You are on page 1of 20

STAR-CCM+ User Guide 3586

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:

Version 4.04.011
STAR-CCM+ User Guide 3588

Control Valve Meshing Tutorial


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

The geometry used in the tutorial is shown below.

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

A modified geometry, with the valve in an open position, will also be


imported and the same meshing values used in the original mesh will be
applied 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;

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3591

STL geometry.

The output window will show a summary of the progress made. A total of
5570 faces and 2787 vertices will be imported. An Import representation node
will 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 window


once the import process is complete.
• Select the Scenes > Geometry Scene 1 > Displayers > Geometry 1 node.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3593

Use the mouse buttons to rotate the model to approximately as shown


below:

As is typical of STL data, the triangle definition is relatively poor and


coarsely 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 to
improve the triangle quality. Before this can be done, the boundaries and
feature curves should be defined.

Splitting the Boundaries

Next we will prepare the boundaries so that they conform to what is


required for the meshing tools. STL surfaces always only contain one patch
definition meaning that only one boundary will be created on import for
each file. This boundary needs to be split in order for different mesh (and
eventually physics) properties can be applied to different parts of the
model.
• Select the Regions > Region 1> Boundaries > control_valve boundary node.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3598

The result of the second combine operation is shown here:

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

Renaming the Boundaries

Renaming the boundaries makes the mesh setup process easier by


identifying the main surfaces that we will apply properties to. The
following names and types will be used:

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

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


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

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3602

Extracting Feature Curves

Feature curves must be added to the import geometry in order to maintain


sharp edges and any surface feature details in the surface remesher and
volume meshes. Since STL surfaces do not contain feature edges in them, we
will create new edges based on an angle criteria.
• Right-click on the Regions > Region 1 > Feature Curves node and select
New 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 to
the Selected box.
• Set the Sharp edge angle value to 20 degrees.
• Unselect the Mark free edges, Mark non-manifold edges, Mark patch
perimeters and Mark boundary perimeters options. These options could be
left on as they will not affect on the resulting feature curve creation for
this case.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3605

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 this
example, along with the prism mesher so that we can generate prism layers
next to the walls in the surface.
• Right-click on the Continua > Mesh 1 > Models node and select Select
Meshing Models... in the pop-up menu.

The Meshing Model Selection dialog will appear. In the panel, do the
following:
• 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.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3607

Setting the Global Mesh Reference Values

To view the global reference values required for the selected meshing
models, open the Reference Values node. The following mesh inputs will be
listed:

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- Percentage of Base 4.0
tive Size
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)

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3609

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

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

Setting the Boundary Mesh Values

If no boundary or region wise values are set then the meshing models
default to the global reference values. For this case, we will set custom
values for the surface remesher triangulation (to increase the density) and
prism layer thickness for the valve wall boundary. This is because:
• This is the area of flow interest and requires additional cells to be
created;
• The gap between the valve and the outside wall is thinner than the rest
of the geometry, so we will use a thinner prism layer in this area.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3615

• 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 selected
in tandem then we could proceed and generate both meshes in one go.
However, for training purposes, we will first generate the surface remesher
mesh and view it before proceeding with the volume meshing. To do this,
either:
• Press the (Generate Surface Mesh) button in the Mesh Generation
toolbar; or
• Select Mesh > Generate Surface Mesh from the pull-down menu on the
main display.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3618

As can be seen, a higher surface triangulation is present in the valve wall


area. This will translate into a higher volume mesh density.

Surface curvature based refinement is also visible on the curved parts of the
geometry. The properties of the remeshed surface can be seen by clicking on
the 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 Generation
toolbar; or
• Select Mesh > Generate Volume Mesh from the pull-down menu on the
main display.

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

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3621

The properties of the volume mesh can be seen by selecting the


Representations > Volume Mesh > Finite Volume Regions > Region 1 node.

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

Running an Analysis

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

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3623

Replacing the Surface Mesh

Copy the control_valve_mod.dbs file from the


/doc/tutorials/controlValve directory to your working directory. Then do
the following:
• Right-click on the Representations > Import node and select
Replace Surface... from the pop-up menu.

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

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3625

Apply Representation > Import from the pop-up menu.

As the patch definitions in the new surface were identical to the original
import 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 need
to be re-created. If they didn’t exist then they could be created using the
same process as described earlier in this tutorial. The surface is ready to be
remeshed.

