Cell–environment interactions and transport#
During a simulation, we may want to model the transport of various chemical substances, such as nutrients, signaling factors, or drugs, that are taken up from or secreted into the environment by cells. This section explains the model used in LattiCS to simulate these processes.
Representation#
Each chemical substance whose transport processes we want to simulate is represented by a SubstrateField object. This object is linked to the SimulationDomain object that represents the simulation space, and it matches its dimensionality, size, and grid resolution (if these are applicable for the given domain). The field object identifies the substance using a user-defined name (e.g., “oxygen” or “nutrient”). It continuously tracks the concentration and provides access to its values at any point in space.
Diffusive transport#
The spatial and temporal behavior of the substance’s concentration in a domain without any sources or sinks is controlled by two key parameters: the diffusion coefficient and the decay rate. The diffusion coefficient determines how quickly the substance spreads through space via diffusion, while the decay rate represents the substance’s natural degradation over time. These processes are simulated by numerically solving the heat equation using the locally one-dimensional (LOD) method described in [1]. If the domain has no spatial structure, only a single (mean) concentration is tracked, and only its decay over time is simulated, without spatial diffusion.
Release and uptake by nodes#
The appearance and disappearance of a chemical substance within the field occur at specific points called nodes. Nodes are virtual locations within the field where the concentration of the substance is either fixed (fixed-type node) or changes over time based on predefined rates and current concentration values (flux-type node). A node may represent, for example, an agent (such as a cell), or an abstract point where the substance is introduced into the simulation space (e.g., a drug carrier particle).
Fixed-type nodes#
In the case of a fixed-type node, the concentration value of the field at the node’s location is set to the concentration specified for the node. (If position is not applicable for the domain, the field’s concentration will be the average of the values specified by all fixed-type nodes.)
Flux-type nodes#
In the case of a flux-type node, the concentration in the field at the node’s location and the concentration within the node itself evolve according to the following model. Consider the node and the field as two separate compartments, denoted by N and F, respectively (see the figure below). F may represent either the entire field or just the chunk of the field corresponding to the node’s position.

The following types of concentration exchange can be defined between the compartments:
Passive transport: the concentrations in the two compartments change based on the difference between their concentrations and a rate constant. In the case of cells, gases, hydrophobic molecules, and small polar molecules typically cross the membrane via this mechanism. The rate of concentration change is governed by the coefficient \(k_p\). Due to passive transport, the concentrations of the two compartments gradually equalize over a sufficiently long time.
Active secretion: the node releases a substance into the field. The change depends on the concentration \(c_N\) in compartment N and the rate constant \(k_r\). In the case of cells, this process can model the function of certain transporter proteins (e.g., ABC transporters), which are capable of pumping chemical substances from inside the cell even against a concentration gradient.
Active uptake: the node takes up a substance from the field. The change depends on the concentration \(c_F\) in compartment F, the node’s maximum (or saturation) concentration \(c_N^s\), and the uptake rate constant \(k_u\). If the substance is available in unlimited supply, the value of \(c_N\) approaches its steady-state value, \(c_N^s\). In cells, this process also models the activity of transporter proteins (e.g., glucose uptake), and it is typically significantly faster than passive transport.
According to the principle of mass conservation and Fick’s first law, the mass changes in the compartments can be described by the following differential equations.
Here, \(n_N\) and \(n_F\) denote the time-dependent amounts (or masses) of the substance in the respective compartments, \(c_N\) and \(c_F\) are the corresponding concentrations, \(c_N^s\) is the saturation concentration in the node, and \(k_p\), \(k_r\), and \(k_u\) are the rate constants defined previously. Given the compartment volumes \(v_N\) and \(v_F\), the changes in concentration can be directly computed from the corresponding changes in mass.
The concentration obtained from the solution of the differential equations is approximated at each time step using the following explicit finite difference scheme.
Note
Since the current implementation of LattiCS uses an explicit scheme, we need to carefully choose the time steps assigned to the SubstrateField object to ensure numerical stability. These time steps must be sufficiently small, depending on the values of the rate constants (\(k_p\), \(k_u\), \(k_r\)), to avoid issues such as negative concentrations or oscillatory behavior.