Skip to content

chennachaos/mpap

Repository files navigation

Multi-Physics Analysis Program (MPAP) for Fluid-Structure Interaction (FSI) using the CutFEM approach on hierarchical b-spline grids.

The finite element formulation is published in 3 papers in CMAME journal. Paper 1 Paper 2 Paper 3

Animations of some of the simulations performed using this code are available on my YouTube channel.

  • Programming languages: C++ and Fortran
  • C++ standard: C++14 (or above)
  • Required third-party libraries:
    1. CMake
    2. Blas
    3. Lapack
    4. Boost
    5. MPI (OpenMPI, MPICH or Intel MPI. Your choice!)
    6. Eigen
    7. METIS
    8. PETSc
    9. VTK
    10. CGAL
    11. Metis and ParMetis
    12. SuperLU

Compilation and building

  1. Clone the repository or download the zip file and extract its contents.
  2. Go to the directory of the repository in a terminal.
  3. Create build and bin directories.
    • mkdir build
    • mkdir bin
  4. Modify the CMake file accordingly.
    • Copy CMakeLists-chennalaptop.txt to a new file for your machine, say CMakeLists-local.txt.
    • Change the paths to the compilers, Eigen, CGAL, PETSc and VTK libraries.
    • Change the path in the install function.
    • Create a symbolic link to the local CMake file.
      • ln -sf CMakeLists-local.txt CMakeLists.txt
  5. Enter the build directory.
    • cd build
  6. Configure using the CMake file
    • cmake ..
  7. Compile, build and install the executable mpap. This step will also copy the exe to the bin folder.
    • make install

Execution

  • Simulations are usually run from the bin folder.
  • Copy petsc_options.dat file from the project/sampleinputs folder to the bin folder.
  • For serial run: ./mpap <pathtodirectory> <inpfilename> (White space between each entry)
  • For parallel run: mpirun -n <nprocs>./mpap <pathtodirectory> <inpfilename>
  • Example:
    • ./mpap ../project/sampleinputs IsquareFixed
    • mpirun -n 4 ./mpap ../project/sampleinputs IsquareFixed

Understanding and using output(s)

For each simulation the output contains two items:

  1. Files for visualisation in ParaView. Generated in the bin folder.

    • One .pvtu file for each time step. Contains velocity, pressure and vorticity for the flow field. This file is an amalgamation of .vtu files for individual subdomains. You need to open the .pvtu files in ParaView for visualising the whole fluid domain.
    • One .vtu file for each solid, if the solids are allowed to move. Only done for flexible solids.
  2. A file with the letter prefixed T to the name of the input file containing the data for forces and displacements. (This will be created in the same directory as the input file.)

About

Multi Physics Analysis Program

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published