Meshing 1

20
STAR-CCM+ User Guide 3586 Version 4.04.011 Meshing Tutorials Three tutorial examples are provided here to demonstrate how to build CFD meshes using the meshing tools in STAR-CCM+. All cases represent realistic industrial applications that originate from different CAD data formats and demonstrate the necessary steps to prepare the surfaces ready for volume meshing. The first tutorial (control valve) illustrates the mesh generation tools in STAR-CCM+ for dealing with a geometry with the following characteristics: Three-dimensional, single region (half model). STL starting surface (closed and manifold). Mixture of inlet, outlet and symmetry type boundaries. The starting data originated from the STAR-Design software and represents a generic control valve design, commonly used for water management. Two variations of the geometry will be considered, namely the valve in an almost closed position and the valve in an open position. The same polyhedral meshing parameters will be used for both situations. The parameters used to build a trimmed cell mesh are also demonstrated. The second tutorial (heat exchanger unit) shows how STAR-CCM+ deals with geometries with the following characteristics: Three-dimensional, multi-region (half model). Parasolid Transmit starting geometry (single file containing assembly). Mixture of inlet, outlet, symmetry and interface type boundaries. The geometry was again built using the STAR-Design software and represents a generic heat exchanger unit. A polyhedral mesh containing a conformal mesh interface between the fluid and solid regions will be built. Prism layers will only be included in the fluid part. The third tutorial (manifold assembly) details how to use the surface wrapper tool to extract an internal closed surface from an assembly containing the following issues:

Transcript of Meshing 1

Page 1: Meshing 1

STAR-CCM+ User Guide 3586

Version 4.04.011

Meshing Tutorials

Three tutorial examples are provided here to demonstrate how to buildCFD meshes using the meshing tools in STAR-CCM+. All cases representrealistic industrial applications that originate from different CAD dataformats and demonstrate the necessary steps to prepare the surfaces readyfor volume meshing.

The first tutorial (control valve) illustrates the mesh generation tools inSTAR-CCM+ for dealing with a geometry with the followingcharacteristics:

• Three-dimensional, single region (half model).

• STL starting surface (closed and manifold).

• Mixture of inlet, outlet and symmetry type boundaries.

The starting data originated from the STAR-Design software and representsa generic control valve design, commonly used for water management. Twovariations of the geometry will be considered, namely the valve in an almostclosed position and the valve in an open position. The same polyhedralmeshing parameters will be used for both situations. The parameters usedto build a trimmed cell mesh are also demonstrated.

The second tutorial (heat exchanger unit) shows how STAR-CCM+ dealswith geometries with the following characteristics:

• Three-dimensional, multi-region (half model).

• Parasolid Transmit starting geometry (single file containing assembly).

• Mixture of inlet, outlet, symmetry and interface type boundaries.

The geometry was again built using the STAR-Design software andrepresents a generic heat exchanger unit. A polyhedral mesh containing aconformal mesh interface between the fluid and solid regions will be built.Prism layers will only be included in the fluid part.

The third tutorial (manifold assembly) details how to use the surfacewrapper tool to extract an internal closed surface from an assemblycontaining the following issues:

Page 2: Meshing 1

STAR-CCM+ User Guide 3588

Version 4.04.011

Control Valve Meshing Tutorial

This tutorial demonstrates how to use the surface and volume meshingtools within STAR-CCM+ to build a single region polyhedral volume meshwith prism layers, starting from an STL type geometry exported from aCAD package. The inputs required to build a trimmed cell mesh with prismlayers are also covered. The geometry is that of a control valve typicallyused for water flow management and is “CFD ready”. That is, theappropriate fluid side passage has been extracted and suitably preparedready for CFD use.

The geometry used in the tutorial is shown below.

The control valve is shown in an almost closed position, with flow enteringat the near end and exiting at the far end. Only a half model will beconstructed due to the symmetrical nature of the geometry. All theappropriate boundaries, along with feature curves, will be defined as partof the meshing process.

A modified geometry, with the valve in an open position, will also beimported and the same meshing values used in the original mesh will beapplied in order to remesh the new geometry at the push of a button.

The remainder of this tutorial is split into the following sections:

• Objectives;

Page 3: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3591

Version 4.04.011

STL geometry.

The output window will show a summary of the progress made. A total of5570 faces and 2787 vertices will be imported. An Import representation nodewill also be added to the Representations node. Click on the Representations> Import node to see the properties of the surface.

Visualizing the Surface Mesh

The geometry will automatically be shown in the graphical display windowonce the import process is complete.

• Select the Scenes > Geometry Scene 1 > Displayers > Geometry 1 node.

Page 4: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3593

