This topic uses Open Source Field Operation and Manipulation (OpenFOAM) as an example to show how to perform high-performance computing by using an Elastic High Performance Computing (E-HPC) cluster.
OpenFOAM is a C++ toolbox for the development of customized numerical solvers, and pre-/post-processing utilities for the solution of continuum mechanics problems, including computational fluid dynamics (CFD). For more information, visit the OpenFOAM official website.
In this topic, OpenFOAM solver named simpleFoam is used as an example to calculate the motorcycle outflow field. Example directory: $FOAM_TUTORIALS/incompressible/simpleFoam/motorBike/.
Log on to the E-HPC console.
Create a cluster named OpenFOAM.
For more information, see Create a cluster. Set the following parameters:
Scheduler: Select pbs.
Other Software: Install openfoam-openmpi 5.0 and openmpi 1.10.7.
If you use an existing cluster, you can install the preceding software in it. For more information, see Install software.
Create a sudo user named foamtest.
For more information, see Create a user.
Use CLI to create and submit a job.
On the Cluster page of the E-HPC console, find OpenFOAM cluster. Click Connect.
In the Connect panel, specify a username, password, and port number for foamtest. Then, click Connect via SSH.
Run the following command to create and submit a job:
export MODULEPATH=/opt/ehpcmodulefiles/ # The environment variables on which the module command depends. module load openfoam-openmpi/5.0 module load openmpi/1.10.7 mkdir /home/foamtest/motorBike # Create a motorBike folder. cp -r /opt/OpenFOAM/OpenFOAM-5.0/tutorials/incompressible/simpleFoam/motorBike/* /home/foamtest/motorBike # Copy the source code in the motorBike example file to the /home/foamtest/motorBike directory. cd /home/foamtest/motorBike source /opt/OpenFOAM/OpenFOAM-5.0/etc/bashrc ./Allrun # Run the motorBike example.
Run the following command to view the result file generated for the OpenFOAM job:
The following figure shows the test result.