Skip to content

Tutorial: simulation of biofilm deformation and detachment

Bowen Li edited this page Jun 4, 2019 · 16 revisions

In this tutorial, we demonstrate how to simulate and visualise a biofilm system with fluid dynamics. The simulation requires three solvers:

  1. NUFEB - for the simulation of biofilm formation and particle motion.
  2. OpenFoam - for the fluid flow simulation.
  3. SediFoam - for the coupling between NUFEB and OpenFaom.

1. Installation

Downloading NUFEB

Make sure you have git, gcc/g++, openmpi and Paraview installed on your system. For example, on Ubuntu:

sudo apt-get install git-core g++ openmpi-bin openmpi-common

on Centos:

sudo yum install git gcc-c++ openmpi

For Paraview, we recommend to download it from its website: https://www.paraview.org/download. The executable paraview is located in /ParaView-xxx/bin/ directory.

Get NUFEB source code and submodules for its third-party libraries:

git clone https://github.com/nufeb/NUFEB --recursive

Building SediFoam

The current version of SediFoam is supported by OpenFoam 2.3.0, 2.3.x, 2.4.0. We recommend to refer the website, for example, https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-2.4.0/Ubuntu for installing OpenFoam 2.4.0 on any Linux distributions.

Once the OpenFoam is install, we can build the SediFoam using the installation file:

cd NUFEB
cd thirdparty
./install-sedifoam.sh

Note that if you are using Centos, please replace the line "cat Make/options-ubuntu-openmpi >> Make/options" with "cat Make/options-linux-openmpi >> Make/options" in install-sedifoam.sh file.

You can type the following command to check whether the build is success:

ls $FOAM_USER_APPBIN$

an executable file named lammpsFoam should be in the directory.