Version 4.04.011

Use the mouse buttons to rotate the model to approximately as shownbelow:

As is typical of STL data, the triangle definition is relatively poor andcoarsely faceted. The surface is closed and manifold however, and as such,can be used as a the basis of a surface remeshing operation in order toimprove the triangle quality. Before this can be done, the boundaries andfeature curves should be defined.

Splitting the Boundaries

Next we will prepare the boundaries so that they conform to what isrequired for the meshing tools. STL surfaces always only contain one patchdefinition meaning that only one boundary will be created on import foreach file. This boundary needs to be split in order for different mesh (andeventually physics) properties can be applied to different parts of themodel.

• Select the Regions > Region 1> Boundaries > control_valve boundary node.

Page 5: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3598

Version 4.04.011

The result of the second combine operation is shown here:

There will be five boundaries remaining at this point. Note that if youselected a different boundary other than control_valve 7 to right-click on,then the resultant boundary list will look slightly different. We can nowproceed to renaming the boundaries.

Renaming the Boundaries

Renaming the boundaries makes the mesh setup process easier byidentifying the main surfaces that we will apply properties to. Thefollowing names and types will be used:

To rename a boundary and set the type, do the following:

• Select the control_valve node in the simulation tree, right-click and select

Boundary Name New Name Boundary Type

control_valve Symmetry Plane Symmetry Plane

control_valve 2 Wall Wall

control_valve 3 Inlet Velocity Inlet

control_valve 7 Valve Wall Wall

control_valve 12 Outlet Pressure Outlet

Page 6: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3602

Version 4.04.011

Extracting Feature Curves

Feature curves must be added to the import geometry in order to maintainsharp edges and any surface feature details in the surface remesher andvolume meshes. Since STL surfaces do not contain feature edges in them, wewill create new edges based on an angle criteria.

• Right-click on the Regions > Region 1 > Feature Curves node and selectNew Feature Curve > Mark Edges... from the pop-up menu.

The Mark Feature Edge Options dialog will appear. Do the following:

• Use the selection arrows to move all the boundaries for Region 1 over tothe Selected box.

• Set the Sharp edge angle value to 20 degrees.

• Unselect the Mark free edges, Mark non-manifold edges, Mark patchperimeters and Mark boundary perimeters options. These options could beleft on as they will not affect on the resulting feature curve creation forthis case.

Page 7: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3605

Version 4.04.011

The surface preparation related to the imported geometry is now complete.We can now proceed to setting up the meshing models that will be used.

Selecting the Meshing Models

We will use the surface remesher and the polyhedral volume mesher for thisexample, along with the prism mesher so that we can generate prism layersnext to the walls in the surface.

• Right-click on the Continua > Mesh 1 > Models node and select SelectMeshing Models... in the pop-up menu.

The Meshing Model Selection dialog will appear. In the panel, do thefollowing:

• Select the Surface Remesher model from the Surface Mesh box.

• Select the Polyhedral Mesher from the Volume Mesh box.

• Select the Prism Layer Mesher from the Optional Meshing models box.

The completed panel with selections is shown below:

• Press the Close button to close the panel.

Page 8: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3607

Version 4.04.011

Setting the Global Mesh Reference Values

To view the global reference values required for the selected meshingmodels, open the Reference Values node. The following mesh inputs will belisted:

The following parameters will be used for this meshing tutorial:

Reference Node Name Property Name Value

Base Size Value 0.06 m

Number of Prism Layers Number of Prism Layers 2 (default)

Prism Layer Stretching Prism Layer Stretching 1.5 (default)

Prism Layer Thickness > Rela-tive Size

Percentage of Base 4.0

Surface Curvature # Pts/circle 36 (default)

Surface Growth Rate Surface Growth Rate 1.3 (default)

Surface Proximity # Points in a gap 2.0 (default)

Surface Proximity Search Floor 0.0 (default)

Page 9: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3609

Version 4.04.011

• In the Properties window, set Value to 0.06 m.

• Repeat this for the other nodes in the list using the values supplied inthe table.

Setting the Boundary Mesh Values

If no boundary or region wise values are set then the meshing modelsdefault to the global reference values. For this case, we will set customvalues for the surface remesher triangulation (to increase the density) andprism layer thickness for the valve wall boundary. This is because:

• This is the area of flow interest and requires additional cells to becreated;

• The gap between the valve and the outside wall is thinner than the restof the geometry, so we will use a thinner prism layer in this area.

Page 10: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3615

Version 4.04.011

• Set the Percentage of Base size to 2.0.

This completes the boundary mesh setup.

Running the Surface Remesher

