SnappyHexMesh Overrides

Christian Kongsgaard
2021-03-01

SnappyHexMesh Overrides
SnappyHexMesh Overrides

Sometimes the SnappyHexMesh preset that Compute provides is not suiting your need. In those cases you would want to apply an override to the SnappyHexMeshDict. That can be done by giving the Mesh component a JSON formatted string with valid overrides.

An override could look like this:

{
  "snapControls": {
    "tolerance":  1.2
  },
  "castellatedMeshControls": {
    "maxGlobalCells":  20e6, 
    "nCellsBetweenLevels":  3
  }
}

You can see what overrides are available for SnappyHexMeshDict at OpenFOAM's official documentation