You are on page 1of 24

INDUSTRIAL & AERONAUTICAL

SCHOOL OF MECHANICAL,
6 Meshing

ENGINEERING
6.1 Mesh Sizing and Structure

A common mistake by those new to CFD is the use of uniform meshes for all solutions.
While for small domains this method may not be computationally much more expensive,
for large domains or those with complicated flow or physical geometry this can result in
excessive computation time. The reason is that a certain minimum cell size may be required
to properly resolve the flow features of interest or the geometry of the bodies involved which
would result in a very large number of cells being used in the whole domain. One way of
optimizing a mesh is to use a sized mesh i.e. one where there are more cells where needed
and fewer in regions which are fairly uniform. Generally, this will mean a concentration of
cells at the solid surfaces and in the regions of shock waves and other discontinuities.

One concept to bear in mind in this regard is the use of structured and unstructured meshes.
A structured mesh is one which can be simply transformed mathematically into a simple
grid for computation. Thus, while adjacent rows of cells can be of differing height, the
rows are all generally bound by straight edges continuous from one row to the next. In an
unstructured mesh, the orientation of the cell boundaries relative to one another is arbitrary.
This means that unstructured meshes are generally computationally more expensive than
structured meshes. Also, structured meshes tend to produce solutions with higher orders
of accuracy i.e. the value of a variable based on the derivatives of variables calculated by
the solver for a structured mesh is generally more accurate than the same value for an
unstructured mesh. While structured meshes have been known to produce solutions of up
to 8th order accuracy, most unstructured solutions are 1st or 0th order accurate. Advances
in these methods in recent times, however, mean that this is changing and the insistence of
older CFD practitioners that only results from structured meshes are meaningful is becoming
less relevant.

Another consideration when structuring a mesh is that of mesh motion and deformation.
While re-meshing methods are becoming faster and simpler, the motion of meshes near
boundaries is a common cause of instability in such models. This is complicated by such
meshes being unstructured and often the initial refinement of the mesh around features of
interest is lost in such remeshing operations. It is therefore more common to create blocks
of mesh which are unstructured and move without deforming (i.e. rigid body motion of
the mesh) and then other, structured mesh blocks (which are more simply remeshed using
layering methods, for example) which do not move but do deform.

39
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
A final consideration in the sizing of meshes is the size difference and alignment of the meshes
between adjacent mesh blocks. When information is translated across a block boundary it is

ENGINEERING
directly transferred to the node in the adjacent mesh if it overlaps one in the first mesh i.e.
if two nodes lie in the same place then the values of the fluid properties must be the same.
Such an alignment of meshes is said to be conformal. However, more often the boundary
nodes of adjacent meshes do not overlap each other. In these cases, the value to be assigned
to the node in the destination mesh is estimated by weighted aggregate of the values at the
nodes nearest it in the source mesh.

The interpolation functions used to translate data between adjacent mesh blocks are normally
based on two or three nodes to either side of the destination node in the source mesh to make
the interpolated result as accurate as possible but there is a limit to the numerical precision
of the solver (increased by using a double-precision solver, for example) and the result is
truncated. Depending on the precision of the solver this can lead to a build-up of truncation
errors as the model progresses, which can even lead to instability. This is more common if the
separation between the nodes in the two meshes (i.e. the cell size) is significantly different
between the two meshes i.e. if the cells in one mesh are significantly larger than those in
the adjacent mesh, the interpolated result will be poor. Generally speaking, the cell sizes
between adjacent meshes should not differ by more than 300% i.e. the cells in the coarser
mesh should not be more than 4 times the size of the cells in the finer mesh at the interface.

An example of the reasons for block boundary errors is given in Figure 27.
27 Assume that
there is an exponential gradient of a variable in a field such that the value at the equidistant
positions shown is 1, 2, 4, and 8. The true value at the node in the destination mesh is
approximately 2.83. When interpolating between two nodes, you are limited to a linear
interpolation. Hence, if the estimate was made using only the two outer nodes of the source
mesh (dark blue), the value estimated would be 4.5, an error of 59%. If the estimate was
made using the two nodes closer in (lighter blue) but still with a linear interpolation, the
estimated value would be 3, an error of only 6%. If the scheme being used could make a
higher-order polynomial estimate by using all four nodes (i.e. a third-order polynomial) the
estimated value would be 2.81, an error of 0.7%. While the final case would be preferable,
most schemes are limited to linear gradient estimates.

This example describes block boundary errors because high-order gradients in a fine mesh
would be lost in the translation to a coarse mesh while translation in the other direction could
lead to complete mis-representation of the data, even though the finer mesh has the resolution
to describe such gradients. It is for this reason that cell size changes at block boundaries
should be as low as possible. While this may seem like a justification for uniform fine mesh
scale throughout your domain, this is computationally inhibitively expensive and typically a
waste. A growing trend in modern CFD is the use of overset meshing techniques. These