Since the surface remesher and volume mesher models have been selectedin tandem then we could proceed and generate both meshes in one go.However, for training purposes, we will first generate the surface remeshermesh and view it before proceeding with the volume meshing. To do this,either:

• Press the (Generate Surface Mesh) button in the Mesh Generationtoolbar; or

• Select Mesh > Generate Surface Mesh from the pull-down menu on themain display.

Page 11: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3618

Version 4.04.011

As can be seen, a higher surface triangulation is present in the valve wallarea. This will translate into a higher volume mesh density.

Surface curvature based refinement is also visible on the curved parts of thegeometry. The properties of the remeshed surface can be seen by clicking onthe appropriate node in the Representations node.

Running the Polyhedral Volume Mesher

The polyhedral and prism layer meshers can now be run:

• Press the (Generate Volume Mesh) button in the Mesh Generationtoolbar; or

• Select Mesh > Generate Volume Mesh from the pull-down menu on themain display.

As before, the output from the meshers will be shown in the Output windowand status updated in the status bar. When the process is complete, themessage Converting mesh into finite volume representation inRegion Region 1 will be shown in the Output window. A summary of themesh quality criteria (namely, the cell quality, face validity, skewness angleand volume ratio) for the core and prism meshes can be viewed by scrollingthe Output window display up.

Page 12: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3621

Version 4.04.011

The properties of the volume mesh can be seen by selecting theRepresentations > Volume Mesh > Finite Volume Regions > Region 1 node.

Note that the above totals for cells, interior faces and vertices may differslightly depending the machine type and architecture. This completes thevolume meshing part of the exercise. You may now proceed to export themesh, run an analysis of the mesh or jump to the part of the tutorial thatexplains how to replace the imported surface mesh with a modified versionand produce a new mesh with one button press. You can also proceed tore-mesh the geometry using trimmed cells with prism layers. Be sure to savethe simulation file first if you want to keep the results of this meshingsession - a suggested simulation name is control_valve1.sim.

Running an Analysis

Running an analysis for this tutorial is optional but by doing so, it willdemonstrate the ability for STAR-CCM+ to automatically map a solutionfrom the current mesh to a new mesh built using either a modified geometryor different meshing parameters (such as a different mesh density or even adifferent type of mesh such as a trimmed cell one).

Page 13: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3623

Version 4.04.011

Replacing the Surface Mesh

Copy the control_valve_mod.dbs file from the/doc/tutorials/controlValve directory to your working directory. Then dothe following:

• Right-click on the Representations > Import node and selectReplace Surface... from the pop-up menu.

• In the Open dialog that appears, select the control_valve_mod.dbs file

Page 14: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3625

Version 4.04.011

Apply Representation > Import from the pop-up menu.

As the patch definitions in the new surface were identical to the originalimport then the boundaries were carried over from one model to the other.Feature curves were also contained in the new surface so these do not needto be re-created. If they didn’t exist then they could be created using thesame process as described earlier in this tutorial. The surface is ready to beremeshed.

Re-running the Mesh Generation

The surface remesher, polyhedral volume mesher and prism mesher can beexecuted in one go as follows:

• Press the (Generate Volume Mesh) button in the Mesh Generationtoolbar; or

• Select Mesh > Generate Volume Mesh from the pull-down menu on themain display.

To view the new volume mesh representation when the process is done, dothe following:

• Right-click on the Scenes > Geometry Scene 1 node and selectApply Representation > Volume Mesh from the pop-up menu.

Page 15: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3627

Version 4.04.011

Selecting the Trimmer Meshing Model

The first thing we will do is change the previously selected meshing modelsto use the trimmer and prism mesher models instead.

• Right-click on Continua > Mesh 1 > Models node and select Select MeshingModels... in the pop-up menu.

The Meshing Model Selection dialog will appear. In the Enabled Meshingmodels box in the panel, do the following:

• Unselect the Prism Layer Mesher model

• Unselect the Polyhedral Mesher model

• Unselect the Surface Remesher model

• Select the Trimmer model from the Volume Mesh box

• Select the Prism Layer Mesher from the Optional Meshing models box

The completed panel with selections is shown below:

The surface remesher model was unselected since a good starting surface isnow available from the previous session.

• Press the Close button to close the panel.

Page 16: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3630

Version 4.04.011

The Maximum Cell Size node controls the maximum size of the cells that willbe allowed away from the surface, that is, in the core. In this instance it hasbeen left at the default value (10000% of the Base Size) meaning that the sizeis relatively unconstrained and can grow many times more than the surfacesize if required. If smaller cells were required in the core then this valueshould be reduced.

