Introduction

Phase separation has recently been recognized as a powerful mechanism to organize biomolecules in the interior of biological cells1,2,3,4,5. The droplets that spontaneously form via phase separation allow cells to sort molecules into compartments, which facilitates different functions, including controlling reactions6,7, storing molecules8, and buffering stochastic noise9. To control these processes, cells need to regulate phase separation in space and time. Examples for control mechanisms include chemical gradients10,11,12,13, chemical modifications of the involved molecules14,15,16,17,18,19,20, and global parameters, like pH and temperature21,22,23,24,25,26. Numerical simulations offer an attractive way to investigate these physical systems to understand how cells control their many droplets.

The dynamics of droplets are often simulated using the Cahn-Hilliard equation27,28,29. This fourth-order partial differential equation is typically expensive to simulate since it requires fine spatial discretization and small time steps. Earlier approaches have improved the computational speed of numerical simulations of the Cahn–Hilliard equation using multi-grid methods30, finite element modeling31,32, incorporating mesh-less methods33, and adaptive grids34,35, but the fundamental drawbacks still persist. Other approaches, such as Molecular Dynamics simulations36,37 and Monte-Carlo methods38, have also been used to simulate phase separation, but are also computationally expensive since they resolve details that are often not necessary for predicting the dynamics of droplets.

In this paper, we present a fast and efficient numerical method for simulating the dynamics of many interacting droplets. The method is based on analytical results from a thin-interface approximation of the continuous Cahn–Hilliard equation39. In our effective model, we describe only the dynamics of the necessary degrees of freedom, which are the droplet positions and radii as well as some coarse information about the dilute phase. The interaction of the droplets via the dilute phase is captured by discretizing their vicinity into thin annular sectors. The dynamics of droplet growth and drift follows from material fluxes exchanged between the droplet and the dilute phase, which are obtained from solving a steady-state reaction–diffusion equation inside all sectors. We present the model by first introducing the basic thermodynamic principles of phase separation, then the analytical theory behind the effective droplet model, and finally the details of the numerical method describing the dynamics of the droplets and dilute background.

Model

The main idea of our model is to replace the detailed description of the entire concentration field by the relevant degrees of freedom of the droplets. We focus on the typical situation of well-separated droplets that are spherical due to surface tension, and thus describe the droplets by their positions \(\varvec{x}_i\) and radii \(R_i\). To build up the theory systematically, we will next introduce the continuous theory, the analytical description of isolated droplets, and then the full effective model.

Continuous theory of phase separation

We consider an isothermal, incompressible fluid in a closed system of volume \(V_\text{tot}\) that consists of solvent and droplet material. The composition is described by the volume fraction \(\phi (\varvec{x}, t)\) of the droplet material, while the solvent volume fraction is given by \(1-\phi\). The thermodynamic state of the system is governed by the free energy functional \(F[\phi ] = \int \left( f(\phi ) + \frac{\kappa }{2} \, |\varvec{\nabla } \phi | ^ 2 \right) \mathrm{d}V\); see ref.28, where \(\kappa\) is a parameter related to the interfacial tension, while phase separation is promoted by the free energy density \(f(\phi )\). For simplicity, we here consider a polynomial form,

$$\begin{aligned} f(\phi ) = \frac{b}{2}(\phi - \phi ^{0}_\text{out})^2(\phi - \phi ^{0}_\text{in})^2 \;, \end{aligned}$$
(1)

where the minima \(\phi ^{0}_\mathrm{in}\) and \(\phi ^{0}_\text{out}\) are the equilibrium concentrations in a thermodynamically large system and b denotes the energy scale. The dynamics of the system follow from the continuity equation, \(\partial _t \phi + \varvec{\nabla } \cdot \varvec{j} = s\). Here, \(\varvec{j}\) denotes spatial fluxes, which for simplicity will only be driven by diffusive processes, so hydrodynamic fluxes are neglected. Conversely, s is a source term related to chemical reactions that convert droplet material into solvent and vice versa39. Chemical reactions are typically local and often described by rate laws that depend on composition. Conversely, the non-local diffusive fluxes \(\varvec{j}\) are driven by gradients in chemical potential

$$\begin{aligned} \mu = \nu \frac{\delta F}{\delta \phi } = b (\phi ^{0}_\mathrm{in} - \phi ) (\phi ^{0}_\mathrm{out} - \phi ) (2\phi - \phi ^{0}_\mathrm{in} - \phi ^{0}_\mathrm{out}) - \kappa \varvec{\nabla }^2 \phi \;, \end{aligned}$$
(2)

where \(\nu\) is the molecular volume of the droplet material. Linear non-equilibrium thermodynamics implies \(\varvec{j} = -\Lambda (\phi ) \varvec{\nabla }\mu\), where \(\Lambda (\phi )\) is a positive mobility40. Hence,

$$\begin{aligned} \frac{\partial \phi }{\partial t} = \varvec{\nabla } \cdot [\Lambda (\phi ) \varvec{\nabla } \mu ] + s(\phi ) \;, \end{aligned}$$
(3)

is a fourth-order, non-linear partial differential equation requiring two boundary conditions. We here focus on the typical choice of no-flux conditions (\(\varvec{n} \cdot \varvec{\nabla } \mu = 0\)) and that solvent and droplet material interact identically with the system’s boundaries (\(\varvec{n} \cdot \varvec{\nabla } \phi = 0\)), where \(\varvec{n}\) denotes the normal vector at the boundary.

In the case without chemical reactions (\(s=0\)), Eq. (3) reduces to the seminal Cahn–Hilliard equation28, which describes passive phase separation. In particular, two bulk phases with composition \(\phi ^{0}_\mathrm{in}\) and \(\phi ^{0}_\mathrm{out}\) typically emerge. These phases are separated by an interface of width \(w = 2\sqrt{\kappa / b}\) with surface tension \(\gamma = \frac{1}{6} \sqrt{b \kappa }\)27,39. When chemical reactions are weak, this general structure is typically preserved, although long-term dynamics, like Ostwald ripening, can be strongly modified39. Strong chemical reactions can actually destroy droplets39 and they might also lead to more complicated patterns41,42, which go beyond the scope of this paper. Instead, we here focus on situations where well-defined droplets with a thin interface are typical.

The dynamics given by Eq. (3) adequately describe phase separation, but it can be prohibitively costly to simulate due to multiple reasons: (1) The interface needs to be resolved, implying discretizations on the order of the typically small interface width w. (2) The equation contains fourth-order derivatives in space, which often limits the time steps. (3) Interesting dynamics often take place on very long time scales. For instance, during Ostwald ripening43,44, length scales in the system evolve as \(t^{ 1/3}\), requiring long simulations to capture relevant behaviour. However, since we are interested primarily in modelling dynamics of droplets, we circumvent these problems by focusing only on phase separation inside the nucleation and growth regime of the free energy density, and assume that sufficiently finite perturbations have already nucleated droplets. We employ the thin-interface approximation39, which is a coarse-grained analytical formulation of the continuous model Eq. (3) valid when the system is subject to strong phase separation, low variation of volume fractions in the droplet phase and the dilute phase, and large droplet sizes compared to the interface width. This analytical approach was utilized earlier to study kinetics of many-droplet systems and effects of chemical reactions on such systems39.

In the next section, we elaborate on using the thin-interface approximation to build an effective droplet model describing the dynamics of droplets and dynamics of the dilute phase separately, instead of the full volume fraction field from the continuous model, thus effectively ‘de-coupling’ the description of phase separated droplets from the dilute phase.

Effective description of isolated droplets

To build the effective model, we next derive approximate descriptions of the dynamics of the radius R and position \(\varvec{x}\) of an isolated droplet. Since we only consider spherical droplets with a thin interface (\(R \gg w\)) and weak chemical reactions, we can use basic thermodynamics to derive the equilibrium concentrations inside and outside of the interface of the droplet, denoted by \(\phi ^\mathrm{eq}_\mathrm{in}\) and \(\phi ^\mathrm{eq}_\mathrm{out}\), respectively. Due to surface tension effects, they are slightly elevated above the basal values \(\phi ^0_\mathrm{in}\) and \(\phi ^0_\mathrm{out}\) prescribed by the free energy density; see Eq. (1). To first order in the curvature of the surface, we have

$$\begin{aligned} \phi ^\mathrm{eq}_\mathrm{in}&= \phi ^{0}_\mathrm{in} \left( 1 + \frac{l_{\gamma , \mathrm{in}}}{R} \right) \qquad \text {and} \end{aligned}$$
(4a)
$$\begin{aligned} \phi ^\mathrm{eq}_\mathrm{out}&= \phi ^{0}_\mathrm{out} \left( 1 + \frac{l_{\gamma , \mathrm{out}}}{R}\right) \;, \end{aligned}$$
(4b)

where \(l_{\gamma , \mathrm{out}}\) and \(l_{\gamma , \mathrm{in}}\) are capillary lengths27. In our case they read \(l_{\gamma , \mathrm{in}} = (\kappa /b)^{1/2} /[3 \phi ^{0}_\mathrm{in} \left( \phi ^{0}_\mathrm{in} - \phi ^{0}_\mathrm{out}\right) ^{3}]\) and \(l_{\gamma , \mathrm{out}} = (\kappa /b)^{1/2}/[3 \phi ^{0}_\mathrm{out} \left( \phi ^{0}_\mathrm{in} - \phi ^{0}_\mathrm{out}\right) ^{3}]\) in three dimensions. The dynamics of the volume fraction field \(\phi _\mathrm{in}\) inside the droplet is in principle described by Eq. (3), but since the composition typically hardly varies, we can linearize \(\phi _\mathrm{in}\) around \(\phi ^{0}_\mathrm{in}\) to obtain

$$\begin{aligned} \frac{\partial \phi _\mathrm{in}}{\partial t} \approx D_\mathrm{in} \varvec{\nabla } ^2 \phi _\mathrm{in} + s(\phi ^{0}_\mathrm{in}) - k_{\mathrm{in}}(\phi _\mathrm{in} - \phi ^{0}_\mathrm{in}) \;, \end{aligned}$$
(5)

where \(D_\mathrm{in} = \Lambda (\phi ^0_\mathrm{in}) \, b\) is the diffusivity and \(k_{\mathrm{in}}= - s'(\phi ^{0}_\mathrm{in})\) denotes the reaction rate27. Generally, positive rates (\(k_\mathrm{in}>0\)) stabilize the volume fraction \(\phi _\mathrm{in}\), while negative rates might destabilize it. However, the instability is suppressed when the droplet radius R is small compared to the reaction–diffusion length scale, \(\xi _\mathrm{in}=\sqrt{D_\mathrm{in}/|k_{\mathrm{in}}|}\)27. Since we here consider weak chemical reactions, \(\xi _\mathrm{in}\) will be large, and we thus assume \(R \ll \xi _\mathrm{in}\) in the following. We use this to solve Eq. (5) in stationary state in a system with angular symmetry using the boundary conditions \(\phi _\mathrm{in}(R) = \phi ^\mathrm{eq}_\mathrm{in}\) and \(\partial _r \phi _\mathrm{in}(0) = 0\). The analytical result allows us to estimate the diffusive flux \(\varvec{j}_\mathrm{in}\) inside the interface,

$$\begin{aligned} \varvec{j}_\mathrm{in} \approx \frac{R}{d} s(\phi ^\mathrm{eq}_\mathrm{in})\,\varvec{n} \;, \end{aligned}$$
(6)

where d is the space dimension; see Supporting Information, Section III. Production of droplet material inside the droplet (\(s(\phi ^\mathrm{eq}_\mathrm{in}) > 0\)) leads to an outward flux \(\varvec{j}_\mathrm{in} \cdot \varvec{n} > 0\), which can drive droplet growth. Conversely, destroying droplet material (\(s(\phi ^\mathrm{eq}_\mathrm{in}) < 0\)) promotes shrinking droplets. Droplets might also grow if they take up material from the surrounding. Similarly to inside of droplets, the volume fraction \(\phi _\mathrm{out}\) will typically vary only little, so we can linearize around the base value \(\phi ^0_\mathrm{out}\) to obtain the reaction–diffusion equation

$$\begin{aligned} \frac{\partial \phi _\mathrm{out}}{\partial t} \approx D_\mathrm{out} \varvec{\nabla } ^2 \phi _\mathrm{out}+ s(\phi _\mathrm{out}) \;, \end{aligned}$$
(7)

where \(D_\mathrm{out} = \Lambda (\phi ^0_\mathrm{out}) \, b\) is the diffusivity outside droplets. Solving this equation and obtaining the corresponding flux \(\varvec{j}_\mathrm{out}\) outside the droplet is more difficult since the environment of the droplet might not be isotropic. We thus discuss the coupling of droplets to the dilute phase \(\phi _\mathrm{out}\) in more detail in the next section.

If we know the fluxes \(\varvec{j}_\mathrm{in}\) and \(\varvec{j}_\mathrm{out}\), we can determine the net accumulation of droplet material at the interface, which implies droplet growth. Note that only the normal components of the fluxes affect the shape, while the tangential components merely distribute material parallel to the interface. The shape changes of an isolated droplet are thus described by the interfacial speed \(v_\mathrm{n}\) in the normal direction27,

$$\begin{aligned} v_\mathrm{n}\approx \frac{\varvec{j}_\mathrm{in}- \varvec{j}_\mathrm{out}}{\phi ^\mathrm{eq}_\mathrm{in}- \phi ^\mathrm{eq}_\mathrm{out}} \cdot \varvec{n} \;; \end{aligned}$$
(8)

see Supporting Information, Section I. General shape changes can result in non-spherical droplets, but since surface tension effects typically ensure a near-spherical shape, we project the general shape onto the degrees of freedom that we use to describe the droplet,

$$\begin{aligned} \frac{\mathrm{d}R}{\mathrm{d}t}&= \frac{1}{S} \int v_\mathrm{n}\, \mathrm{d}A \qquad \text {and} \end{aligned}$$
(9a)
$$\begin{aligned} \frac{\mathrm{d} \varvec{x}}{\mathrm{d}t}&= \frac{d}{S} \int v_\mathrm{n}\, \varvec{n} \, \mathrm{d}A \;, \end{aligned}$$
(9b)

where the integral is over the droplet surface, d is the space dimension, and S is the surface area of the droplet; see Supporting Information, Section II. Here, the first equation describes how material accumulates at the interface due to sum of all normal fluxes \(v_\mathrm{n}\), leading to growth. The second equation describes how the weighted sum of all vectorial fluxes gives rise to drift. Taken together, Eq. (9) determines how an isolated droplet evolves in time. This involves Eqs. (4), (6), (8) as well as an approximation for the fluxes \(\varvec{j}_\mathrm{out}\) outside the droplet interface, which is the central part of our method that we discuss next.

Numerical model for many droplets

The dynamics of many droplets in the same system are coupled since they may exchange material via the dilute phase. To describe this exchange, and ultimately derive the flux \(\varvec{j}_\mathrm{out}\) at each droplet, we first consider the dynamics of the volume fraction of the dilute phase \(\phi _\mathrm{out}\). In principle, the dynamics of \(\phi _\mathrm{out}\) follows from Eq. (7), with appropriate boundary conditions applied at the system’s boundary and at all droplet surfaces. To simplify the description of the dilute phase, we assume that \(\phi _\mathrm{out}\) is defined in the entire system, including where droplets are; see Fig. 1A. In this picture, droplets are local perturbations that exchange material with the background field \(\phi _\mathrm{out}\).

Figure 1
figure 1

Schematics of the simulation model, describing droplets and the background field \(\phi _\mathrm{out}\). (A) Droplets co-exist with the background field \(\phi _\mathrm{out}\) and interact with it only through material fluxes. For simplicity, \(\phi _\mathrm{out}\) also exists at the location of the droplets, but this has negligible effect on the dynamics. (B) Isolated droplet (yellow) with a surrounding shell of thickness \(\ell\), which is further discretized in N sectors of linear size \(\Delta s\). The exchange fluxes between droplet and background are determined in each sector based on the equilibrium fraction \(\phi ^\mathrm{eq}_\mathrm{out}\) (red dots) and the value \(\phi _\mathrm{out}^{(m)}\) at the outer side (black dot), which is determined from the background field using bilinear interpolation. The background field \(\phi _\mathrm{out}\) is uniformly discretized on a Cartesian grid (gray grid).

Dynamics of the background field

The background field \(\phi _\mathrm{out}\) changes due to diffusion and reactions, even if droplets are absent. To capture this dynamics, we discretize the continuous field \(\phi _\mathrm{out}\) on a uniform Cartesian grid with a distance \(\Delta x\) between the neighbouring support points. We then evolve Eq. (7) in time using finite central differences and explicit temporal stepping45. Since we do not need to resolve droplets at this scale, the spatial discretization can be much larger than in traditional Cahn–Hilliard equations.

Growth of a single droplet in a background field

To obtain the flux \(\varvec{j}_\mathrm{out}\) in the vicinity of an isolated droplet, we need to determine \(\phi _\mathrm{out}\) in the region surrounding this droplet. We do this by considering Eq. (7) in an annular shell of thickness \(\ell\) surrounding the droplet, which we further discretize into N sectors in the angular dimensions; see Fig. 1. In two-dimensional systems, we place sectors of equal size uniformly around the circle. Such symmetric placement is impossible in three dimensions, where we instead place N points approximately uniformly on the sphere and use a spherical Voronoi tessellation 46 to determine the corresponding sectors. In both cases, we assume that fluxes in the angular directions are negligible for simplicity, so we can express the volume fraction in the m-th sector as \(\phi _\mathrm{out}^{(m)}(r)\), where r is a radial coordinate measuring distance from the droplet position \(\varvec{x}\). We determine \(\phi _\mathrm{out}^{(m)}(r)\) using Eq. (7) in stationary state with the boundary conditions \(\phi _\mathrm{out}^{(m)}(R)=\phi ^\mathrm{eq}_\mathrm{out}\) and \(\phi _\mathrm{out}^{(m)}(R + \ell )= \phi _\mathrm{shell}^{(m)}\). Here, \(\phi _\mathrm{shell}^{(m)}\) is the volume fraction of droplet material in the background field at the outer side of the m-th shell sector, which we estimate from a linear interpolation of the discretized background field \(\phi _\mathrm{out}\); see Fig. 1. Since \(\phi _\mathrm{out}^{(m)}(r)\) typically varies only marginally in the shell sector, we also linearize the reaction flux, \(s(\phi _\mathrm{out}^{(m)}) \approx \Gamma _\mathrm{out} - k_\mathrm{out}\, \phi _\mathrm{out}\), by imposing \(s(\phi _\mathrm{out}^{(m)})(R) = s(\phi ^\mathrm{eq}_\mathrm{out})\) and \(s(\phi _\mathrm{out}^{(m)})(R + \ell ) = s(\phi _\mathrm{shell}^{(m)})\). This implies \(\Gamma _\mathrm{out} = [\phi _\mathrm{shell}^{(m)} \, s(\phi ^\mathrm{eq}_\mathrm{out}) - \phi ^\mathrm{eq}_\mathrm{out}\, s(\phi _\mathrm{shell}^{(m)})] / (\phi _\mathrm{shell}^{(m)} - \phi ^\mathrm{eq}_\mathrm{out})\) and \(k_\mathrm{out}= [s(\phi ^\mathrm{eq}_\mathrm{out}) - s(\phi _\mathrm{shell}^{(m)})] / (\phi _\mathrm{shell}^{(m)} - \phi ^\mathrm{eq}_\mathrm{out})\). Taken together, we obtain an analytical approximation of \(\phi _\mathrm{out}^{(m)}(r)\) in each shell sector, from which we determine the local normal flux \(\varvec{j}_\mathrm{out}^{(m)}\) outside the droplet; see Supporting Information, Section IV. Using these expressions together with Eqs. (6), (8) and (9), we find that individual droplets evolve according to

$$\begin{aligned} \frac{\mathrm{d}R}{\mathrm{d}t}&\approx \frac{1}{\phi ^\mathrm{eq}_\mathrm{in}} \sum _{m=1}^{N} \frac{A_m}{S}\left( \frac{R}{d} s(\phi ^\mathrm{eq}_\mathrm{in}) - {j}^{(m)}_\mathrm{out} \right) \qquad \text {and} \end{aligned}$$
(10a)
$$\begin{aligned} \frac{\mathrm{d}\varvec{x}}{\mathrm{d}t}&\approx \frac{d}{\phi ^\mathrm{eq}_\mathrm{in}} \sum _{m=1}^{N} \frac{A_m}{S} \left( \frac{R}{d}s(\phi ^\mathrm{eq}_\mathrm{in}) - {j}^{(m)}_\mathrm{out}\right) \varvec{n}_m \;, \end{aligned}$$
(10b)

where R and S are radius and surface area of the droplet, respectively, \(A_m\) is the inner area of the shell sector and \(\varvec{n}_m\) is the unit vector pointing from the droplet center to the m-th shell center; see Fig. 1. We use Eq. (10) to describe how internal reactions and external material exchange with the background affects the dynamics of each droplet.

Coupled dynamics of droplets and the background field

Equation (10) describe how droplets change when they exchange droplet material with the background field \(\phi _\mathrm{out}\). Due to material conservation, the material flux from the droplet toward each sector m, \(\varvec{j}_\mathrm{out}^{(m)} \cdot \varvec{n} \, A_m\), needs to accumulate in the background field. We use a linear interpolation at the midpoint of the inner boundary of the shell section (red points in Fig. 1B) to add the respective amount to the background field \(\phi _\mathrm{out}\). Note that negative fluxes \(\varvec{j}_\mathrm{out}^{(m)}\) distribute material from the background field to the droplet and thus lead to growth. Taken together, this procedure ensures material conservation while preserving anisotropies of the exchange.

Full simulation

The full numerical method evolves the state of the system, i.e., the discretized background field \(\phi _\mathrm{out}(\varvec{r})\) and the positions \(\varvec{x}_i\) and radii \(R_i\) of all droplets, in time. We propose an explicit iteration, where the state at \(t+\Delta t\) is directly determined from the state at time t. Here, we first evolve the reaction–diffusion equation Eq. (7) of the background field and then iterate over all droplets. For each droplet, we determine the fluxes \(\varvec{j}_\mathrm{out}^{(m)} \cdot \varvec{n}\) for all shell sectors m and remove the associated material from the background field. We then update the droplet’s position and radius according to Eq. (10). Starting from an initial state at \(t=0\), this algorithm allows us to evolve the dynamics forward in time.

Choosing simulation parameters

The algorithm described above has several parameters that need to be chosen wisely for an accurate and fast simulation. In particular, we need to specify the discretization \(\Delta x\) of the background field, the shell thickness \(\ell\), the typical size \(\Delta s\) of a shell sector, and the time step \(\Delta t\). We next discuss suitable values for all four parameters using detailed simulation of the continuous model given by Eq. (3) as ground truth. We later show that the resulting choice for the parameters can recapitulate many effects that have been described previously in the literature.

To calibrate the simulation parameters, we compare our effective model to the established continuous model given by Eq. (3). Our test case consists of two passive droplets of initial radius \(R_0=20 w\) whose centers are separated by \(S_\mathrm{d}=10 R_0\). The droplets are placed in a background of vanishing initial volume fraction, \(\phi _\mathrm{out}(\varvec{r}, 0) = 0\), so the system is under-saturated and the droplets will shrink. For the continuous model, we exploit the angular symmetry of the problem and consider an azimuthally symmetric cylindrical domain where \(r,z \in [0, 682 w]\). Conversely, our effective model is simulated in a 3-dimensional cubic domain of size \([0, 1000 w]^{3}\). We compare the final radii of the droplets after a duration T, where the droplets typically have shrunk by about \(20\%\). The deviation of the mean droplet radius \(\langle R_*\rangle\) of our effective model compared to the radius \(\langle R_\mathrm{CM}\rangle\) of the continuous model allows us to determine the crucial simulation parameters \(\Delta x\), \(\ell\), and \(\Delta s\).

Grid discretization \(\Delta x\)

The spatial discretization \(\Delta x\) determines the resolution at which variations of the background field \(\phi _\mathrm{out}\) are resolved. Consequently, the choice of \(\Delta x\) is based on the problem: If spatial interactions are negligible and a mean-field model is desired, \(\Delta x\) can be arbitrarily large. Conversely, if spatial correlations between droplets are important, \(\Delta x\) needs to be smaller than the droplet separation. Another case are external gradients that affect droplets12, where \(\Delta x\) needs to be on the order of the droplet radii, so spatial anisotropies can be resolved on the droplet level.

Annular shell thickness \(\ell\)

The most crucial part of our numerical method describes how material exchanges between the droplets and the background field. To describe this exchange faithfully, we interpolate the background field in an annular shell around the droplet. The thickness \(\ell\) of this shell can thus be interpreted as an interpolation length scale and its value affects the accuracy of the simulation: If \(\ell \ll \Delta x\), the fluxes \(\varvec{j}_\mathrm{out}^{(m)}\) are overestimated since they scale with \(\ell ^{-1}\); see Supporting Information, Section IV. Conversely, if \(\ell \gg \Delta x\), the background field would not be evaluated in the vicinity of the droplet, so interactions cannot be captured correctly. Taken together, we conclude that \(\ell \sim \Delta x\) is a reasonable choice for the shell thickness. Indeed, Fig. 2A shows that this choice leads to a faithful estimate of the droplet growth for various values of \(\Delta x\).

Figure 2
figure 2

Effect of annular shell thickness \(\ell\) and sector size \(\Delta s\) in simulations of a passive droplet pair. (A) Mean droplet size \(\langle R_*\rangle\) (filled dots) as a function of \(\ell\) for various \(\Delta x\) (vertical dotted lines) using \(\Delta s\approx R_0\). The ground truth \(\langle R_\mathrm{CM}\rangle\) (black dashed line) is obtained from the continuous model. (B\(\langle R_*\rangle\) as a function of \(\Delta s\) (filled dots) for various \(\Delta x\) using \(\ell \approx R_0\), with \(\langle R_\mathrm{CM}\rangle\) shown as the black dashed line. (A, B) Two droplets with radii \(R_0 = 20 w\) are placed with their centers \(10 R_0\) apart in an empty background, \(\phi _\mathrm{out}(\varvec{r}, t=0) = 0\). Continuous simulations given by Eq. (3) used an azimuthally symmetric cylindrical domain with bounds \(r,z \in [0, 682 w]\) with a spatial discretization of 0.5w. Effective simulations used a 3-dimensional cubic domain of size \([0, 1000 w]^3\) and \(l_{\gamma , \mathrm{in}} = 0.166 w\). Additional parameters are \(s=0\), \(\Lambda = w^2 / b \tau\), \(\phi ^{(0)}_\mathrm{out} = 0\), \(\phi ^{(0)}_\mathrm{in} = 1\), \(\tau = w^2/D_\mathrm{out}\), and \(w = 2 \sqrt{\kappa / b}\).

Shell sector width \(\Delta s\)

To resolve spatial anisotropies around a droplet, we discretize the shell into N sectors; see Fig. 1B. To obtain \(\phi _\mathrm{shell}\) for each sector, the background field \(\phi _\mathrm{out}\) is interpolated once per sector. Consequently, a larger number of sectors leads to a finer discretization and potentially a higher accuracy at the expense of larger computational cost. However, the accuracy is limited by the background discretization \(\Delta x\) as increasing N will have hardly any benefit if the distance \(\Delta s\) between interpolation points is already smaller than \(\Delta x\). For two and three dimensions, we respectively use \(\Delta s\approx 2\pi R/N\) and \(\Delta s\approx \sqrt{4 \pi R^2 / N}\); see Fig. 1B. Using \(\Delta s\sim \Delta x\), we can solve these equations for N, so that we can determine the number of sectors for each droplet based on its instantaneous radius \( R \). Note that this implies that the dynamics of larger droplets will be described by more sectors to faithfully capture the interaction with their surrounding. Fig. 2B shows that the shell sector size \(\Delta s\) has only marginal effects in simple situations.

Time step \(\Delta t\)

While the three previously discussed parameters affect material fluxes between droplets and background, the time step \(\Delta t\) determines the accuracy of dynamics of the model. Smaller values of \(\Delta t\) imply more accurate simulations, while larger values result in faster simulations, although numerical instabilities might also render simulations unstable. We next separately analyze the dynamics of the background field, the shell, and the droplet growth to identify the maximal suitable value of \(\Delta t\).

The dynamics of the background are described by the partial differential equation Eq. (7), which we here solve using a simple explicit Euler scheme. A standard von Neumann stability analysis shows that this scheme is stable if \(\Delta t< \Delta x^2/(2 D_\mathrm{out})\), where \(D_\mathrm{out}\) is the diffusivity in the background field. Consequently, a suitable time step for evolving the background field is \(\Delta t_\mathrm{background} = 0.1 \Delta x^2/D_\mathrm{out}\), where we chose the constant pre-factor conservatively. Similarly, we define \(\Delta t_\mathrm{shell} = 0.1 \ell ^2/D_\mathrm{out}\) for the shell. To ensure faithful dynamics of droplet growth, we demand that the relative growth \(R^{-1}|\mathrm{d}R/\mathrm{d}t|\) is small during a single time step \(\Delta t\). Assuming that typical droplets are not much smaller than the mean initial droplet radius \(\langle R\rangle\), this implies a maximal time step \(\Delta t_\mathrm{drop} = 0.1 \langle R\rangle ^2/D_\mathrm{out}\). Finally, we also consider the time scale of reactions, \(\Delta t_\mathrm{reaction} = 0.1 / (\max _\phi |s(\phi )|)\), based on the maximal rate of \(s(\phi _\mathrm{out})\). Taken together, we set the time step of the simulation to the minimal value of the four limiting time scales determined above.

Validation

We showed above that \(\Delta x \approx \ell \approx \Delta s\) is a sensible choice for the parameters of our algorithm. To see how this choice affects accuracy and speed of the simulation, we next present three simulation scenarios, which range from single droplets in an heterogeneous environment to coarsening of large dilute emulsions.

Passive droplet in external gradient

Figure 3
figure 3

Droplet dynamics in external gradients. (A) Droplet radius R as a function of time t compared to the analytical prediction (dashed line) from the thin-interface approximation27, the effective droplet model (blue), and the continuous model (orange). The inset shows a schematic of the simulation with the gradient imposed in the background. (B) Droplet drift speed v as function of t compared to the analytical prediction (dashed line) from the thin-interface approximation27. (A, B) The continuous model uses a cylindrical domain with \(r \in [0, 400 w]\), \(z\in [-L_2, L_2]\) with \(L_2=600 w\), azimuthal symmetry, and boundary conditions \(\mu (z=-L_2) = 0\) and \(\mu (z=L_2)= 0.072\,b w^3\) to impose the gradient. The effective model uses a 3-dimensional box of size \([-L_3, L_3]^3\) with \(L_3 = 422 w\), \(\Delta x= R_0\), \(\ell \approx \Delta s \approx R_0\), and boundary conditions \(\phi _\mathrm{out}(y = -L_3) = 0.01483\) and \(\phi _\mathrm{out}(y = L_3) = 0.0851\). Note that in the absence of droplets, boundary conditions imply identical linear gradient in the continuous model as \(\phi = \phi (z)\) and in the effective droplet model as \(\phi _\mathrm{out}= \phi _\mathrm{out}(y)\), which were also used to initialize the background for both models. Remaining parameters are specified in Fig. 2.

We first consider a single droplet in an external composition gradient, which is maintained via boundary conditions. Biological cells use such a setup to control the position of droplets in their interior10,12,47. Fig. 3 shows that the effective droplet model captures the drift and growth of the passive droplet quantitatively. While the resulting dynamics are very similar, the run time of the simulations are very different: The continuous model took roughly one day to complete, while the effective model finished within 10 seconds on identical hardware. Since the continuous model is much slower, we performed some tests in the subsequent sections only with the effective model.

Active droplet with logistic growth

We next test whether our effective model also captures the growth of droplets subjected to non-linear chemical reactions. We here consider logistic growth, \(s(\phi )= k \phi (1 - a \phi )\), where k sets the reaction rate and a determines the chemical equilibrium; the parameter \(a^{-1}\) is often called the carrying capacity. In a phase separating system, these reactions produce droplet material outside the droplet (where \(\phi < a^{-1}\)) and destroy it inside (assuming \(\phi ^{0}_\mathrm{out} > a^{-1}\)). These reactions are thus qualitatively similar to the active droplets with linear chemical reactions that we discussed above. However, the non-linear chemical reactions now lead to a non-monotonous growth of the active droplet; see Fig. 4. Our effective model captures this intricate behaviour quantitatively; the deviations to the full simulation of the continuous model are small. Taken together, our effective model adequately describes the behaviour of single active droplets, even if the chemical reactions are non-linear.

Figure 4
figure 4

Non-linear growth of a single active droplet. Droplet radius R as a function of time t for the continuous model (orange) and the effective droplet model (blue). The continuous model uses a spherically symmetric domain with \(r \in [0, 100 w]\). The effective model uses a 3-dimensional box of size \([- \frac{L}{2}, \frac{L}{2}]^3\) with \(L = 161 w\), \(\Delta x\approx \ell \approx \Delta s \approx R_0 = 20 w\). Model parameters are \(s(\phi )= k \phi (1 - a \phi )\), \(\phi _\mathrm{out}(t=0) = 0.1\), \(k = 10^{-4} \tau ^{-1}\) with \(a = 2\). Remaining parameters are specified in Fig. 2.

Mean-field coarsening of passive droplets

We next consider the interactions of many passive droplets in a dilute emulsion. When droplets only interact via the spatially averaged background field, Lifshitz and Slyozov predicted that the average droplet radius \(\left\langle R \right\rangle\) grows as \(t^{1/3}\) in this case43,44,48. Our simulation of \(10^5\) droplets indeed recovers this scaling (Fig. 5A) when we mimic this situation by setting the discretization \(\Delta x\) to the system size. Moreover, Fig. 5B shows that the distribution of radii also follows the universal shape \(H(\rho ) = \frac{4}{9}\rho ^2\left( 1+ \frac{\rho }{3} \right) ^ {-7/3} \left( 1-\frac{2 \rho }{3} \right) ^{-11/3} \mathrm{exp} \left( 1 - \frac{3}{3 - 2\rho } \right)\), where \(\rho =R/{\left\langle R \right\rangle }\) is a scaled droplet size43. Our effective model thus faithfully captures the dynamics of many droplets, optionally even beyond the Lifshitz-Slyozov regime by increasing the spatial resolution to capture correlations in droplet growth.

Figure 5
figure 5

Ostwald ripening of passive droplets. (A) Mean droplet radius \(\langle R \rangle\) as a function of time t shows the expected43,44 scaling \(\langle R \rangle \propto t^{1/3}\). Inset shows snapshot at \(t=2 \times 10^8 \tau\). (B) Frequency \(H(\rho )\) of the normalized radius \(\rho = R/\left\langle R \right\rangle\) at \(t = 2 \times 10^8 \tau\) compared to the expected universal distribution (black)43,44. (A, B) Simulations were carried out in a 3-dimensional periodic cubic domain of size \([0, L]^3\), where \(L = 10^4 w\). We used \(\Delta x \approx \ell \approx L\) and a single shell sector to approach the mean field solution. \(10^5\) droplets were initialized with radii chosen uniformly in [9.5w, 10.5w] in an initial background \(\phi _\mathrm{out}(t=0) = 0.05\). Remaining parameters are specified in Fig. 2.

Mean-field coarsening of active droplets

As a final example, we consider the interaction of many active droplets in a dilute emulsion. Here, we focus on the simplest case of a first-order reaction between the solvent and the droplet material, which is known to suppress Ostwald ripening27,39. We thus solve Eq. (3) using the reaction flux \(s(\phi ) = k_\mathrm{f}(1 - \phi ) - k_\mathrm{b}(\phi )\). Fig. 6 shows that the emulsions with broad initial sizes quickly converge to mono-disperse distributions in 2 and 3 dimensions. The droplet size in stationary state is very close to the theoretical prediction, which we obtain numerically from the condition \(\varvec{j}_\mathrm{in}= \varvec{j}_\mathrm{out}\) using Eqs. (5) and (7). Taken together, we thus demonstrated that our effective model faithfully recovers important physical behaviour of active droplets.

Figure 6
figure 6

Suppression of Ostwald ripening by first-order chemical reactions. (A, B) Radii R as a function of time t of droplets evolving in \(d=2\) dimensions (A) and \(d=3\) dimensions (B). The theoretically expected radii are indicated by dashed horizontal lines. 100 droplets with radii chosen uniformly in [10w, 50w] were placed in a periodic cubic domain of size \([0, L]^d\) with \(L=1000 w\). Model parameters are \(s(\phi )= k_\mathrm{f}(1 - \phi ) - k_\mathrm{b}\phi\), \(\phi _\mathrm{out}(t=0) = k_\mathrm{f}/(k_\mathrm{f}+ k_\mathrm{b})\), \(k_\mathrm{f}= 10^{-5} \tau ^{-1}\), \(k_\mathrm{b}= 10^{-4} \tau ^{-1}\), \(\Delta x \approx \ell \approx L\), and a single shell sector for all droplets. Remaining parameters are specified in Fig. 2.

Outlook and discussion

We showed that our effective method is orders of magnitudes faster than the continuous model while still accurately capturing the dynamics of droplets under the influence of chemical reactions and external gradients. To demonstrate that the method also extends to more challenging situations, we finally simulate the combination of chemical reactions and external gradients on the dynamics of the droplets. Fig. 7 shows that droplets grow as they drift along the gradient and they approach the fixed radius given by \(\overline{R}_\mathrm{3D}\), so that this system controls droplet drift and size. Taken together, our simulations demonstrate that the novel simulation method captures the dynamics of interacting active droplets efficiently.

Figure 7
figure 7

Active droplets in an external gradient. (AB) Snapshots of two-dimensional projections of the three-dimensional system at times indicated above the frame, showing droplets drift up the gradient (black arrow). White circles denote droplets while color indicates the volume fraction in the background field. (C) Droplet radius R as a function of time t indicating that all droplets reach \(\overline{R}_\mathrm{3D}\) (dashed line); compare to Fig. 6. (AC) Four droplets with radii chosen uniformly from \([0.8 R_0, 1.2 R_0]\) were placed in a cubic Cartesian domain of size \([-\frac{L}{2}, \frac{L}{2}]^3\) with boundary conditions \(\phi _\mathrm{out}(x = -\frac{L}{2}) = 0\) and \(\phi _\mathrm{out}(x = \frac{L}{2}) = 0.1\) to impose the gradient and no-flux boundary conditions at the remaining system boundaries. Model parameters are \(L = 10^3 w\), \(\Delta x\approx \ell \approx \Delta s \approx R_0 {= \,} 40 w\), \(s(\phi )= k_\mathrm{f}(1 - \phi ) - k_\mathrm{b}\phi\), \(\phi _\mathrm{out}(t=0) = k_\mathrm{f}/(k_\mathrm{f}+ k_\mathrm{b})\), \(k_\mathrm{f}= 10^{-5} \tau ^{-1}\) and \(k_\mathrm{b}= 10^{-4} \tau ^{-1}\). Remaining parameters are specified in Fig. 2.

To gain the significant speed-up, our approach focuses on relevant degrees of freedom and leverages analytical results. This method can in principle be extended to more challenging situations in the future. For instance, droplets embedded in an elastic matrix affect each others growth, which can be described by similar effective theories49,50. Similar dynamics will also inform the dynamics of droplets in cells, where for instance chromatin and the cytoskeleton suppress coalescence of condensates51,52,53. Our method can in principle also account for fluid flows, which are present in many liquid-like systems 10,54,55. Here, large scale flows will advect the droplets and also affect the background field. Finally, we could account for Brownian motion of droplets, their coalescence upon contact, and their spontaneous division in sufficiently strongly driven systems 56,57. In particular, droplets have shown anomalous coarsening behavior in cells, primarily due to hindrance and physical barriers which curb their ability of coalesce51,52,58,59. Extending our effective method to account for these physical processes will allow analyzing more and more complex situations, approaching the complexity necessary to understand the behavior of many droplets in biological cells.

In summary, we have demonstrated that our effective method faithfully captures the effects of chemical reactions and external chemical gradients. The method is several orders of magnitude faster than traditional continuous models, making it viable for fast and computationally efficient simulations of systems with many droplets. More importantly, our model provides a modular platform, which can be extended with other relevant physical phenomena affecting droplets, thus shedding insights on the formation, dissolution, stability, and sizes of biomolecular condensates.