Source Creation Tutorial – Test Portal

Source Creation Tutorial

This tutorial describes the procedures used to locally control the clustering within a geometry using sources.

CENTAUR has two basic types of sources: CAD sources and Geometric Sources. CAD sources are sources attached to parts of the CAD including Curves, Panels and Groups. Geometric sources are sources that are described by various geometric shapes including Cylinders, Boxes, etc. This tutorial describes the generation of both types of sources.

Sources will be created at each of the three stages of mesh generation: surface, prism/hex and tetrahedra. Using this method allows for the grid to be optimized for the specific needs of an application in a straightforward manner.

Recommended / Prerequisites: Basic Tutorial.
Tube mesh with additional clustering due to sources.
This tutorial demonstrates how to do the following:
  • Create Surface Sources (CAD and Geometric)
  • Create a Prismatic Source
  • Create a Tetrahedral Source

The geometry used for this tutorial is a periodic annular tube geometry that has a smaller cylindrical inlet tube connected to the main passageway. The restart file contains both the geometry and the setup from the Basic Mesh tutorial.

The tutorial file can be found in the “CENTAUR_Tutorials” folder located in CENTAUR’s installation directory, or you can download it using the following link:

Step 1: Load the Geometry

The first step is to start the CENTAUR Graphical Interface and load in the tubes.rst file via the File>Open… option.

When loading the .rst file, there will be a prompt asking which modules should be loaded. Make sure to select All modules or All modules except User Preferences.

Restart File Module Selection Window.

This will open the main window with the tubes geometry already loaded including the setup from the Basic Mesh tutorial:

Step 2: Create Surface Sources

The surface clustering can be locally modified using surface sources. The following sources will be created: a CAD source that will increase the clustering on panels 8 & 9, a second CAD source that will increase clustering on panel 3, and a cylindrical source that will increase clustering on the upper surface. These sources are created as follows:

Source 1 (CAD Source):

The first source will be a CAD source for the two panels (8 & 9) in the tube inlet region that will locally increase the clustering by changing the Curvature Clustering. To add this source, first select panels 8 and 9. Then use the Sources>Create Source>Create CAD Source… option or the Create Source toolbar button  to create a new CAD source. In the Create CAD source dialog box, switch to the Panels Tab to add these panels to the source using the Add Selected button. (Add By Number could also be used to add a panel to the source by simply typing its number. Also, the Pick button can be used to allow for clicking on a single panel and directly adding it to the CAD source.) Next, switch to the Surface Tab to locally modify the Curvature Clustering Factor using a value of 30 (sets 30 points across a full circle with the same radius as the local curvature). If desired, the source can also be renamed to make it easier to find and modify this source in the future, e.g. Tube Source. All these changes can be seen in the dialog box below:
Naming the CAD source. 

 

Selecting the panels to be included in the source.

 

Modifying the Curvature Clustering for the surface mesh.

Source 2 (CAD Source):

The second source will be a CAD source for the hub panel (Panel 3) that will increase the clustering by decreasing its length scale using an absolute size. Just as for the first surface source, use the Sources>Create Source>CAD Source… option to create a new source group named Hub. Add Panel 3 to this source and set the surface size to 20 (this size was chosen so that there will be 10 elements across this panel which is 200 units wide). This source is shown in the dialog box below:

Naming the 2nd CAD source and setting the surface size parameter.

Panel selection for the CAD source.

Source 3 (Geometric Source):

The third source will be a cylindrical source connecting a point on the inlet surface to a point at the intersection of the tube inlet and the main flow pathway. To create this source, the locations of the ends of the source must first be determined. The easiest way to do this is to switch the View mode to Curve and select curves 11 and 14:
Curve selection for Geometric Source creation.

The location of these curves including the midpoints that will be used to create the source can be stored by adding the sources to the Point List using the L hotkey twice (once for each curve) or use the Tools>Point List>Add Points of Highlighted Entities option.Next use the Source>Create Source>Geometric Source>Cylinder… option to create a cylindrical source. In this source dialog box, give it a name, Upstream, activate it for the surface and give it a value of 5. Then switch to the Geometry tab, set the Radius to 50, and set the location of the source using the Choose Point buttons to select the midpoints of curves 11 and 14. The source dialog box and Choose Point dialog box can be seen here:

Naming and modifying the surface parameters for the Geometric source.

 

Setting up the Cylinder geometry.

Point list window.

The sources are shown here with the geometric source shown by a pink cylinder and the CAD sources shown with asterisks next to the panel numbers (note that the View Mode has been switched back to Panel):

Geometry setup with added sources.

Note that when Point Selection window is open, it is also possible to interactively select points in the graphics window using the mouse. Simply click on the desired point location after the point selection window has been opened using the Choose Point button for each point in the Geometry tab. If a red dot appears under the mouse cursor, that means that the location of the panel/curve label or curve endpoint will be used precisely for the point location.

Step 3: Generate a Surface Mesh

Mesh generation for the final mesh cases proceeds as above using the Mesh Generator>Generate New Mesh… option and selecting Stop after Surface for the Stage and use tubes_src for the casename.

Automatically loading the resulting mesh file, tubes_src.fvs, into the program shows the effect of all 3 sources:

Generated surface mesh.

Step 4: Create a Prismatic Source

Next, a prismatic source will be applied to the hub region that allows the prismatic thickness to vary from the Inlet to the Outlet panel. To create a source with a variable size, a geometric source must be created. Make sure to switch from the Visualizer sidebar to the Setup sidebar display before setting up the new sources.

