You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

OpenFOAM at a glance

Purpose: Computational Fluid Dynamics
Latest version: 5.0
Licence: GNU GPL
Website: http://www.openfoam.com/ext-link

OpenFOAM is a software environment for computational fluid dynamics (CFD) and related computations.

OpenFOAM provides a C++ library and tools for setting up, meshing, solving, computing properties, and post-processing continuum mechanics, especially computational fluid dynamics. OpenFOAM includes solvers for a number of applications and provides an environment in which users can build their own.

 


 

SLURM Submit script example

For more information use the Job Script Generator.

ofoam_example.slm
#!/bin/bash
#SBATCH -J ofoam_example
#SBATCH -e ofoam_example.err
#SBATCH -o ofoam_example.out
#SBATCH -p std
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --mem=4G

module load apps/openfoam/5.0
source config_OF 1606
 
INPUT_DIR=${PWD}
OUTPUT_DIR=${PWD}

cd $SCRATCH
cp -r $INPUT_DIR/* $SCRATCH
mpirun -np $t [yoursolver] > log
reconstructPar
cp ./* $OUTPUT_DIR

 

Sbatch options:

  • -JSpecify a name for the job allocation. The default is the name of the batch script.
  • -e: Specify a name for the error output file.
  • -o: Specify a name for the output file.
  • -p: Specify the name of the partition (queue) where the job will be submited. The default is std.
  • --nodes: Number of nodes requested for allocation
  • --ntasks: Number of processes requested for allocation
  • --mem-per-cpu: Memory allocated per core.

 


 

  • No labels