---
abstract: 'Cellular aggregates play a significant role in the evolution of biological systems such as tumor growth, tissue spreading, wound healing, and biofilm formation. Analysis of such biological systems, in principle, includes examining the interplay of cell-cell interactions together with the cell-matrix interaction. These two interaction types mainly drive the dynamics of cellular aggregates which is intrinsically out of equilibrium. Here we propose a non-linear continuum mechanics formulation and the corresponding finite element simulation framework to model the physics of cellular aggregate formation. As an example, we focus in particular on the process of bacterial colony formation as recently studied by Kuan et al. @Kuan2021. Thereby we describe the aggregation process as an active phase separation phenomenon. We develop a Lagrangian continuum description of the problem which yields a substantial simplification to the formulations of the governing equations. Due to the presence of spatial Hessian and Laplacian operators, a gradient-enhanced approach is required to incorporate ${\mathcal{C}}^{1}$ continuity. In addition, a robust and efficient finite element formulation of the problem is provided. Taylor–Hood finite elements are utilized for the implementation to avoid instabilities related to the LBB condition. Finally, through a set of numerical examples, the influence of various parameters on the dynamics of the cellular aggregate formation is investigated. Our proposed methodology furnishes a general framework for the investigation of the rheology and non-equilibrium dynamics of cellular aggregates.'
address:
- 'Institute of Applied Mechanics, University of Erlangen-Nuremberg, Egerland Str. 5, 91058 Erlangen, Germany'
- 'Siemens Industry Software GmbH, Nordostpark 3, 90411 Nuremberg, Germany'
- 'Department of Biology, University of Erlangen-Nuremberg, 91058 Erlangen, Germany'
- 'Max Planck Zentrum f<span>ü</span>r Physik und Medizin, 91058 Erlangen, Germany'
- 'Department of Mechanical Engineering, Bilkent University, 06800 Ankara, Turkey'
- 'Glasgow Computational Engineering Center, James Watt School of Engineering, University of Glasgow, Glasgow G12 8QQ, United Kingdom'
author:
- Soheil Firooz
- Stefan Kaessmair
- Vasily Zaburdaev
- Ali Javili
- Paul Steinmann
bibliography:
- 'library.bib'
title: On continuum modeling of cell aggregation phenomena
---

Cellular aggregates, Active phase separation, Continuum model, Eulerian approach, Lagrangian approach

