comp-physics / RBC3D

3D Spectral boundary integral solver for cell-scale blood flow
MIT License
7 stars 3 forks source link
blood boundary-integral-equation red-blood-cells spectral-methods stokes-flow

RBC3D Banner

RBC3D

Spectral boundary integral solver for cell-scale flows

Authors: S. H. Bryngelson, H. Zhao, A. Isfahani, J. B. Freund

RBC3D is a flow solver for soft capsules and cells via the methods discussed in Zhao et al., JCP (2010) and more. This codebase solves the boundary integral form of the Stokes equations via an algorithm tailored for cell-scale simulations:

Installation

To install on a mac from the cloned repository, you can

brew install gcc mpich gfortran pkg-config wget cmake
./rbc.sh install-mac

and then set these environment variables in your ~/.zshrc or ~/.bashrc. Note that $HOME will need to be replaced with the folder you cloned RBC3D in.

export PETSC_DIR=$HOME/RBC3D/packages/petsc-3.19.6
export PETSC_ARCH=arch-darwin-c-opt

Then to execute and run a case, you can:

mkdir build
cd build
cmake ..
make -j 8 minicase # or just `make` to make common and all the cases
cd minicase
mpiexec -n 1 ./minit
mpiexec -n 2 ./mtube # number of nodes can be changed

This will generate output files in build/minicase/D. To keep output files in examples/minicase/D and use input files in examples/minicase/Input, you can do this instead once files are built in the build directory:

cd examples/case
mpiexec -n 1 ../../build/case/minit
mpiexec -n 2 ../../build/case/mtube

To run a case with more cells and nodes, you should use a supercomputing cluster. Instructions on how to build RBC3D on a cluster are available here.

Papers that use RBC3D

This is an attempt to document the papers that make use of RBC3D.

License

MIT.