Upload
piyush-sanduja
View
147
Download
1
Embed Size (px)
Citation preview
Mesh Generation with Mesh Generation with GambitGambit
Read the documentation!Read the documentation!
Fluent has very good on-line Fluent has very good on-line documentation documentation
Gambit is not as goodGambit is not as good
Don’t just read the Don’t just read the documentation but go to documentation but go to
library and get hold of some library and get hold of some of the journal referencesof the journal references
Mesh generationMesh generation
Generating a good mesh is a large Generating a good mesh is a large part of the CFD problempart of the CFD problem
Generating a good quality mesh Generating a good quality mesh can be hard workcan be hard work
What is a satisfactory mesh for a What is a satisfactory mesh for a problem will not automatically be problem will not automatically be so when another model option is so when another model option is enabledenabled
Grid TypesGrid Types
Fluent can solve flow problems in Fluent can solve flow problems in 2d or 3d2d or 3d
The cyclone simulation discussed The cyclone simulation discussed in the introductory lecture is a in the introductory lecture is a typical 3d problemtypical 3d problem
The 2d channel is a typical 2d The 2d channel is a typical 2d problemproblem
2d Grids2d Grids
consume much less consume much less memory and take much memory and take much less time to solveless time to solve
a 2d grid intrinsically a 2d grid intrinsically assumes that there are assumes that there are no velocity gradients in no velocity gradients in the direction normal to the direction normal to the gridthe grid
This assumption is really This assumption is really only valid is the channel only valid is the channel is extremely wide in zis extremely wide in z
u/z =0
z y x
2d Grids2d Grids
Can also be used Can also be used with an axisymmetric with an axisymmetric flow such as swirling flow such as swirling flow in a centrifugeflow in a centrifuge
again the again the assumption of zero assumption of zero velocity gradient velocity gradient normal to grid normal to grid applies, but this is in applies, but this is in the the directiondirection
z y x
2d grids - types2d grids - types
mapped mapped (preferred if it (preferred if it possible to do so)possible to do so)
paved with paved with triangles or quads triangles or quads (unstructured (unstructured solver only)solver only)
2d quad mapped
2d tri paved
2d quad paved
2d grids2d grids
2d grids are drawn on faces in 2d grids are drawn on faces in GambitGambit
2d face grids are used as a 2d face grids are used as a precursor to creating 3d gridsprecursor to creating 3d grids
3d grids3d grids
The grid you will generate for a full The grid you will generate for a full 3d simulation of the flow3d simulation of the flow
obviously consumes more memory obviously consumes more memory and takes longer to solveand takes longer to solve
generated for a volume in Gambitgenerated for a volume in Gambit mapped preferred.mapped preferred. complex 3d grids such as Cooper complex 3d grids such as Cooper
and t-grid are unstructured grids and t-grid are unstructured grids
Structured and Structured and Unstructured SolversUnstructured Solvers
Structured Solver (Fluent 4.5)Structured Solver (Fluent 4.5)– uses i,j,k indexing to locate neighboring cellsuses i,j,k indexing to locate neighboring cells– grid must be structured and based on a topologically grid must be structured and based on a topologically
rectangular block in computational spacerectangular block in computational space– but this doesn’t mean the grid cant be curvedbut this doesn’t mean the grid cant be curved– all grid lines continue from one boundary to its oppositeall grid lines continue from one boundary to its opposite
Unstructured Solver (Fluent 5.0)Unstructured Solver (Fluent 5.0)– uses an internal data structure to link cells and facesuses an internal data structure to link cells and faces– doesn’t force an overall topology on the grid so mesh doesn’t force an overall topology on the grid so mesh
volumes can be any shapevolumes can be any shape– doesn’t use indexing to locate neighboring cellsdoesn’t use indexing to locate neighboring cells– can read a structured grid can read a structured grid
Structured and Structured and Unstructured solversUnstructured solvers
Structured solvers were written first because Structured solvers were written first because they were easy to writethey were easy to write
unstructured solves are more “modern”unstructured solves are more “modern” however Fluent 4.5 (structured) and Fluent 5.0 however Fluent 4.5 (structured) and Fluent 5.0
(unstructured) had different sets of models(unstructured) had different sets of models eg Fluent 5.0 doesn’t have the Eulerian granular eg Fluent 5.0 doesn’t have the Eulerian granular
flow model (4.5 does) but it is much easier to set flow model (4.5 does) but it is much easier to set up 5.0 for moving mesh problems. 5.0 has Large up 5.0 for moving mesh problems. 5.0 has Large Eddy SimulationEddy Simulation
Fluent 6 is supposed to merge the two Fluent 6 is supposed to merge the two approaches togetherapproaches together
Structured GridsStructured Grids Topologically rectangularTopologically rectangular This means that the mesh volume is a This means that the mesh volume is a
quadrilateral in 2d or a hexahedron in 3dquadrilateral in 2d or a hexahedron in 3d Each mesh volume is linked only to its Each mesh volume is linked only to its
immediate neighborsimmediate neighbors But the edges can be mapped around But the edges can be mapped around
curves and mesh volumes don’t have to curves and mesh volumes don’t have to be the same sizebe the same size
Reduces storage and CPU requirementsReduces storage and CPU requirements Solid regions like tank baffles can be Solid regions like tank baffles can be
generated by blanking those mesh points generated by blanking those mesh points which overlap the solid region and making which overlap the solid region and making them “dead zones”. Fiddly but still them “dead zones”. Fiddly but still generates a good gridgenerates a good grid
dead zones waste storage. dead zones waste storage.
Unstructured GridsUnstructured Grids Mesh volumes can be linked to Mesh volumes can be linked to
any other volume in the domainany other volume in the domain And can be any shapeAnd can be any shape less computationally efficient less computationally efficient
than a structured gridthan a structured grid but can still read a structured but can still read a structured
grid topology (often still the grid topology (often still the best)best)
can use non-conformal gridscan use non-conformal grids introduces flexbility but this introduces flexbility but this
flexbility creates problemsflexbility creates problems
Unstructured Grid Unstructured Grid TopologiesTopologies
3d hexahedron
2d Prism
2d Triangle
Tetrahedron Pyramid Prism
Unstructured grids - Unstructured grids - MappedMapped
If you can generate a mapped If you can generate a mapped mesh for the domain then do somesh for the domain then do so
Unstructured grids - TgridUnstructured grids - Tgrid
Uses a 3d paving algorithmUses a 3d paving algorithm uses the tetrahedron and pyramidsuses the tetrahedron and pyramids very easy to generate a grid for very easy to generate a grid for
complex geometrycomplex geometry but is inefficient and has problems but is inefficient and has problems
of numerical diffusion and of numerical diffusion and skewnessskewness
Unstructured grids - Unstructured grids - Cooper meshCooper mesh
This grid projects a set of face meshes from one This grid projects a set of face meshes from one side of the domain to anotherside of the domain to another
the face meshes that are projected may be the face meshes that are projected may be mapped or pavedmapped or paved
but the faces surrounding the ray of projection but the faces surrounding the ray of projection must be mapped and must have the same must be mapped and must have the same number of grid points along the raynumber of grid points along the ray
can lead to very small mesh volumes at flow can lead to very small mesh volumes at flow constrictionsconstrictions
but a better alternative to the tgrid if you can but a better alternative to the tgrid if you can work out how to generate it.work out how to generate it.
Pros and ConsPros and Cons You will be using an unstructured solver (and grid) anywayYou will be using an unstructured solver (and grid) anyway The unstructured tetrahedral mesh (tgrid) is the easiest The unstructured tetrahedral mesh (tgrid) is the easiest
mesh to generate for a complex geometrymesh to generate for a complex geometry But it is inefficient in that more mesh points are often But it is inefficient in that more mesh points are often
generated compared to a hex meshgenerated compared to a hex mesh it can also cause numerical problems because of it can also cause numerical problems because of
skewnessskewness and because the faces are not automatically aligned with and because the faces are not automatically aligned with
the flow you can get false diffusion. This can reduce the the flow you can get false diffusion. This can reduce the accuracy of the problemaccuracy of the problem
Even if it requires more work to generate a quadrilateral Even if it requires more work to generate a quadrilateral or hexahedral (and cooper) mesh may give better results or hexahedral (and cooper) mesh may give better results in the final simulationin the final simulation
What is a good grid?What is a good grid?
A high quality meshA high quality mesh– smooth variations in grid smooth variations in grid
spacingspacing– minimal grid skewness minimal grid skewness
(cell interior angles equal(cell interior angles equal– graded towards graded towards
boundaries and other boundaries and other areas where rapid areas where rapid variations in parameters variations in parameters occuroccur
– sometimes all this is hard sometimes all this is hard to achieve particularly to achieve particularly with a tetrahedral meshwith a tetrahedral mesh
Avoid:
Skew
Large Volume changes
High aspect ratio
And try to align the grid with flowstreamlines
Assessing grid qualityAssessing grid quality Default measure of quality Default measure of quality
is is EquiAngle SkewEquiAngle Skew This should be minimisedThis should be minimised Definition depends on cell Definition depends on cell
geometrygeometry– Hex and quad < 0.7Hex and quad < 0.7– Tets < 0.8Tets < 0.8– Tri < 0.7Tri < 0.7
The tetrahedral mesh will The tetrahedral mesh will sometimes not meet this sometimes not meet this criteria in all parts of the criteria in all parts of the domaindomain
Hex or quads amax
amin
skew = max[ (amax – 90)/90, (90 – amin)/90]
Tri’s or tets
Skew = Optimal face/cell size – face/cell size Optimal face/cell size
Optimal face
Actual face
Gambit - bottom up Gambit - bottom up approachapproach
create vertex’screate vertex’s link vertex’s to make edgeslink vertex’s to make edges create faces from edgescreate faces from edges create volumes from faces (3d)create volumes from faces (3d) mesh edgesmesh edges mesh facesmesh faces mesh volumes (3d)mesh volumes (3d)
Gambit - top down Gambit - top down approachapproach
create volumes or faces directlycreate volumes or faces directly generate complex 3d volumes by generate complex 3d volumes by
uniting and splitting volumesuniting and splitting volumes mesh volumes or faces directlymesh volumes or faces directly this can be a good shortcut way to this can be a good shortcut way to
create the geometry and/ora gridcreate the geometry and/ora grid but Gambit may default to the t-grid but Gambit may default to the t-grid
option when the grid is generatedoption when the grid is generated