Mesh Generation

In order to set up the mesh, you must first move out of DesignModeler and into CFX-Mesh.

  1. At the top of the ANSYS Workbench window, you should be able to see two tabs: StaticMixer [Project] and StaticMixer [DesignModeler]. Click on StaticMixer [Project] to return to the Project Page.

  2. In the left-hand column, near the top, you should now see an entry Generate CFX Mesh. Click on this.

  3. CFX-Mesh will open up. At first glance it looks very similar to DesignModeler.

Overview of CFX-Mesh

CFX-Mesh is designed to have the same look and feel as DesignModeler. In particular, this means that you can use the same mouse controls to manipulate the model.

One important difference between DesignModeler and CFX-Mesh is connected to the order of the items in the Tree View. In DesignModeler the Tree View shows items in the order that they were created, and the order affects the final geometry. In CFX-Mesh the order of the items in the Tree View are not important and all items of the same type are grouped together, independent of when they were created.

You will be able to see that various items are already present in the Tree View in DesignModeler; these are the default items and contain default settings. Some of the symbols next to items in the Tree View have slightly different implications in CFX-Mesh than they did in DesignModeler. In CFX-Mesh, the meanings are as follows:

Symbol

Meaning

Everything is valid.

Everything is valid but the item has been automatically changed and you may wish to double-check the settings. This may occur, for example, if you have performed a geometry update which has resulted in a face no longer existing: if that face appeared in the location list for any mesh feature, then it will have been removed automatically as part of the update and so the mesh feature will be marked with this status symbol.

Everything is valid but the item is “locked” i.e. editing of this feature is restricted in some way. In general, items which are locked cannot be deleted, and most cannot be renamed or have their locations changed. For example, the Default 2D Region is given this symbol as it cannot be deleted or renamed.

This means that there is something invalid about the definition of the item or one of its sub-items (which will also be marked with the same symbol). Often this will be because no required selection has been made.

The item is suppressed (inactive).

The item is suppressed and will be invalid when it is unsuppressed.

These status symbols only apply to Regions.

They apply when the item has been hidden in the Graphics window. When these status symbols are displayed, the item cannot be selected in the Graphics window; however, the item is not suppressed and will still be meshed (although the mesh can be displayed on the item only when the item is visible in the viewer).

In turn, the symbols mean that the item is OK, has been changed automatically, is locked, or is invalid. The symbols are paler versions of the top four symbols in the table and their meanings correspond.

These status symbols only apply to Preview Groups.

If the symbol underneath the yellow flash is a green tick, then the Preview Group is valid but either the mesh has not been generated or the generated mesh is out-of-date i.e. it does not reflect the current mesh settings. To generate an up-to-date mesh for the Preview Group, right-click over its name and choose Generate This Surface Mesh. To generate an up-to-date mesh on all Preview Groups, right-click over Preview in the Tree View and choose to Generate All Surface Meshes.

If the symbol shows the yellow lightning bolt but the symbol underneath it is a yellow tick, then the Preview Group is both out-of-date (see above) and automatically changed. Refer to the table entry for a yellow tick symbol for details of what might cause an automatic change to a Preview Group.

If the symbol shows the yellow lightning bolt but the symbol underneath it is a yellow padlock, then you cannot edit, rename or delete the item. This applies to the Default Preview Group.

If the symbol shows the yellow lightning bolt but the symbol underneath it is a red exclamation mark, then the Preview Group is both out-of-date (see above) and invalid. You must make the Preview Group valid (by making a valid selection for its Location) before you can generate or regenerate it.

The item is “locked” (see the description of the locked symbol above) AND invalid. You must make the item valid before you can mesh again. In the case of a locked Virtual Edge, all you can do is do is delete it; in most other cases you must edit the location list to make it valid.

This indicates that an item contains associated sub-items . Left-click on the symbol to expand the item and display its contents.

Left-click on the symbol to close the item so that its contents are not visible in the tree.

The generation of the surface and volume mesh is controlled by the various features that you can access in CFX-Mesh. The type of controls available depend on the mesher used. By default, you are using the Delaunay Surface Mesher for surface meshing and Advancing Front Volume Mesher for volume meshing.

In this first example, you will only set up the most basic features for controlling the mesh generation. Only the basic length scale of the mesh will be specified.


Back To Top

Setting up the Regions

The first step is to define some regions on the geometry. Composite 2D Regions are created from the solid faces (primitive 2D Regions) of the geometry. They can be used in CFX-Pre to assign boundary conditions, such as inlets and outlets, to the problem. You do not need to create Composite 2D Regions at all in CFX-Mesh, but it is easier to name and group faces into Composite 2D Regions in CFX-Mesh than it is to select the corresponding mesh in CFX-Pre. This example uses an inlet boundary condition at the entrance to each of the two side pipes, an outlet boundary condition on the end of the funnel outlet and a wall boundary condition for the remaining surfaces.

Note

There is an important distinction between primitive 2D Regions and the underlying solid faces, which applies when the model has more than one solid. This is explained in the Mesh Generation section of the Heating Coil tutorial.

If you look at the Tree View, you can see that under Regions, one Composite 2D Region is defined already, called Default 2D Region. This region will always contain all of the faces of the model which you have not explicitly assigned to another Composite 2D Region.