This source will go from the middle of curve 10 to the middle of curve 9, so these curves must be added to the Point List as in Step 2 above: select curves 10 and 9 and then use the L hotkey twice.

After the points are added to the list, create a cylindrical source named Hub 2 (Sizes Tab) using those two points and set a radius to 110 (Geometry Tab):

Creating a prismatic cylindrical source.

 

Setting up the cylinder geometry.

Since the size will vary from one end to the other, double check the locations of the two endpoints to prevent the size from varying in the wrong direction.Then use the Advanced Prism / Hex Tab to allow for the size to vary from one end of the source to other. Turn on Varying First Layer Thickness and switch the mode to Radial/Axial-Linear and specify the following sizes:

Pt#1 (Rmin): 0.23265
Pt#1 (Rmax): 0.23265
Pt#2 (Rmin): 1.3959
Pt#2 (Rmax): 1.3959
(These values correspond to the minimum and maximum thickness values from the default prismatic input file for this case, and can be found in the Prism/Hex Tab of the Input Parameters Window.):
Varying sizes tab.

This will lead to the following configuration:

Note that when Point Selection window is open, it is also possible to interactively select points in the graphics window using the mouse. Simply click on the desired point location after pressing the point selection window has been opened using the Choose Point button for each point in the Geometry tab. If a red dot appears under the mouse cursor, that means that the location of the panel/curve label or curve endpoint will be used precisely for the point location.

Step 5: Generate a Prismatic Mesh

Mesh generation for the final mesh cases proceeds as above using the Mesh Generator>Generate New Mesh option and selecting Stop after Prism/Hex for the Stage.
Automatically loading the resulting mesh file, tubes_src.fvp, with a cut at X=0 shows the effect of this prismatic source (All groups have been moved to the Not Shown column and the BL/Tet Interface mesh display has been turned off):
Generated Prismatic mesh.
Note that the prisms on the left side of the outer surface are also reduced in thickness due to aspect ratio issues.

Step 6: Create a Tetrahedral Source

Finally, a tetrahedral source will be added down the centerline of the tube inlet all the way to the center of the hub surface. A Relative type source that reduces the sizes of the tetrahedra in the region to 60% of their original size will be used. In general, the Relative type sources set the ratio between the local element size and the element size due to other factors (i.e. CAD Clustering, Curvature Clustering, Proximity Clustering). It is suggested to use them for fine-tuning of a generated/reference mesh.

As in Steps 2 and 4 above, the point list will be used to store the ends of the geometric source. This time panels 7 and 3 should be selected and added to the list with the L hotkey. Adding a panel to the point list will add the location where the label is drawn on the screen which is the middle of the panel’s underlying surface.

Then, an Advanced Cylinder source should be created with the name Tet Source, Radius 1=50, Radius 2=150, activated for Tetrahedra with a value of 0.6 and the type set to Relative.

Creating a tetrahedral source.
Setting up the Advanced Cylinder geometry.
With this source added to the geometry, the geometry now looks like this:
Geometry setup with all created sources.

Note that when Point Selection window is open, it is also possible to interactively select points in the graphics window using the mouse. Simply click on the desired point location after pressing the point selection window has been opened using the Choose Point button for each point in the Geometry tab. If a red dot appears under the mouse cursor, that means that the location of the panel/curve label or curve endpoint will be used precisely for the point location.

If the sources need to be changed, the Source Management window can be used. This window is opened using either the Source>Manage Sources… option or the  toolbar button. This window allows for sources to be modified, created or highlighted allowing for easy control over cases with multiple sources. Through this window, the user can also select to “Show sizes” in order to inspect the requested source sizes before the mesh generation. The sizes of the source elements are then shown as wireframe tetrahedra.

Source sizes shown as wireframe tetrahedra.

Step 7: Generate a Hybrid Mesh

Mesh generation for the final mesh cases proceeds as above using the Mesh Generator>Generate New Mesh… option and selecting Entire mesh for the Stage.
Automatically loading the resulting mesh file, tubes_src.hyb, with a cut at X=0 shows the effect of this tetrahedral source and all the other sources (All groups have been moved into the Not Shown column):
Generated Hybrid Grid with Sources.
This is quite a bit different from the original grid with no sources at all:
Generated Hybrid Grid with no Sources.

More Information

Choosing a good size for a source is very case dependent. In CENTAUR, there are various tools that can be used to help determine the size of parts of the geometry, the length scales of the local CAD geometry, and the lengths of edges in an existing mesh. These techniques include the following:
1. Querying the properties of a Curve or Panel
a. Select a Curve or Panel
b. Use the Q hotkey to open a window showing properties of that highlighted selected entity including the length of a curve and the shortest/longest lengths of the curves associated with a panel.
Right clicking on a selected curve or panel will also bring up a context menu with the option: Properties… This option will also open the same window the the properties of the highlighted selected curve.
2. The Measurement Tool (Tools>Measurement Tool… or the toolbar button) can be used to find the distance between two points in the CAD model or between points in a loaded mesh.
3. The current input parameters are also a great source of sizes for the sources. For example, the current settings for the first layer thickness, stretching, and number of layers in the Prism/Hex tab of the Input Parameters window can help to set sizes for a source. Similarly, the maximum surface size can be a useful reference point.
Once the lengths are distances are known, the size and radius of each source can be set according to the needs of the current mesh.
For more information and more examples of sources, please see the Sources feature page.