...
- Checking the surface mesh quality, creating a directory for the surfaceMesh and copying to this folder, and creating a ParaView file.
- Log file produced with check if the surface mesh (FMS) is good.
- Production of a VTK-file to show the surfaceMesh in ParaView.
- (Decomposing if necessary).
- Generate the volume mesh and check the mesh.
- Choice can be made to do multi-threading when memory is too small. Decomposition is needed.
- The STL file is for adding refinement at the object or a refinement region and is not mandatory.
- cartesianMesh can be replaced either by pMesh or tetMesh.
- checkMesh is performed.
- Produce output of bad quality mesh cells if existing to illustrate in ParaView.
- Non-orthogonal cells.
- Skew faces.
- Wrong-oriented faces.
- Zero volume cells.
Mesh quality
The mesh quality check is done in OpenFOAM using the utility checkMesh. This section is based on the output generated by checkMesh. The quality checks are explained beneath, and a thumb-rule value (for indication) is given for mesh quality. The results using cfMesh and snappyHexMesh are compared at the end.
Explanation of mesh quality terms
A brief explanation of mesh quality is given below:
...
- Affects gradient of the face center of the cell (difference between orange and black).
- Adds diffusion to the solution.
- Mainly affects the diffusive terms.
- Maximum of 80.
...
- Expansion rate, growth, or uniformity.
- Adds diffusion when large.
- Maximum change should be less than 20% (30%).
Aspect ratio
- Ratio between dx and dy.
- Large AR is ok if gradients in the largest direction are small.
- It smears the gradients.
- Should be lower than 80.
Skewness
- Deviation of the black vector and the face center f.
- Affects the interpolation.
- Adds diffusion.
- Affects the convective term.
...
- Cell face aligned with flow results in a smaller error in flow and gradients (truncation).
- In general: hexahedral is more accurate.
- Easily aligned with the flow.
- Stretched to resolve BL without losing much quality.
- Prefered for force calculations.
- Without dominant flow direction: hex has no advantage anymore.
- Polyhedral approximates better in that case the gradients.
- Skewness can be a problem -> oscillatory due to more faces.
- Growth rate control and volumetric refinement are difficult.
- Tetrahedal fewer faces:
- Fewer problems with oscillatory results.
- Growth rate is easily controlled.
- Larger truncation errors at the wall.
- Can easily adapt to a structure.
- Needs more computing resources but less mesh time.
- Small changes in flow -> larger mesh cells can be used.
...