Polyhedral Mesh Handling in Openfoam: Hrvoje Jasak
Polyhedral Mesh Handling in Openfoam: Hrvoje Jasak
in OpenFOAM
Hrvoje Jasak
[email protected]
Objective
• Overview of mesh handling in OpenFOAM
Topics
• Polyhedral cell and related nomenclature
• Mesh definition and organisation
• Zones and sets
• Moving mesh support
• Handling topological changes
Nomenclature
• A polygonal face is defined by a list of vertex labels. The ordering of vertex labels
defines the face normal (orientation) using the right-hand rule
• A polyhedral cell is defined by a list of face labels that bound it
• Cell centre is marked by P , face centre and face interpolates by f , face normal sf
and neighbouring cell centre by N
• Face centre and cell volume are calculated using a decomposition into triangles or
pyramids
3 N
sf
df
4
f
2 P
t1
t2
triangle
r
z
5
t0
y V
1
0 x
Mesh Classes
• Base mesh classes: topology and geometry analysis engine
◦ polyMesh: collection of all points, faces, cells and boundary patches in the
simulation
◦ primitiveMesh: active singly connected mesh as described above
• Discretisation types require specific support, re-using basic mesh info
◦ fvMesh: supports the FVM discretisation
◦ tetFemMesh: supports the FEM discretisation on tetrahedral decomposition
• Patch information separated along the same lines
◦ PrimitivePatch: topology/geometry analysis
◦ polyPatch: patch on the polyhedral mesh
◦ fvPatch: support for the FVM
◦ tetFemPatch: support for the FEM
• Patch mapping and access to base topology/geometry available for special cases
Operating on Subsets
• Zones and sets allow sub-setting of mesh elements
• Note: discretisation and matrix will always be associated with the complete mesh!
• Zones: points, faces and cells
◦ Define partition of mesh elements. Each point/face/cell may belong to a
maximum of one zone.
◦ Fast two-directional query: what zone does this point belong to?
◦ Used extensively in topological mesh changes
• Sets
◦ Arbitrary grouping of points/faces/cells fo manipulation
◦ Single cell may belong to multiple sets
◦ Sets used to create other sets: data manipulation with setSet tool
◦ Examples
faceSet f0 new patchToFace movingWall
faceSet f0 add labelToFace (0 1 2)
pointSet p0 new faceToPoint f0 all
cellSet c0 new faceToCell f0 any
cellSet c0 add pointToCell p0 any