This tutorial is automatically generated from TestSpheroidTutorial at revision 98e266d4.
Note that the code is given in full at the bottom of the page.
In this test we set up a spheroid with a plentiful supply of oxygen on the boundary and watch it grow
over time. Cells can gradually become apoptotic if the oxygen tension is too low.
This time we will use on off-lattice MeshBased cell population. Cell centres are joined with
springs with a Delauney Triangulation used to identify neighbours. Cell area is given by the dual
(Voronoi Tesselation). We start off with a small number of cells. We use a MutableMesh which
can change connectivity over time and a HoneycombMeshGenerator to set it up with a simple
honeycomb pattern. Here the first and second arguments define the size of the mesh -
we have chosen a mesh that is 5 nodes (i.e. cells) wide, and 5 nodes high. The extra ‘2’ argument puts
two layers of non-cell elements around the mesh, which help to form a nicer voronoi tesselation
for area calculations.
We create some cells next, with a stem-like proliferative type. This means they will continually
proliferate if there is enough oxygen, similar to how a tumour spheroid may behave.
Define when cells become apoptotic
Now we have a mesh and a set of cells to go with it, we can create a CellPopulation as before.
To view the results of this and the next test in Paraview it is necessary to explicitly generate the required .vtu files.
We then pass in the cell population into an OffLatticeSimulation, and set the output directory and end time.
We ask for output every 12 increments
We define how the springs between cells behave using a force law.
We set up a PDE for oxygen diffusion and consumption by cells, setting the rate of consumption to 0.1
We set a constant amount of oxygen on the edge of the spheroid
Set up a pde modifier to solve the PDE at each simulation time step
As before, we set up a scene modifier for real-time visualization
Eventually remove apoptotic cells
To run the simulation, we call Solve(). We can again do a quick rendering of the population at the end of the simulation
Full results can be visualized in Paraview from the file_handler.GetOutputDirectoryFullPath() directory.