Create the Composite 2D Region for the first inlet:

  1. Right-click over Regions in the Tree View.

  2. Select Insert>Composite 2D Region.

  3. A new object, Composite 2D Region 1, is inserted under Regions in the Tree View. In the Details View, there will be two buttons, Apply and Cancel, next to Location, and this means that you are ready to select the face from the Graphics window.

  4. In the Graphics window, click on the circular face at the end of the side pipe which is at the position with the lowest value of the Y-coordinate. This will turn green to show that it has been selected, as in the picture below. You can rotate the model to make it easier to select the appropriate face by holding down the middle mouse button and moving the mouse over the geometry.

  5. Click on Apply in the Details View.

  6. Change the name of the region to in1: right-click over the name, select Rename and then type over the existing name.

Now create the second inlet:

  1. Right-click over Regions in the Tree View.

  2. Select Insert>Composite 2D Region.

  3. A new object, Composite 2D Region 1, is inserted under Regions in the Tree View. In the Graphics window, click on the circular face at the end of the side pipe which is at the position with the highest value of the Y-coordinate.

  4. Click on Apply in the Details View.

  5. Change the name of the region to in2 by right-clicking over the existing name.

Finally, create the region for the outlet:

  1. Right-click over Regions in the Tree View and select Insert>Composite 2D Region.

  2. Select the circular face at the bottom of the mixer vessel, with the lowest value of the Z-coordinate.

  3. Click on Apply in the Details View.

  4. Change the region name to out.

It is not necessary to create a fourth Composite 2D Region for the walls of the static mixer. This is because any remaining faces which are not explicitly assigned to a Composite 2D Region are automatically assigned to the 2D Region named Default 2D Region. You can use this region in CFX-Pre to define the location of your wall boundary condition.


Back To Top

Setting up the Mesh

You will only set a single size for all of the elements, in this tutorial. The next tutorial will then improve upon this coarse mesh.

  1. Click on Default Body Spacing in the Tree View, which is contained in Mesh>Spacing.

  2. In the Details View, change Maximum Spacing to 0.3 m. This is a coarse length scale for this model, but is reasonable for a first run to generate an approximate solution and to test that the model is working correctly.

  3. Press Enter on the keyboard to set this value.

The remaining settings will be left as their default.


Back To Top

Generating the Surface Mesh

You will now have a look at the surface mesh to see the effect of the chosen length scale.

  1. Click on the plus sign next to Preview in the Tree View to open it up.

  2. Right-click over Default Preview Group and select Generate This Surface Mesh. The Default Preview Group always contains all faces in the geometry, so the mesh will be generated everywhere.

During the generation of the surface mesh, the progress will be displayed using the status bar which appears to the bottom right of the CFX-Mesh window.

  1. You can modify the way that the mesh is displayed by clicking on Preview in the Tree View and changing the options shown in the Details View. For example, by changing the Display Mode you can switch to display the mesh in Wire Mesh rather than with solid faces. Simply click on the name Default Preview Group to redisplay the surface mesh using the new settings.

It is not necessary to create the surface mesh within CFX-Mesh, since if it has not been created explicitly it will be automatically generated when you create the volume mesh. However, in many of these tutorials, you will create the surface mesh first, to demonstrate the effect of various mesh settings. It is generally a good idea to check the surface mesh before creating the volume mesh, to ensure that any settings you have made have the desired effect.


Back To Top

Generating the Volume Mesh

The volume mesh and all of the region information required for CFX-Pre is stored in a CFX-Pre Mesh file *.gtm. The CFX-Pre Mesh File is read into CFX-Pre at the start of the simulation definition.

Generate the volume mesh as follows.

  1. Right-click on Mesh in the Tree View and select Generate Volume Mesh.

  2. Choose to save the CFX-Pre Mesh File as StaticMixerMesh.gtm.

During the generation of the volume mesh, the progress will be displayed using the status bar which appears to the bottom right of the CFX-Mesh window. When the volume mesh is complete, the status bar will disappear and you will be able to take control of the user interface again.

The mesh is now complete.

  1. Select File>Save to save the CFX-Mesh database as StaticMixer.cmdb in the same directory as the other project files.

  2. At the top of the ANSYS Workbench window, you should be able to see three tabs: StaticMixer [Project], StaticMixer [DesignModeler] and StaticMixer [CFX-Mesh]. Click on StaticMixer [Project] to return to the Project Page.

  3. Select File>Save to save the project.

If you want to continue by working through the ANSYS CFX example “Tutorial 1: Flow in a Static Mixer” using the newly-generated mesh, and have ANSYS CFX 10.0 in ANSYS Workbench installed on your machine, then follow these steps:

  1. On the Project Page, a new entry will have appeared when you generated the file: Advanced CFD. Under this entry, double-click on StaticMixerMesh.gtm to open up CFX-Pre.

  2. Once CFX-Pre has opened, choose File>Save Simulation As... to save the simulation as StaticMixer.

  3. Select Tools>Quick Setup Mode... to enter the Quick Setup Mode that this tutorial uses.

  4. Work through the ANSYS CFX 10.0 tutorial, missing out the instructions in the section “Creating a New Simulation”. Note that you do not need to copy the sample file StaticMixerMesh.gtm to your working directory if you have just created the mesh in CFX-Mesh, since you will want to use your new mesh and not the one supplied with ANSYS CFX. For the “Importing a Mesh” section, the only action that you need to carry out is to select Assembly from the Select Mesh drop-down list, as the mesh is loaded automatically when you start ANSYS CFX in the manner described above.

If you do not have ANSYS CFX 10.0 in ANSYS Workbench installed or do not want to work through the ANSYS CFX example, then:

  1. Exit from ANSYS Workbench by selecting File>Exit.