Introduction {#sec:intro}
============

Within the human body, most cells interact with their neighboring cells and with their extracellular matrix to establish a unique organization. These cell-cell and cell-matrix interactions form a complex network of mechanical, biological and chemical signals which play a significant role in cell physiology @Futaki2021 [@Griffith2006; @Kim2020; @Pampaloni2007]. The study of cellular interactions provides a significant insight towards a better understanding of many biological processes such as tumor growth @Kleiser1987 [@Eguchi2018], tissue spreading @Douezan2012 [@Beaune2014; @Beaune2017; @Douezan2011], biofilm formation @Clevers2016 [@Johnson2008; @Ben-Jacob1998] and wound healing @Armstrong1992 [@Bi2016]. Although there exist numerous contributions on experimental methods to examine cellular interactions and their final outcomes @Freitag1995 [@Brossay1994; @Todd1984; @Klausen2003; @Imhaus2014], there are still certain details and information that remain hard to assess. Examples of such details include the exact relation between the interactions and individual cell's adhesion properties, or the speed at which sorting between the cells occurs. Clearly, determining the relationships between all the problem variables via conducting experiments is an arduous and time consuming task. Theoretical approaches, however, provide a valuable alternative as they do not suffer from such limitations and facilitate parametric studies. Mathematical modeling allows us to quantify parameters such as local speeds, fluxes and their rates of change in a natural way. They also enable us to investigate the effects of interactions between cells of different types or to allow the cell properties to vary independently of one another. Given these benefits, mathematical modeling proves to be an inclusive and efficient alternative for analyses of cellular interactions @Armstrong2006.

There exist two major approaches for mathematical description of cellular interactions: *agent-based* and *continuum models*. In agent-based approaches, the cells are modeled and treated individually using a set of biophysical rules @Drasdo2005 [@Griffe2020; @Anderson2000; @Block2007]. Each cell is approximated, for example, as a homogeneous, isotropic, elastic, spherical object parameterized by measurable biophysical and biological quantities. The agent-based approach is particularly useful when one wants to study the interaction of individual cells with each other and with their environment @MOREIRA2002 [@Alber2002; @Alarcon2004]. Since this method is based on a series of rules for each cell, translating biological processes into a model is straightforward @Geris2011. For small-scale studies or cases in which the properties of the cells vary over distances comparable to the size of a cell, a higher degree of spatial resolution is obtained via agent-based models in comparison to continuum models. Despite all the precision that the agent-based method offers, this approach is difficult to study analytically and its computational cost greatly increases as the number of cells increases. For instance, simulation of a tumor growth process requires systems which evolve from a single progenitor cell to $10^{6}$ cells *in vitro* and $10^{11}$ cells *in vivo*. Carrying out a computational analysis on such large cell population sizes is a cumbersome task, if possible at all @Macklin2007. Additionally, it is often neither desirable nor necessary to track each individual cell within a very large population. For larger-scale applications, a continuum modeling proves to be a more viable alternative. This approach is well suited to describe large scale phenomena where the cell properties vary smoothly over a length scale of several cell diameters and therefore the cell properties can be approximated by a local average. Continuum models frequently involve ordinary and partial differential equations which are usually in the reaction-diffusion form @Araujo2004 [@Roose2007; @Horstmann2004; @Anguige2010; @Anguige2009]. Many aspects of tumor and tissue growth have been studied using continuum models @Byrne1996 [@Cristini2003; @Macklin2007]. A continuum description of cell motility due to cell-cell and cell-matrix interaction was presented in @Armstrong2006 [@Gerisch2008; @Ramis-Conde2008]. They introduced a non-local interaction term to account for adhesion between the cells and between the cells and matrix. Coarse grained continuum approaches such as hydrodynamic theories, have also provided a powerful tool to capture large scale emergent behaviors in active cellular systems @Callan-Jones2011a [@Ranft2010; @Julicher2007; @Popovic2017; @Prost2015a]. Further studies on continuum modeling of cellular aggregates are available in @Kopf2013 [@Bao2018; @Arciero2011]. We refer to @Byrne2009 for a thorough comparison between agent-based and continuum modeling of cellular aggregates.

A prototypical biological example of cellular aggregation is the formation of bacterial microcolonies and biofilms. One of the first steps in the process of bacterial colonization of biotic and abiotic surfaces is the formation of aggregates or colonies consisting of several thousands of cells. Usually, these microcolonies later evolve into much more complex bacterial communities, known as biofilms @Johnson2008a [@Otoole2000]. Bacterial infections involving biofilms are far more resistant to anti-microbial treatments in many cases @Hoiby2010. Thus, investigation of the mechanism of bacterial microcolony formation is of immense significance in the fields of medicine and engineering. A few well-known examples of bacterial microcolonies causing dangerous microbial infections are *Pseudomonas aeruginosa* @Jin2011, *Neisseria meningitidis* @Charles-Orszag2016, *Vibrio cholerae* @Toma2002 and *Neisseria gonorrhoeae* @Ponisch2017.

In this manuscript, we focus on microcolonies of *Neisseria gonorrhoeae (NG)* bacteria. These bacterial microcolonies are the infectious units which form on human epithelial tissue and cause gonorrhoeae, the second most common sexually transmitted disease @Jonsson1994. Multi-scale computational simulations have been conducted recently to study biophysical aspects of NG microcolonies @Bonazzi2018 [@Ponisch2017; @Ponisch2018]. The NG bacteria, as well as many other bacteria species, use multiple long and thin retractable filaments, called type IV pili, in order to interact with the environment and with each other @Howie2005. A series of studies have been carried out to investigate the twitching motility of bacteria mediated by type IV pili @Mattick2002 [@Holz2010; @Biais2010; @Eriksson2015; @Merz2000]. Pili can extend from the cell body, attach to the substrate and retract. Pilus retraction generates forces which are then translated into movement of cells. The magnitude of the forces generated by the pilus retraction are in the range of $100-180\,\text{pN}$ which is considered as one of the strongest active molecular forces known in nature @Maier2003 [@Ponisch2017]. Additionally, pili of one cell could also extend and attach to pili of other cells. Retraction of the attached pili network attracts the cells towards each other and leads to formation of an aggregate. These cycles of growth, attachment, detachment and retraction drive the cell motility on substrates and the aggregate formation process @Zaburdaev2014. Pili mediated cell-cell and cell-matrix interactions are crucial for the formation and maintenance of microcolonies @Weber2015 [@Todd1984; @Imhaus2014; @Taktikos2015]. The main objective of this contribution is to formulate and simulate the process of cell aggregation phenomena within a nonlinear continuum mechanics framework. We develop our framework in a Lagrangian setting which yields considerable simplification of the equations and enables implicit time integration which considerably increases the computational robustness. In doing so, we take a prototypical example of NG bacteria and we describe the process of colony formation as an active phase separation phenomenon. Our work is mainly based on the coarse grained approach previously developed by Kuan et al. @Kuan2021 [@Kuan2021b]. While we focus on intercellular interactions, our aim is to provide a robust and efficient computational setting for generic cell-matrix interaction problems, and to develop its fully nonlinear finite element implementation. Our proposed framework provides a versatile and reliable simulation technique that allows studying the processes of aggregate formation under high forces and strong phase-separated regimes nearing much closer to the physiologically relevant conditions.

  ---------------------------------------------------------- ------------------------------------------------- ------------------------------------------------- ---------------------------------------------------
  ${\{\bullet\}}$                                            an arbitrary quantity                             $\dot{{\{\bullet\}}}$                             material time derivative of ${\{\bullet\}}$
  \[-2.5pt\] $\nabla_{{\boldsymbol{X}}}{\{\bullet\}}$        material gradient of ${\{\bullet\}}$              $\nabla_{{\boldsymbol{x}}}{\{\bullet\}}$          spatial gradient of ${\{\bullet\}}$
  \[-2.5pt\] $\nabla_{{\boldsymbol{X}}}\cdot{\{\bullet\}}$   material divergence of ${\{\bullet\}}$            $\nabla_{{\boldsymbol{x}}}\cdot{\{\bullet\}}$     spatial divergence of ${\{\bullet\}}$
  \[-2.5pt\] $\Delta_{{\boldsymbol{x}}}{\{\bullet\}}$        spatial Laplacian of ${\{\bullet\}}$              $\nabla^{2}_{{\boldsymbol{x}}}{\{\bullet\}}$      spatial Hessian of ${\{\bullet\}}$
  \[-2.5pt\] ${\mathcal{L}}_{t} {\{\bullet\}}$               Lie time derivative of ${\{\bullet\}}$            $\delta{\{\bullet\}}$                             variation of ${\{\bullet\}}$
  \[-2.5pt\] $R$                                             cell radius                                       $E$                                               cell elastic modulus
  \[-2.5pt\] $f^{\text{p}}$                                  pili-pili attractive force                        $f^{\text{s}}$                                    steric repulsive force
  \[-2.5pt\] $n^{\text{p}}$                                  number of bound pili pairs                        $\xi$                                             cell-substrate friction coefficient
  \[-2.5pt\] $k_{\text{on}}$                                 pili binding rate                                 $k_{\text{off}}$                                  pili unbinding rate
  \[-2.5pt\] $l$                                             pili length                                       $\ell_0$                                          pili average length
  \[-2.5pt\] ${\boldsymbol{l}}_{ij}$                         distance vector between cells $i$ and $j$         ${\boldsymbol{l}}$                                spatial velocity gradient
  \[-2.5pt\] ${\boldsymbol{X}}$                              material position vector                          ${\boldsymbol{x}}$                                spatial position vector
  \[-2.5pt\] $c_0$                                           material cell number density                      $c_t$                                             spatial cell number density
  \[-2.5pt\] $p_0$                                           material bound pili number density                $p_t$                                             spatial bound pili number density
  \[-2.5pt\] ${\boldsymbol{g}}$                              cell number density gradient                      ${\boldsymbol{v}}$                                cell velocity
  \[-2.5pt\] ${\boldsymbol{y}}$                              non-linear deformation map                        ${\boldsymbol{F}}$                                deformation gradient
  \[-2.5pt\] $J$                                             Jacobian of the deformation gradient              ${\boldsymbol{K}}$                                cofactor of the deformation gradient
  \[-2.5pt\] $\delta$                                        Kronecker delta                                   $\Psi_\text{tot}$                                 total internal energy
  \[-2.5pt\] ${\boldsymbol{I}}$                              material second-order identity tensor             ${\boldsymbol{i}}$                                spatial second-order identity tensor
  \[-2.5pt\] ${\mathcal{B}}_0$                               material configuration                            ${\partial}{\mathcal{B}}_0$                       boundary of the material configuration
  \[-2.5pt\] ${\boldsymbol{t}}^{\text{a}}$                   active traction on material configuration         ${\boldsymbol{t}}^{\text{p}}$                     passive traction on material configuration
  \[-2.5pt\] $\delta {\boldsymbol{y}}$                       linear momentum balance test function             $\delta c$                                        cell number density conservation test function
  \[-2.5pt\] $\delta {\boldsymbol{g}}$                       cell density gradient continuity test function    $\delta p$                                        bound pili number density evolution test function
  \[-2.5pt\] ${\boldsymbol{E}}$                              Green–Lagrange strain tensor                      ${\boldsymbol{B}}$                                Piola deformation tensor
  \[-2.5pt\] ${\boldsymbol{S}}^{\text{a}}$                   active Piola–Kirchhoff stress                     ${\boldsymbol{\tau}}^{\text{a}}$                  active Kirchhoff stress
  \[-2.5pt\] ${\boldsymbol{P}}^{\text{a}}$                   active Piola stress                               ${\boldsymbol{\sigma}}^{\text{a}}$                active Cauchy stress
  \[-2.5pt\] ${\boldsymbol{P}}^{\text{p}}$                   passive Piola stress                              ${\boldsymbol{\sigma}}^{\text{p}}$                passive Cauchy stress
  \[-2.5pt\] ${\boldsymbol{S}}^{\text{f}}$                   pili formation Piola–Kirchhoff stress             ${\boldsymbol{\sigma}}^{\text{f}}$                pili formation Cauchy stress
  \[-2.5pt\] ${\overline{{\boldsymbol{P}}}}$                 cell density gradient continuity Piola stresses   ${\boldsymbol{N}}$                                material unit normal to the boundary
  \[-2.5pt\] ${\text{\usefont{U}{bbm}{m}{n}R}}$              assembled residual vector                         ${\boldsymbol{U}}$                                global vector of unknowns
  \[-2.5pt\] ${\text{\usefont{U}{bbm}{m}{n}K}}$              assembled tangent stiffness                       $\# e$                                            number of elements
  \[-2.5pt\] $N$                                             shape function of the finite elements             ${\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}$   symmetric fourth-order identity tensor
  \[-2.5pt\] $\lambda$                                       penalty parameter                                 $\Delta t$                                        time step
  \[-2.5pt\]                                                                                                                                                     
  ---------------------------------------------------------- ------------------------------------------------- ------------------------------------------------- ---------------------------------------------------

  : Summary of key definitions and notations.<span data-label="tab:notation"></span>

The remainder of this manuscript is organized as follows. Table \[tab:notation\] gathers the key definitions and notations of the paper. Section \[sec:Governing equations\] introduces the problem definition and presents the governing equations. Finite element implementation of the problem is elaborated in Section \[sec:FEM\]. Our proposed theory is illustrated through a set of numerical examples in Section \[sec:result\]. Finally, Section \[sec:conc\] concludes the work and provides further outlooks.

Governing equations {#sec:Governing equations}
===================

This section elaborates on the governing equations. First the problem of cell aggregation is defined and all the parameters and their roles are introduced. Afterwards, the continuum approach within the Lagrangian settings is detailed. Note that for simplicity and readability, our formulations here are developed for a two-dimensional case, but there are no conceptual limitations to generalize it to three dimensions.

Problem definition {#sec:prob}
------------------

Figure \[fig:cell\] (left) shows a transmission electron microscopy image of a single NG bacterium together with its pili. In this contribution, we approximate the cell geometry with a circular disk with the radius $R$ for the sake of simplicity, as shown in Fig. \[fig:cell\] (right). Each NG bacterium is surrounded by approximately $10-20$ pili which are isotropically distributed around the cell @Zaburdaev2014 [@Eriksson2015]. The length of each individual pilus $l$ was shown to be exponentially distributed with the average value of $\langle l \rangle = \ell_{0}$. Measurements report the average length $\ell_{0}$ to be around $1-2\, \mu \text{m}$ with cell radius $R$ being around $1\,\mu \text{m}$ @Holz2010.

Figure \[fig:problem\] depicts a group of cells interacting via their pili. In order to move on a substrate, cells use their pili. Pili can grow, attach to the substrate and retract, which produces the force required for the displacement. Pili-substrate interactions play a significant role in determining the cell motility which is essential for understanding the kinetics of aggregation. Here, since we are mainly interested in examining the behavior of aggregates, only a substrate friction is considered to represent the pili-substrate interactions. Further details on pili-substrate interactions are available in @Ponisch2019. The growth and retraction of the pili occurs through the process of polymerization and depolymerization which is powered by specific motor protein complexes @Marathe2014 [@Craig2019; @Craig2004]. Apart from attaching to the substrate, pili can also attach to pili of other cells. Retraction of an attached pili pair generates an attractive force $f^\text{p}$ which pulls the cells towards each other. In Fig. \[fig:problem\], bound pili are depicted by blue lines with a dot on them, whereas free pili are shown by solid green lines. The number of the pili pairs that have formed between two cells is denoted as $n^\text{p}$. Accordingly, as illustrated for the cells $i$ and $s$, the overall attractive force between two cells which have formed a network of bound pili is $f^\text{p}n^\text{p}_{is}$. Assuming no bound pairs at the initial time, the number of bound pili between the cells $i$ and $j$ (that do not move relative to each other) can be obtained via the relation $${\displaystyle\frac}{{\mbox{d}}n_{ij}^{\text{p}}}{{\mbox{d}}t} = {\displaystyle\frac}{k_\text{on}\,e^{-l_{ij}\ell_0}}{2\pi\ell_0^2} - k_\text{off}n_{ij}^{\text{p}}
\qquad \Longrightarrow \qquad 
n_{ij}^{\text{p}} = {\displaystyle\frac}{k_\text{on}\,e^{-l_{ij}\ell_0}}{2\pi\ell_0^2k_\text{off}}\left[ 1 - e^{-k_\text{off}\,t}   \right]\,,
\label{eq:pili_evolution}$$ with $k_\text{on}$ being the pili binding rate and $k_\text{off}$ being the pili unbinding/detachment rate. The distance between the cells $i$ and $j$ is $l_{ij}$ which is the magnitude of the vector pointing from cell $j$ to cell $i$ as $l_{ij}=|| {\boldsymbol{l}}_{ij} ||=|| {\boldsymbol{r}}_{i} - {\boldsymbol{r}}_{j} ||$. This relation was obtained by Kuan et al. @Kuan2021b [@Kuan2021] which is a mean field approximation that ignores the discreteness of the pili number. The factor ${\displaystyle\frac}{k_\text{on}\,e^{-l_{ij}/\ell_0}}{2\pi\ell_0^2}$ stems from the assumption of an exponential distribution of the pili length and integration over all possible binding points along the line connecting two bacteria. Figure \[fig:pili\_evolution\] renders the variation of bound pili pairs between the cells $i$ and $j$ with respect to their distance $l_{ij}$ and time for three different values of binding rate $k_{\text{on}}$ (two different views are given for better illustration). The average pili length is set to $\ell_0=1.0\,\mu\text{m}$. It is confirmed that as time evolves, the number of bound pili pairs reaches a steady state. Larger distance between the cells yields a decreased number of bound pili pairs. This is justifiable since the further the cells are from each other, the less chance their pili have to attach to each other due to their limited length. Evidently, larger binding rates also result in more bound pili pairs.

![ Variation of the bound pili pairs $n_{ij}^{\text{p}}$ between the cells $i$ and $j$ with respect the their distance $l_{ji}$ and time $t$ according to relation . Three different values $0.1$, $0.2$ and $0.3$ for the pili binding rate are considered. Two different views are provided for better illustration. Pili average length is set to $\ell_0=1.0\,\mu\text{m}$ and the unbinding rate is set to $k_{\text{off}}=0.005\,\text{s}^{-1}$. <span data-label="fig:pili_evolution"></span>](pili-evolution.pdf){width="100.00000%"}

Another force that plays a role in the cell aggregate formation dynamics is the steric repulsive force $f^{\text{s}}_{ij}$ which occurs between the cells $i$ and $j$ that are in direct contact. In the model, having this repulsive force is necessary to prevent interpenetration of the cells. In summary, three major forces determine the dynamics of the cells in the network; cell-substrate friction, pili-pili mediated attractive force and steric repulsive force. The forces arising from the contraction of the constantly remodeling pili network attract the cells together and in the presence of the excluded volume interactions, a densely packed colony is formed which behaves as an active visco-elastic material @Kuan2021.

Since the pili-pili interactions are driven by active retractions and growth of pili, the system is inherently out of equilibrium. The force balance equation for an individual cell in the aggregate can be obtained as $$f^{\text{p}}\sum_{\substack{j=1\\j\neq i}} n_{ij}^{\text{p}}\hat{{\boldsymbol{l}}}_{ji} + \sum_{\substack{j=1\\j\neq i}} f^{\text{s}}_{ij}\hat{{\boldsymbol{l}}}_{ij} - \xi {\boldsymbol{v}}_{i} = 0\,,
\label{eq:force-balance}$$ with ${\boldsymbol{v}}_i$ being the velocity of cell $i$ and $\xi$ being the friction coefficient between the cell and the substrate. Note the first summation is over the neighboring cells with which the cell has formed pili pairs and the second summation is over the neighboring cells with which the cell is in direct contact. The unit vector $\hat{{\boldsymbol{l}}}_{ij}={\boldsymbol{l}}_{ij}/l_{ij}$ shows the direction of the pili-pili mediated force acting on cell $i$ by cell $j$ which is in the same direction of the steric repulsive force between these two cells. The three terms in Eq.  represent pili-pili mediated forces, excluded volume interactions and cell-substrate friction, respectively. The summations in Eq.  imply that the equation is solved for each cell individually. While this approach offers more accuracy together with a higher degree of spatial resolution, it suffers from computational costs as the number of cells increases. Moreover, if one is interested in examining the collective/overall behavior of the aggregate, tracking each individual cell is neither desirable nor necessary. In this section, we propose a continuum model to describe the dynamics of dense bacterial colonies. In our methodology, the system is characterized by two key features which distinguish it from previous models of active systems. First, at time scales smaller than the pili detachment time, the bound pili network endows aggregates with elastic-like material properties for which a Lagrangian approach might be more suitable. At larger time scales, pili can rearrange which allows for stress relaxation resulting in a fluid-like behavior for which an Eulerian approach is the common choice. Second, the attractive pili-pili mediated force dipoles are balanced by steric repulsion forces which allow for considering dense cellular aggregates. These two key features are captured by the proposed continuum equations.

Eulerian approach {#sec:Eulerian}
-----------------

In the Eulerian approach, the cell aggregate is treated as a compressible fluid-like material. Therefore, our domain would be a fixed control window and we observe the changes that the aggregate goes through over this window. This section briefly details on the governing equations of the problem within an Eulerian approach that were previously derived by coarse-graining microscopic equations in @Kuan2021.

### Balance equations {#sec:balance_Eulerian}

The first balance equation is the overall cell number conservation equation which reads $$\begin{aligned}
{\displaystyle\frac}{{\partial}c_t}{{\partial}t} +\nabla_{\!{\boldsymbol{x}}}\!\cdot(c_t {\boldsymbol{v}}) = 0\,,
\end{aligned}
\label{eq:continuity_Eulerian}$$ where $c_t$ is the spatial cell *number* density and ${\boldsymbol{v}}$ is the cell (ether) velocity. Note, the subscript ${\boldsymbol{x}}$ indicates that spatial derivatives are taken with respect to the coordinates in the current configuration. The two variables $c_t$ and ${\boldsymbol{v}}$ are the unknowns of our problem. The second balance equation is the linear momentum balance which arises from the microscopic balance of forces in Eq.  and reads $$\nabla_{\!{\boldsymbol{x}}}\!\cdot{\boldsymbol{\sigma}}^{\text{a}} + \nabla_{\!{\boldsymbol{x}}}\!\cdot{\boldsymbol{\sigma}}^{\text{p}} - \xi c_t{\boldsymbol{v}} = {{\boldsymbol{0}}}\,,
\label{eq:LMB_Eulerian}$$ with ${\boldsymbol{\sigma}}^\text{a}$ and ${\boldsymbol{\sigma}}^\text{p}$ being the active and passive Cauchy stresses, respectively. The third balance equation is the bound pili number density evolution equation which reads $${\displaystyle\frac}{{\partial}p_{t}}{{\partial}t}  + \nabla_{\!{\boldsymbol{x}}}\! \cdot {\left(}p_{t}{\boldsymbol{v}} {\right)}- k_{\text{on}}  {\left[}c_{t}^{2} + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t} \,  {\left[}\Delta_{{\boldsymbol{x}}} c_{t}{\right]}- {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| \nabla_{\!{\boldsymbol{x}}} c_{t} \big|^{2}  {\right]}+ k_{\text{off}} p_{t} = 0\,,
\label{eq:pili_Eulerian}$$ with $p_t$ the spatial bound pili number density. This equation incorporates the pili turnover dynamics from Eq. . Note, in our continuum formulation we denote the spatial pili number density as $p_t$ which is a coarse-grained version of $n_{ji}^{\text{p}}$. The spatial Laplacian operator $\Delta_{{\boldsymbol{x}}}$ is defined by the inner product $\Delta_{{\boldsymbol{x}}}{\{\bullet\}}\!:=\nabla_{{\boldsymbol{x}}}\cdot{\left(}\nabla_{{\boldsymbol{x}}}{\{\bullet\}}{\right)}$. Equation  clearly states that the overall bound pili number is not conserved since the pili network constantly changes due to the binding and unbinding pairs.

### Stress definitions {#sec:stress_Eulerian}

The next step is to state the definitions for the active and passive stresses. For the passive stress, we have a straightforward explicit expression which reads $${\boldsymbol{\sigma}}^\text{p}=-{\displaystyle\frac}{E \pi R^2 c_t}{1-\pi R^2 c_t}{\boldsymbol{i}}\,,
\label{eq:passive_stress_Eulerian}$$ with ${\boldsymbol{i}}$ being the spatial second-order identity tensor, $E$ being the bulk modulus of the cell and $R$ being the cell radius. The expression for the passive Cauchy stress is similar to a *hydrostatic pressure-like stress*. This expression is one of the simplest forms to describe the excluded volume interactions. It resembles the van der Waals gas law for pressure in the absence of attractive interactions. As a result, in the absence of the active stress, the only forces acting on cells would be steric repulsive forces and cell-substrate friction, thus while moving on the substrate, the cells tend to repel each other until they reach a state of equilibrium. As it will be elucidated in the numerical examples, this gives rise to formation of a uniform distribution of cells throughout the domain. Figure \[fig:piR\] depicts the behavior of the passive stress with respect to the cell number density. The $x$-axis represents the dimensionless parameter $c_t R^2$ with the left $y$-axis representing $1-\pi R^2 c_t$ and the right $y$-axis representing the pressure term in the passive stress. At $c_tR^2=1/\pi $, the stress renders an asymptotic behavior since the denominator tends to zero. As a result, this value represents the upper bound for the cell number density.

![ Illustration of the behavior of passive stress with respect to cell number density. The denominator of the stress becomes zero at the value $\text{max}(c_t R^2)=1/\pi$ hence, the asymptotic behavior. This value represents the upper bound for the cell number density. <span data-label="fig:piR"></span>](piR.pdf){width="80.00000%"}

The definition of the active Cauchy stress is given as coarse-grained average of the microscopic expression (for details see @Kuan2021). For us, its time evolution equation is of interest which reads $$\begin{aligned}
&{\displaystyle\frac}{{\partial}{\boldsymbol{\sigma}}^\text{a}}{{\partial}t}  + \nabla_{\!{\boldsymbol{x}}}\!\cdot({\boldsymbol{\sigma}}^\text{a}{\otimes}{\boldsymbol{v}}) - 2\left[ {\boldsymbol{l}} \cdot {\boldsymbol{\sigma}}^\text{a} \right]^{\text{sym}} = - {\displaystyle\frac}{1}{\ell_0 p_t f^{\text{p}}} \left[{\boldsymbol{\sigma}}^\text{a}{\otimes}{\boldsymbol{\sigma}}^\text{a}\right]:{\boldsymbol{l}}^{\text{sym}}  + {\boldsymbol{\sigma}}^\text{f} - k_\text{off}\,{\boldsymbol{\sigma}}^\text{a}\,,\\
\end{aligned}
\label{eq:active_stress_Eulerian}$$ with ${\boldsymbol{l}}$ being the spatial velocity gradient ${\boldsymbol{l}}={\ensuremath{\mbox{grad}}}{\boldsymbol{v}}$ and ${\boldsymbol{\sigma}}^{\text{f}}$ being the pili formation Cauchy stress tensor which will be defined below. The active Cauchy stress results from the pili-pili mediated attractive forces between the cells which pull the cells together and lead to the formation of an aggregate. For the pili formation Cauchy stress an explicit formulation is achievable. Due to the intrinsic nature of pili-pili interactions as force dipoles, this stress tensor has a nematic symmetry and reads $${\boldsymbol{\sigma}}^{\text{f}} = {\displaystyle\frac}{f^{\text{p}}k_\text{on}\ell_{0}}{2} {\left[}c_{t}^{2}{\boldsymbol{i}} - {\displaystyle\frac}{3\ell_{0}^{2}}{4} {\left[}2{\left[}\nabla_{{\boldsymbol{x}}} c_{t} {\otimes}\nabla_{{\boldsymbol{x}}} c_{t} {\right]}+ \big| \nabla_{{\boldsymbol{x}}} c_{t} \big|^{2} {\boldsymbol{i}} {\right]}+ {\displaystyle\frac}{3\ell_{0}^{2}}{4} {\left[}c_{t} {\left[}\Delta_{{\boldsymbol{x}}} c_{t}{\right]}{\boldsymbol{i}} + 2c_{t}\nabla^{2}_{{\boldsymbol{x}}}c_{t} {\right]}{\right]}\,,
\label{eq:pili_formation_stress_Eulerian}$$ where $\nabla^{2}_{{\boldsymbol{x}}}$ denotes the spatial Hessian operator defined by $\nabla^{2}_{{\boldsymbol{x}}}{\{\bullet\}}:= \nabla_{{\boldsymbol{x}}}{\left(}\nabla_{{\boldsymbol{x}}}{\{\bullet\}}{\right)}$.

Lagrangian approach {#sec:Lagrangian}
-------------------

This section elaborates the pertinent equations within a Lagrangian framework, hence, all the equations are written in the material configuration. In the Lagrangian approach, we follow the trajectory of the cells as time elapses. Key geometric notions from nonlinear continuum kinematics are thereby the integration of the cell velocity into the cell nonlinear deformation map ${\boldsymbol{x}}={\boldsymbol{y}}({\boldsymbol{X}},t)$ with ${\boldsymbol{x}}$ and ${\boldsymbol{X}}$ denoting the Eulerian and the Lagrangian coordinates. Based on the notion of the cell deformation map ${\boldsymbol{y}}$, we introduce the corresponding material deformation gradient ${\boldsymbol{F}}:=\nabla_{{\boldsymbol{X}}}{\boldsymbol{y}}$, its Jacobian (determinant) $J:=\det {\boldsymbol{F}}$ and its cofactor ${\boldsymbol{K}}:=J{\boldsymbol{F}}^{-T}$. As will be elucidated, the main advantage of the Lagrangian approach is that it yields a significant simplification for the equations which facilitates finite element implementation of the problem. In addition, employing the Lagrangian approach enables utilization of implicit time integration schemes which is computationally more robust compared to explicit time integration and less prone to instability issues. A significant step towards the Lagrangian formulation of the problem is parametrization of all fields in Lagrangian coordinates ${\boldsymbol{X}}$. Especially the spatial cell number density is parameterized as $c_{t}=c_{t}({\boldsymbol{X}},t)$. This critical step allows us to adopt ${\mathcal{C}}^{0}$ continuous or discontinuous schemes and to avoid complications regarding the implementation of ${\mathcal{C}}^{1}$ continuous elements.

### Balance equations {#sec:balance_Lagrangian}

Similar to the previous section, we start with the overall cell number conservation equation. Using the material time derivative $D{\{\bullet\}}/Dt =\dot{{\{\bullet\}}} = {\partial}{\{\bullet\}}/{\partial}t + \nabla_{{\boldsymbol{x}}}{\{\bullet\}}\cdot {\boldsymbol{v}}$ and Eq. , the Lagrangian form of the overall cell number conservation equation can be written as $${\displaystyle\frac}{D{\left(}Jc_{t}{\right)}}{D t}
=
\dot{{\overline{Jc_{t}}}}
=
\dot{J} c_{t} + \dot{c_{t}} J
=0\,.
\label{eq:continuity_Lagrangian}$$ The second balance equation is the linear momentum balance. To define the Lagrangian version of the linear momentum balance equation, the velocity field is replaced by the time derivative of the deformation map as ${\boldsymbol{v}}=\dot{{\boldsymbol{y}}}$. Using the relation $\nabla_{{\boldsymbol{X}}}\cdot {\boldsymbol{P}}=J \nabla_{{\boldsymbol{x}}} \cdot {\boldsymbol{\sigma}}$ the material linear momentum balance reads $$\nabla_{{\boldsymbol{X}}}\cdot{\boldsymbol{P}}^\text{a} + \nabla_{{\boldsymbol{X}}}\cdot{\boldsymbol{P}}^\text{p} -\xi J c_{t}\dot{{\boldsymbol{y}}} = {{\boldsymbol{0}}}\,,
\label{LMB_Lagrangian}$$ with ${\boldsymbol{P}}^\text{a}$ and ${\boldsymbol{P}}^\text{p}$ being the active and passive Piola stresses, respectively. The next step is to define the Lagrangian version of the bound pili evolution equation. Using the relations $p_{0} =J p_{t}$ and $\dot{{\{\bullet\}}} = {\partial}{\{\bullet\}}/{\partial}t + \nabla_{{\boldsymbol{x}}}{\{\bullet\}}\cdot {\boldsymbol{v}}$, the bound pili evolution equation can be written in terms of the material pili density as $$\dot{p_{0}} - J k_\text{on}  {\left[}c_{t}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t} \Delta_{{\boldsymbol{x}}} c_{t} - {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| \nabla_{{\boldsymbol{x}}} c_{t} \big|^{2} {\right]}+ k_{\text{off}}p_{0}=0\,.
\label{eq:pili_Lagrangian}$$ Note, in Eq. , the derivatives of the cell number density are still with respect to the spatial coordinates. In Section \[sec:gradient\_enhanced\_Lagrangian\], these derivatives will be transformed completely to the material configuration hence, our fully Lagrangian formulation.

### Stress definitions {#sec:stress_Lagrangian}

Similar to the passive Cauchy stress, derivation of the passive Piola stress is straightforward. Using the relation ${\boldsymbol{P}} = J {\boldsymbol{\sigma}}\cdot {\boldsymbol{F}}^{-T} $, the passive Piola stress reads $${\boldsymbol{P}}^\text{p}=-{\displaystyle\frac}{E \pi R^2 c_{t}}{1-\pi R^2 c_{t}}{\boldsymbol{K}}\,.
\label{passive_stress_Lagrangian}$$ Derivation of the active Piola stress from the relation  is an intricate task and requires further attention. The active Piola stress tensor, a two-point tensor, must be converted to a fully material stress tensor. In doing so, firstly the active Cauchy stress ${\boldsymbol{\sigma}}^\text{a}$ is transformed to the active Kirchhoff stress ${\boldsymbol{\tau}}^\text{a}$ as $${\boldsymbol{\tau}}^\text{a} = J {\boldsymbol{\sigma}}^\text{a}\,,$$ with its material time derivative $$\dot{{\boldsymbol{\tau}}^\text{a}}
= 
J \left[ {\displaystyle\frac}{{\partial}{\boldsymbol{\sigma}}^\text{a}}{{\partial}t} + \nabla_{{\boldsymbol{x}}} \!\cdot ({\boldsymbol{\sigma}}^\text{a}{\otimes}{\boldsymbol{v}}) \right]\,.$$ Via multiplying Eq.  by the Jacobian $J$, we arrive at a corresponding relation for Eq.  in terms of the Kirchhoff stress $$\dot{{\boldsymbol{\tau}}^\text{a}} - 2\left[ {\boldsymbol{l}} \cdot {\boldsymbol{\tau}}^\text{a} \right]^{\text{sym}} = - {\displaystyle\frac}{1}{\ell_0p_0f^{\text{p}}} \left[{\boldsymbol{\tau}}^\text{a}{\otimes}{\boldsymbol{\tau}}^\text{a}\right]:{\boldsymbol{l}}^{\text{sym}}  + {\boldsymbol{\tau}}^\text{f} - k_\text{off}\,{\boldsymbol{\tau}}^\text{a}\,.
\label{eq:active_kirchhof_time_derivative}$$ To obtain a fully material form of this equation, the Lie time derivative of the Kirchhoff stress needs to be introduced. To express the Lie time derivative of the Kirchhoff stress, we need to calculate the pull-back of the Kirchhoff stress, calculate its material time derivative and then push it forward to the spatial configuration again which renders $$\begin{aligned}
{\mathcal{L}}_t{\boldsymbol{\tau}}^\text{a} 
= 
\dot{{\boldsymbol{\tau}}^\text{a}} - 2\left[ {\boldsymbol{l}} \cdot {\boldsymbol{\tau}}^\text{a} \right]^{\text{sym}}\,.
\end{aligned}
\label{eq:Lie_time_derivative}$$ Note, the symmetry of the Kirchhoff stress is utilized in the above derivation. Further details regarding the formulation of the Lie time derivative are available in \[sec:app\_2\]. The pull-back of the active Kirchhoff stress yields the active Piola–Kirchhoff stress as $${\boldsymbol{S}}^\text{a} = {\boldsymbol{F}}^{-1} \cdot {\boldsymbol{\tau}}^\text{a} \cdot {\boldsymbol{F}}^{-T}\,.$$ Using Eqs.  and , one can write $${\mathcal{L}}_t{\boldsymbol{\tau}}^\text{a} = {\boldsymbol{F}} \cdot \dot{{\boldsymbol{S}}^\text{a}}\cdot{\boldsymbol{F}}^T = - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[{\boldsymbol{\tau}}^\text{a}{\otimes}{\boldsymbol{\tau}}^\text{a}\right]:{\boldsymbol{l}}^{\text{sym}}  + {\boldsymbol{\tau}}^\text{f} - k_\text{off}\,{\boldsymbol{\tau}}^\text{a}\,.$$ Accordingly, the material time derivative of the active Piola–Kirchhoff stress in terms of the active Kirchhoff stress is obtained as $$\dot{{\boldsymbol{S}}^\text{a}} 
= 
{\boldsymbol{F}}^{-1} \cdot {\left[}{\mathcal{L}}_t{\boldsymbol{\tau}}^\text{a}{\right]}\cdot {\boldsymbol{F}}^{-T}
=
{\boldsymbol{F}}^{-1}\cdot\left[- {\displaystyle\frac}{1}{\ell_0\rho_t^\text{p}f^{\text{p}}} \left[ {\boldsymbol{\tau}}^\text{a}:{\boldsymbol{l}}^{^{\text{sym}}}\right]{\boldsymbol{\tau}}^\text{a}  + {\boldsymbol{\tau}}^\text{f} - k_\text{off}\,{\boldsymbol{\tau}}^\text{a}\right]\cdot{\boldsymbol{F}}^{-T}\,.$$ Finally, via replacing ${\boldsymbol{\tau}}^\text{a}$ with ${\boldsymbol{F}}\cdot{\boldsymbol{S}}^\text{a}\cdot{\boldsymbol{F}}^{T}$, we arrive at the final form of the material time derivative of the active Piola–Kirchhoff stress $$\dot{{\boldsymbol{S}}^\text{a}} = - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:\dot{{\boldsymbol{E}}}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\,,
\label{eq:active_stress_Lagrangian}$$ with ${\boldsymbol{E}}$ being the Green–Lagrange strain tensor ${\boldsymbol{E}}=\tfrac{1}{2}[{\boldsymbol{F}}^T\cdot{\boldsymbol{F}}-{\boldsymbol{I}}]$. For further details regarding the derivation of Eq. , see \[sec:app\_2\]. The most significant advantage of using the Lagrangian approach is that it yields considerable simplification to the governing equations and the active stress time evolution equation. The active stress can be numerically determined via time-discretizing Eq. , see \[sec:app\_3\] for further details. Subsequently, after solving for the active Piola–Kirchhoff stress, the active Piola stress can be immediately obtained via ${\boldsymbol{P}}^\text{a}={\boldsymbol{F}}\cdot{\boldsymbol{S}}^\text{a}$. Stating the material time derivative of the active Piola–Kirchhoff stress , severely alleviates incrementally objective time integration of the active stress evolution. The next step is to define the pili formation second Piola–Kirchhoff stress ${\boldsymbol{S}}^{\text{f}}$. Inserting the relation ${\boldsymbol{S}} = J{\boldsymbol{F}}^{-1}\cdot{\boldsymbol{\sigma}}\cdot{\boldsymbol{F}}^{-T}$ into Eq. , yields the pili formation Piola–Kirchhoff stress as $$\begin{aligned}
{\boldsymbol{S}}^\text{f} = {\displaystyle\frac}{1}{2}f^{\text{p}}k_\text{on}\ell_{0}J {\left[}c_{t}^{2}{\boldsymbol{B}} + {\displaystyle\frac}{3\ell_{0}^{2}}{4} {\left[}-2 {\boldsymbol{F}}^{-1}\!\! \cdot {\left[}\nabla_{{\boldsymbol{x}}} c_{t} {\otimes}\nabla_{{\boldsymbol{x}}} c_{t} {\right]}\cdot {\boldsymbol{F}}^{-T} \!\!\! - \big| \nabla_{{\boldsymbol{x}}} c_{t} \big|^{2} {\boldsymbol{B}} + c_{t}{\left[}\Delta_{{\boldsymbol{x}}} c_{t}  {\right]}{\boldsymbol{B}} + c_{t} {\left[}{\boldsymbol{F}}^{-1}\!\! \cdot \nabla^{2}_{{\boldsymbol{x}}}c_{t} \cdot {\boldsymbol{B}} + {\boldsymbol{B}} \cdot \nabla^{2}_{{\boldsymbol{x}}}c_{t} \cdot {\boldsymbol{F}}^{-T} {\right]}{\right]}{\right]}\,,\\
\end{aligned}
\label{eq:pili_formation_stress_Lagrangian}$$ with ${\boldsymbol{B}}={\boldsymbol{F}}^{-T}\cdot{\boldsymbol{F}}^{-1}$ the Piola deformation tensor. Note, in Eq. , the gradients and divergences are with respect to the spatial coordinates which will be transformed completely to the material configuration in Section \[sec:gradient\_enhanced\_Lagrangian\].

### Weak form {#sec:weak_form_Lagrangian}

To obtain the weak form of the overall cell number conservation equation, its strong form is multiplied by a scalar-valued test function $\delta c_{t}$ and then integrated over the referential domain as follows $$\int_{{\mathcal{B}}_0} {\left[}\dot{J} c_{t} + \dot{c_{t}} J {\right]}\delta c_{t} \, {\mbox{d}}V 
=
0\, \qquad  \forall \delta c_{t}\,.
\label{eq:weak_continuity_Lagrangian}$$ To obtain the weak form of the linear momentum balance, its strong form too is multiplied by a vector-valued test function $\delta {\boldsymbol{y}}$ and then integrated over the referential domain which yields $$\int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{a}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{p}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V  + \int_{{\mathcal{B}}_0} \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V = \int_{{\partial}{\mathcal{B}}_0}   \delta {\boldsymbol{y}} \cdot {\boldsymbol{t}}^{\text{a}}\, {\mbox{d}}A + \int_{{\partial}{\mathcal{B}}_0}   \delta {\boldsymbol{y}} \cdot {\boldsymbol{t}}^{\text{p}}\, {\mbox{d}}A\,\qquad  \forall \delta {\boldsymbol{y}},
\label{eq:weak_LMB_Lagrangian_2}$$ where ${\boldsymbol{t}}^{\text{a}}$ and ${\boldsymbol{t}}^{\text{p}}$ are active and passive tractions acting on the boundary of the domain, respectively. Similarly, the weak form of the bound pili evolution equation is obtained via multiplying Eq.  by a scalar-valued test function $\delta p_0$ and then integrating over the referential domain as $$\int_{{\mathcal{B}}_0} {\left[}\dot{p_{0}} - J k_\text{on}  {\left[}c_{t}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t} \Delta_{{\boldsymbol{x}}} c_{t} - {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| \nabla_{{\boldsymbol{x}}} c_{t} \big|^{2} {\right]}+ k_{\text{off}}p_{0} {\right]}\delta p_0 \,{\mbox{d}}V= 0\,
\qquad  \forall \delta p_{0}.
\label{eq:weak_pili_Lagrangian}$$

### Gradient enhanced framework {#sec:gradient_enhanced_Lagrangian}

So far, the unknowns of our problem in Lagrangian approach have been the cell number density $c_{t}$, the cell deformation map ${\boldsymbol{y}}$ and bound pili number density $p_{0}$. A further challenge that arises in our problem is the presence of the Hessian of the spatial cell number density $\nabla^{2}_{{\boldsymbol{x}}}c_{t}$ and the Laplacian of the spatial cell number density $\Delta_{{\boldsymbol{x}}}c_{t}$ in the bound pili number density evolution equation  and the pili density formation Piola stress equation . Thus, second derivatives of the spatial cell number density $c_t$ are required to be calculated. In doing so, different strategies have been employed in the literature, among which the well-established ones are ${\mathcal{C}}^{1}$ continuous elements @Papanicolopulos2012 [@Fischer2012], isogeometric analysis @Hughes2005 [@Bazilevs2010], micromorphic continuum approach and the gradient enhanced framework @Kirchner2005 [@Neff2014; @Kaessmair2020]. In order to stay within the realm of the classical finite element method (FEM) associated with a ${\mathcal{C}}^0$ continuous interpolation approach, we adopt the gradient enhanced framework. In doing so, we introduce an additional independent spatial vector field ${\boldsymbol{g}}$ to represent the spatial gradient of the cell number density $\nabla_{{\boldsymbol{x}}} c_t$ and *weakly enforce* ${\boldsymbol{g}}\overset{!}{=}\nabla_{{\boldsymbol{x}}} c_t$. Note, similar to the spatial cell number density, its gradient is also parametrized as a function of the Lagrangian coordinates ${\boldsymbol{g}}={\boldsymbol{g}}({\boldsymbol{X}},t)$. The first step is to transform the Laplacian and Hessian to substitute the terms including spatial derivatives of $c_{t}$ with ${\boldsymbol{g}}$ as $$\begin{aligned}
&\Delta_{{\boldsymbol{x}}} c_t = \nabla_{{\boldsymbol{x}}} \cdot (\nabla_{{\boldsymbol{x}}} c_t) = \nabla_{{\boldsymbol{x}}} \cdot {\boldsymbol{g}} \,,\\
&\nabla^{2}_{{\boldsymbol{x}}} c_t = \nabla_{{\boldsymbol{x}}} (\nabla_{{\boldsymbol{x}}} c_t) = \nabla_{{\boldsymbol{x}}}^{\text{sym}} {\boldsymbol{g}} = {\displaystyle\frac}{1}{2} {\left[}\nabla_{{\boldsymbol{x}}} {\boldsymbol{g}} + \nabla_{{\boldsymbol{x}}}^{T} {\boldsymbol{g}} {\right]}\,,
\end{aligned}
\label{eq:cell_gradient_Eulerian}$$ where a symmetric gradient of ${\boldsymbol{g}}$ follows from the symmetry of the Hessian of the cell number density. Afterwards the resulting terms must be pulled back to the material configuration so as to unify the Lagrangian formalism. For an arbitrary vector field ${\boldsymbol{a}}$, the following relations hold between the spatial and material divergence and gradient $\nabla_{{\boldsymbol{x}}} \cdot {\boldsymbol{a}}  = \nabla_{{\boldsymbol{X}}} {\boldsymbol{a}} : {\boldsymbol{F}}^{-T}$ and $\nabla_{{\boldsymbol{x}}} {\boldsymbol{a}} = \nabla_{{\boldsymbol{X}}} {\boldsymbol{a}} \cdot {\boldsymbol{F}}^{-1}$. Accordingly, the Laplacian and Hessian of the cell number density can be written in terms of ${\boldsymbol{g}}$ in the material configuration as $$\begin{aligned}
&\Delta_{{\boldsymbol{x}}} c_{t} =  \nabla_{{\boldsymbol{x}}} \cdot {\boldsymbol{g}} = \nabla_{{\boldsymbol{X}}} {\boldsymbol{g}} : {\boldsymbol{F}}^{-T}\,,\\
&\nabla^{2}_{{\boldsymbol{x}}} c_{t} = \nabla_{{\boldsymbol{x}}}^\text{sym} {\boldsymbol{g}} = {\displaystyle\frac}{1}{2} {\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}} \cdot {\boldsymbol{F}}^{-1}  + {\boldsymbol{F}}^{-T} \cdot \nabla_{{\boldsymbol{X}}}^{T} {\boldsymbol{g}}  {\right]}\,.
\end{aligned}
\label{eq:cell_gradient_Lagrangian}$$ Using Eq. , the strong  and weak  forms of the bound pili number density evolution equation can be stated as fully Lagrangian equations as $$\dot{p_{0}} - J k_\text{on}  {\left[}c_{t}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t} {\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}}:{\boldsymbol{F}}^{-T} {\right]}- {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| {\boldsymbol{g}} \big|^{2} {\right]}+ k_{\text{off}}p_{0}=0\,,
\label{eq:pili_Lagrangian_updated_1}$$ and $$\int_{{\mathcal{B}}_0} {\left[}\dot {p_{0}} - J k_\text{on}  {\left[}c_{t}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t} {\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}}:{\boldsymbol{F}}^{-T} {\right]}- {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| {\boldsymbol{g}} \big|^{2} {\right]}+ k_{\text{off}}p_{0} {\right]}\delta p_0 \, {\mbox{d}}V=0\,,
\label{eq:pili_Lagrangian_updated_2}$$ respectively. Accordingly the pili density formation Piola–Kirchhoff stress equation  can be rewritten as $$\begin{aligned}
{\boldsymbol{S}}^\text{f} = {\displaystyle\frac}{1}{2}f^{\text{p}}k_\text{on}\ell_{0}J {\left[}c_{t}^{2}{\boldsymbol{B}} + {\displaystyle\frac}{3\ell_{0}^{2}}{4} {\left[}-2 {\boldsymbol{F}}^{-1}\!\! \cdot {\left[}{\boldsymbol{g}} {\otimes}{\boldsymbol{g}} {\right]}\cdot {\boldsymbol{F}}^{-T} \!\!\! - {\left[}{\boldsymbol{g}} {\right]}^{2} {\boldsymbol{B}} + c_{t}{\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}}:{\boldsymbol{F}}^{-T}  {\right]}{\boldsymbol{B}} + c_{t} {\left[}{\boldsymbol{F}}^{-1}\!\! \cdot \nabla_{{\boldsymbol{X}}}{\boldsymbol{g}} \cdot {\boldsymbol{B}} + {\boldsymbol{B}} \cdot \nabla_{{\boldsymbol{X}}}^{T}{\boldsymbol{g}} \cdot {\boldsymbol{F}}^{-T} {\right]}{\right]}{\right]}\,.\\
\end{aligned}
\label{eq:pili_formation_stress_Lagrangian_updated}$$

