Sciences and methods > Computational Fluid Dynamics > CFD software > OpenFOAM > Examples of sequential and parallel executions on Murska
 
Tehdyt toimenpiteet

Examples of sequential and parallel executions on Murska

Herein we assume that the OpenFOAM environment is created and that the steps in the icoFoam tutorial example are performed.


Sequential batch job

Copy an example file for sequential run of the OpenFOAM cavity flow tutorial in to the run directory

cp  /v/linux26_x86_64/appl/fluid/foam_instfiles/batchfiles/seqjob $FOAM_RUN/icoFoam

Check that the memory and execution time limits, as well as the paths are ok in the job file.

Notice that in the jobfile, the module load openfoam command is not used.  Instead an other file, foam_1.5_batchjob_source, is needed to be sourced.

The job is send to the batch environment by giving the command

bsub < seqjob


Parallel batch job

Here we execute the cavity flow tutorial with 4 processors.  First we have to increase the mesh size up to 200 x 200 cells.  Edit the icoFoam/cavity/system/constant/polyMesh/blockMeshDict file in following way.

Change these lines to look as



convertToMeters 1.0;

hex (0 1 2 3 4 5 6 7) (200 200 1) simpleGrading (1 1 1)


Save the file.  Make following copy

 cp $FOAM_TUTORIALS/interFoam/damBreak/system/decomposeParDict  cavity/system

In decomposeParDict file you may set the parameters for the domain decomposition, i.e. for the partitioning of the fluid domain for different processors.  The decomposeParDict file in damBreak tutorial case is usable as it is for this example.


Next make a copy of the example file of murska parallel batch job:

cp  /v/linux26_x86_64/appl/fluid/foam_instfiles/batchfiles/parjob $FOAM_RUN/icoFoam

and edit it into proper shape.

Notice that in the jobfile, the module load openfoam command is not used.  Instead an other file, foam_1.5_batchjob_source, is needed to be sourced.

Next, in the cavity directory, create the new mesh and decompose it to 2 x 2 domains


blockMesh 

decomposePar

and send the parallel job for processing


bsub < parjob

The results are written into cavity/processors* directories.  For to combine the results of the different domains, give the command


reconstructPar

The final results are the available in the cavity/0.* directories.