40
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
Cell boundary
Destination mesh node
Block boundary

ENGINEERING
1 2 4 8

Source mesh node

Figure 27: Mesh block boundary interpolation

are methods in which the mesh is not explicitly divided into separated blocks but rather there
are additional blocks of mesh associated with moving features. This separate mesh moves
‘over’ the background mesh as the feature moves (hence the term overset mesh). Where
the overset mesh is outside of the computational domain defined by the background mesh,
its nodes are ‘switched off’ i.e. no computation is done for them. Where the overset mesh
overlaps the background mesh, its nodes are ‘switched on’ and the nodes of the background
mesh are ‘switched off’.

In effect this means that a distinct block of mesh of arbitrary shape can move arbitrarily
over the background mesh allowing much more freedom to the range of motion that can be
considered. The overset mesh block can have a mesh that has been optimised for expected
physics (e.g. shock waves) and will retain this finer spatial resolution as it moves. The only
issue with such meshes is that there is an interface region at the edge of the overset mesh
through which information is translated between the overset and background mesh and so it
is important that the cells be similar in size and type here to minimise truncation errors, as
with classical block boundaries.

6.1.1 Minimum mesh cell size

The minimum cell size in a mesh is arguably one of the biggest considerations when sizing
the mesh. This is because small decreases in the minimum cell size can lead to very large
increases in the total number of nodes in the mesh. For this reason it is typically advisable to
determine the maximum possible minimum cell size that will meet your needs and use that
in the creation of the initial mesh. Smaller cells can then be included by adaptive refinements
subsection 7.6)
methods (subsection 7.6 during the execution of the simulation.

41
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
There are three primary considerations when deciding on the minimum cell size for a mesh:
minimum feature length, geometric resolution of curvilinear features, and turbulence model-

ENGINEERING
ling.

6.1.1.1 Minimum feature length

The geometry of a flow field is carried through into the solver by the positions of the nodes
in the mesh. By definition, the edges / faces connecting the nodes of the mesh are straight
/ plane. Thus, if a feature is smaller than the separation of two nodes it will get ‘blurred
out’ by the geometric truncation of meshing. If the feature must be resolved because it is of
consideration in the model, it will define the minimum cell size in that region. This applies
equally to geometric and flow features.

For example, consider a micro-jet injected into a much larger tank. The diameter of the jet
will define the largest possible minimum cell size in that region. If the cells were larger than
the jet diameter, its geometry would not be accurately represented and a velocity flow rate
definition would result in an incorrect mass flow rate.

If the fluid dynamics around the jet were of interest in the model then you would also need
to consider the velocity profile of the jet. Assuming that it is a fully-developed, subcritical
flow, the velocity profile across the jet would be essentially parabolic. Thus, a minimum of
3 nodes across the jet would be needed, though typically you would need 10 or more nodes
across the jet diameter to make a reasonably accurate approximation. Thus the minimum
1 th of the jet diameter.
cell size in that region would need to be 10

In the case of a faster vehicle overtaking another, the accurate description of the flow in the
gap between the two vehicles is important to the determination of the transverse loads on each
vehicle during the manoeuvre. Assuming a velocity profile comparable to the developed flow in
a channel, you would need a minimum of 10 cells across the 0.9 m gap. Thus, the maximum
size for the minimum cell size in that gap would be 0.09 m (90 mm).

6.1.1.2 Geometric resolution of curvilinear features

Apart from the geometric resolution described above, there is the consideration of the accurate
representation of curvilinear geometry. Since the connectors of mesh nodes are straight, it is
clear that a significant number of nodes are required along any curvilinear feature to describe
the geometry with a reasonable level of accuracy. If you limit the change in arc to 5% of a
full turn, this is a maximum arc length of 18°. However, when representing curved surfaces
it often necessary to use a finer mesh than this as a 5% curve would mean only 6 nodes /

42
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
5 edges describing a 90° arc and, depending on the importance of that arc in the flow, the
modelled flow could vary significantly from the actual flow. Typically such surfaces would be

ENGINEERING
described by cells subtending around 5° of arc.

In the case of overtaking vehicles, there are 4 90°‘curves per vehicle that would need to be
described. The flow around these corners will strongly affect the separation around each
vehicle and the interaction of the separated flows between them. Thus, if you were to opt for
5° arc limit, this would require 18 cells around each arc. To determine the minimum cell size
suggested by geometric resolution, you would hence divide the 90° arc length (471 mm) by 18
for a suggested limit of 26.1 mm. For ease of specification this can be approximated as 25
mm.

6.1.1.3 Turbulence modelling

Viscous and turbulent effects in CFD are not directly represented since the mechanisms of
turbulence and viscosity are not completely understood, and such a model would also be com-
putationally expensive. Rather, these effects are modelled i.e. they are included in an overall
fashion by equations which calculate the average effect and impose this on affected regions
of the flow field. These equations are empirical and based on many different experimental
and theoretical results. As such, these models can be ‘tuned’ but the default values given in
packages like Fluent are adequate initial values for these models. It is, however, necessary for
any developed model that the values of the governing parameters for the turbulence models
be calculated for the given flow field and the model adjusted as necessary.

Due to this formulation of viscous modelling, the mesh in regions where these effects are most
pertinent (i.e. boundary layers) must be sized to produce the most accurate results. While
some models use so-called sub-grid modelling, the majority require that the basic mesh at the
boundaries conform to geometric limits. The most common of these rules of thumb is that the
first row of cells must be such that 5 ≤ y + ≥ 30. The reason for this is that a cell height less
than y + = 5 will allow for modelling of the laminar sub-boundary layer and direct calculation
of the other parts of the boundary layer. In contrast, cells larger than y + = 30 will model
the laminar and mixing zone sub-boundary layers while the remainder of the boundary layer
will be directly calculated. Please familiarise yourself with the structure of the boundary
layer if these terms are unclear to you to understand the physical implications of improperly
specifying these cell sizes.

A quick calculation would show that for typical flows in air a cell height for a value of y + = 5
would be of the order of 0.1 mm. Thus, for most air flows, the first layer of cells for a
boundary layer is typically sized for y + = 30, which is approximately 1 mm for most of these

43
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
flows. These low sizes also mean that boundary layer regions are handled in a special way
in CFD to prevent excessive cell counts in models. This is done by making use of inflation

ENGINEERING
layers when meshing. In these cases, the entire domain is meshed using the minimum cell size
dictated by other considerations and then cells are ‘pushed out’ from the solid boundaries
with the low y + height calculated. This results in cells with very high aspect ratio i.e. very
long versus the height. However, this is not a problem when modelling the boundary layer
as the property gradients through the boundary layer thickness are steep, requiring high
concentrations of cells to resolve, while the property gradients in the flow direction are low,
requiring low concentrations of cells to resolve.

6.1.2 Maximum mesh cell size

While not as critical as the minimum mesh cell size, the proper specification of the maximum
mesh cell size can be important for limiting the overall mesh size and ensuring good quality
of information reaching the refined areas of the model. If this size is too small then the mesh
may be too large for computation in a reasonable amount of time. In constrained flows the
maximum mesh cell size is often not that much larger than the minimum mesh cell size but
in far-field condition models, this size is often an order of magnitude (or even two) larger
than the minimum.

In selecting a maximum mesh cell size it is first necessary to consider where these cells are
most likely to occur. In far-field models, this will be at the far-field boundaries of the model.
Hence, the size of the cells there should be such that flow effects there are not blurred out by
being too large, though most features are expected to be dissipated at a far-field boundary if
it is suitably far from the object of interest. An upper limit for this size would typically be
one which places between 10 and 20 cells along one of these boundaries. Often this size will
need to be revised to be smaller to consider the possibility of flow features smaller than this
size. It should also be considered that using a maximum cell size at the upstream far-field
boundary can result in a loss of information for downstream calculations if the properties on
that boundary are not uniform. That said, most cases of a far-field boundary are defined by
uniform conditions along the far-field boundary.

In the case of the demonstration problem, the longest edge of any of the mesh blocks is
approximately 61 m. This would suggest a cell size of between 30 and 60 cm. It is important
to now consider how this would compare to the expected flow field. Although the effects of
the vehicles are expected to be felt upstream, at the boundary the effect is expected to be of
fairly small gradient. Hence if you were to imagine sampling the flow field 30 cm apart at
this distance it is feasible that there would be negligible difference. Thus a maximum mesh
cell size of 30 cm would seem reasonable.

44
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
6.2 Mesh motion vs fluid motion

ENGINEERING
It is important at this point to discuss the distinction between mesh motion and modelled
fluid motion. Many people new to CFD tend to think that the motion of the mesh implies
movement of the fluid being modelled, and that the fluid velocity equals that of the mesh.
The fact is that these two motions are entirely unrelated. Just as you can model a moving
fluid on a stationary mesh, you can model a stationary fluid on a moving mesh. The nodes of
the mesh are simply computational points for imposing the governing equations and boundary
conditions.

Typically there is no reason to move your mesh unless one of the boundaries is moving. This
means that the motion of that boundary will induce motion of the fluid but the movement
of the nodes of the mesh in the free fluid does not cause fluid motion. Rather, it is the
physical boundary conditions of no slip and continuity at a wall (the fluid must match the
velocity of the wall at the surface and cannot disappear into or emerge from the wall) that
induce the motion of the fluid, like stirring a spoon in a cup of coffee. If you were modelling
that scenario, the spoon would be a ‘hole’ in the mesh and would probably have a refined
mesh block associated with it which would move through the surrounding mesh but it would
be the solid walls of the spoon that would induce fluid motion.

6.3 Boundary Types

When defining the mesh the boundary types must also be specified as the node identifiers are
then saved into particular sets to be passed to the solver, Fluent. There are a few common
boundary types used in most solvers which can be broadly divided into physical and inertial
boundaries, where the former imposes physical conditions to be met while the latter defines
inertial properties of the fluid at that position:

6.3.1 Physical boundary types

• Wall: the most common boundary type and the default imposed by Fluent if no
specification is given. This boundary does not allow flow to cross it and will require
that the no-slip condition be met

• Symmetry: while similar to the wall boundary in that flow cannot cross it, there
are no viscous effects on a symmetry boundary. This can also sometimes be set as a
periodic boundary, meaning that the effects seen at the top may repeat at the bottom,
such as in modelling a gas turbine

45
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
• Axis: related to the symmetry boundary in that flow cannot cross it and there are no
viscous effects, this is required for an axisymmetric model to be run

ENGINEERING
• Interface: while not strictly a physical boundary, this type is needed to enable data
from one mesh block to be passed into another. Interfaces are defined in (at least) pairs
since each of the mesh blocks must have a boundary across which the information can
be passed

6.3.2 Inertial boundary types

Note that some of these conditions cannot be used in conjunction for reasons of compressib-
ility. These exceptions are identified by Fluent when setting up the simulation

• Pressure Far Field: the boundary type required for free-air models where one is
modelling effectively an infinite atmosphere. This is a non-reflecting boundary type
meaning that pressure variations reaching this boundary can pass out of the flow field.
Fluid properties can be set as quiescent (though a small, non-zero value must be set) or
a velocity imposed along the entire boundary. Serves as both inlet and outlet boundary
type

• Velocity Inlet: the simplest of the constrained inertial inlet boundary conditions,
this allows you to set the velocity of the flow passing through the boundary. Flow
is typically defined as normal to the boundary and the boundary surface is typically
constrained by wall boundary conditions. Specification of velocity by the Velocity Inlet
type can preclude the fully developed flow velocity distribution being modelled initially.
Typically used for subsonic flow. Inlet boundary for the Outflow boundary type

• Outflow: the simplest of the constrained inertial outlet conditions, it requires es-
sentially no specification. Typically used for subsonic flow. Outlet boundary for the
Velocity Inlet boundary type

• Pressure Inlet: a more comprehensive constrained inertial inlet boundary type which
requires the total fluid state (defined by temperature, total pressure, and static pressure)
to be specified. The local velocity is calculated from the continuity equations and
can hence be used to specify both subsonic and supersonic flows. Typically used for
supersonic flows. Inlet boundary for the Pressure Outlet boundary type

• Pressure Outlet: a more comprehensive constrained inertial outlet boundary type


which requires the fluid state (defined by temperature and static pressure) to be spe-
cified. The pressure is defined as a back pressure and hence there can be local reversed

46
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
flow if the back pressure exceeds the static pressure at the boundary. Typically used
for supersonic flows. Outlet boundary for the Pressure Inlet boundary type

ENGINEERING
6.4 Creation in ANSYS Meshing

1. In ANSYS Workbench, drag a Mesh component system into the workspace somewhere
near the Geometry block already there. Notice that there is now a check mark next
to the geometry item as it has been completed and is ready for use. As with when the
geometry component was first added, the geometry item in the Mesh component system
is marked with a blue question mark . In addition, you can see that the mesh item in
the Mesh component is marked with an open blue question mark . The reason for the
difference is that the mesh item is dependent on the geometry item and, since it hasn’t
been defined, nothing can be changed with the mesh item

2. Click and hold on the geometry item in the Geometry component system and drag across
to the geometry item of the Mesh component system, which will be highlighted in red
and give a share identifier, then release the mouse. You will see that there is now a link
between the two component systems and that the geometry item in the Mesh component
system has changed to a check mark while the open question mark for the mesh item
has changed to the refresh symbol .

Mesh component system


Component system link

Figure 28: Geometry component system linked to the geometry item of the Mesh component
system

47
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
3. Double-click on the mesh item in the Mesh component system to open the meshing
application, ANSYS Meshing. When ANSYS Meshing opens you will notice that the

ENGINEERING
layout is similar to that of Geometry. Notice that there is currently no mesh specified

4. Select the Mesh item in the Outline pane

5. The first specification to be made in the details pane (Figure


Figure 29)
29 will be the type of
mesh:

Figure 29: Details of the mesh specification

• Physics Preference: is the specification of the type of solver that will be pro-
cessing this mesh. While Finite Element Analysis (FEA) solvers can work with
meshes with mid-side nodes, CFD solvers cannot and so it is important to select
the CFD option from the dropdown
• Solver Preference: can be left as Fluent as this example deals with the use of
Fluent
• Element Order and Element Size: can be left as they are, though the element
size should be set to the maximum (0.3 m) [Remember that if your changes do not
appear when you have finished them that you may need to use a comma instead of
a point to enter decimal fractions]

Figure 30),
6. The next specification to be made is the global mesh sizing preferences (Figure 30
which also limit the effect of subsequent local mesh sizing preferences. The first option
for this is to use the adaptive sizing function in Fluent. This will not be covered here
as it is effectively automatic

7. If you do not use the adaptive sizing function within Fluent, then several, more direct
controls become available for the global meshing controls:

• Growth Rate: This is the value which determines how much larger than the lower
cells the next row is. For example, if the growth rate is 1.20 and the first row of

48
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 30: Details of the global mesh sizing specification

cells has a height of 1, then the next row will have a height of 1.2. The default
value of 1.20 is suitable for most applications, and the value must be greater than
1
• Mesh Defeaturing: This is the setting which smooths unnecessary fine features
of the geometry when meshing. Rather than simply creating mesh truncation over
those region, the mesh defeaturing tool creates smooth meshing in the region by
extending the defeatured zone around a fine feature to prevent unexpected flow
features from too coarse a defeaturing. The value provided is the maximum length
of features which will be removed in meshing
• Capture Curvature: This is an automatic tool to resolve curved features of the
geometry. It requires 2 values: the minimum curvature size, and the curvature
normal angle
– Minimum curvature size is the smallest curved feature which will be resolved
in meshing i.e. curves with a smaller radius will be defeatured
– Curvature normal angle is the maximum angle span that would be represented
by a face when meshed
• Capture Proximity: This is an automatic tool to resolve flow between faces /
edges which are close together. It requires 3 values: the minimum proximity size,
the number of cells across the gap, and the proximity size function sources:
– Minimum proximity size is the smallest gap size that will be resolved i.e. gaps
which are narrower than this will be defeatured
– Number of cells across the gap is the minimum number of cells required across
gaps identified by the proximity meshing tool. The default value of 3 is gen-
erally insufficient for small gaps as it cannot resolve a fully-developed flow
profile well. It is typical to increase this to at least 10 if narrow-gap flows are
the focus of the model

49
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
– Proximity size function sources is a specification of the geometric features
between which the meshing tool will try to identify gaps. It has the options of

ENGINEERING
Faces, Edges, and Faces and Edges. The dimensionality of these sources will
depend on your model i.e. it is unnecessary to inspect for small gaps between
faces in a 2D model because the entire model exists in a face, while it may be
unnecessary to inspect for gaps between edges in a 3D model
Switch off mesh defeaturing and curvature capture. There are no very fine features
in the geometry to be removed (since it was not imported from CAD), and the
resolution of the curved edges will be specified by other means. Select the Capture
Proximity option as the flow between the vehicles will need resolution. Also, even
though the block boundary does not constrain the flow, proper meshing between the
vehicle edge and the block boundary must be considered. Change the value for the
number of cells across a gap to 10. Also, change the proximity size function source
to be only edges as this is a 2D model

8. The next option in the details pane is the Inflation section. This is used to create
an initial mesh and then to grow it out from solid surfaces so that the cells there are
optimised for boundary layer modelling. This method has proven to be somewhat fragile
for complex geometries but could be used here. Increase the number of layers to 10 and
leave the remainder of the settings at the default values. However, the inflation will be
specified manually later

Figure 31: Details of the global mesh inflation sizing specification

9. The final item of interest in the details pane is the Statistics item. Once you have
completed meshing this will report the size and other parameters of your mesh. Right-
click on the mesh item in the Outline pane and select the Generate option to create the
initial mesh based only on the global settings. If successful, the icon next to the mesh
item should change to a green check mark and the initial mesh should look something
like that shown in Figure 33,
33 comprising fewer than 20 000 nodes

50
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 32: Some operations in the mesh context menu

Figure 33: Initial mesh based on global mesh options

10. Before proceeding it is worth inspecting the mesh in some detail to identify regions where
additional mesh controls may be needed. Using the zoom tool focus on the section
immediately around the two vehicles. There are several points to note in this initial
mesh:

• There is a high concentration of nodes in the small gaps between the vehicle bound-
aries and the block boundaries inserted by the Proximity advanced meshing function
• The outer corners of the slower vehicle are poorly resolved geometrically because
the curvature advanced meshing function was not applied
• Although not grouped into a single body in Geometry (the method used to enforce
conformal meshing) the meshes between the three blocks that will move or deform
are nearly conformal at their interfaces
• The meshes at the edges of the proximity-meshed regions are not conformal with
the adjacent mesh blocks (and cannot be)
• The mesh at the leading and trailing edges of the vehicles, and along the outer edge
of the slower vehicle, are quite coarse (estimated cell size of 40 cm along the outer
edge of the slower vehicle) and will likely need refinement
• There is currently no inflation mesh on the vehicles

51
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 34: Details of the initial mesh based on global mesh options

(Note than you can pan or rotate the view, and then return to the initial zoom
using the fit view tool )

11. Based on the inspection of the initial mesh, some refinement of the mesh immediately
surrounding the vehicles is needed. The most commonly used tools for this purpose are
inserted via the Mesh Control menu

Figure 35: Mesh control options that can be used to optimise the initial mesh

• Method: This item is used to specify the type of cells used in particular regions of
the mesh. This is used only when it is absolutely necessary to have particular cells
in a mesh block for computational reasons (e.g. types of motion or deformation of
the mesh) and the default meshing method has not inserted these cells
• Sizing: The most commonly used function, this allows you to explicitly specify
regions in which the mesh must be of a particular size

52
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
• Mapped and Face Meshing: These methods are used when you wish to force
a mesh to be structured i.e. it will resemble a tiled floor. Typically used when the

ENGINEERING
layering mesh motion method will be used. The Mapped Meshing function can only
be used in 3D models
• Inflation: This method defines features against which boundary layers are ex-
pected to form and defines inflation meshes to pre-optimise the mesh for solution
thereof

12. To begin, insert a Sizing item. Notice that a new sizing item appears in the outline
pane and that the mesh icon changes back to a question mark. The settings for a sizing
method are quite simple:

Figure 36: Detailed settings for the sizing mesh control method

• Scoping Method: This is the method that will be used to assign the control to
features of the geometry. Generally you will use the Geometry Selection option (as
in this case) where you directly select geometry elements but occasionally it may
be useful to use the Named Selection method, where you have previously made a
selection of several geometric features and assigned a name
• Geometry: This block will remain yellow until you have confirmed the geometry
to which mesh control will be applied. Choose the Edge dimensionality selector
and then change the mouse to the Box Selection mode (as shown in Figure 37).
37
Now draw a box around the edges that comprise the faster vehicle. Then, holding
down the Ctrl key, draw another box around only the edges comprising the slower
vehicle. Now click in the Geometry box and press the Apply button. If you have
done this correctly it should no longer be highlighted in yellow and should indicate
that 16 Edges have been selected (i.e. 8 per vehicle (4 straight edges and 4 corner
radii)). Notice as well that the Sizing element in the Outline pane has been renamed
as an Edge Sizing

53
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 37: Changing the mouse mode for geometry selection

• Suppressed: Leave this option set to No since you want this mesh control to be
applied. Later you may wish to suppress this in favour of other controls
• Type: There are four principal sizing types: Element Size, Number of Divisions,
Sphere of Influence, and Factor of Global Size
– Element Size: most of the time you will use this default option in which
you directly specify the size of the elements that must be placed on the selected
geometric features
– Number of Divisions: this method divides each of the edges into a fixed
number of lengths. A major drawback of this method is that it can lead to
large differences in cell size for edges connected to each other if they are of
different length
– Sphere of Influence: this method can be used to create spherical (or, in
2D models, circular) regions of a specified cell size. Typically you must first
create a new co-ordinate system at the centre of the required sphere and then
use this in the definition of the refinement region.
– Factor of Global Size: imposes a constant cell size which is the specified
fraction of the global cell size (defined in the global mesh controls). This is
useful to have cell sizing automatically change when the global size is increased
or decreased, but should be avoided if the cell size on the controlled elements
is specifically sized (rather than relatively)
For this problem, select the Element Size option
• Element Size: this is the size of the actual elements that you wish to enforce
on the selected geometry. Click where you see a size value specified next to the
Element Size control and enter the required size. In the case of the demonstration
problem, we want the cells to match the proximity method cell size which is most
likely the minimum global cell size so set this value to 15 mm (0.015 m)
• Behaviour: This method allows you to set a precedence of the mesh controls
inserted:

54
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
– Soft: the default option which allows the local mesh control to be overridden
by global or other harder local mesh controls

ENGINEERING
– Hard: the option which enforces that the specified control is imposed and
overrides other softer controls which may affect the same region of the mesh.
Generally a hard local mesh control will override a global control
Select the Hard option. Note that when you do so some of the control options
disappear
• Bias: this method allows you to specify the cells such that they change size over the
length of edges only. The default is to have no bias but biases such as larger cells
at one end of a line or even a refinement toward the centre and then coarsening
toward the other end of a line are possible. When specifying such a bias the bias
factor, which is the ratio of the largest cell edge to the smallest cell edge, must be
set. Leave this option at its default of No Bias

Notice that once you have specified the element size for this sizing that yellow rectangles
appear along the edges giving a visual representation of the new edge sizing. The icon for
the Edge Sizing item in the Outline pane will have changed to a check mark indicating
that the specification is complete. The icon for the Mesh item will have changed to a
lightning blot indicating that it must be updated

Figure 38: Preview of edge sizing before mesh is updated

13. Press the Update Button to update the mesh with the new controls. Bear in mind
that it may take a few seconds for this process to be completed, during which there will
be a progress bar displayed indicating the progress

14. Once complete the mesh detail should resemble that in Figure 40 and comprise around
26 000 nodes. As before it is worth inspecting the details of the mesh to be sure that
previous issues identified have been resolved:

55
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 39: Meshing progress indicator

Figure 40: Updated mesh including edge sizing mesh control

• The conformality between the moving and deforming blocks has not been affected
• The ratio of cell size at the edge of the proximity-refined region and the adjacent
mesh blocks seems to be around 6:1 so it may pose a bit of an issue to modelling
and translation of information across block boundaries. This can be revised in later
iterations of the model
• When the faster vehicle block is closer to the slower vehicle block the mesh sizes
either side of the block boundaries will be almost identical and so this should min-
imise interpolation errors during that critical stage of the simulation

15. The final mesh control to insert will be the inflation layers on each of the vehicles.
Before doing so it would be useful to inspect one of the vehicles so that the effect can be
observed. Use the zoom tool to view the entire faster vehicle in greater detail:
Notice that the cells on the vehicle boundary are clearly visible and fairly square in
appearance

16. Select the Inflation method from the Mesh Control menu

56
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 41: Detailed view of the faster vehicle mesh before the inflation method is applied

17. As with the Sizing method, the first item to be specified will be the geometry to which the
inflation must be applied. In this case, this will be the face on which the mesh must be
affected. Since the default dimensionality for inflation-affected geometries is Volumes
, change the dimensionality selector to Faces . Ensure that the mouse mode is set
to Single Select and then click on the mesh around the vehicle. The selected face will
go green as shown in Figure 42
Click Apply in the Geometry item of the details pane to confirm the selection

Figure 42: The face of the faster vehicle mesh block selected for control by the Inflation
method

18. The next item to specify is the Boundary Scoping Method and Boundary. As with the
Sizing method, the Geometry Selection option is most commonly used. Click in the
Boundary item and change the mouse mode to Box Select and the dimensionality is

57
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
for edges and then select the edges of the faster vehicle. Click Apply. There should
be 8 edges confirmed as selected

ENGINEERING
19. The final setting needed for the Inflation method is the maximum number of layers. As
before set this option to 10. Leave the other settings at their default values

20. Update the mesh . Once complete, the detailed mesh around the faster vehicle will now
include a very fine layer used for calculating the boundary layer flow and the number
of nodes will have climbed closer to 34 000. Note how the small apparent change in the
visible mesh has added a significant number of nodes because of the high cell density

Figure 43: The updated faster vehicle mesh with the inflation layer included

21. Apply a similar Inflation method to the slower vehicle. Upon completion the mesh
should be around 42 000 nodes

22. Before continuing, it worth checking the quality of the mesh, included as the Mesh
Metric item in the Quality item of the Mesh details. The most common option for this
is the Aspect Ratio of the cells. Once selected, the minimum, maximum, average, and
standard deviation of the aspect ratios of all the mesh cells will be displayed and a bar
graph of the distribution shown below the mesh. While the ideal is to have all cells as
close to an aspect ratio of 1 (i.e. a square cell) as possible, the use of an inflation layer
will add high aspect ratio cells. High aspect ratio cells are generally a problem if they
occur elsewhere in the mesh because it means that gradients in the longer direction of
the cell may be poorly represented. However, in a boundary layer mesh this is not as
much of a problem because the gradients along a boundary layer are generally weak, and
the use of inflation cells makes accurately modelling the shear exerted on the body much
easier

58
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
23. The final task before finishing is to specify the boundary types of the mesh. This is done
by naming the various geometric features of the mesh as Named Selections. It is not

ENGINEERING
essential that this be done at this stage but doing so allows for automatic boundary typing
in Fluent if the features are correctly named because Fluent will attempt to interpret the
boundary type from a name if present. Setting the boundary types in Fluent can be
done but is cumbersome because there is no graphical means to do so directly and the
automatically generated names for geometric features in Fluent are not immediately
intuitive. Start with the wall boundaries of the faster vehicle:

(a) Set the mouse mode to Box Select and the dimensionality for edges and select
the edges which comprise the faster vehicle
(b) Right-click and select Create Named Selection

Figure 44: Context menu options including Create Named Selection

(c) Specify the name of the named selection. For automatic boundary typing to work
in Fluent the name provided must include, and preferably begin, with the boundary
type required. You can also add extra information to make it clear which boundary
you are naming for ease of reference. If you do not include the boundary type
in the name, then Fluent automatically specify boundaries as walls. Since named
selections cannot include spaces, leave these out or replace them with underscores
( ) or hyphens (-). Enter Wall Faster Vehicle and then click OK
(d) Since this is the first named selection added the Named Selections item will now
appear in the Outline pane

24. Create a similar named selection for the slower vehicle

25. The next edges that can be named are the pressure far field boundary. Since the mesh
is divided into blocks, if you name all of the relevant edges as a named selection they
will get split in Fluent so it is advisable to name them per block:

59
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
(a) Set the mouse mode to Point Select and the dimensionality for edges and select
one the edges which comprise the outer boundaries (but not the block interface

ENGINEERING
boundaries) of the Slower Vehicle block
(b) Holding the Ctrl key, select the other two pressure far field boundaries of the block
(c) Right-click and select Create Named Selection. Specify the name of the named
selection. Enter Pressure Far Field Slower Vehicle and then click OK
(d) Repeat this process for the Growing Mesh, Shrinking Mesh, and Stationary blocks

26. The interfaces need to be properly defined now:

(a) Set the mouse mode to Point Select and the dimensionality for edges and
select one the edges which are mesh block interfaces in the Growing Block mesh.
You will notice that the Multiple Selection icon appears in the workspace. This
is because there are multiple edges that can be selected in the same location. You
can change between the options by clicking on of the planes of the icon, and select
multiple of the options by holding the Ctrl key while selecting planes in the icon.
However, this is not always as clear as in this case (because one edge is much
shorter than the other) and it is typically advised to hide blocks with which you
are not working while the named selections specific to that block are defined as
including the same edge in multiple named selections causes errors which prevent
the simulation from progressing

Figure 45: Geometry selection with multiple coincident features

(b) Expand the Geometry item in the Outline pane. As you select each of the parts
listed there it will be highlighted in the workspace. You may rename these from the
context menu if you wish to make selecting the correct one easier
(c) Right-click on the part for which you wish to define the interface named selection
and select the Hide All Other Bodies option. Note that there is also the option

60
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,
to suppress this or other bodies. Suppression completely removes the geometry
definition from the model until unsuppressed while hiding only hides the body and

ENGINEERING
makes it unavailable for selection but retains its associations. Thus, if the parts
are suppressed the previously-defined named selections associated with them will
become suppressed as well (marked with a blue cross ) while if they are hidden
the associated features remain valid

Figure 46: Context menu for geometry control in ANSYS Meshing including the Hide and
Suppress options

(d) Right-click on the edge that you want to define as an interface and select Create
Named Selection. Note that when selecting the edge now that there is no Multiple
Selection icon. When naming interfaces it is useful to name them in such a way
that it is clear which ones must be paired in Fluent (since interface connection
is not automatic). One convention which has been found to be very useful is to
name the interface with the block to which it is attached and then the block/s to
which it must be paired. The two block names are separated by a hyphen rather
than an underscore to make it easier to parse the names into block identities.
This convention creates pairs of names that can be easily picked from a list when
associating interfaces in Fluent. Under this convention, you would enter Inter-
face Growing Mesh-Slower Vehicle and then click OK
(e) Once you have finished naming all of the interfaces for the current mesh block,
right-click on the block in the Geometry item of the Outline pane again an select
the Show All Bodies option
(f ) Repeat this process for all of the remaining mesh interfaces for a total of 12 inter-
face named selections as shown below

61
INDUSTRIAL & AERONAUTICAL
SCHOOL OF MECHANICAL,

ENGINEERING
Figure 47: All interfaces defined and indicated in the workspace

27. The final named selections that must be made are the ones which define each of the
blocks. This serves two purposes: to ensure that the blocks are recognised as fluids
in Fluent, and also to make them easy to identify in Fluent for settings that will be
needed to define mesh motion. Change the mouse mode to Single Select and the
dimensionality for faces and select the Slower Vehicle face. As before, create a
named selection calling it Fluid Slower Vehicle

28. Repeat this process for the remaining 4 mesh blocks

29. Save the project

30. Close ANSYS Meshing

This is the saved state of the model at the end of the meshing operations.

62

You might also like