snappyHexMesh on cloudHPC

Published by rupole1185 on

Many users wonder how which procedure follows our snappyHexMesh script. The reply to this question is rather simple and this post aims at giving you the most important info.

basic steps to generate mesh with snappyHexMesh

Obviously to use snappyHexMesh there are three steps to follow and complete: blockMesh – which generates the initial structured mesh, surfaceFeatures – which extract the edges of the input STL file and snappyHexMesh which is the official procedure to follow to generate a mesh.

// block mesh generation

// surface feature extraction for and

// snappyHexMesh execution

mesh management

After the mesh ends, some advanced tools allow to check the quality of the mesh and make some preliminaries updates. In particular:

  • checkMesh with all controls enabled
  • createPatch which updates your mesh patches if you have previously specified a createPatchDict file under the system directory.
// extended checkMesh
checkMesh -allGeometry -allTopology -writeSets vtk

// final createPatch
createPatch -overwrite

Advanced controls are also present and they are peculiar of cloudHPC. Thanks to this special variables in controlDict activate operations to perform on your mesh such as rescaling it.

// Controlled by your system/controlDict: splitMesh
// if "true"
splitMeshRegions -cellZonesOnly -overwrite
// if "largest"
splitMeshRegions -largestOnly -overwrite

// Controlled by your system/controlDict: scaleFactor
// i.e.: scaleFactor 1000

After the mesh

Once your mesh is over you can run your CFD analysis. Among the functionalities of cloudHPC you have the possibility to copy a certain mesh into your CFD analysis. When executing your analysis in fact you can find two options to select:

  • Folder . This specifies the case folder on the storage you want to execute
  • Mesh . The folder of a second case from which you want to copy the OpenFOAM mesh from.

Thanks to this, you can generate a single mesh with snappyHexMesh and copy it to all the CFD cases which share the same grid. To try it yourself, register for free and use the cloudHPC up to 300 vCPU Hours.

Software selection cloudHPC


Leave a Reply

Avatar placeholder

Your email address will not be published.

%d bloggers like this: