This code is a work-in-progress. The Git commit messages in the repository show the latest progress like bugfixes, addition of features, etc.


With Bitbucket account and SSH keys:

git clone git@bitbucket.org:dog5011/ibcartins3d.git


git clone https://bitbucket.org/dog5011/ibcartins3d.git


  • master
  • with-petsc


Unsteady incompressible Navier-Stokes solver based on the Fractional Step algorithm (Kim & Moin, 1982) with interface to use PETSc for time integration.


  • 3D Cartesian
  • Spatial Discretization of Convective terms
    • First order upwind
    • Second order central
    • Fourth order central
    • Fifth order upwind (with WENO limiting)
  • Time integration
    • With PETSc (with-petsc branch)
    • Native time-integration scheme
      • Low Storage RK3 for convective term
      • Trapezoidal for viscous terms
  • Additional features
    • Option to discretize flux in conservative or non-conservative form
    • Immersed boundary methodology to treat solid objects in flow (STL geometry needed as input)
    • (PETSc only) Use custom RK or ARKIMEX scheme by registering its Butcher tableaux
  • Serial as well as parallel (MPI)
    • Compiling

      The following steps should compile the code (the default prefix is the source folder itself, so the binary will be installed in ibcartins3d/bin):

      autoreconf -i
      This will generate the required files for:
      [CFLAGS="..."] ./configure [--with-mpidir=/path/to/mpi] [--prefix=/install/dir]
      make install

      ** A serial version can be compiled using the "-Dserial" compile flag.
      ** If MPI is unavailable or the configure script is unable to detect MPI, then a serial version of the code will get compiled.

      Compiling with PETSc - for the with-petsc branch:

    • Install PETSc (See below)
    • Define the variables PETSC_DIR=/path/to/petsc and PETSC_ARCH (architecture/build)
    • Compile with the usual steps (the configure script will automatically detect these variables and decide whether to compile with PETSc interface).

    • ** It is preferable to use the same MPI compiler for building PETSc and this code.
      ** If the variables PETSC_DIR and PETSC_ARCH are not defined in the environment, the code will get compiled without PETSc time-integration.

      PETSc Installation
      The code uses some PETSc features that are *NOT* available yet in the official release. See here for instructions to download and install PETSc.


      [/path/to/mpi/bin/]mpiexec -n $NPROC /path/to/IBCARTINS3D
      Note: $NPROC needs to be equal to the product of the "iproc" entries in the input file "solver.inp".

      See the README file in the source for a list of required input files and their explanations.


      The folder run/ contains several examples with all the input files required to run a case.