Required for core elements of the Chaste simulation environment
Required for the immersed boundary functionality
Required for setting up the numerical method
This test is never run in parallel
In Chaste, every simulation is run as a ’test’, and here we define a test class which inherits from
AbstractCellBasedTestSuite. The class AbstractCellBasedTestSuite sets up various parameters for us. Of
particular use is that RandomNumberGenerator is re-seeded with zero. This means any random numbers generated
(for instance, random variation in cell size) is reproducible from one simulation to the next.
Simulation - a basic immersed boundary simulation#
Immersed boundary methods simulate two-way coupled cell-fluid interactions. They can be used to model
cells within fluids, and fluids within cells. The chaste implementation supports multiple fluid sources,
cell wall shape changes, laminas, leaky laminas and biological noise.
In this simulation, we create an immersed boundary framework with a palisade of cells. The cells have a slight
variation in size, and a basement membrane is included. Each cell in the simulation is assigned a basic
cell-cycle model; no proliferation occurs.
The first thing we define is a 2D (specified by the <2,2>) mesh. This holds spatial information of the
simulation, including that of the underlying fluid grid as well as the location of cell boundary-points. To
create this we use an ImmersedBoundaryPalisadeMeshGenerator. The parameters are, in order:
5: number of cells in the palisade
100: number of boundary points in each cell
0.2: ‘superellipse’ exponent which determines initial cell shape; 1.0 is an ellipse, 0.0 a rectangle
2.0: the initial aspect ratio of each cell; they start twice as high as their width
0.15: the proportion of random variation in cell heights
true: whether the mesh should contain a basement membrane
We now generate a collection of cells. We do this by using a CellsGenerator and we specify the
proliferative behaviour of the cell by choosing a CellCycleModel. Here we choose an
UniformCellCycleModel which does not allow proliferation. For an immersed boundary
simulation we need as may cells as elements in the mesh.
We now create a CellPopulation object (passing in the mesh and cells) to connect the mesh and the cells
together. Here we use an ImmersedBoundaryCellPopulation and the dimension is <2>.
We now create an OffLatticeSimulation object and pass in the CellPopulation. We also set some
options for the simulation like output directory, output multiple (so we don’t visualize every timestep),
and end time.
Additionally, we tell the numerical method that we want the cell population to update node locations.
All of the machinery for the immersed boundary method is handled in the following SimulationModifier.
Here, we create a ‘shared pointer’ to an ImmersedBoundarySimulationModifier object and pass it to the
OffLatticeSimulation.
We now associate an ImmersedBoundaryLinearMembraneForce and
ImmersedBoundaryLinearInteractionForce to the SimulationModifier which
handles the membrane elasticity forces. These are created in a similar manner as above.
Finally we call the Solve method on the simulation to run the simulation.