Re-running the Mesh Generation

The surface remesher, polyhedral volume mesher and prism mesher can be
executed in one go as follows:
• Press the (Generate Volume Mesh) button in the Mesh Generation
toolbar; or
• Select Mesh > Generate Volume Mesh from the pull-down menu on the
main display.

To view the new volume mesh representation when the process is done, do
the following:
• Right-click on the Scenes > Geometry Scene 1 node and select
Apply Representation > Volume Mesh from the pop-up menu.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3627

Selecting the Trimmer Meshing Model

The first thing we will do is change the previously selected meshing models
to use the trimmer and prism mesher models instead.
• Right-click on Continua > Mesh 1 > Models node and select Select Meshing
Models... in the pop-up menu.

The Meshing Model Selection dialog will appear. In the Enabled Meshing
models 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 is
now available from the previous session.
• Press the Close button to close the panel.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3630

Reference Node Name Property Name Value


Surface Size>Relative Target Percentage of Base 8.0
Size
Template Growth Rate Default Growth Rate Fast (default)
Template Growth Rate Surface Growth Rate None
(default)

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

The Template Growth Rate option controls the extent to which the cells are
refined. The Default Growth Rate, set to Fast by default, controls the transition
rate in the interior volume mesh (away from the surface). Setting it to fast
means it will transition as quick as possible from one layer to the next, using
a minimum of one cell for each transition layer. The Surface Growth Rate, set
to 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 determine
the number of cells to grow at the surface. If you wanted additional refined
cells then you could choose one of the other options such as medium or
slow, which would introduce at least 2 or 4 refined levels of cells
respectively.

Setting the Boundary Mesh Values

Custom surface size values will be used for both the valve wall and the
symmetry plane in order to control the density of the trimmed cell mesh. In
the case of the valve wall, the surface size settings are used to increase the
mesh density in the vicinity of the valve area above and beyond any
refinements due to proximity effects. For the symmetry plane, there is no
requirement to maintain the global surface mesh density, so we will allow
the mesh size to increase up to a maximum size equal to the base size. We
could also repeat this for the inlet and outlet boundaries if desired although
this will not be demonstrated here.

The same valve wall inputs as before will be used so we can proceed directly
to the symmetry plane mesh conditions.
• Open the Regions > Region 1 > Symmetry Plane > Mesh Conditions node to
view the available options.
• Select the Custom Surface Size node.

Version 4.04.011
STAR-CCM+ User Guide Control Valve Meshing Tutorial 3632

• 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 does
not need to be changed. The symmetry plane is now no longer constrained
in the same way as the other surfaces in the geometry and larger cell sizes
will 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 Generation
toolbar; or
• Select Mesh > Generate Volume Mesh from the pull-down menu on the
main display.

Version 4.04.011
STAR-CCM+ User Guide 3635

Heat Exchanger Unit Meshing Tutorial


This tutorial demonstrates how to use the surface and volume meshing
tools within STAR-CCM+ to build a multi-region polyhedral volume mesh
with prism layers, starting from an Parasolid Transmit geometry exported
from a CAD package. A conformal mesh between each region is also
enforced 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 suitably
prepared ready for CFD use.

The geometry used in the tutorial is shown below.

The heat exchanger geometry was originally built using the STAR-Design
CAD program by CD-adapco. A separate body was used to represent each
part of the geometry but both bodies were saved to a single Parasolid
Transmit file.

The heat exchanger unit contains multiple fluid flow passages connected by
two 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 is
hollow on the inside. Only a half model will be considered due to the

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

Defining the Region Names and Types


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

As can be seen, two regions were created during the import process, namely
Body 1 and Body 2. If you select each in turn then the associated part will be
highlighted in the display. To better identify the regions, we will rename
them as fluid and solid, plus assign the appropriate region types.
• Select the Regions>Body 1 node.

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

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 Fluid
Region as it has no effect on the meshing operations. However, setting the
type is a good reminder of what type of region each part of the domain is
and what type of prism layer mesh should be allocated to this region. The
region 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 information
that will distinguish one boundary surface from another is stored as patches
within STAR-CCM+. One of the easiest ways of splitting a boundary surface
into constituent boundaries is using this patch information. The reason for
splitting is that we need to identify the flow boundaries, plus the interface
boundary that will be used to indicate which surface planes are common to
both regions and will require a conformal mesh condition.

Version 4.04.011

You might also like