### How to measure the diffusion constant for cells in aggregate in a CC3D simulation?

23
views
0
6 days ago by
Hi,

In the paper "Multi-Scale Modeling of Tissues Using CompuCell3D" by Swat et al., on page 5, the author(s) mentioned that one can measure the diffusion constant of cells in aggregates in the simulation. So I am asking for suggestions on how to do so in CC3D.

Thank you,
Community: CompuCell3D

2
5 days ago by
With Priyom's help, I've found some much better resources for this.

See slides 51-59 in;
http://www.compucell3d.org/BinDoc/cc3d_binaries/Tutorials/PASI2013/MultiScaleModelingWithCC3D-SBML.pdf

The diffusion measurement demo can be downloaded from;
http://www.compucell3d.org/BinDoc/cc3d_binaries/Tutorials/PASI2013/DiffusionCalculator.zip
This is an excellent example of a python only CC3D model. The code is pretty old though and to use it you need to add a couple lines to the file "DiffusionCalculator.py". After line #64 add;
contact.ElementCC3D("Energy", {"Type1":"Medium", "Type2": "Wall"},10)
 contact.ElementCC3D("Energy", {"Type1":"Cells",  "Type2": "Wall"},10)
contact.ElementCC3D("Energy", {"Type1":"Wall",   "Type2": "Wall"},10)

Note that the plot in CC3D is only drawn at the end of the simulation. Also, a log of all the displacements is written to a text file.
0
5 days ago by
I believe you can use the equation;
(deltaX)^2/(deltaT) = 2D
Where deltaX is the displacement of a single cell along the x-axis in time period deltaT and D is the diffusion constant

One way to track the cell's position is to add a dictionary to the cell and save the cell's X, Y and Z position every (some number of) mcs. Every (some number of) mcs you calculate the X (or Y or Z) displacement, square that and divide by the (some number of) mcs. Since the simulation is stochastic the D will fluctuate from interval to interval so you'll need to average over a number of intervals.The units of D will be pixel^2/mcs, which is distance^2/unit time.