### Fictitious variational approach {#sec:variational_Lagrangian}

The final step to complete our formulation is to update the governing equations given the new continuity requirement. The advantage of using a (fictitious) variational approach is that it provides the admissible forms of tractions and external forces without any prior knowledge or assumptions. In addition, with no extra effort or derivations, the variational approach furnishes the weak form which is central to the finite element implementation of the problem. In order to obtain the updated governing equations, a total energy functional is minimized via setting its first variation to zero. To begin, we assume that there exist a fictitious energy function $\Psi_1$ whose variation with respect to the degrees of freedom yields the already existing weak forms , and . The term "fictitious" for this energy function implies that the original weak forms were directly derived from the strong forms and not from any specific energy function and, as mentioned before, the strong forms themselves are obtained using the coarse-grained continuum approach developed in @Kuan2021 [@Kuan2021b]. To enforce the continuity of the spatial cell number density gradient, we introduce a new energy function $\Psi_2$ whose definition will be provided shortly. The total energy $\Psi_{\text{tot}}$ consists of the initial fictitious energy and the newly defined energy $$\Psi_{\text{tot}} = \Psi_1 + \Psi_2\,.$$ The energies are the integrals of their corresponding internal energy densities over their associated domains as $$\Psi_{\text{tot}} = \int_{{\mathcal{B}}_0}  \psi_{\text{tot}} \, {\mbox{d}}V \,, \qquad \Psi_1 = \int_{{\mathcal{B}}_0} \psi_1 \, {\mbox{d}}V\,, \qquad \Psi_2 = \int_{{\mathcal{B}}_0} \psi_2 \, {\mbox{d}}V \,.$$ To minimize $\Psi_{\text{tot}}$, its first variation is set to zero. That is $$\delta \Psi_{\text{tot}} \stackrel{{\boldsymbol{.}}}{=} 0 \qquad  \Longrightarrow \qquad  \delta\Psi_1 + \delta\Psi_2 \stackrel{{\boldsymbol{.}}}{=} 0\,.$$ The field variables in our problem are the cell number density $c_t$, cell deformation map ${\boldsymbol{y}}$, bound pili number density $p_0$ and cell number density gradient ${\boldsymbol{g}}$. The energy density function to impose the continuity of the spatial cell density gradient reads $$\psi_2 = \psi_2{\left(}c_t,{\boldsymbol{y}},{\boldsymbol{g}} {\right)}= {\displaystyle\frac}{1}{2} J \lambda {\left[}{\boldsymbol{F}}^{-T}\cdot \nabla_{{\boldsymbol{X}}}c_{t} - {\boldsymbol{g}} {\right]}^2 \,,
\label{eq:energy_Lagrangian}$$ with $\lambda$ being the penalty parameter. The penalty parameter determines how strongly the condition ${\boldsymbol{g}}\overset{!}{=}\nabla_{{\boldsymbol{x}}} c_t$ is satisfied. Note, the dependence of $\psi_2$ on ${\boldsymbol{y}}$ is through the deformation gradient ${\boldsymbol{F}}$ and its determinant $J$. Accordingly, one could write $$\int_{{\mathcal{B}}_0}\!\! \delta \psi_{\text{tot}} \, {\mbox{d}}V 
=
\int_{{\mathcal{B}}_0} \delta \psi_1 \, {\mbox{d}}V +  \int_{{\mathcal{B}}_0} \delta {\left(}{\displaystyle\frac}{1}{2} J \lambda {\left[}{\boldsymbol{F}}^{-T}\cdot \nabla_{{\boldsymbol{X}}}c_{t} - {\boldsymbol{g}} {\right]}^2 {\right)}\, {\mbox{d}}V\,.
\label{eq:variation_Lagrangian_1}$$ Calculating the variation of the overall energy density with respect to all degrees of freedom and their gradients, yields the weak forms as $$\int_{{\mathcal{B}}_0} \delta \psi_{\text{tot}} \, {\mbox{d}}V
=
\int_{{\mathcal{B}}_0}\!\!\! \delta \psi_1 \, {\mbox{d}}V 
+
\int_{{\mathcal{B}}_0}\!\!\! \delta \psi_2 \, {\mbox{d}}V\,,$$ with $$\begin{aligned}
&\int_{{\mathcal{B}}_0} \delta \psi_{1} \, {\mbox{d}}V
=
\int_{{\mathcal{B}}_0}\!\!\! \delta_{c_{t}} \psi_1 \, {\mbox{d}}V
+
\int_{{\mathcal{B}}_0}\!\!\! \delta_{{\boldsymbol{y}}} \psi_1 \, {\mbox{d}}V
+
\int_{{\mathcal{B}}_0}\!\!\! \delta_{p_0} \psi_1 \, {\mbox{d}}V \,,\\
&\int_{{\mathcal{B}}_0} \delta \psi_{2} \, {\mbox{d}}V
=
\int_{{\mathcal{B}}_0}\!\!\! \delta_{c_{t}} \psi_2 \, {\mbox{d}}V
+
\int_{{\mathcal{B}}_0}\!\!\! \delta_{{\boldsymbol{y}}} \psi_2 \, {\mbox{d}}V
+
\int_{{\mathcal{B}}_0}\!\!\! \delta_{{\boldsymbol{g}}} \psi_2 \, {\mbox{d}}V \,.
\end{aligned}$$ The variations of the newly defined energy function read $$\begin{aligned}
&\int_{{\mathcal{B}}_0}\! \delta_{c_{t}} \psi_2  \, {\mbox{d}}V = \int_{{\mathcal{B}}_0} \lambda J {\left[}{\boldsymbol{B}} \cdot \nabla_{{\boldsymbol{X}}} c_{t} - {\boldsymbol{F}}^{-1} \cdot {\boldsymbol{g}} {\right]}\cdot  \nabla_{{\boldsymbol{X}}} \delta c_{t} \, {\mbox{d}}V\,, \\[5pt]
&\int_{{\mathcal{B}}_0}\! \delta_{{\boldsymbol{y}}} \psi_2   \, {\mbox{d}}V = \int_{{\mathcal{B}}_0}\! \underbrace{{\left[}{\displaystyle\frac}{1}{2}\lambda J{\left[}{\boldsymbol{F}}^{-T} \cdot \nabla_{{\boldsymbol{X}}} c_{t} - {\boldsymbol{g}} {\right]}^{2} {\boldsymbol{F}}^{-T} - \lambda J {\left[}{\left[}{\boldsymbol{F}}^{-T}\cdot \nabla_{{\boldsymbol{X}}} c_{t}  {\right]}{\otimes}{\left[}{\boldsymbol{B}}\cdot \nabla_{{\boldsymbol{X}}} c_{t}  - {\boldsymbol{F}}^{-1} \cdot {\boldsymbol{g}}{\right]}{\right]}{\right]}}_{{\overline{{\boldsymbol{P}}}}} : \nabla_{{\boldsymbol{X}}} \delta{\boldsymbol{y}} \, {\mbox{d}}V \,,\\[5pt] 
&\int_{{\mathcal{B}}_0}\! \delta_{{\boldsymbol{g}}} \psi_2  \, {\mbox{d}}V = - \int_{{\mathcal{B}}_0} \lambda J {\left[}{\boldsymbol{F}}^{-T} \cdot \nabla_{{\boldsymbol{X}}} c_{t} - {\boldsymbol{g}} {\right]}\cdot \delta {\boldsymbol{g}} \, {\mbox{d}}V \,,
\end{aligned}$$ with ${\overline{{\boldsymbol{P}}}}$ being the cell-density-gradient-continuity-induced Piola stress which arises due to the dependence of $\psi_2$ on the deformation. Finally, we arrive at the final weak form of the governing equations which form our residual system as $$\begin{aligned}
&\text{overall cell number conservation:} &&\int_{{\mathcal{B}}_0} \!\!\! {\left[}\dot{J} c_{t} + \dot{c_{t}} J {\right]}\delta c_{t} \, {\mbox{d}}V + \int_{{\mathcal{B}}_0} \!\!\! \lambda J {\left[}{\boldsymbol{B}} \cdot \nabla_{{\boldsymbol{X}}} c_{t} - {\boldsymbol{F}}^{-1}\cdot{\boldsymbol{g}} {\right]}\cdot  \nabla_{{\boldsymbol{X}}} \delta c_{t} \, {\mbox{d}}V = 0\,,\\
&\text{linear momentum balance:} &&\int_{{\mathcal{B}}_0} \!\!\! \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V +\!\!\! \int_{{\mathcal{B}}_0} \!\!\! {\left[}{\boldsymbol{P}}^{\text{a}} + {\boldsymbol{P}}^{\text{p}} + {\overline{{\boldsymbol{P}}}} {\right]}:  \nabla_{{\boldsymbol{X}}} \delta{\boldsymbol{y}} \, {\mbox{d}}V  - \int_{{\partial}{\mathcal{B}}_0} \!\!\!\!  \delta {\boldsymbol{y}} \cdot {\left[}{\boldsymbol{t}}^{\text{a}} + {\boldsymbol{t}}^{\text{p}} {\right]}\, {\mbox{d}}A={{\boldsymbol{0}}}\,, \\
&\text{bound pili number density evolution:} && \int_{{\mathcal{B}}_0} {\left[}\dot {p_{0}} - J k_\text{on}  {\left[}c_{t}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t} {\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}}:{\boldsymbol{F}}^{-T} {\right]}- {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| {\boldsymbol{g}} \big|^{2} {\right]}+ k_{\text{off}}p_{0} {\right]}\delta p_0 \, {\mbox{d}}V = 0\,, \\
&\text{cell number density gradient continuity:} &&\int_{{\mathcal{B}}_0} \!\!\! -\lambda J {\left[}{\boldsymbol{F}}^{-T}\cdot \nabla_{{\boldsymbol{X}}} c_{t} - {\boldsymbol{g}} {\right]}\cdot \delta {\boldsymbol{g}} \, {\mbox{d}}V = {{\boldsymbol{0}}}\,.
\end{aligned}
\label{eq:weak_Lagrangian}$$

Finite element implementation {#sec:FEM}
=============================

In this section, we present a general finite element formulation for the implementation of our developed methodology. The first step towards finite element implementation of our problem is the derivation of the discretized weak forms which has been concluded in Section \[sec:variational\_Lagrangian\]. For time integration, the time interval $\mathds{T}$ is subdivided into a set of intervals $\Delta t$ with $$\mathds{T} = \bigcup_{n=0}^{\#\text{ts}-1} {\left[}t_n,\, t_{n+1}  {\right]}\,,$$ where $\#\text{ts}$ denotes the number of time steps and the time increment is defined by $\Delta t = t_{n+1}-t_{n}$. As mentioned earlier, an implicit time integration associated with the backward Euler method is employed here in which an unknown $y_{n+1}$ is determined via the relation $y_{n+1}-y_{n} =  f(y_{n+1}) \Delta t$ based on the continuous evolution equation $\dot{y}=f(y)$.

Here, the spatial discretization of the problem domain is carried out using the Bubnov–Galerkin finite element method. The geometry together with the variables are approximated using isoparametric coordinates ${\boldsymbol{\xi}} \in [-1, 1]^2$. Using standard interpolations together with the isoparametric concept, the geometry is discretized as $$\begin{aligned}
{\boldsymbol{X}}\Big|_{{\mathcal{B}}_0}  \!\!\!\approx {\boldsymbol{X}}({\boldsymbol{\xi}}) = \sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) {\boldsymbol{X}}^i\,, 
\end{aligned}
\label{eq:discretized_Lagrangian}$$ with $\# \text{e}$ denoting the number of elements and ${\boldsymbol{\xi}}$ denoting the natural space coordinates. Accordingly the discretized fields read $$\begin{aligned}
&c_{t}\Big|_{{\mathcal{B}}_0} \!\!\!\approx c_{t}({\boldsymbol{\xi}}) = \sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) c_{t}^i\,, 
&&\delta c_{t}\Big|_{{\mathcal{B}}_0} \!\!\!\approx \delta c_{t}({\boldsymbol{\xi}}) = \!\!\!\sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) \delta c_{t}^i\,,\\
&{\boldsymbol{y}}\Big|_{{\mathcal{B}}_0} \!\!\!\approx {\boldsymbol{y}}({\boldsymbol{\xi}}) = \sum_{i=1}^{\#\text{e}} M^{i}({\boldsymbol{\xi}}) {\boldsymbol{y}}^i\,, 
&&\delta{\boldsymbol{y}}\Big|_{{\mathcal{B}}_0}  \!\!\!\approx \delta{\boldsymbol{y}}({\boldsymbol{\xi}})  = \!\!\!\sum_{i=1}^{\#\text{e}} M^{i}({\boldsymbol{\xi}}) \delta{\boldsymbol{y}}^i\,, \\
&p_{0}\Big|_{{\mathcal{B}}_0} \!\!\!\approx p_{0}({\boldsymbol{\xi}}) = \sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) p_{0}^i\,, 
&&\delta p_{0}\Big|_{{\mathcal{B}}_0} \!\!\!\approx \delta p_{0}({\boldsymbol{\xi}}) = \!\!\!\sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) \delta p_{0}^i\,,\\ 
&{\boldsymbol{g}}\Big|_{{\mathcal{B}}_0} \!\!\!\approx {\boldsymbol{g}}({\boldsymbol{\xi}}) = \sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) {\boldsymbol{g}}^i\,,
&&\delta{\boldsymbol{g}}\Big|_{{\mathcal{B}}_0}  \!\!\!\approx \delta{\boldsymbol{g}}({\boldsymbol{\xi}})  = \!\!\!\sum_{i=1}^{\#\text{e}} N^{i}({\boldsymbol{\xi}}) \delta{\boldsymbol{g}}^i\,,
\end{aligned}
\label{eq:discretized_Lagrangian}$$ with $N^i$ and $M^i$ being different shape functions, which, however, can also be chosen identical in particular cases. For the cases where a mixed finite element formulation is required, these shape functions are polynomials of different orders.

The discretized weak form of the overall cell number conservation equation $\eqref{eq:weak_Lagrangian}_1$ reads $$\int_{{\mathcal{B}}_0} {\left[}c_{t_{n}} {\displaystyle\frac}{ J_{n+1} - J_{n} }{\Delta t} + J_{n+1} {\displaystyle\frac}{ c_{t_{n+1}} - c_{t_{n}} }{\Delta t} {\right]}N^{i}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0} \lambda J_{n+1} {\left[}{\boldsymbol{B}}_{n+1} \cdot \nabla_{{\boldsymbol{X}}} c_{t_{n+1}} - {\boldsymbol{F}}_{n+1}^{-1} \cdot {\boldsymbol{g}}_{n+1} {\right]}\cdot  \nabla_{{\boldsymbol{X}}}  N^{i}  \, {\mbox{d}}V
=0\,.
\label{eq:discretized_continuity_Lagrangian}$$ The discretized weak form of the linear momentum balance equation $\eqref{eq:weak_Lagrangian}_2$ reads $$\int_{{\mathcal{B}}_0} \xi J_{n+1} c_{t_{n+1}} {\displaystyle\frac}{{\boldsymbol{y}}_{n+1}-{\boldsymbol{y}}_{n}}{\Delta t} M^{i}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0} {\left[}{\boldsymbol{P}}^{\text{a}}_{n+1} + {\boldsymbol{P}}^{\text{p}}_{n+1} + {\overline{{\boldsymbol{P}}}}_{n+1} {\right]}\cdot \nabla_{{\boldsymbol{X}}}  M^{i} \, {\mbox{d}}V 
=
\int_{{\partial}{\mathcal{B}}_0} \!\!\!  {\boldsymbol{t}}^{\text{a}}M^{i}\, {\mbox{d}}A +\!\!\! \int_{{\partial}{\mathcal{B}}_0} \!\!\!  {\boldsymbol{t}}^{\text{p}}M^{i}\, {\mbox{d}}A\,.
\label{eq:discretized_LMB_Lagrangian}$$ The discretized weak form of the bound pili number density evolution equation $\eqref{eq:weak_Lagrangian}_3$ reads $$\int_{{\mathcal{B}}_0} {\left[}{\displaystyle\frac}{p_{0_{n+1}}-p_{0_{n}}}{\Delta t} - J_{n+1} k_\text{on}  {\left[}c_{t_{n+1}}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t_{n+1}} {\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}}_{n+1}:{\boldsymbol{F}}_{n+1}^{-T} {\right]}- {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| {\boldsymbol{g}}_{n+1} \big|^{2} {\right]}+ k_{\text{off}}p_{0_{n+1}} {\right]}N^{i} \, {\mbox{d}}V = 0\,,
\label{eq:discretized_pili_Lagrangian}$$ and finally, the discretized weak form of the cell density gradient continuity equation $\eqref{eq:weak_Lagrangian}_4$ reads $$\int_{{\mathcal{B}}_0} -\lambda J_{n+1} {\left[}{\boldsymbol{F}}_{n+1}^{-T} \cdot \nabla_{{\boldsymbol{X}}} c_{t_{n+1}} - {\boldsymbol{g}}_{n+1} {\right]}N^i \, {\mbox{d}}V
=
{{\boldsymbol{0}}}\,.
\label{eq:discretized_gradient_Lagrangian}$$ The fully-discrete form of balance equations can be obtained by applying the spatial approximation which form a residual system associated with the global node $I$ as $$\begin{aligned}
&{\text{\usefont{U}{bbm}{m}{n}R}}^{I}_{c} = { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} {\left[}c_{t_{n}} {\displaystyle\frac}{ J_{n+1} - J_{n}}{\Delta t} + J_{n+1} {\displaystyle\frac}{ c_{t_{n+1}} - c_{t_{n}}}{\Delta t}  {\right]}N^{i}  \, {\mbox{d}}V + { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} \lambda J_{n+1} {\left[}{\boldsymbol{B}}_{n+1} \cdot \nabla_{{\boldsymbol{X}}} c_{t_{n+1}} - {\boldsymbol{F}}_{n+1}^{-1}\cdot{\boldsymbol{g}}_{n+1} {\right]}\cdot  \nabla_{{\boldsymbol{X}}}  N^{i}  \, {\mbox{d}}V = 0\,,\\
&{\text{\usefont{U}{bbm}{m}{n}R}}^{I}_{{\boldsymbol{y}}} = { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} \xi J_{n+1} c_{t_{n+1}} {\displaystyle\frac}{{\boldsymbol{y}}_{n+1}-{\boldsymbol{y}}_{n}}{\Delta t} M^{i}  \, {\mbox{d}}V + { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} }\int_{{\mathcal{B}}_0} {\left[}{\boldsymbol{P}}^{\text{a}}_{n+1} + {\boldsymbol{P}}^{\text{p}}_{n+1} + {\overline{{\boldsymbol{P}}}}_{n+1} {\right]}\cdot \nabla_{{\boldsymbol{X}}}  M^{i} \, {\mbox{d}}V - 
{ \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#se} }\int_{{\partial}{\mathcal{B}}_0} \!\!\! {\left[}{\boldsymbol{t}}^{\text{a}} + {\boldsymbol{t}}^{\text{p}} {\right]}M^{i}\, {\mbox{d}}A= {{\boldsymbol{0}}}\,,\\
&{\text{\usefont{U}{bbm}{m}{n}R}}^{I}_{p} = { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} {\left[}{\displaystyle\frac}{p_{0_{n+1}}-p_{0_{n}}}{\Delta t} - J_{n+1} k_\text{on}  {\left[}c_{t_{n+1}}^{2}  + {\displaystyle\frac}{3\ell_{0}^{2}}{4} c_{t_{n+1}} {\left[}\nabla_{{\boldsymbol{X}}} {\boldsymbol{g}}_{n+1}:{\boldsymbol{F}}_{n+1}^{-T} {\right]}- {\displaystyle\frac}{3\ell_{0}^{2}}{4} \big| {\boldsymbol{g}}_{n+1} \big|^{2} {\right]}+ k_{\text{off}}p_{0_{n+1}} {\right]}N^{i} \, {\mbox{d}}V = 0\,,\\
&{\text{\usefont{U}{bbm}{m}{n}R}}^{I}_{{\boldsymbol{g}}} = { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} -\lambda J_{n+1} {\left[}{\boldsymbol{F}}_{n+1}^{-T} \nabla_{{\boldsymbol{X}}} c_{t_{n+1}} - {\boldsymbol{g}}_{n+1} {\right]}N^i \, {\mbox{d}}V = {{\boldsymbol{0}}}\,,
\end{aligned}
\label{eq:residual_Lagrangian}$$ with $\# se$ denoting the number of surface elements and ${ \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{}^{} }$ being the assembly operator. The global residual vector consist of the above four residual vectors as $${\text{\usefont{U}{bbm}{m}{n}R}}_{\text{tot}}=
{\left[}\begin{matrix}
{\text{\usefont{U}{bbm}{m}{n}R}}_{c_t}\\
{\text{\usefont{U}{bbm}{m}{n}R}}_{{\boldsymbol{y}}}\\
{\text{\usefont{U}{bbm}{m}{n}R}}_{p_0}\\
{\text{\usefont{U}{bbm}{m}{n}R}}_{{\boldsymbol{g}}}
\end{matrix}
{\right]}\,,
\qquad 
\text{with} 
\qquad
{\text{\usefont{U}{bbm}{m}{n}R}}_{c_t} = 
{\left[}\begin{matrix}
{\text{\usefont{U}{bbm}{m}{n}R}}^{1}_{c_t}\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{2}_{c_t}\\
\vdots\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{\text{nn}}_{c_t}\\
\end{matrix}
{\right]}\,,
\qquad
{\text{\usefont{U}{bbm}{m}{n}R}}_{{\boldsymbol{y}}} = 
{\left[}\begin{matrix}
{\text{\usefont{U}{bbm}{m}{n}R}}^{1}_{{\boldsymbol{y}}}\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{2}_{{\boldsymbol{y}}}\\
\vdots\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{\text{nn}}_{{\boldsymbol{y}}}\\
\end{matrix}
{\right]}\,,
\qquad
{\text{\usefont{U}{bbm}{m}{n}R}}_{p_0} = 
{\left[}\begin{matrix}
{\text{\usefont{U}{bbm}{m}{n}R}}^{1}_{p_0}\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{2}_{p_0}\\
\vdots\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{\text{nn}}_{p_0}\\
\end{matrix}
{\right]}\,,
\qquad
{\text{\usefont{U}{bbm}{m}{n}R}}_{{\boldsymbol{g}}} = 
{\left[}\begin{matrix}
{\text{\usefont{U}{bbm}{m}{n}R}}^{1}_{{\boldsymbol{g}}}\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{2}_{{\boldsymbol{g}}}\\
\vdots\\
{\text{\usefont{U}{bbm}{m}{n}R}}^{\text{nn}}_{{\boldsymbol{g}}}\\
\end{matrix}
{\right]}\,,
\label{eq:global_residual_Lagrangian}$$ where nn denotes the total number of nodes. Finally, the fully discrete nonlinear system of governing equations becomes $${\text{\usefont{U}{bbm}{m}{n}R}}_{\text{tot}} = {\text{\usefont{U}{bbm}{m}{n}R}}_{\text{tot}} ({\boldsymbol{U}}) \stackrel{{\boldsymbol{!}}}{=} {{\boldsymbol{0}}}\,,
\label{eq:residual_zero_Lagrangian}$$ with ${\boldsymbol{U}}$ being the global vector of unknowns. To find the solution of the system , the Newton–Raphson scheme is employed. The consistent linearization of the resulting system of equations yields $${\text{\usefont{U}{bbm}{m}{n}R}}_{\text{tot}} ({\boldsymbol{U}}_{n+1}) = {\text{\usefont{U}{bbm}{m}{n}R}}_{\text{tot}} ({\boldsymbol{U}}_{n}) + {\text{\usefont{U}{bbm}{m}{n}K}}_{\text{tot}}\cdot \Delta{\boldsymbol{U}}_{n} \stackrel{{\boldsymbol{!}}}{=} {{\boldsymbol{0}}}\qquad
\text{with}
\qquad
{\text{\usefont{U}{bbm}{m}{n}K}}_{\text{tot}} = {\displaystyle\frac}{{\partial}{\text{\usefont{U}{bbm}{m}{n}R}}_{\text{tot}}}{{\partial}{\boldsymbol{U}}}\big\lvert_{n}
\qquad 
\text{and}
\qquad
{\boldsymbol{U}}_{n+1}={\boldsymbol{U}}_{n}+\Delta{\boldsymbol{U}}_{n}\,,
\label{eq:Newton_Lagrangain}$$ where the subscript $n$ indicates the step number.

Numerical results {#sec:result}
=================

This section aims to illustrate our proposed theory through a set of numerical examples. In doing so, the evolution of the cell number density under various conditions is investigated. Moreover, parametric studies are carried out in order to highlight the influence of different parameters on the evolution of the cell number density. Throughout all the examples, the domain is a $80\times80$ square subject to periodic boundary conditions. Implicit time integration is adopted with no stability condition which leads to robust solution of our problem and larger time steps could be used. All the numerical results are obtained from our in-house finite element code. The solution procedure is robust and for all examples, we obtain convergence with a quadratic rate associated with the Newton–Raphson scheme.

Cell number density evolution {#sec:active}
-----------------------------

![ Snapshots of the cell number density evolution in the presence of the active stress. The first and second rows represent the cell number density distribution in undeformed and deformed configurations, respectively. The third and the fourth rows illustrate how an Eulerian observer would see the cell number density evolution through a fixed window associated with the Eulerian framework. <span data-label="fig:active"></span>](active.pdf){width="100.00000%"}

![ Another illustration of the cell aggregate evolution in Fig. \[fig:active\] with variable color-bar range. <span data-label="fig:active_2"></span>](active_2.pdf){width="100.00000%"}

This section investigates the evolution of the cells under two different scenarios. In the first scenario, the cellular aggregate behavior is investigated in the presence of all the driving forces. That is, the pili-pili mediated attractive forces, steric repulsion forces and the cell-substrate friction. In the second scenario, the problem is simplified to the case where the pili-pili mediated attractive forces are eliminated. In this case, we investigate the cell number density evolution when only the steric repulsion forces and the cell-substrate friction are the forces acting on the cells.

Figure \[fig:active\] renders six different snapshots of the cellular aggregate evolution at different times associated with the first scenario. The color represents the magnitude of cell number density throughout the domain. The first and second rows represent the cell number density distribution in the undeformed and deformed configurations, respectively. The third and the fourth rows illustrate how an Eulerian observer would see the cellular aggregate evolution through a fixed window associated with the Eulerian framework. At the initial time $t=0$, the problem starts with a uniform distribution of cells with initial $c_t=0.079$ perturbed with $\pm 0.001$ relative random fluctuation. The cell radius is set to $R=1\,\mu \text{m}$, the cell bulk modulus is set to $E=1\,\text{N}/\text{m}^2$ and the friction coefficient is set to $\xi=10\,\text{Ns}/\text{m}$. In addition, the pili pair binding rate is $k_{\text{on}}=0.0178\,\text{s}^{-1}$, the pili pair unbinding rate is $k_{\text{off}}=0.01\,\text{s}^{-1}$, the average pili length is $\ell_0=2.0\,\mathrm{\mu} \text{m}$ and the pili-pili mediated attractive force is $f^{\text{p}}=18.0\,\text{pN}$. Since the backward Euler time integration is adopted, an adaptive time stepping is employed with initial time step of $\Delta t=0.5\,\text{s}$. If convergence is obtained at very few iterations, the time step is enlarged by a factor of $1.2$ and vice versa. Through the aggregate evolution, first an initial homogeneous smooth cell distribution is observed due to the action of the passive stress. This is justifiable since the formation of bound pili pairs (and thus emergence of active stress) requires time hence, the dominance of the passive stress at the starting steps. As time elapses, more bound pili pairs form as depicted in Fig. \[fig:pili\_evolution\]. Thus cells tend to attract each other which is reflected in the dominance of the active stress which triggers the onset of the phase separation. Therefore, pili-mediated attractive forces act as the major driving force which lead to the formation of an aggregate. Figure \[fig:active\_2\] provides another illustration of the cell aggregate evolution in Fig. \[fig:active\] with variable color range in each step. The purpose of the figure is to elucidate the initial random distribution of cells and highlight the early smooth distribution of cells due to the passive stress which is reflected in the tighter color bar range.

![ A parametric study on the cell density evolution. The $y$-axis shows the difference between the maximum and minimum cell density throughout the domain while the $x$-axis shows the elapsed time. The left figure studies the effects of the pili average length $\ell_0$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $f^{p}=12\,\text{pN}$. The middle figure studies the effects of the pili pair binding rate $k_{\text{on}}$ where $\ell_0=2.0\,\mu \text{m}$ and $f^{p}=12\,\text{pN}$. The right figure studies the effects of the pili pair attractive force $f^{p}$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $\ell_0=2.0\,\mu \text{m}$. <span data-label="fig:active_parameters"></span>](active_l.pdf "fig:"){width="32.00000%"} ![ A parametric study on the cell density evolution. The $y$-axis shows the difference between the maximum and minimum cell density throughout the domain while the $x$-axis shows the elapsed time. The left figure studies the effects of the pili average length $\ell_0$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $f^{p}=12\,\text{pN}$. The middle figure studies the effects of the pili pair binding rate $k_{\text{on}}$ where $\ell_0=2.0\,\mu \text{m}$ and $f^{p}=12\,\text{pN}$. The right figure studies the effects of the pili pair attractive force $f^{p}$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $\ell_0=2.0\,\mu \text{m}$. <span data-label="fig:active_parameters"></span>](active_kon.pdf "fig:"){width="32.00000%"} ![ A parametric study on the cell density evolution. The $y$-axis shows the difference between the maximum and minimum cell density throughout the domain while the $x$-axis shows the elapsed time. The left figure studies the effects of the pili average length $\ell_0$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $f^{p}=12\,\text{pN}$. The middle figure studies the effects of the pili pair binding rate $k_{\text{on}}$ where $\ell_0=2.0\,\mu \text{m}$ and $f^{p}=12\,\text{pN}$. The right figure studies the effects of the pili pair attractive force $f^{p}$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $\ell_0=2.0\,\mu \text{m}$. <span data-label="fig:active_parameters"></span>](active_fp.pdf "fig:"){width="32.00000%"}

In Fig. \[fig:active\_parameters\], a parametric study is carried out to investigate the influence of the average pili length $\ell_0$, pili-pili binding rate $k_{\text{on}}$ and pili-pili mediated attractive force $f^{\text{p}}$ on the formation of an aggregate. Each figure renders the difference between the maximum and the minimum cell number density versus time. The left figure studies the effects of the pili average length $\ell_0$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $f^{p}=12\,\text{pN}$, the middle figure studies the effects of the pili pair binding rate $k_{\text{on}}$ where $\ell_0=2.0\,\mu \text{m}$ and $f^{p}=12\,\text{pN}$ and the right figure studies the effects of the pili pair attractive force $f^{p}$ where $k_{\text{on}}=0.05\,\text{s}^{-1}$ and $\ell_0=2.0\,\mu \text{m}$. For all figures, an initial decrease in the cell number density difference is observed which is associated with function of the passive stress. This behavior is vividly observed in the second step in Fig. \[fig:active\_2\] as the color bar limits tend to tighten. It is observed that, if the values of $f^{p}$, $\ell_0$ and $k_{\text{on}}$ are small, the pili-pili mediated forces cannot overcome the steric repulsive forces and the difference continues to decrease until a uniform homogeneous distribution is obtained. For these cases the phase separation does not occur and the dynamics of the cell network is mainly driven by the steric repulsive forces and cell-substrate friction. The lower the values of $f^{p}$, $\ell_0$ and $k_{\text{on}}$, the faster the equilibrium state is reached. However, if the values of $f^{p}$, $\ell_0$ and $k_{\text{on}}$ are large enough, the pili-pili mediated forces tend to dominate the other forces as time elapses which is reflected in the larger cell number density difference. In these cases, the active stress plays a more considerable role compared to the passive stress which yields the onset of the phase separation. Increasing the values of $f^{p}$, $\ell_0$ and $k_{\text{on}}$ results in higher rates of phase separation as indicated by larger slopes of graphs in Fig. \[fig:active\_parameters\]. This behavior is natural to expect as larger values of $f^{p}$ means that the attractive force between the pili pairs is stronger which causes the cells to form a colony at a higher rate. Larger values of $\ell_0$ indicate longer pili implying that pili are more capable to reach out and attach to pili of other cells which facilitates the formation of a colony. And finally, larger values of $k_{\text{on}}$ signify faster binding rate between the pili leading to a faster formation of bound pairs which accelerates the colony formation. Note, the parameters in the graphs in Fig \[fig:active\_parameters\], totally follow the condition obtained by Kuan et al. @Kuan2021 [@Kuan2021b] using linear stability analysis which reads $$-{\displaystyle\frac}{1}{\xi}{\displaystyle\frac}{E\pi R^2}{{\left[}1-c_t^{\text{initial}}\pi R^2 {\right]}^2}+{\displaystyle\frac}{c_t^{\text{initial}}\ell_0f^{\text{p}}k_{\text{on}} }{k_{\text{off}}\xi}>0\,.$$ Satisfying the above condition indicates the onset of the phase separation.

![Illustration of the Taylor–Hood element utilized for the simulation. For this element type we used quadratic approximation for the deformation map field and linear approximation for the cell number density in order to observe the LBB condition.<span data-label="fig:element"></span>](element.pdf){width="80.00000%"}

Now we consider the second scenario where the cell number density evolution is examined while its dynamics is driven only by the steric repulsive forces and the pili-substrate friction. In the absence of the the pili-pili mediated attractive forces, the complexity of the problem reduces considerably since the bound pili number density evolution equation is eliminated from the system of equations. In addition, there is no need to adopt a gradient enhanced framework to deal with the Laplacian and Hessian of the cell number density. As a result, the field variables simply become the original cell number density $c_t$ and the deformation map ${\boldsymbol{y}}$ and, under periodic boundary condition, the fully discrete residual system  simplifies to $$\begin{aligned}
&{\text{\usefont{U}{bbm}{m}{n}R}}^{I}_{c} = { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} {\left[}c_{t_{n}}  {\displaystyle\frac}{J_{n+1} - J_{n}}{\Delta t} + J_{n+1}  {\displaystyle\frac}{c_{t_{n+1}} - c_{t_{n}}}{\Delta t}  {\right]}N^{i}  \, {\mbox{d}}V = 0\,,\\
&{\text{\usefont{U}{bbm}{m}{n}R}}^{I}_{{\boldsymbol{y}}} = { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} } \int_{{\mathcal{B}}_0} \xi J_{n+1} c_{t_{n+1}} {\displaystyle\frac}{{\boldsymbol{y}}_{n+1}-{\boldsymbol{y}}_{n}}{\Delta t} M^{i}  \, {\mbox{d}}V + { \mathop{\mbox{\Large {\textsf {\textbf A}}}}_{\alpha=1}^{\#e} }\int_{{\mathcal{B}}_0} {\boldsymbol{P}}^{\text{p}}_{n+1}  \cdot \nabla_{{\boldsymbol{X}}}  M^{i} \, {\mbox{d}}V  = {{\boldsymbol{0}}}\,.\\
\end{aligned}$$ As mentioned earlier, pili-pili attractive forces are absent and the repulsive forces between the cells are reflected in the passive stress. To cope with the mixed nature of the problem, i.e. to respect the LBB inf-sup condition, we allow interpolation of the cell number density $c_t$ and the deformation map ${\boldsymbol{y}}$ with different polynomial order. We exploit the Taylor–Hood element for our finite element implementation which is linear in $c_t$ and quadratic in ${\boldsymbol{y}}$. Subsequently, the corresponding shape functions $N^{i}$ and $M^{i}$ are polynomials of different orders. Figure \[fig:element\] provides an illustrative schematic of the Taylor–Hood elements adopted in our simulations.

![ Different snapshots of the cell network evolution in the absence of the active stress. The first and second rows represent the cell number density distribution in undeformed and deformed configurations, respectively. The third and the fourth rows illustrate how an Eulerian observer would see the cell number density evolution through a fixed window associated with the Eulerian framework. The dynamics of cell is only driven by the steric repulsion forces and the cell-substrate friction. Uniform color throughout the domain indicates uniform homogeneous distribution of the cells. <span data-label="fig:passive"></span>](passive.pdf){width="100.00000%"}

Figure \[fig:passive\] renders six different snapshots of the cell density evolution at different times. The boundary and the initial conditions are similar to the previous case study. Similarly the deformed and undeformed bodies are provided in the first and second rows where the third and fourth rows are associated with the Eulerian window. Since there exists no pili-pili attractive force, as time elapses, the cells tend to repel each other until they reach to the state of equilibrium. This equilibrium state is obtained when the cells are uniformly distributed throughout the domain. It is observed that throughout time evolution, the difference between the cell densities tend to vanish which signifies the uniformity of the cell distribution. Moreover, due to the absence of the active stress, the domain does not undergo any considerable deformation where the deformation gradient remains close to identity.

In Fig. \[fig:passive\_parameters\], a parametric study is carried out to investigate the influence of the friction coefficient $\xi$ and cell bulk modulus $E$ on the cell number density evolution. Each figure renders the difference between the maximum and the minimum cell number density versus time. The left figure studies the effects of the friction coefficient with $E=1\,\text{N}/\text{m}^2$ and $R=1\,\mu \text{m}$ and the right figure studies the effects of the cell bulk modulus with $\xi=10\,\text{Ns}/\text{m}$ and $R=1\,\mu \text{m}$. Smaller density difference in each figure indicates more uniform distribution. It is observed that increasing the friction coefficient delays the uniform distribution which is understandable since the friction coefficient impedes the cells movement. Thus, for larger friction coefficients, the cells require more time to disperse due to the repulsive forces. On the other hand, we observe that a uniform distribution is reached at a faster rate for larger cell bulk modulus. This is also justifiable since larger bulk modulus indicates more rigidity of the cells which gives rise to their quicker dispersion after colliding with other cells.

![ A parametric study on the cell density evolution in the absence of the active stress. The $y$-axis shows the difference between the maximum and minimum cell density throughout the domain as a measure of homogeneity of the cell distribution while the $x$-axis shows the elapsed time. The left figure renders the effects of friction coefficient on the cell density evolution when $E=1\,\text{N}/\text{m}^2$ and $R=1\,\mu \text{m}$. The right figure renders the effects of cell bulk modulus on the cell density evolution when $R=1\,\mu \text{m}$ and $\xi=10\,\text{Ns}/\text{m}$. <span data-label="fig:passive_parameters"></span>](passive_xi.pdf "fig:"){width="48.00000%"} ![ A parametric study on the cell density evolution in the absence of the active stress. The $y$-axis shows the difference between the maximum and minimum cell density throughout the domain as a measure of homogeneity of the cell distribution while the $x$-axis shows the elapsed time. The left figure renders the effects of friction coefficient on the cell density evolution when $E=1\,\text{N}/\text{m}^2$ and $R=1\,\mu \text{m}$. The right figure renders the effects of cell bulk modulus on the cell density evolution when $R=1\,\mu \text{m}$ and $\xi=10\,\text{Ns}/\text{m}$. <span data-label="fig:passive_parameters"></span>](passive_E.pdf "fig:"){width="48.00000%"}

Overall cell number conservation {#sec:number-density}
--------------------------------

It is noteworthy to mention that our mixed four-field ${\left(}c_t,{\boldsymbol{y}},p_0,{\boldsymbol{g}}{\right)}$ implementation conserves the total cell number in a Lagrangian solution domain exactly. To ensure the discrete conservation of the total cell number throughout the domain, we rewrite the strong form of the continuity equation , integrate it over the referential domain and expand it as $$\int_{{\mathcal{B}}_0} \dot{{\overline{Jc_{t}}}} \, {\mbox{d}}V
=
\int_{{\mathcal{B}}_0} {\left[}\dot{J} c_{t} + \dot{c_{t}} J {\right]}\, {\mbox{d}}V
\approx
\int_{{\mathcal{B}}_0} {\left[}{\displaystyle\frac}{J_{n+1}-J_{n}}{\Delta t} c_{t_{n}} + {\displaystyle\frac}{c_{t_{n+1}}-c_{t_{n}}}{\Delta t} J_{n+1} {\right]}\, {\mbox{d}}V
=
0\,.
\label{eq:cell_density_conserve_1}$$ Note, to satisfy the overall cell number conservation equation in the last integral, the cell density in the first term must be chosen from step $n$ whereas the Jacobian in the second term must be chosen from step $n+1$. Accordingly, Eq.  reads $$\int_{{\mathcal{B}}_0} J_{n+1}c_{t_{n+1}} {\mbox{d}}V - \int_{{\mathcal{B}}_0} J_{n}c_{t_{n}} \, {\mbox{d}}V
=
0\,,
\label{eq:cell_density_conserve_2}$$ which can in turn be written as the integrals over the spatial domain as $$\int_{{\mathcal{B}}_{t_{n+1}}} c_{t_{n+1}} {\mbox{d}}v_{n+1}
=
\int_{{\mathcal{B}}_{t_{n}}} c_{t_{n}} {\mbox{d}}v_{n}
\,,
\label{eq:cell_density_conserve_3}$$ which is equivalent to the conservation of the total cell number. Figure \[fig:mass\] illustrates the percentage of the overall cell number change versus time for the two case studies associated with Figs. \[fig:active\] and \[fig:passive\]. It is of great significance to point out that no cell number loss occurs within our systems, thus the variation of the total cell number remains zero without any fluctuation, see @Onate2014 [@Cremonesi2017] for further discussions on the issue regarding mass loss/production in Lagrangian formulations.

![ Illustration of the discrete conservation of the overall cell number for both case studies associated with Figs. \[fig:active\] and \[fig:passive\]. The $x$ axis represents the elapsed time whereas the $y$ axis represents the percentage of change in the overall cell number. The left figure corresponds to the case where all forces are present in the dynamics of the system whereas the left figure corresponds to the case where pili-pili mediated forces are absent. <span data-label="fig:mass"></span>](mass.pdf){width="100.00000%"}

Colony coalescence {#sec:colony}
------------------

![ Illustration of the colony coalescence process. Five snapshots of the coalescence process in both undeformed and deformed configurations are depicted. The parameter $h$ measures the bridge length between the two merging colonies. The center plots render the effects of $k_{\text{on}}$ and $f^{\text{p}}$ on the evolution of the bridge between the colonies. <span data-label="fig:two-bubble"></span>](two-bubble-h.pdf){width="100.00000%"}

In this section, two colonies are put next to each other and the process of their coalescence is examined. In doing so, we define a new parameter $h$ which measures the bridge length between the two merging colonies. From a computational point of view, we define the boundary of the bridge where the the cell number density gradient in $y$ direction is $96\%$ of its maximum value throughout the domain. Figure \[fig:two-bubble\] investigates the influence of the pili-pili binding rate $k_{\text{on}}$ and the pili-pili mediated attractive force $f^{\text{p}}$ on the size of the bridge. Five snapshots of the coalescence process in both undeformed and deformed configurations are shown on top and bottom, respectively. The snapshots correspond to the green line in the left plot with $k_{\text{on}}=0.021\,\text{s}^{-1}$ and $f^{\text{p}}=18\,\text{pN}$. The left plot renders the bridge length versus time for three different values of the pili-pili binding rate with $f^{\text{p}}=18\,\text{pN}$. The blue line corresponds to $k_{\text{on}}=0.019\,\text{s}^{-1}$, the green line corresponds to $k_{\text{on}}=0.021\,\text{s}^{-1}$ and the red line corresponds to $k_{\text{on}}=0.023\,\text{s}^{-1}$. It is observed that the bridge grows with a faster rate as we increase the pili-pili binding rate. The right plot renders the bridge length versus time for three different values of the pili-pili mediated attractive forces with $k_{\text{on}}=0.023\,\text{s}^{-1}$. The blue line corresponds to $f^{\text{p}}=18\,\text{pN}$, the green line corresponds to $f^{\text{p}}=31\,\text{pN}$ and the red line corresponds to $f^{\text{p}}=43\,\text{pN}$. Similarly, larger values of $f^{\text{p}}$ result in a faster growth of the bridge. These two observations are justifiable since larger binding rates and larger pili-pili attractive forces imply quicker bound pili formation and stronger attractive forces between the cells, respectively, and thus they yield quicker aggregate formation. In both cases, the growth starts with smaller rate due to the function of the passive stress. Further evolution of time leads the pili-pili mediated forces to become more dominant which yields higher rate growths.

Aggregate position and periodicity {#sec:periodicity}
----------------------------------

![ Formation of aggregates under different initial random distributions. In each block, the top figures render the undeformed configuration whereas the bottom figures render the deformed bodies. Although the initial distributions are the different, aggregates with similar sizes and same degree of phase separations are obtained. <span data-label="fig:position"></span>](bubble-position.pdf){width="100.00000%"}

![ Illustration of the periodicity of the domain. Although the aggregate are formed in different positions in the domain, due to periodicity, a single centered aggregate can always be extracted if enough samples are put next to each other. <span data-label="fig:periodic"></span>](periodicity.pdf){width="100.00000%"}

This section shows the formation of aggregates under different initial random distribution of cells. Figure \[fig:position\] renders three different cases with various initial random distribution of cells. Each block contains the undeformed and deformed configurations with five different snapshots from the domain. It is observed that, despite different initial conditions, similar aggregates with the same size and degree of the phase separation are obtained at the end. It is noteworthy that due to the different initial distribution, the bodies have deformed differently in order to yield the same aggregate. Although the aggregates are formed in different locations in the three cases shown in Fig. \[fig:position\], due to periodicity, a single centered aggregate can always be extracted if enough samples are put next to each other. Figure \[fig:periodic\] sheds light on this issue more vividly. The final snapshots of the three cases in Fig. \[fig:position\] are shown on the top row in Fig. \[fig:periodic\] . In the middle row, these samples are put together in order to form a periodic structure. In the bottom row, it is shown that similar centered aggregates can always be extracted.

Summary and outlook {#sec:conc}
===================

A continuum framework to model and simulate the behavior of biological cellular aggregates has been established. The process of micro-colony formation has been described as an active phase separation phenomenon. It turns out that employing the Lagrangian approach yields considerable simplification of the equations in particular for the active stress time evolution as compared to previously introduced Eulerian approach @Kuan2021. In addition to satisfying the conservation of the total cell number, our proposed Lagrangian formulation enabled implicit time integration which considerably increases the computational robustness. We demonstrate that three major forces determine the dynamics of the cells in an aggregate network; the pili-pili mediated attractive forces, the steric repulsion forces and the cell-substrate friction. In the absence of pili-pili mediated forces, the repulsive forces simply distribute the cells uniformly throughout the domain whereas in the presence of the pili-pili mediated forces, we observe a phase separation leading to the formation of micro-colonies. A parametric study has been carried out to study the influence of various parameters on the cell density behavior. Our proposed methodology furnishes a general framework for the continuum modeling of the non-equilibrium dynamics of dense cellular aggregates. We believe that this contribution provides significant insights towards the dynamics of cell aggregates which in turn can be exploited to better understand the behavior of infectious diseases. Further extension of this work include analysis of different cell species, as well as examining other biological systems with pronounced cell-matrix interactions.

Acknowledgment {#acknowledgment .unnumbered}
==============

Soheil Firooz and Paul Steinmann gratefully acknowledge the support provided by EAM cluster. Also Soheil Firooz would like to thank Hui–Shun Kuan for fruitful discussions regarding the parametric study. Vasily Zaburdaev would like to acknowledge the support by Volkswagen foundation "Life?" initiative.

Detailed derivations of the weak forms {#sec:app_1}
======================================

This section provides further details regarding the intermediate steps in the derivation of the linear momentum balance equation  as follows $$\begin{aligned}
\int_{{\mathcal{B}}_0} \nabla_{{\boldsymbol{X}}}\cdot &{\boldsymbol{P}}^{\text{a}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V + \int_{{\mathcal{B}}_0} \nabla_{{\boldsymbol{X}}} \cdot {\boldsymbol{P}}^{\text{p}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V - \int_{{\mathcal{B}}_0} \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V\\
=
&\int_{{\mathcal{B}}_0}  \nabla_{{\boldsymbol{X}}} \cdot {\left(}{\boldsymbol{P}}^{a^{T}} \cdot \delta {\boldsymbol{y}} {\right)}\, {\mbox{d}}V - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{a}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0}  \nabla_{{\boldsymbol{X}}} \cdot {\left(}{\boldsymbol{P}}^{p^{T}} \cdot \delta {\boldsymbol{y}} {\right)}\, {\mbox{d}}V - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{p}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V  - \int_{{\mathcal{B}}_0} \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V\\
=
&\int_{{\mathcal{B}}_0}  {\left[}{\boldsymbol{P}}^{a^{T}} \cdot \delta {\boldsymbol{y}} {\right]}\cdot {\boldsymbol{N}} \, {\mbox{d}}A - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{a}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0}  {\left[}{\boldsymbol{P}}^{p^{T}} \cdot \delta {\boldsymbol{y}} {\right]}\cdot {\boldsymbol{N}} \, {\mbox{d}}A - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{p}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V  - \int_{{\mathcal{B}}_0} \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V\\
=
&\int_{{\mathcal{B}}_0}   \delta {\boldsymbol{y}} \cdot {\boldsymbol{P}}^{\text{a}} \cdot {\boldsymbol{N}} \, {\mbox{d}}A - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{a}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0}   \delta {\boldsymbol{y}} \cdot {\boldsymbol{P}}^{\text{p}} \cdot {\boldsymbol{N}} \, {\mbox{d}}A - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{p}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V  - \int_{{\mathcal{B}}_0} \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V\\
=
&\int_{{\mathcal{B}}_0}   \delta {\boldsymbol{y}} \cdot {\boldsymbol{T}}^{\text{a}}\, {\mbox{d}}A - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{a}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V + \int_{{\mathcal{B}}_0}   \delta {\boldsymbol{y}} \cdot {\boldsymbol{T}}^{\text{p}} \, {\mbox{d}}A - \int_{{\mathcal{B}}_0}  {\boldsymbol{P}}^{\text{p}} : \nabla_{{\boldsymbol{X}}} \delta {\boldsymbol{y}}  \, {\mbox{d}}V  - \int_{{\mathcal{B}}_0} \xi J c_{t} \dot{{\boldsymbol{y}}} \cdot \delta {\boldsymbol{y}} \, {\mbox{d}}V = 0\,.
\end{aligned}
\label{eq:weak_LMB_Lagrangian_1_app}$$

Detailed derivations of the active stress {#sec:app_2}
=========================================

In this section, the derivation of the material time derivative of the active Piola–Kirchhoff stress is provided in detail. To begin, the Lie time derivative of the Kirchhoff stress is obtained as follows $$\begin{aligned}
{\mathcal{L}}_t{\boldsymbol{\tau}}^\text{a} 
&=  {\boldsymbol{F}} \cdot {\left[}\dot{{\overline{{\boldsymbol{F}}^{-1} \cdot{\boldsymbol{\tau}}^\text{a}\cdot {\boldsymbol{F}}^{-T}}}} {\right]}\cdot {\boldsymbol{F}}^T
 = {\boldsymbol{F}} \cdot \left[  \dot{{\boldsymbol{F}}^{-1}} \cdot {\boldsymbol{\tau}}^\text{a} \cdot {\boldsymbol{F}}^{-T} + {\boldsymbol{F}}^{-1}  \cdot \dot{{\boldsymbol{\tau}}^\text{a}} \cdot {\boldsymbol{F}}^{-T} + {\boldsymbol{F}}^{-1} \cdot {\boldsymbol{\tau}}^\text{a} \cdot \dot{{\boldsymbol{F}}^{-T}}  \right] \cdot {\boldsymbol{F}}^T\\[8pt]
& = {\boldsymbol{F}}\cdot \left[-  {\boldsymbol{F}}^{-1}\cdot{\boldsymbol{l}}\cdot {\boldsymbol{\tau}}^\text{a}\cdot {\boldsymbol{F}}^{-T} + {\boldsymbol{F}}^{-1}\cdot \dot{{\boldsymbol{\tau}}^\text{a}} \cdot {\boldsymbol{F}}^{-T} - {\boldsymbol{F}}^{-1} \cdot {\boldsymbol{\tau}}^\text{a} \cdot {\boldsymbol{l}}^{T} \cdot {\boldsymbol{F}}^{-T}   \right] \cdot {\boldsymbol{F}}^T \\[8pt]
& = \dot{{\boldsymbol{\tau}}^\text{a}} - {\boldsymbol{l}} \cdot {\boldsymbol{\tau}}^\text{a}  - {\boldsymbol{\tau}}^\text{a} \cdot {\boldsymbol{l}}^{T} 
  = \dot{{\boldsymbol{\tau}}^\text{a}} - {\boldsymbol{l}}\cdot {{\boldsymbol{\tau}}^\text{a}}^T  - {\boldsymbol{\tau}}^\text{a}\cdot {\boldsymbol{l}}^{T} 
  = \dot{{\boldsymbol{\tau}}^\text{a}} - 2\left[ {\boldsymbol{l}} \cdot {\boldsymbol{\tau}}^\text{a} \right]^{\text{sym}}\,.
\end{aligned}
\label{eq:Lie_time_derivative_app}$$ Afterwards, using the relation ${\boldsymbol{S}}={\boldsymbol{F}}^{-1} \cdot {\boldsymbol{\tau}}^\text{a} \cdot {\boldsymbol{F}}^{-T}$ on could write $$\begin{aligned}
\dot{{\boldsymbol{S}}^\text{a}}
= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\left[}{\boldsymbol{F}}\cdot{\boldsymbol{S}}^\text{a}\cdot{\boldsymbol{F}}^{T}{\right]}:{\boldsymbol{l}}^{T}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}
= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:{\left[}{\boldsymbol{F}}^{T}\cdot{\boldsymbol{l}}^{T}\cdot{\boldsymbol{F}}{\right]}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\,.
\end{aligned}
\label{eq:active_stress_Lagrangian_app_1}$$ Since the Piola–Kirchhoff stress is a symmetric tensor, for an arbitrary second order tensor ${\boldsymbol{A}}$ we can write $${\boldsymbol{S}}:{\boldsymbol{A}} = {\boldsymbol{S}}:\left[{\displaystyle\frac}{1}{2}\left[ {\boldsymbol{A}} + {\boldsymbol{A}}^T \right]\right]\,.$$ Thus, Eq.  can be rewritten as $$\begin{aligned}
\dot{{\boldsymbol{S}}^\text{a}}
&= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:{\left[}{\boldsymbol{F}}^{T}\cdot{\boldsymbol{l}}^{T}\cdot{\boldsymbol{F}}{\right]}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\\
&= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:{\displaystyle\frac}{1}{2}\left[{\left[}{\boldsymbol{F}}^{T}\cdot{\boldsymbol{l}}^{T}\cdot{\boldsymbol{F}}{\right]}+ \left[{\boldsymbol{F}}^{T}\cdot{\boldsymbol{l}}^{T}\cdot{\boldsymbol{F}}\right]^{T}\right]\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\\
&= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:{\left[}{\boldsymbol{F}}^{T}\cdot{\boldsymbol{l}}^{\text{sym}}\cdot{\boldsymbol{F}}{\right]}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\\
\end{aligned}
\label{eq:active_stress_Lagrangian_app_2}$$ Finally, utilizing the relation $${\boldsymbol{F}}^{T}\cdot[{\boldsymbol{l}}]^\text{sym}\cdot{\boldsymbol{F}} = 
{\boldsymbol{F}}^T \cdot\left[{\displaystyle\frac}{1}{2}\left[{\boldsymbol{l}}^T + {\boldsymbol{l}} \right] \right]\cdot{\boldsymbol{F}} =
{\displaystyle\frac}{1}{2}\left[{\boldsymbol{F}}^T\cdot{\boldsymbol{l}}^T\cdot{\boldsymbol{F}} + {\boldsymbol{F}}^T\cdot{\boldsymbol{l}}\cdot{\boldsymbol{F}} \right] =
{\displaystyle\frac}{1}{2}\left[\dot{{\boldsymbol{F}}^T}\cdot{\boldsymbol{F}} + {\boldsymbol{F}}^T\cdot\dot{{\boldsymbol{F}}} \right] =
\dot{{\boldsymbol{E}}}\,,$$ we can derive the fully Lagrangian form of the active Piola–Kirchhoff stress as $$\dot{{\boldsymbol{S}}^\text{a}}
= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:\dot{{\boldsymbol{E}}}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\,.
\label{eq:active_stress_Lagrangian_app_3}$$

Time integration of the active stress {#sec:app_3}
=====================================

In this section we detail on the time integration technique in order to calculate the active second Piola–Kirchhoff stress. The non-linear relation for the active second Piola–Kirchhoff stress reads $$\dot{{\boldsymbol{S}}^\text{a}} 
= - {\displaystyle\frac}{1}{\ell_0 p_0f^{\text{p}}} \left[ {\boldsymbol{S}}^\text{a}:\dot{{\boldsymbol{E}}}\right]{\boldsymbol{S}}^\text{a}  + {\boldsymbol{S}}^\text{f} - k_\text{off}\,{\boldsymbol{S}}^\text{a}\,,$$ which could be written in the form $${\displaystyle\frac}{{\boldsymbol{S}}^{\text{a}}_{n+1}-{\boldsymbol{S}}^{\text{a}}_{n}}{\Delta t} = - {\displaystyle\frac}{1}{\ell_{0} p_{0}f^{\text{p}}\Delta t} {\boldsymbol{S}}^{\text{a}}_{n+1} {\left[}{\boldsymbol{S}}^{\text{a}}_{n+1}:{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}{\right]}+ {\boldsymbol{S}}_{n+1}^{\text{f}} - k_{\text{off}}{\boldsymbol{S}}^{\text{a}}_{n+1}\,.$$ To linearize this equation, we put all the terms on one side and treat them as a residuum ${\boldsymbol{R}}$ that must vanish $${\boldsymbol{R}} = {\displaystyle\frac}{{\boldsymbol{S}}^{\text{a}}_{n+1}-{\boldsymbol{S}}^{\text{a}}_{n}}{\Delta t} + {\displaystyle\frac}{1}{\ell_{0} p_{0}f^{\text{p}}\Delta t} {\boldsymbol{S}}^{\text{a}}_{n+1} {\left[}{\boldsymbol{S}}^{\text{a}}_{n+1}:{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}{\right]}- {\boldsymbol{S}}_{n+1}^{\text{f}} + k_{\text{off}}{\boldsymbol{S}}^{\text{a}}_{n+1}\,.$$ The linearization of ${\boldsymbol{R}}$ reads $${\boldsymbol{R}}_{n+1} \approx \text{Lin}{\boldsymbol{R}}_{n+1} = {\boldsymbol{R}}_{n} + {\displaystyle\frac}{{\partial}{\boldsymbol{R}}}{{\partial}{\boldsymbol{S}}^{\text{a}}}\big\lvert_{n} \cdot \Delta {\boldsymbol{S}}^{\text{a}}_{n}\stackrel{!}{=}{{\boldsymbol{0}}}\,.
\label{eq:linearize_R}$$ The tangent reads $$\begin{aligned}
{\text{\usefont{U}{bbm}{m}{n}K}} = {\displaystyle\frac}{{\partial}{\boldsymbol{R}}}{{\partial}{\boldsymbol{S}}^{\text{a}}} &= {\left[}{\displaystyle\frac}{1}{\Delta t} + k_{\text{off}}{\right]}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}} + {\displaystyle\frac}{1}{\ell_{0} p_{0}f^{\text{p}}\Delta t}  \bigg[ {\left[}{\boldsymbol{S}}^{\text{a}}_{n+1}:{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}{\right]}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}} + {\boldsymbol{S}}^{\text{a}}_{n+1}{\otimes}{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}\bigg]\\
&={\left[}{\displaystyle\frac}{1}{\Delta t} + k_{\text{off}}  + {\displaystyle\frac}{1}{\ell_{0} p_{0}f^{\text{p}}\Delta t} {\left[}{\boldsymbol{S}}^{\text{a}}_{n+1}:{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}{\right]}{\right]}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}} + {\displaystyle\frac}{1}{\ell_{0}p_{0}f^{\text{p}}\Delta t}  \bigg[   {\boldsymbol{S}}^{\text{a}}_{n+1}{\otimes}{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}\bigg]\,,
\end{aligned}$$ with ${\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}$ being the symmetric fourth-order identity which reads ${\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}=1/2{\left[}\delta_{ik}\delta_{jl} + \delta_{il}\delta_{jk} {\right]}$. Finally, an iterative Newton–Raphson scheme is employed to solve for ${\boldsymbol{R}}_{n+1}$ and thus, for ${\boldsymbol{S}}^{\text{a}}_{n+1}$ as $${\left[}{\boldsymbol{S}}^{\text{a}}{\right]}_{n+1} = {\left[}{\boldsymbol{S}}^{\text{a}} {\right]}_{n} + {\left[}d{\boldsymbol{S}}^{\text{a}} {\right]}\quad \text{with} \quad  {\left[}\Delta{\boldsymbol{S}}^{\text{a}} {\right]}_{ij} = - {\left[}{\text{\usefont{U}{bbm}{m}{n}K}}^{-1} {\right]}_{ijkl} {\left[}{\boldsymbol{R}} {\right]}_{kl}\,.$$ To calculate ${\text{\usefont{U}{bbm}{m}{n}K}}^{-1}$ we use the Sherman–Morrison formula which states that for an arbitrary fourth-order tensor ${\text{\usefont{U}{bbm}{m}{n}A}}$ that can be written in the form $${\text{\usefont{U}{bbm}{m}{n}A}} = \beta {\text{\usefont{U}{bbm}{m}{n}B}} + \alpha {\boldsymbol{C}}{\otimes}{\boldsymbol{D}} \,,
\label{eq:inverse}$$ with $\alpha$ and $\beta$ being scalars, ${\boldsymbol{C}}$ and ${\boldsymbol{D}}$ being second-order tensors and ${\text{\usefont{U}{bbm}{m}{n}B}}$ being a fourth-order tensor, the inverse of ${\text{\usefont{U}{bbm}{m}{n}A}}$ reads $${\text{\usefont{U}{bbm}{m}{n}A}}^{-1} = {\displaystyle\frac}{1}{\beta} {\text{\usefont{U}{bbm}{m}{n}B}}^{-1} -  {\displaystyle\frac}{\alpha}{\beta^2+\alpha\beta{\boldsymbol{D}}:{\text{\usefont{U}{bbm}{m}{n}B}}^{-1}:{\boldsymbol{C}}} {\left[}{\text{\usefont{U}{bbm}{m}{n}B}}^{-1}:{\boldsymbol{C}}{\otimes}{\boldsymbol{D}}:{\text{\usefont{U}{bbm}{m}{n}B}}^{-1} {\right]}\,.$$ To proceed, we write our tangent in the form of Eq.  as $${\text{\usefont{U}{bbm}{m}{n}K}} = \beta {\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}} + \alpha \bigg[   {\boldsymbol{S}}_{n+1}{\otimes}{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}\bigg]\,,$$ with $$\alpha={\displaystyle\frac}{1}{\ell_{0}\rho^{\text{p}}_{0}f^{\text{p}}\Delta t} \qquad \text{and} \qquad 
\beta={\left[}{\displaystyle\frac}{1}{\Delta t} + k_{\text{off}}  + {\displaystyle\frac}{1}{\ell_{0}\rho^{\text{p}}_{0}f^{\text{p}}\Delta t} {\left[}{\boldsymbol{S}}_{n+1}:{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}{\right]}{\right]}\,.$$ Therefore, using the identity ${\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}^{-1}}={\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}$, ${\text{\usefont{U}{bbm}{m}{n}K}}^{-1}$ reads $${\text{\usefont{U}{bbm}{m}{n}K}}^{-1} = {\displaystyle\frac}{1}{\beta} {\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}} -  {\displaystyle\frac}{\alpha}{\beta^2+\alpha\beta{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}:{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}:{\boldsymbol{S}}_{n+1}} {\left[}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}:{\boldsymbol{S}}_{n+1}{\otimes}{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}:{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}} {\right]}\,,$$ or in index notation $${\left[}{\text{\usefont{U}{bbm}{m}{n}K}}^{-1}{\right]}_{ijkl} \!\!\!= {\displaystyle\frac}{1}{\beta}{\left[}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}{\right]}_{ijkl} -  {\displaystyle\frac}{\alpha}{\beta^2+\alpha\beta{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}_{mn}:{\left[}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}{\right]}_{mnrs}:{\left[}{\boldsymbol{S}}_{n+1}{\right]}_{rs}  } {\left[}{\left[}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}{\right]}_{ijmn}: {\left[}{\boldsymbol{S}}_{n+1}{\otimes}{\left[}{\boldsymbol{E}}_{n+1} - {\boldsymbol{E}}_{n} {\right]}{\right]}_{mnrs}:{\left[}{\text{\usefont{U}{bbm}{m}{n}I}}^{\text{sym}}{\right]}_{rskl} {\right]}\,.$$

Some useful relations {#sec:app_4}
=====================

This section provides some useful derivatives in index notation relation which will be helpful regarding the derivation of the tangents for the finite element implementation. $$\left[{\displaystyle\frac}{{\partial}J}{{\partial}{\boldsymbol{F}}}\right]_{ij} = J \left[{\boldsymbol{F}}^{-T}\right]_{ij} \,,
\qquad
\left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = \delta_{ik} \delta_{jl}\,,
\qquad
\left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{T}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = \delta_{il} \delta_{jk}\,,
\qquad
\left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{-1}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = - \left[{\boldsymbol{F}}^{-1} \right]_{ik} \left[{\boldsymbol{F}}^{-T} \right]_{jl}\,,$$

$$\left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{-T}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = - \left[{\boldsymbol{F}}^{-1} \right]_{il} \left[{\boldsymbol{F}}^{-T} \right]_{jk}\,,
\qquad
\left[{\displaystyle\frac}{{\partial}{\boldsymbol{B}}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = \left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{-1}}{{\partial}{\boldsymbol{F}}}\right]_{imkl} \left[{\boldsymbol{F}}^{-T} \right]_{mj} + \left[{\boldsymbol{F}}^{-1} \right]_{im} \left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{-T}}{{\partial}{\boldsymbol{F}}}\right]_{mjkl} \,,$$

$$\left[{\displaystyle\frac}{{\partial}{\boldsymbol{E}}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = {\displaystyle\frac}{1}{2} \left[ \left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{T}}{{\partial}{\boldsymbol{F}}}\right]_{imkl} \left[{\boldsymbol{F}} \right]_{mj} + \left[{\boldsymbol{F}}^{T} \right]_{im} \left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}}{{\partial}{\boldsymbol{F}}}\right]_{mjkl} \right]\,,\\$$

$$\left[{\displaystyle\frac}{{\partial}{\boldsymbol{P}}}{{\partial}{\boldsymbol{F}}}\right]_{ijkl} = \left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}}{{\partial}{\boldsymbol{F}}}\right]_{imkl} \left[{\boldsymbol{S}} \right]_{mj} + \left[{\boldsymbol{F}} \right]_{im} \left[{\displaystyle\frac}{{\partial}{\boldsymbol{S}}}{{\partial}{\boldsymbol{F}}}\right]_{mjkl} \,,
\qquad
\left[ {\displaystyle\frac}{{\partial}[{\boldsymbol{g}} {\otimes}{\boldsymbol{g}}]}{{\partial}{\boldsymbol{g}}} \right]_{ijk} \!\!\!\!= \left[ \left[{\boldsymbol{I}}\right]_{ik} \left[{\boldsymbol{g}}\right]_{j}  + \left[{\boldsymbol{g}}\right]_{i} \left[{\boldsymbol{I}}\right]_{jk} \right]\,,$$

