Contrib multiSolver/installation

From OpenFOAMWiki

1 Installing multiSolver

To install multiSolver:

0. If you are running pre-compiled binaries, first make sure you can compile your copy of OpenFOAM.

1. Download the code from here.

http://openfoam-extend.svn.sourceforge.net/viewvc/openfoam-extend/trunk/Breeder_1.5/libraries/multiSolverExtension/?view=tar

2. Open a terminal window and browse to the folder with your download.

3. Execute the following commands. You should be able to just copy and paste all 8 lines into your terminal:

tar --transform='s,multiSolverExtension,'$WM_PROJECT_DIR',' \
-x -v -z -P -f openfoam-extend-multiSolverExtension.tar.gz
cd $WM_PROJECT_DIR/src/multiSolver
wmake libso
cd $FOAM_APP/utilities/postProcessing/multiSolver
wmake
cd $FOAM_APP/solvers/multiSolver/multiSolverDemo
wmake

multiSolver should now be installed.

2 Testing the installation

The installation comes with a demo application and test case. First copy the test case into you run/tutorials directory:

cp -rf $WM_PROJECT_DIR/tutorials/multiSolver $FOAM_RUN/tutorials

To run the test case:

cd $FOAM_RUN/tutorials/multiSolver/multiSolverDemo/teeFitting2d
blockMesh
multiSolverDemo

To view the results:

multiSolver -load all
multiSolver -set icoFoam1
paraFoam

2.1 About the test case

The demo application is:

  1. icoFoam1 - i.e. icoFoam with boundary conditions 1;
  2. scalarTransportFoam;
  3. icoFoam2 - i.e. icoFoam with boundary conditions 2;
  4. scalarTransportFoam (again);
  5. repeat.

The test case is a 2-dimensional tee fitting. The boundary conditions are:

1. icoFoam1:

        Inlet
         ||
         ||
Closed ====== Outlet

2. scalarTransportFoam

        T = 1
         ||
         ||
 zeroG ====== zeroG


3. icoFoam2

        Outlet
         ||
         ||
Outlet ====== Inlet

4. scalarTransportFoam

        T = 1
         ||
         ||
 zeroG ====== zeroG

The test case also has storeFields defined to demonstrate their use:

  • icoFoam doesn't need the T field, so it stores this field; and
  • scalarTransportFoam doesn't need the P field.

Since icoFoam1 is the first to run, it must have all fields defined in its initial/0 directory, even though it is storing the T field.