SnappyHexMesh Vs SALOME

Published by rupole1185 on

Hexahedral Meshes (Hex-dominant, Structured, Unstructured Hex) – SNAPPYHEXMESH

Hexahedral cells are 6-faced, 8-vertex elements (like bricks or cubes).

Pros:

  1. Accuracy:
    • Lower Numerical Diffusion: Hex cells, especially when aligned with the flow direction (common in structured grids or near walls), introduce significantly less numerical diffusion (false diffusion) compared to tets. This leads to more accurate results, particularly for flow features like wakes, jets, and thermal plumes.
    • Better Gradient Capture: Their ability to be highly anisotropic (stretched in one direction much more than others) makes them ideal for resolving boundary layers (e.g., using prism or inflation layers at walls). These layers are effectively extruded hexahedral cells. For a given number of cells, they can capture steep velocity and temperature gradients far more effectively.
  2. Computational Efficiency (per cell):
    • Fewer Cells for Same Accuracy: Often, a hexahedral mesh can achieve the same level of accuracy with significantly fewer cells than an equivalent tetrahedral mesh. Fewer cells mean less memory usage and faster computation times.
    • Better Aspect Ratio Control: You can control the aspect ratio very precisely, which is crucial for boundary layers (thin cells perpendicular to the wall).
  3. Solver Performance: Some solvers can be more robust or faster with high-quality hex meshes due to better cell quality metrics, lower skewness, and higher orthogonality.

Cons:

  1. Meshing Complexity and Time:
    • Very Difficult for Complex Geometries: Generating a high-quality, purely hexahedral mesh for complex geometries (e.g., car underbody, engine manifold) is extremely challenging and time-consuming. It often requires significant manual intervention, skilled meshing engineers, and specialized software.
    • Automation: Less automated than tetrahedral meshing.
  2. Geometry Flexibility: Poor for geometries that are not easily block-structured.
  3. Maintenance: Changes to geometry can necessitate significant re-meshing effort.

Tetrahedral Meshes (Unstructured) – SALOME

Tetrahedral cells are 4-faced, 4-vertex elements (like pyramids).

Pros:

  1. Meshing Simplicity and Speed:
    • Easy for Complex Geometries: Tetrahedral meshing is highly automated and can be generated quickly for almost any geometry complexity (internal or external flow). This makes it excellent for preliminary designs, quick turnarounds, or whenever geometry changes are frequent.
    • Automation: Highly automated.
  2. Geometry Flexibility: Excellent for even the most intricate and dirty (non-manifold, gaps, overlaps) geometries.
  3. Initial Design/Concept: Ideal for rapid prototyping and initial design exploration where computational time for meshing is a primary concern.

Cons:

  1. Accuracy:
    • Higher Numerical Diffusion: Due to their typically isotropic nature and less favorable alignment with flow paths, tetrahedral meshes inherently introduce more numerical diffusion (“false diffusion”). This can smear out strong gradients and lead to less accurate results for certain flow phenomena.
    • Poor for Boundary Layers (on their own): Pure tetrahedral meshes struggle to resolve the thin, high-gradient regions near walls (boundary layers) efficiently. They would require an astronomically large number of tiny cells perpendicular to the wall to achieve sufficient resolution, making the simulation computationally prohibitive.
  2. Computational Efficiency (per cell):
    • More Cells for Same Accuracy: To achieve comparable accuracy to a good hex mesh, a tet mesh typically requires significantly more cells (often 5-10x or more). This translates to much longer simulation times and higher memory requirements.
    • Less Ideal Aspect Ratios: While prism layers (see Hybrid below) address this, standalone tets are not good at creating cells with high aspect ratios needed for wall resolution.
  3. Cell Quality: It’s easier to end up with low-quality (e.g., high-skewness, low-orthogonality) tet cells in highly constrained regions, which can affect solver stability and accuracy.

The Common and Often “Best” Solution: Hybrid Meshes (Tetrahedral Core + Prism Layers)

In modern CFD, a hybrid mesh is often the preferred and most practical approach, combining the advantages of both:

  • Tetrahedral Core: The bulk of the domain (away from walls) is filled with tetrahedral cells, leveraging their ease of generation for complex geometries.
  • Prism (or Inflation) Layers: Near solid walls, several layers of high-quality, high-aspect-ratio hexahedral-like cells (specifically called prism or wedge cells) are extruded from the wall surface. These layers are critical for resolving the boundary layer, capturing steep velocity and temperature gradients, and accurately calculating quantities like wall shear stress and heat transfer coefficients (which depend on achieving a correct $y^+$ value).

Advantages of Hybrid Meshes:

  • Balance of Accuracy and Automation: They offer good accuracy in critical wall regions (via prisms) while maintaining the ease of meshing complex geometries in the bulk fluid (via tets).
  • Computational Efficiency: They are far more computationally efficient than a pure tet mesh designed for comparable accuracy, especially for wall-bounded flows.
  • Industry Standard: Widely used in almost all professional CFD codes for a vast range of applications (automotive, aerospace, turbomachinery, HVAC, etc.).
  • Polyhedral Cells: Some software also offers polyhedral cells which are like a “super-tetrahedron” or a generalized cell with many faces. They offer some of the accuracy benefits of hexes (better face alignment averaging) with the meshing flexibility of tets, often reducing cell count compared to tets. They are frequently used as the “core” fill after prism layers.

Conclusion: Which is “Best”?

  • For Pure Accuracy on Simple Geometries (e.g., fundamental research, academic studies): Structured Hexahedral meshes are generally superior due to minimal numerical diffusion and excellent control over cell quality and alignment.
  • For Quick Turnaround and Highly Complex Geometries (where precise boundary layer resolution isn’t the absolute primary concern): Pure Tetrahedral meshes are fastest to generate.
  • For the Vast Majority of Industrial CFD Applications (balancing accuracy, meshing effort, and computational cost), especially for wall-bounded flows: Hybrid Meshes (Tetrahedral core with Prism/Inflation layers) are the most effective and commonly used solution.

Therefore, for most practical CFD simulations concerning flows interacting with solid surfaces, the answer is rarely pure tet or pure hex, but rather a hybrid approach leveraging the strengths of both.Refine response


CloudHPC is a HPC provider to run engineering simulations on the cloud. CloudHPC provides from 1 to 224 vCPUs for each process in several configuration of HPC infrastructure - both multi-thread and multi-core. Current software ranges includes several CAE, CFD, FEA, FEM software among which OpenFOAM, FDS, Blender and several others.

New users benefit of a FREE trial of 300 vCPU/Hours to be used on the platform in order to test the platform, all each features and verify if it is suitable for their needs


Categories: SALOMEsnappyHexMesh

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *