PhysiCell for tumor heterogeneity

2D simulation of tumor heterogeneity

Launch Tool

You must login before you can run this tool.

Version 1.2 - published on 21 Feb 2019

doi:10.21981/NTPV-XY98 cite this

View All Supporting Documents



Published on


Introduction: a heterogeneous tumor

This app demonstrates competition in a tumor with heterogeneous growth characteristics. It is based on a published PhysiCell example in Ghaffarizadeh et al. (2018) [1]. In this model, cancer cells rapidly divide while consuming oxygen, which drives the emergence of hypoxic gradients. Greater availability of oxygen drives faster proliferation, while low oxygen can trigger necrotic death, creating a necrotic core (brown cells) in the center of the tumor. Each cell expresses a mutant "oncoprotein" p, which determines how well the cells can respond to oxygen availability to enter the cell cycle. Cells with greater p expression divide more rapidly. In the demonstration, cells are shaded from blue (lowest p and least proliferative) to yellow (greatest p and most proliferative).

Cells are initially distributed assigned a random p expression following a Gaussian distribution. Here are some emergent features to notice:

  • Faster proliferating cells (yellow) expand clonally in small but growing patches.
  • The overall color distribution starts very very heterogeneous (with a "salt and pepper" spatial distribution of p), but becomes more uniform over time as clones emerge and expand.
  • The increasing uniformity of color shows that selection is choosing winners (yellower cells).

Click here to jump straight to the instructions. 

This model and cloud-hosted demo are part of a course on computational multicellular systems biology created and taught by Dr. Paul Macklin in the Department of Intelligent Systems Engineering at Indiana University. It is also part of the education and outreach for the IU Engineered nanoBIO Node and the NCI-funded cancer systems biology grant U01CA232137. The models are built using PhysiCell: a C++ framework for multicellular systems biology [1].

Chemical components:

All chemical signals move by chemical diffusion in the simulated environment, using BioFVM [2] to solve the reaction-diffusion equations. A key property is the diffusion length scale. Diffusion (with a diffusion coefficient D) helps spread a signal over large distances, while decay (and uptake) (with coefficient λ) eliminates the signal to slow its spread. These effects compete to determine the characteristic distance Lthat a chemical signal travels.

That length scale L is given by L = sqrt( D/λ ).

Choosing D and λ can help to tune the chemical communication distance in these models.

Oxygen (σ):

This is released by the computational boundary (a simplified model of a far-field vasculature), and consumed by tumor cells.

We use a far-field value of 38 mmHg (about 5%), which is a typical physioxic condition. See [1] and [2] for more references. We use a length scale of 1000 μm, and cancer cell uptake gives a length scale of 100 μm in densely packed regions.

Cell agents:

We use agent-based models to explore multicellular systems like this one. Each cell is modeled as a software agent with an independent state, and its own rules to change its behavior based on local environmental conditions and communication. We use PhysiCell as our modeling platform [1].

Key features in the agent-based models:

Birth and death:

Cells can proliferate (divide into two daughter cells of half size), with division rates regulated by cell rules. In our model, cells continuously work to grow towards a "target" mature volume.

Note that birth and death are stochastic events for each cell agent: if such a process occurs at rate r, then between now (t) and soon (t + Δt), the probability of the event occurring for that agent is rΔt.

Secretion and uptake:

Cells can secrete chemical factors, or they can remove them (i.e., consume or uptake). This can contribute to gradients in chemical factors, and it's a key method of communication between cells. Moreover, cells can "sample" the chemical state of their surrounding environment. Secreting is sending a signal. Uptaking and sampling is receiving a signal.

Biased migration:

Motile cells perform biased migration. After traveling for Tpersistence time (the mean persistence time), they choose a new migration direction dmigrate. Based on the environmental conditions, the cell chooses a directional bias (intended direction) dbias and a random unit vector r. The motile direction dmigrate is then determined by according to:

dmigrate = b dbias + (1-b) r.

Here, b is a bias parameter (between 0 and 1) that determines how strongly biased migration is towards dbias. If b =1, then migration is deterministic towards dbias. If b = 0, then migration is completely random (Brownian).

Once the migration direction is chosen, it is normalized, and multiplied by the cell's migration speed.


Cell agents can stick to one another within a prescribed interaction distance (some multiple of their radius), and they can exert a pushing force on neighbors. PhysiCell [1] uses potential functions to implement these simple mechanics. Notably, PhysiCell is an off-lattice model, meaning that cells can have variable sizes, and can move freely without grid artifacts.

They aren't required to move some prescribed number of spatial steps. They also can divide without checking for an open neighbor "site". Instead, they can divide and push their neighbors out of the way. 

Focal adhesions:

PhysiCell allows custom functions for any cell agents. We use this to model focal cell-cell adhesions as spring-like forces. If two cells i and j (with positions xi and xj) have a focal adhesion, then cell i is adhered to cell j with a spring-like force that we model as:

Fij = ε (xj - xi),

where ε is the elastic coefficient. Because PhysiCell has an inertialess formatulation (see the method paper in [1]), this is added directly to the cell's velocity, and so ε has units min-1. To model the finite deformability of cells and these elastic focual adhesions, we detach the cells if their distance (||xj - xj||) exceeds a set maximum distance rmax.

Cancer cells (shaded from blue to yellow)

Cancer cells divide at a rate proportional to oxygen availability and oncoprotein expression p, and they experience necrotic death at a rate that increases as oxygen decreases. We use the default parameter values from [1] for this sample model; they cannot be adjusted by users in the current demo version. Note that all cancer cells are non-motile in this example. Oxygen-dependent cell cycle entry happens at a rate modeled as 

r = rmax p (σ - σH) (σmax - σH,

where the oxygenation σ is sampled at the cell's position, σH is the hypoxic threshold below which cell cycle entry ceases, and cell cycle entry reaches a maximum rate of rmax for oxygen levels above σmax. See [1] for parameter values and further details.

Cancer cells increase their necrotic death rate dnecrosis based on their oxygenation conditions, following

dnecrosis = dmax (σN-σ) (σN - σS),

where σN is the necrotic threshold, below which cells begin to necrosis. Also, dmax is the maximum necrotic death rate that is reached when σ < ωS. (Note that σSσNσHσmax.) See [1] for parameter values and further details. Apoptotic cancer cells are red, and necrotic cancer cells are brown.

Basic instructions

Modify the parameters in the "config basics" and "user params" tabs. Click the "run" button once ready.

To view the cell plots, click the "cell plots" tab, and slide the bar to advance through simulation frames. Note that as the simulation runs, the "max" field (maximum frame number) will increase, so you can view more simulation frames.

To view the substrate fields, click the "substrate plots" tab, choose a substrate from the drop-down menu, and slide through the saved times. Note that as the simulation runs, the "max" field (maximum frame number) will increase, so you can view more simulation frames.

Note that you can download full simulation data for further exploration in your tools of choice.

Powered by

This software is powered by PhysiCell [1-2], a powerful simulation tool that combines multi-substrate diffusive transport and off-lattice cell models. PhysiCell is BSD-licensed, and available at:

It is a C++, cross-platform code with minimal software dependencies. It has been tested and deployed in Linux, BSD, OSX, Windows, and other environments, using the standard g++ compiler. 


The Jupyter-based GUI was auto-generated by xml2jupyter [3], a technique to create graphical user interfaces for command-line scientific applications.


To learn more about our work, please visit


Scientific Staff

Randy Heiland, Research Associate, Intelligent Systems Engineering, Indiana University.

  • Lead software architect

Paul Macklin, Ph.D. , Associate Professor, Intelligent Systems Engineering, Indiana University.

  • Scientific lead, developed PhysiCell simulation model

The following undergraduate students have contributed to this project:

Jupyter notebook and UI development

  • Eric Bower (IU Intelligent Systems Engineering, B.S., 2018-present)
  • Daniel Mishler (IU Intelligent Systems Engineering, B.S., 2018-present)
  • Tyler Zhang (IU Intelligent Systems Engineering, B.S., 2018)

Sponsored by

  • NSF EEC-1720625. Network for Computational Nanotechnology - Engineered nanoBIO Node
  • Breast Cancer Research Foundation 
  • Jayne Koskinas Ted Giovanis Foundation for Health and Policy
  • NIH U01CA232137


[1] Ghaffarizadeh A, Heiland R, Friedman SH, Mumenthaler SM, Macklin P (2018) PhysiCell: An open source physics-based cell simulator for 3-D multicellular systems. PLoS Comput Biol 14(2): e1005991.

[2] Ghaffarizadeh A, Friedman SH, Macklin P (2016) BioFVM: an efficient, parallelized diffusive transport solver for 3-D biological simulations. Bioinformatics 32(8):1256-8.

[3] Heiland R, Mishler D, Zhang T, Bower E, Macklin P (2019, in preparation) Xml2jupyter: Mapping parameters between XML and Jupyter widgets. J Open Source Software


Cite this work

Researchers should cite this work as follows:

  • This tool is still in preparation for submission. For now, please cite: 

    Ghaffarizadeh A, Heiland R, Friedman SH, Mumenthaler SM, Macklin P (2018) PhysiCell: An open source physics-based cell simulator for 3-D multicellular systems. PLoS Comput Biol 14(2): e1005991.

  • Randy Heiland, Paul Macklin (2019), "PhysiCell for tumor heterogeneity," (DOI: 10.21981/NTPV-XY98).

    BibTex | EndNote