$$\left[ {\displaystyle\frac}{{\partial}[\nabla_{{\boldsymbol{X}}}\,{\boldsymbol{g}} : {\boldsymbol{F}}^{-T}]}{{\partial}\nabla_{{\boldsymbol{X}}}\,{\boldsymbol{g}}} \right]_{ij} \!\!\!\!= \left[{\boldsymbol{F}}^{-T}\right]_{ij} \left[ {\displaystyle\frac}{{\partial}[\nabla_{{\boldsymbol{X}}}\,{\boldsymbol{g}} : {\boldsymbol{F}}^{-T}]}{{\partial}\,{\boldsymbol{F}}} \right]_{ij} \!\!\!\!=  \left[{\displaystyle\frac}{{\partial}{\boldsymbol{F}}^{-T}}{{\partial}{\boldsymbol{F}}}\right]_{klij} \left[\nabla_{{\boldsymbol{X}}}\,{\boldsymbol{g}} \right]_{kl}\,.$$

Calculation of the derivatives at the element level {#sec:app_5}
===================================================

In this section a brief example to calculate the derivatives of a scalar field $\alpha$, a vector field ${\boldsymbol{a}}$ and a second-order tensor field ${\boldsymbol{A}}$ with respect to the nodal values at the element level is elaborated. $${\left[}{\displaystyle\frac}{{\partial}\alpha}{{\partial}\alpha^{J}} {\right]}= {\displaystyle\frac}{{\partial}{\left(}\alpha^{S}N^{S}{\right)}}{{\partial}\alpha^{J}} = {\displaystyle\frac}{{\partial}\alpha^{S}}{{\partial}\alpha^{J}} N^{S} =  \delta^{SJ} N^{S} = N^{J}\,,$$

$${\left[}{\displaystyle\frac}{{\partial}\nabla_{{\boldsymbol{x}}} \alpha}{{\partial}\alpha^{J}} {\right]}_{i} = {\displaystyle\frac}{{\partial}{\left[}\nabla_{{\boldsymbol{x}}}{\left(}\alpha^{S}N^{S}{\right)}{\right]}_{i}}{{\partial}\alpha^{J}} = {\displaystyle\frac}{{\partial}{\left[}\alpha^{S} \nabla_{{\boldsymbol{x}}} N^{S}_{i} {\right]}}{{\partial}\alpha^{J}} = {\displaystyle\frac}{{\partial}\alpha^{S}}{{\partial}\alpha^{J}} \, \nabla_{{\boldsymbol{x}}} N^{S}_{i} = \delta^{SJ} \, \nabla_{{\boldsymbol{x}}} N^{S}_{i} = {\left[}\nabla_{{\boldsymbol{x}}} N^{J}{\right]}_{i}\,,$$

$${\left[}{\displaystyle\frac}{{\partial}{\boldsymbol{a}}}{{\partial}{\boldsymbol{a}}^{J}} {\right]}_{ij} = {\displaystyle\frac}{{\partial}{\left(}{\boldsymbol{a}}^{S}_{i}N^{S}{\right)}}{{\partial}{\boldsymbol{a}}^{J}_{j}} = {\displaystyle\frac}{{\partial}{\boldsymbol{a}}^{S}_{i}}{{\partial}{\boldsymbol{a}}^{J}_{j}} N^{S} = \delta_{ij} \delta^{SJ} N^{S} = \delta_{ij} N^{J}\,,$$

$${\left[}{\displaystyle\frac}{{\partial}\nabla_{{\boldsymbol{x}}}{\boldsymbol{a}}}{{\partial}{\boldsymbol{a}}^{J}} {\right]}_{ijk} = {\displaystyle\frac}{{\partial}{\left[}\nabla_{{\boldsymbol{x}}}{\left(}{\boldsymbol{a}}^{S}_{i}N^{S}{\right)}{\right]}_{j}}{{\partial}{\boldsymbol{a}}^{J}_{k}} = {\displaystyle\frac}{{\partial}{\left[}{\boldsymbol{a}}^{S}_{i} {\otimes}\nabla_{{\boldsymbol{x}}} N^{S}_{j} {\right]}}{{\partial}{\boldsymbol{a}}^{J}_{k}} = {\displaystyle\frac}{{\partial}{\boldsymbol{a}}^{S}_{i}}{{\partial}{\boldsymbol{a}}^{J}_{k}} \, \nabla_{{\boldsymbol{x}}} N^{S}_{j} = \delta_{ik} \delta^{SJ} \, \nabla_{{\boldsymbol{x}}} N^{S}_{j} = \delta_{ik} \, {\left[}\nabla_{{\boldsymbol{x}}} N^{J}{\right]}_{j}\,,$$

$${\left[}{\displaystyle\frac}{{\partial}{\boldsymbol{A}}}{{\partial}{\boldsymbol{A}}^{J}} {\right]}_{ijkl}\!\!\!\! = {\displaystyle\frac}{{\partial}{\left(}{\boldsymbol{A}}^{S}_{ij}N^{S}{\right)}}{{\partial}{\boldsymbol{A}}^{J}_{kl}} = {\displaystyle\frac}{{\partial}{\boldsymbol{A}}^{S}_{ij}}{{\partial}{\boldsymbol{A}}^{J}_{kl}} N^{S} = \delta_{ik} \delta_{jl} \delta^{SJ} N^{S} = \delta_{ik} \delta_{jl} N^{J}\,,$$

$${\left[}{\displaystyle\frac}{{\partial}\nabla_{{\boldsymbol{x}}}{\boldsymbol{A}}}{{\partial}{\boldsymbol{A}}^{J}} {\right]}_{ijklm} = {\displaystyle\frac}{{\partial}{\left[}\nabla_{{\boldsymbol{x}}}{\left(}{\boldsymbol{A}}^{S}_{ij}N^{S}{\right)}{\right]}_{k}}{{\partial}{\boldsymbol{A}}^{J}_{lm}} = {\displaystyle\frac}{{\partial}{\left[}{\boldsymbol{A}}^{S}_{ij} {\otimes}\nabla_{{\boldsymbol{x}}} N^{S}_{k} {\right]}}{{\partial}{\boldsymbol{A}}^{J}_{lm}} = {\displaystyle\frac}{{\partial}{\boldsymbol{A}}^{S}_{ij}}{{\partial}{\boldsymbol{A}}^{J}_{lm}} \, \nabla_{{\boldsymbol{x}}} N^{S}_{k} = \delta_{il} \delta_{jm} \delta^{SJ} \, \nabla_{{\boldsymbol{x}}} N^{S}_{k} = \delta_{il} \delta_{jm} \, {\left[}\nabla_{{\boldsymbol{x}}} N^{J}{\right]}_{k}\,.$$

References {#references .unnumbered}
==========

{'source': 'arXiv_out/2207'}