Sunteți pe pagina 1din 22

Mesh Generation with

Gambit

Read the documentation!


Fluent has very good on-line
documentation
Gambit is not as good
Dont just read the
documentation but go to
library and get hold of some
of the journal references

Mesh generation
Generating a good mesh is a large
part of the CFD problem
Generating a good quality mesh can
be hard work
What is a satisfactory mesh for a
problem will not automatically be so
when another model option is
enabled

Grid Types
Fluent can solve flow problems in
2d or 3d
The cyclone simulation discussed
in the introductory lecture is a
typical 3d problem
The 2d channel is a typical 2d
problem

2d Grids

consume much less


memory and take much
less time to solve
a 2d grid intrinsically
assumes that there are
no velocity gradients in
the direction normal to
the grid
This assumption is really
only valid is the channel
is extremely wide in z

u/z =0

z
y
x

2d Grids

Can also be used


with an axisymmetric
flow such as swirling
flow in a centrifuge
again the
assumption of zero
velocity gradient
normal to grid
applies, but this is in
the direction

z
y
x

2d grids - types

mapped
(preferred if it
possible to do so)

2d quad mapped

2d tri paved

paved with
triangles or quads
(unstructured
solver only)

2d quad paved

2d grids
2d grids are drawn on faces in
Gambit
2d face grids are used as a
precursor to creating 3d grids

3d grids
The grid you will generate for a full 3d
simulation of the flow
obviously consumes more memory
and takes longer to solve
generated for a volume in Gambit
mapped preferred.
complex 3d grids such as Cooper and
t-grid are unstructured grids

Structured and
Unstructured Solvers

Structured Solver (Fluent 4.5)


uses i,j,k indexing to locate neighboring cells
grid must be structured and based on a topologically
rectangular block in computational space
but this doesnt mean the grid cant be curved
all grid lines continue from one boundary to its opposite

Unstructured Solver (Fluent 5.0)


uses an internal data structure to link cells and faces
doesnt force an overall topology on the grid so mesh volumes
can be any shape
doesnt use indexing to locate neighboring cells
can read a structured grid

Structured and
Unstructured solvers

Structured solvers were written first because they


were easy to write
unstructured solves are more modern
however Fluent 4.5 (structured) and Fluent 5.0
(unstructured) had different sets of models
eg Fluent 5.0 doesnt have the Eulerian granular
flow model (4.5 does) but it is much easier to set
up 5.0 for moving mesh problems. 5.0 has Large
Eddy Simulation
Fluent 6 is supposed to merge the two approaches
together

Structured Grids

Topologically rectangular
This means that the mesh volume is a
quadrilateral in 2d or a hexahedron in 3d
Each mesh volume is linked only to its
immediate neighbors
But the edges can be mapped around
curves and mesh volumes dont have to
be the same size
Reduces storage and CPU requirements
Solid regions like tank baffles can be
generated by blanking those mesh points
which overlap the solid region and making
them dead zones. Fiddly but still
generates a good grid
dead zones waste storage.

Unstructured Grids

Mesh volumes can be linked to


any other volume in the domain
And can be any shape
less computationally efficient
than a structured grid
but can still read a structured
grid topology (often still the
best)
can use non-conformal grids
introduces flexbility but this
flexbility creates problems

Unstructured Grid
Topologies
3d hexahedron

2d Prism

2d Triangle

Tetrahedron

Pyramid

Prism

Unstructured grids Mapped

If you can generate a mapped


mesh for the domain then do so

Unstructured grids - Tgrid


Uses a 3d paving algorithm
uses the tetrahedron and pyramids
very easy to generate a grid for
complex geometry
but is inefficient and has problems
of numerical diffusion and
skewness

Unstructured grids Cooper mesh

This grid projects a set of face meshes from one


side of the domain to another
the face meshes that are projected may be
mapped or paved
but the faces surrounding the ray of projection
must be mapped and must have the same number
of grid points along the ray
can lead to very small mesh volumes at flow
constrictions
but a better alternative to the tgrid if you can work
out how to generate it.

Pros and Cons

You will be using an unstructured solver (and grid) anyway


The unstructured tetrahedral mesh (tgrid) is the easiest
mesh to generate for a complex geometry
But it is inefficient in that more mesh points are often
generated compared to a hex mesh
it can also cause numerical problems because of skewness
and because the faces are not automatically aligned with
the flow you can get false diffusion. This can reduce the
accuracy of the problem
Even if it requires more work to generate a quadrilateral
or hexahedral (and cooper) mesh may give better results
in the final simulation

What is a good grid?

A high quality mesh


smooth variations in grid
spacing
minimal grid skewness
(cell interior angles equal
graded towards boundaries
and other areas where
rapid variations in
parameters occur
sometimes all this is hard
to achieve particularly with
a tetrahedral mesh

Avoid:
Skew

Large Volume changes

High aspect ratio

And try to align the grid with flow


streamlines

Assessing grid quality

Default measure of quality


is EquiAngle Skew
This should be minimised
Definition depends on cell
geometry

Hex and quad < 0.7


Tets < 0.8
Tri < 0.7

The tetrahedral mesh will


sometimes not meet this
criteria in all parts of the
domain

Hex or quads

amax
amin

skew = max[ (amax 90)/90, (90 amin)/90]

Tris or tets
Skew = Optimal face/cell size face/cell size
Optimal face/cell size
Optimal face

Actual face

Gambit - bottom up
approach
create vertexs
link vertexs to make edges
create faces from edges
create volumes from faces (3d)
mesh edges
mesh faces
mesh volumes (3d)

Gambit - top down


approach
create volumes or faces directly
generate complex 3d volumes by
uniting and splitting volumes
mesh volumes or faces directly
this can be a good shortcut way to
create the geometry and/ora grid
but Gambit may default to the t-grid
option when the grid is generated