The Template Growth Rate option controls the extent to which the cells arerefined. The Default Growth Rate, set to Fast by default, controls the transitionrate in the interior volume mesh (away from the surface). Setting it to fastmeans it will transition as quick as possible from one layer to the next, usinga minimum of one cell for each transition layer. The Surface Growth Rate, setto None by default, controls the number of layers of cells at the surface.Setting it to none means that the default growth rate value will determinethe number of cells to grow at the surface. If you wanted additional refinedcells then you could choose one of the other options such as medium orslow, which would introduce at least 2 or 4 refined levels of cellsrespectively.

Setting the Boundary Mesh Values

Custom surface size values will be used for both the valve wall and thesymmetry plane in order to control the density of the trimmed cell mesh. Inthe case of the valve wall, the surface size settings are used to increase themesh density in the vicinity of the valve area above and beyond anyrefinements due to proximity effects. For the symmetry plane, there is norequirement to maintain the global surface mesh density, so we will allowthe mesh size to increase up to a maximum size equal to the base size. Wecould also repeat this for the inlet and outlet boundaries if desired althoughthis will not be demonstrated here.

The same valve wall inputs as before will be used so we can proceed directlyto the symmetry plane mesh conditions.

• Open the Regions > Region 1 > Symmetry Plane > Mesh Conditions node toview the available options.

• Select the Custom Surface Size node.

Surface Size>Relative TargetSize

Percentage of Base 8.0

Template Growth Rate Default Growth Rate Fast (default)

Template Growth Rate Surface Growth Rate None(default)

Reference Node Name Property Name Value

Page 17: Meshing 1

STAR-CCM+ User Guide Control Valve Meshing Tutorial 3632

Version 4.04.011

• Set the Percentage of Base value to be 100.0.

The Relative Target Size is already set to be 100% of the base size and doesnot need to be changed. The symmetry plane is now no longer constrainedin the same way as the other surfaces in the geometry and larger cell sizeswill be seen on this plane. We can now proceed to perform the meshing.

Running the Trimmed Cell Mesher

The trimmer and prism layer meshers can now be run:

• Press the (Generate Volume Mesh) button in the Mesh Generationtoolbar; or

• Select Mesh > Generate Volume Mesh from the pull-down menu on themain display.

Page 18: Meshing 1

STAR-CCM+ User Guide 3635

Version 4.04.011

Heat Exchanger Unit Meshing Tutorial

This tutorial demonstrates how to use the surface and volume meshingtools within STAR-CCM+ to build a multi-region polyhedral volume meshwith prism layers, starting from an Parasolid Transmit geometry exportedfrom a CAD package. A conformal mesh between each region is alsoenforced via the use of an in-place interface during the meshing procedure.

The geometry is that of a heat exchanger unit and is “CFD ready”. That is,the appropriate fluid and solid side parts have been extracted and suitablyprepared ready for CFD use.

The geometry used in the tutorial is shown below.

The heat exchanger geometry was originally built using the STAR-DesignCAD program by CD-adapco. A separate body was used to represent eachpart of the geometry but both bodies were saved to a single ParasolidTransmit file.

The heat exchanger unit contains multiple fluid flow passages connected bytwo end plenums, one of which is split to force the flow around the system.The flow domain is contained with a solid material cylinder, which ishollow on the inside. Only a half model will be considered due to the

Page 19: Meshing 1

STAR-CCM+ User Guide Heat Exchanger Unit Meshing Tutorial 3642

Version 4.04.011

Defining the Region Names and Types

The regions created during the import process can be reviewed by openingthe Regions node in the simulation tree:

As can be seen, two regions were created during the import process, namelyBody 1 and Body 2. If you select each in turn then the associated part will behighlighted in the display. To better identify the regions, we will renamethem as fluid and solid, plus assign the appropriate region types.

• Select the Regions>Body 1 node.

Page 20: Meshing 1

STAR-CCM+ User Guide Heat Exchanger Unit Meshing Tutorial 3644

Version 4.04.011

option in the pull-down menu for Type in the Properties window.

There is no requirement to set the region Type to anything other than FluidRegion as it has no effect on the meshing operations. However, setting thetype is a good reminder of what type of region each part of the domain isand what type of prism layer mesh should be allocated to this region. Theregion icon will also change to reflect the new type.

We can now proceed and define the boundary surfaces for each region.

Defining the Boundaries

The CAD import resulted in one boundary per region. CAD informationthat will distinguish one boundary surface from another is stored as patcheswithin STAR-CCM+. One of the easiest ways of splitting a boundary surfaceinto constituent boundaries is using this patch information. The reason forsplitting is that we need to identify the flow boundaries, plus the interfaceboundary that will be used to indicate which surface planes are common toboth regions and will require a conformal mesh condition.