Zero-Config CFD: How the cloudHPC OpenFOAM Script Automates Your Engineering Workflow
In a traditional HPC environment, launching an OpenFOAM simulation feels like a project in itself. You have to manage version sourcing, write manual decomposition scripts, and handle the tedious task of reconstructing parallel results.
At cloudHPC.cloud, we’ve eliminated this overhead. When you run a simulation, our specialized OpenFOAM script takes over the heavy lifting, acting as an automated “orchestrator” for your CFD cases.
Here is how the script transforms a collection of dictionaries into a running simulation.
The Workflow Logic
As shown in the logic diagram below, the script follows a rigorous “Sanity Check” approach to ensure your simulation doesn’t fail due to common configuration errors.

1. Environment & Version Management
The script begins by identifying the specific OpenFOAM flavor you’ve selected—supporting a massive range from v1912 up to the latest v2412, as well as the Foundation (of13) versions. It automatically sources the correct bashrc and RunFunctions, ensuring all environment variables are correctly mapped before a single cell is solved.
2. Automated Parallel Decomposition
Manually editing numberOfSubdomains is a thing of the past. The OpenFOAM script detects your selected hardware and automatically adjusts your decomposeParDict:
- Scotch: Sets the subdomain count to match your physical CPU cores.
- Hierarchical: The script contains an intelligent algorithm to calculate optimal $$ x, y, z $$ coefficients.
# How the script calculates hierarchical coefficients automatically
cubicroot=$( echo $nProc | awk '{print $1^(1/3) }' )
coeffs0=${cubicroot%.*}
# ... automated logic to ensure product equals nProc
foamDictionary -entry "hierarchicalCoeffs/n" -set "( $coeffs0 $coeffs1 $coeffs2 )" system/decomposeParDict
3. The Meshing Pipeline
If the script detects that a polyMesh doesn’t exist, it triggers the meshing sequence. It supports both snappyHexMesh and cfMesh workflows, handling everything from surfaceFeatureExtract to checkMesh in parallel. It even includes logic to automatically scale your mesh or split regions for Conjugate Heat Transfer (CHT) cases if specified in your controlDict.
4. Smart Solver Execution
The script reads your application entry to launch the correct solver (like simpleFoam or pimpleFoam).
One of the most powerful features is the self-healing loop. If a simulation is interrupted or a file write fails, the script detects the “FOAM FATAL ERROR,” cleans the corrupted time-step, and attempts to resume the run automatically.
5. Post-Processing & Reconstruction
After the solver completes, the script doesn’t just stop. It:
- Automatically executes
reconstructParfor your time-steps. - Deletes bulky
processor*folders to keep your storage lean. - Prepares
.foamand.OpenFOAMfiles so you can open your results in ParaView immediately after download.
Why Engineers Love It
The OpenFOAM script means you spend less time writing bash commands and more time analyzing flow physics. By providing a standardized, robust execution path, we ensure that your simulations are repeatable, scalable, and fail-safe.
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