Giter Site home page Giter Site logo

comp-physics / rbc3d Goto Github PK

View Code? Open in Web Editor NEW
7.0 0.0 3.0 30.59 MB

3D Spectral boundary integral solver for cell-scale blood flow

License: MIT License

Makefile 0.71% Fortran 91.81% Python 1.57% Shell 3.02% BitBake 0.81% CMake 2.09%
red-blood-cells blood spectral-methods boundary-integral-equation stokes-flow

rbc3d's Introduction

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:

  • Spectrally-accurate spherical harmonics represent the deforming surfaces
  • Modified Green’s function approximation used for near-range interactions
  • Electrostatic-like repulsion prevents cells from intersecting
  • Weak-formulation of no-slip boundary conditions (e.g., vessel walls)
  • These features ensure that simulations are robust. Parallel communication via MPI enables large simulations, such as model vascular networks.

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 from the RBC3D root directory, run these commands but replace .zshrc with where you store environment variables:

rootdir=`pwd`
echo -e "export PETSC_DIR=$rootdir/packages/petsc-3.21.3 \nexport PETSC_ARCH=arch-darwin-c-opt" >> ~/.zshrc

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.

rbc3d's People

Contributors

sbryngelson avatar smullangi3 avatar suzanmanasreh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

rbc3d's Issues

Github-hosted Code Runner

Code Runner that compiles RBC3D with ubuntu-latest. Can use similar install process to mac and add necessary install scripts. Feel free to refactor install scripts or improve install process with CMake.

readme describes installation on a specific computer

The readme should describe how to install the code on any *nix based computer or at least a specific generic one, like ubuntu or macos. A link can be included to Phoenix or other specific install instructions in version control.

Rearrange cases

Right now all of the cases are in the root directory. They should be moved to something like an examples/ directory, like examples/different-cell-types for example.

Fix Output File Data

The output files of field.F90, v.f and v.g are unusable in Paraview. Also can't use xe*.dat files unless you're in tecplot.

Dropbox link broken in install instructions

wget https://www.dropbox.com/s/gljrvl6p2f5x3go/l_mkl_p_10.0.1.014.tgz returns 404 not found error. Could eliminate step by having l_mkl_p_10.0.1.014.tgz already in the packages directory.

Viscosity Term

The viscRat term can be set for a case in Input/tube.in. However, running a case with non-uniform viscosity (viscRat not 1) and walls causes the simulation to crash. This ticket is to fix it.

Dependencies are outdated

This codebase carries several very out of date dependencies. This makes it quite challenging to build and likely affects performance. Resolving this issue would substitute more up-to-date or modern/difference packages for such things. Below are some example packages.

  • Intel MKL (current version very very old)
  • GMRES solver (currently a hardcoded file?)
  • Build system relying upon makedepf90
  • PETSc (current version very very old)

Code runner to check compilation

We shouldn't have to manually compile and run all cases before making a PR. This ticket is to create a code runner that we could submit jobs to to check that /common and all cases under /examples/ compile. This would need an automated build script in /.github/scripts/ to run on Phoenix or another cluster.

Resolve compiler warnings

The gcc compiler available on the school clusters throws several warnings as you can see here and here. These mostly have to do with MPI argument mismatches and bad floating point conversions. I think they should be fixed so no one introduces new warnings in the future. You need access to ICE or Phoenix for this unless you figure out how to reproduce these warnings on mac.

Random point selection in arbitrary wall geometry

Currently, examples/randomized_case and examples/carotid_web assume a tube has a circular cross section, so they choose random points in a circle. However, that's not the case for tubes that look like this and this. This ticket is to write a place cell algorithm that handles placing cells in any arbitrary wall geometry.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.