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
blockMesh

// surface feature extraction for OpenFOAM.com and OpenFOAM.org
surfaceFeatures
surfaceFeatureExtract




// snappyHexMesh execution
snappyHexMesh

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
transformPoints

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

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



2 Comments

snappyHexMesh calculator - Cloud HPC · 20 January 2023 at 12:50 am

[…] is a tool which helps users into choosing the main geometrical parameters of a CFD mesh built using snappyHexMesh, the opensource meshing software included in OpenFOAM. Thanks to this tool, using few parameters, […]

Comparing Mesh Generation Software - Cloud HPC · 22 November 2023 at 10:45 am

[…] 1. SnappyHexMesh […]

Leave a Reply

Avatar placeholder

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