RETURN
Simulation
October 2021

OpenFoam on Qarnot Cloud

OpenFoam Is the software Open source reference for Computational Fluid Dynamics (CFD) simulations (Computational Fluid Dynamics). Although it is mainly used for fluid simulations, it also has solvers for all sorts of physical phenomena. Running your OpenFOAM simulation on Qarnot is as easy as downloading your case and running a script. Here is an overview of the various steps.

Versions

The test case uses OpenFOAM v2412, but numerous versions are available on Qarnot, which are given in the following table. To choose one, simply change the value of DOCKER_TAG in the script used to start the calculation.

If you are interested in a different version, please email us at support-compute@qarnot-computing.com.

Prerequisites

Before starting the case, please ensure that the following prerequisites have been met.

Test case

This test case is based on the simulation of the motorcycle tutorial. The test case presented below is based on the motorcycle. It contains the mesh (mesh) and the case configuration files.

Download it, unpack it and move the “motorbike” folder next to one of the following scripts.

Launch of the case

After downloading the case Motorbike, you should be able to start your calculation in the two ways shown below (mode Batch or ssh).

1 - Fashion Batch

To launch this script, simply download the previous code, place it on the same level as the input folder, and run Python3 run-openfoam.py in your terminal. Make sure you have copied your authentication token into the script (instead of <MY_SECRET_TOKEN>) to be able to launch the task on Qarnot.

Your test case will be automatically launched using the path command RUN_SCRIPT defined in the script run-openfoam.py.

2 - Ssh mode

The script shown below allows you to connect to your container using the ssh protocol.

To launch it, simply copy the previous code into a Python script, place it at the same level as the input folder, and set your ssh key in the settings DOCKER_SSH. Make sure you have copied your authentication token into the script (instead of “MY_SECRET_TOKEN”) to be able to launch the task on Qarnot.

Execute Python3 run-openfoam-ssh.py in your terminal.

You should now be able to connect to the host using the information shown on your console.

/! \ Please note that you must use the user Openfoam to launch your case.

Your test case is available in /share.

Go to the directory /share and you are now in a position to execute your test case with the command defined in the variable RUN_SCRIPT.

CD/share
. /Allrun

For more information on the available settings, please refer to the settings section.

Results

At any time, you can monitor the status of your task on the general web interface.

You should also have a results file in the Bucket output and on your computer containing all the numerical results. You can open the file motorbike.foam to view the results in Paraview or any other visualizer. You can also use our implementation Paraview web to view the results online if required.

Available settings:

Optional parameters:

Conclusion

That is all! If you have any questions, please contact qlab@qarnot-computing.com and we will be happy to help!

Return

Our articles