Difference between revisions of "Extend-bazaar/Toolkits/ImmersedBoundary"

From OpenFOAMWiki
(Rectified mirror references)
(Added a few more instructions and information)
Line 12: Line 12:
  
 
=== Install from the original source code on 1.6-ext ===
 
=== Install from the original source code on 1.6-ext ===
'''TODO'''
+
To download and install, run these commands:
 +
<bash>mkdir -p $FOAM_RUN
 +
cd $FOAM_RUN/..
 +
wget "http://www.openfoamworkshop.org/2012/downloads/Training/ZeljkoTukovic/ZeljkoTukovic-ImmersedBoundaryMaterial.tgz"
 +
tar -xzf ZeljkoTukovic-ImmersedBoundaryMaterial.tgz
 +
cd ImmersedBoundary
 +
tar -xzf ImmersedBoundary_HJ_ZT.tgz
 +
cd ImmersedBoundary_HJ_ZT/src
 +
./Allwmake
 +
</bash>
  
  
Line 21: Line 30:
 
git clone git@github.com:wyldckat/ImmersedBoundary.git ImmersedBoundary
 
git clone git@github.com:wyldckat/ImmersedBoundary.git ImmersedBoundary
 
cd ImmersedBoundary/src
 
cd ImmersedBoundary/src
#cp -r timeStepping/MRF/* $FOAM_SRC/finiteVolume/cfdTools/general/MRF/
 
#wmake libso $FOAM_SRC/finiteVolume
 
 
./Allwmake
 
./Allwmake
 
</bash>
 
</bash>
Line 41: Line 48:
 
== Documentation ==
 
== Documentation ==
 
'''TODO'''
 
'''TODO'''
 +
 +
 +
=== Creating new solvers that use this toolkit ===
 +
Transcript from the instructions present in the file {{tt|src/SOLVER_COOKBOOK}}, documenting the procedure for creating new solvers that use this toolkit:
 +
<pre>Make/options: add
 +
 +
    -I$(LIB_SRC)/triSurface/lnInclude \
 +
    -I$(LIB_SRC)/meshTools/lnInclude \
 +
    -I../immersedBoundary/lnInclude
 +
 +
 +
    -ltriSurface \
 +
    -lmeshTools \
 +
    -L$(FOAM_USER_LIBBIN) -limmersedBoundary \
 +
 +
createFields.H: add
 +
 +
#  include "createIbMasks.H"
 +
 +
solver:
 +
 +
1) add immersed boundary headers
 +
 +
#include "immersedBoundaryFvPatch.H"
 +
#include "immersedBoundaryAdjustPhi.H"
 +
 +
2) on calculation of face fluxes (or their components), mask with faceIbMask
 +
 +
3) before to adjustPhi, add:
 +
 +
        // Adjust immersed boundary fluxes
 +
        immersedBoundaryAdjustPhi(phi, U);
 +
 +
4) on explicit updates, add correctBoundaryConditions();
 +
 +
eg.
 +
 +
        U = fvc::reconstruct(phi);
 +
        U.correctBoundaryConditions();
 +
 +
5) On reports of continuity error, add masking:
 +
 +
        Info<< "IB-masked continuity error = "
 +
            << mag(cellIbMask*fvc::div(phi))().weightedAverage(mesh.V()).value()
 +
            << endl;
 +
 +
  or use immersedBoundaryContinuityErrs.H
 +
 +
5) Chenge Courant number check to be IB-sensitive, using
 +
 +
  immersedBoundaryCourantNo.H
 +
</pre>
 +
 +
 +
== Discussion threads ==
 +
Here is a list of known discussion threads regarding this toolkit:
 +
* [http://www.cfd-online.com/Forums/openfoam/124472-immersed-boundary-method-already-available-2-1-x-2-2-x.html#post459040 Is Immersed Boundary Method already available in OF 2.1.x or 2.2.x]
 +
* [http://www.cfd-online.com/Forums/openfoam/131488-immersed-boundary-cylinder-tutorial-using-icoibfoam-application.html Immersed Boundary Cylinder Tutorial using IcoIbFoam application]
  
  

Revision as of 17:30, 5 April 2014

1 Description

This toolkit was created by Zeljko Tukovic and Hrvoje Jasak, according to this presentation. The original source code is provided here: ZeljkoTukovic-ImmersedBoundaryMaterial.tgz


2 Installation

Valid versions: OF Version 16ext.png

It depends on the origin from which you wish to download:


2.1 Install from the original source code on 1.6-ext

To download and install, run these commands:

mkdir -p $FOAM_RUN
cd $FOAM_RUN/..
wget "http://www.openfoamworkshop.org/2012/downloads/Training/ZeljkoTukovic/ZeljkoTukovic-ImmersedBoundaryMaterial.tgz"
tar -xzf ZeljkoTukovic-ImmersedBoundaryMaterial.tgz
cd ImmersedBoundary
tar -xzf ImmersedBoundary_HJ_ZT.tgz
cd ImmersedBoundary_HJ_ZT/src
./Allwmake


2.2 Install from a Git repository on 1.6-ext

To download and install, run these commands:

mkdir -p $FOAM_RUN
cd $FOAM_RUN/..
git clone git@github.com:wyldckat/ImmersedBoundary.git ImmersedBoundary
cd ImmersedBoundary/src
./Allwmake

Note: If you have problems using git to clone from the official repository, then try these mirrors:

  1. wyldckat's ImmersedBoundary repository at Github - you can use any of the following commands:
    git clone git@github.com:wyldckat/ImmersedBoundary.git ImmersedBoundary
    git clone https://github.com/wyldckat/ImmersedBoundary.git ImmersedBoundary


3 Usage examples

TODO


4 Documentation

TODO


4.1 Creating new solvers that use this toolkit

Transcript from the instructions present in the file src/SOLVER_COOKBOOK, documenting the procedure for creating new solvers that use this toolkit:

Make/options: add

    -I$(LIB_SRC)/triSurface/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I../immersedBoundary/lnInclude


    -ltriSurface \
    -lmeshTools \
    -L$(FOAM_USER_LIBBIN) -limmersedBoundary \

createFields.H: add

#   include "createIbMasks.H"

solver:

1) add immersed boundary headers

#include "immersedBoundaryFvPatch.H"
#include "immersedBoundaryAdjustPhi.H"

2) on calculation of face fluxes (or their components), mask with faceIbMask

3) before to adjustPhi, add:

        // Adjust immersed boundary fluxes
        immersedBoundaryAdjustPhi(phi, U);

4) on explicit updates, add correctBoundaryConditions();

eg.

        U = fvc::reconstruct(phi);
        U.correctBoundaryConditions();

5) On reports of continuity error, add masking:

        Info<< "IB-masked continuity error = "
            << mag(cellIbMask*fvc::div(phi))().weightedAverage(mesh.V()).value()
            << endl;

  or use immersedBoundaryContinuityErrs.H

5) Chenge Courant number check to be IB-sensitive, using

  immersedBoundaryCourantNo.H


5 Discussion threads

Here is a list of known discussion threads regarding this toolkit:


6 History

19:16, 5 April 2014 (CEST): Kicked off this page, since it was nowhere to be found on the wiki.