Estimate OpenFOAM cloudHPC cost
As a cloudHPC provider, it is important to give guidelines to users about estimating the cost of using remote hardware resources for one single simulation. Today we talk about OpenFOAM and we discover how you can estimate the cost of one single simulation.
Let’s start from scratch: OpenFOAM is an opensource CFD software. Our platform currently hosts both the main branches: openfoam.org and openfoam.com . In order to understand better the pricing it is important to note that OpenFOAM can use only OpenMPI scalability, differently to other CFD software.
This mean that when using OpenFOAM we are forced to select “highcore” instances in order to use 100% of their computing power. The following table reports the current highcore instance pricing per CORE/Hour.
Estimate simulation computational cost
Now that we know the hardware cost per hour, it is necessary to estimate the OpenFOAM cloudHPC cost. To do that it is important to know these details of your CFD analysis:
- Time discretization: is your simulation transient or steady? Transient analysis usually are more hardware consuming than steady ones. So if not necessary, convert to steady!
- Mesh size: how many cells you are going to simulate? Computational cost is directly proportionally to the mesh size and in particular to the cells number.
- Mesh quality: in order to run a computation on poor quality meshes you have to iterate for longer, intrudice a higher nonOrthogonalityCorrector or reduce the relaxation factors in fvSolution. This definitely increases the computational time.
- Turbulence modelling: some turbulence modelling (i.e. k-epsilon or k-w SST) intruduces two extra equations, some other only one (Spalart–Allmaras), while some others introduce none (LES) but they have constraints on time schemes.
- CFD modelling: beside the turbulence, other modelling may be introduced and as a consequence the total simulation time can be affected for example by:
- heat transfer
- radiative heat transfer
- geometry variations
- Algebraic schemes: in the end every CFD simulation involves solving a linear system of equations. Under fvSolution you are specifying for every variable the schemes you are using: GaussSeidel, GAMG, PBiCGStab, PCG etc. and obviously, different algorithms different computational costs
Using PRE instances
It is good to notice that OpenFOAM can take advantage of PRE instances which provide a great discount. When using them, remember to follow these instructions under controlDict file:
startFrom latestTime; //in case of restart, restart from last saved time step writeControl timeStep; //control timing of writing results writeInterval 100; //writing results frequency purgeWrite 5; //keeps only the 5 most recent results and cancels older
OpenFOAM cloudHPC cost of a single analysis
As you noticed, there are so many parameters that can affect the computational cost of one single simulation. To provide a certain data we anyway try to make some assumptions:
STEADY analysis on a 20M cells using simpleFoam (duration approx 10 hours on a 48 highcore PRE machine): cost of 24€
TRANSIENT analysis on a 10M cells using rhoPimpleFoam (duration approx 20 hours on a 48 highcore machine): cost of 48€
These assumption are generally way bigger than most of the CFD analysis performed by standard users, so you can take these number as limits of the costs for one single analysis. Since the situation in your peculiar analysis may be very different, we invite you all to register and test the platform for FREE with the 300 vCPU/Hours provided. Only by trying yourself you can get a real idea of the costs of your analysis.