Open Foam
OPENFOAM
SERIAL JOB SCRIPT Sample job file for openfoam for running in serial :
File Name : openfoam.cmd
#!/bin/bash
#PBS -o logfile.log
#PBS -e errorfile.err
#PBS -l walltime=24:00:00
#PBS -l select=1:ncpus=1:mpiprocs=1
tpdir=echo $PBS_JOBID | cut -f 1 -d .
tempdir=$HOME/scratch/job$tpdir
mkdir -p $tempdir
cd $tempdir
cp -R $PBS_O_WORKDIR/* .
simpleFoam
mv ../job$tpdir $PBS_O_WORKDIR/.
In the command prompt, type the command, qsub openfoam.cmd