Finite Element Method based simulation framework for multiphysics problems in solid and fluid mechanics.
A variety of finite element formulations are implemented.
- Programming languages: C++.
- C++ standard: C++14 (or above)
- Required third-party libraries:
- Clone the repository or download the zip file and extract its contents.
- Go to the directory of the repository in a terminal.
- Create build and bin directories.
mkdir build
mkdir bin
- Modify the CMake file accordingly.
- Copy
CMakeLists-chennalaptop.txt
to a new file for your machine, sayCMakeLists-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
- Copy
- Enter the
build
directory.cd build
- Configure using the CMake file
cmake ..
- Compile, build and install the executable
mpap
. This step will also copy the exe to thebin
folder.make install
- Add the path to the project
bin
to the globalPATH
variable to detect the executable from any other location.export PATH=$PATH:/home/chenna/Documents/myCode/mphyfem/bin
- You can add the above command to
.bashrc
to avoid doing it everytime.
- Simulations are usually run from any folder with a sub-folder named
inputs
. - The project directory and file structure is as shown below.
project | ----inputs | | config | | meshfile.msh | | petsc_options.dat
- To run the simulation, run the executable from the terminal.
- Example 1: To run using the default
config
file in theinputs
sub-directory../femSolidmechanics
- Example 2: To run using a different configuration file in the
inputs
sub-directory../femSolidmechanics configfile.config
If you use MPHYFEM in your research, please cite it as:
@misc{mphyfem,
author = {Chennakesava Kadapa},
title = {{MPHYFEM}: An FEM-based simulation framework for multiphysics problems},
year = {2024},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/chennachaos/mphyfem}},
}