Available Versions:
version 12 / version 8
OpenFOAM is a versatile computational fluid dynamics (CFD) toolset built on the Finite Volume method, capable of handling a wide range of engineering and scientific applications. It provides robust solutions for fluid flow (including turbulence, heat transfer, and chemical reactions), as well as solid dynamics and electromagnetics. With OpenFOAM, you can model and simulate complex fluid dynamics scenarios across diverse fields, such as aerodynamics, energy systems, and industrial processes.
When configuring an OpenFOAM simulation through the Inductiva API, the process follows several steps: domain partitioning, meshing, solving, and post-processing. To set up the simulation, you’ll need configuration files organized into three main folders; time
, constant
, and system
.
Here’s a quick example code to get you started. This example follows the motorbike tutorial from OpenFOAM repository and shows how to run an OpenFOAM simulation on a c3d-standard-180 Google Cloud machine using our API. To try it out, simply paste the code into your Python environment.
For more details on the simulator’s features and configurations, visit the official OpenFOAM Foundation site.
"""OpenFOAM Foundation example."""
import inductiva
# Allocate Google cloud machine
cloud_machine = inductiva.resources.MachineGroup( \
provider="GCP",
machine_type="c3d-standard-180")
# Initialize the Simulator
openfoam = inductiva.simulators.OpenFOAM(distribution="foundation",
version="12")
# Run simulation with config files in the input directory
task = openfoam.run( \
input_dir="/path/to/my/openfoam/files",
shell_script="./Allrun",
on=cloud_machine)
# Wait for the simulation to finish and download the results
task.wait()
cloud_machine.terminate()
task.download_outputs()
Dive Deep
In this advanced OpenFOAM example, we simulate a high-lift wing configuration from the MB9 micro-benchmark of the ExaFOAM benchmarks. This benchmark is a precursor to the HPC Grand Challenge, which simulates a full aircraft configuration using wall-modeled LES (WMLES) for turbulence.
We use a 2D, three-element high-lift wing in this simulation, applying WMLES for turbulence modeling. The simulation is executed via the Inductiva API, first on a 360 vCPU machine and then on an MPI cluster with two large machines to test if we can reduce execution time by half.
We’ve got 20 simulators ready for you to explore.
Just one click away from running your favorite open-source simulators on the cloud and at scale!
Why not give it a try? Explore our example codes and discover everything our API can offer.
AMR-Wind
CaNS
CP2K
DualSPHysics
FVCOM
FDS
GROMACS
GX
NWChem
OpenFAST
OpenFOAM (ESI)
OpenFOAM (Foundation)
Quantum ESPRESSO
Reef3D
SCHISM
SNL-SWAN
SPlisHSPlasH
SWAN
SWASH
XBeach