1 Introduction

In recent years, the study of how the sessile and planktonic phenotypes interact in biofilm lifestyle has become a theme of intense interest and scrutiny [1]. Biofilms are microbial assemblies which commonly develop attached to abiotic or biotic surfaces. They are characterized by a solid matrix of extracellular polymeric substance (EPS) in which microorganisms are embedded [2]. The biofilm dynamics are deeply influenced by microbial mass exchanges between biofilm and the surrounding environment, which involve both the sessile and planktonic biomasses. The biofilm formation is initiated by pioneer microbial cells in planktonic form, which attach to a solid support through an initial attachment process. Such cells switch their mode of growth from planktonic to sessile and constitute the first sessile microbial colony [3], which develops and expands over time as a result of the microbial metabolic growth. Meanwhile, large EPS production by sessile cells confers high density and compactness to the aggregate and protects it from external agents. During the maturation stage, the high density induces large spatial gradients in biofilm properties, leading to numerous microenvironments and extremely heterogeneous microbial distributions. Specifically, new biological conditions arising within the biofilm can promote the phenomenon of microbial invasion: motile planktonic cells colonize the aggregate by penetrating the biofilm matrix, and proliferate as new sessile biomass where ideal conditions for their metabolic activity occur [4]. This means that the number of microbial species constituting the biofilm can increase over time, since microbial species initially not present can join the biofilm when new metabolic microniches arise. Furthermore, external shear forces, nutrients depletion and biomass decay lead to the detachment of cells from the biofilm colony into the surrounding medium [5]. Lastly, in the final stage of the biofilm lifecycle, microbial dispersal phenomena can occur: as a result of habitat decay (resource depletion and cell competition for space), planktonic cells, known as dispersed cells, are released in the surrounding environment, migrate to new surfaces and subsequently constitute new biofilm aggregates [6].

Despite the high amount of mathematical works on multispecies biofilms growth developed in the framework of the Wanner-Gujer model [7] or as multidimensional partial differential equation models [8,9,10,11,12], most of them completely neglect the attachment process in the initial phase of biofilm formation, since the initial data that prescribe location, size, and composition of colonies at the onset of the simulations are arbitrarily assigned. This strongly affects the biofilm development and maturation as highlighted by a recent work [13] where the attachment has been incorporated as a discrete stochastic process in a density-dependent diffusion–reaction model for cellulolytic biofilms. Furthermore, the Wanner–Gujer-type models [7, 14,15,16] can lead, in some cases, to ecological restrictions on the number of species constituting the biofilm [17]. Indeed, they are characterized by a restriction on the number of species that can inhabit the biofilm under the detachment regime: that is, if a species is not initially present within the biofilm on the support, it will be washed out from the system. The free boundary problem introduced in this work is intended to overcome these limitations by considering the initial biofilm formation mediated by planktonic cells as well as the colonization process. In particular, we present a one-dimensional continuous model considering two state variables representing the planktonic and sessile phenotypes and reproducing the transition from the former to the other in the biofilm lifecycle. The underlying model is a coupled hyperbolic–elliptic free boundary value problem with nonlocal effects. The attachment is modeled as a continuous, deterministic process which depends on the concentrations of the attaching species in the bulk liquid [16]. The colonization process which results in the establishment of new species in sessile form is modeled by considering an additional reaction term in the hyperbolic equations, which depends on the concentration of planktonic species within the biofilm [18]. The concentration of the planktonic species within the biofilm is governed by elliptic partial differential equations which describe their diffusion from the bulk liquid within the biofilm. A reaction term is considered to account for the conversion of the planktonic phenotype into the sessile mode of growth.

The work is organized as follows. Section 2 introduces the mathematical background for the attachment process in the initial phase of multispecies biofilm formation, in the framework of the Wanner–Gujer approach to biofilm modeling [16]. The free boundary is constituted by the biofilm thickness, and it is assumed to be initially zero. The growth of the attaching species is governed by nonlinear hyperbolic partial differential equations. The free boundary is governed by a first order differential equation that depends on attachment, detachment and biomass growth velocity. It is recalled that the free boundary velocity is greater than the characteristic velocity of the mentioned hyperbolic system during the first instants of biofilm formation. As a consequence, the free boundary is a space-like line. The initial-boundary conditions for the microbial concentrations are assigned on this line, and they are equal to the relative abundance of the species in the biomass attached to the biofilm–bulk liquid interface. The free boundary value problem is completed by a system of semi-linear elliptic partial differential equations that governs the quasi-static diffusion of substrates. In Sect. 3, a numerical experiment shows that the free boundary problem introduced in [16] needs to be generalized to eliminate any restriction on the number of species inhabiting the mature biofilm as described in [17]. Section 4 introduces the new free boundary problem which accounts for both the initial phase of biofilm formation and the diffusion and colonization of planktonic species within the biofilm. Section 5 introduces the integral version of the differential free boundary problem provided in Sect. 4, which is derived by adopting characteristics coordinates. An existence and uniqueness theorem of solutions is shown in Sect. 5 in the class of continuous functions. The proposed model is also solved numerically to simulate the biofilm evolution during biologically relevant conditions and provides interesting insights toward quantitative understanding of biofilm dynamics and ecology. Numerical results are reported in Sect. 6. Finally, the conclusions of the work are outlined in Sect. 7.

2 Background

A free boundary approach was introduced in [16] for modeling the initial phase of the multispecies biofilm formation and growth in the framework of Wanner-Gujer model [7]. In this context, denoting by \(X_i(z,t)\) the concentration of the generic bacterial species i, the one-dimensional multispecies biofilm growth is governed by the following system of nonlinear hyperbolic partial differential equations

$$\begin{aligned} \frac{\partial }{\partial t}X_i(z,t)+ \frac{\partial }{\partial z}(u(z,t)X_i(z,t)) =\rho _ir_{M,i},\ i=1,...,n, \end{aligned}$$
(2.1)

where u(zt) denotes the velocity of the microbial mass, \(r_{M,i}\) the specific growth rate, and \(\rho _i\) the constant density. In addition, the substratum is assumed to be placed at \(z=0\).

The function \(r_{M,i}\) depends on \(\mathbf{X}=(X_1,...,X_n)\), and substrates \(S_{j}\), \(j=1,...,m\), as well

$$\begin{aligned} r_{M,i}=r_{M,i}(\mathbf{X}(z,t),\mathbf{S}(z,t)),\ \mathbf{S}=(S_1,...,S_m). \end{aligned}$$
(2.2)

u(rt) is governed by the following equation:

$$\begin{aligned} \frac{\partial u}{\partial z} = \sum _{i=1}^{n}r_{M,i},\ 0< z\le L(t),\ t>0,\ u(0,t)=0, \end{aligned}$$
(2.3)

where L(t) represents the biofilm thickness.

The substrate diffusion is governed by semi-linear parabolic partial differential equations that are usually considered in quasi-static conditions [14]

$$\begin{aligned} -D_j\frac{\partial ^2 S_j}{\partial z^2} = r_{S,j}(\mathbf{X}(z,t),\mathbf{S}(z,t)),\ j=1,...,m, \end{aligned}$$
(2.4)

where the functions \(r_{S,j}\) denote the conversion rate of substrate j and \(D_j\) the diffusion coefficients assumed constant.

The biofilm thickness L(t) represents the free boundary of the mathematical problem. Its evolution is governed by the following ordinary differential equation [7, 16, 19,20,21,22,23],

$$\begin{aligned} \dot{L}(t)=u(L,t)+\sigma _{a}({{\varvec{\psi }}^*})-\sigma _d(L), \end{aligned}$$
(2.5)

where \(\sigma _a\) denotes the attachment velocity of biomass from bulk liquid to biofilm and \(\sigma _d\) the detachment velocity of biomass from biofilm to bulk liquid. The function \(\sigma _{a}\) depends linearly on the concentrations \(\psi _i^*\), \(i=1,...,n\), \({\varvec{\psi }}^*=(\psi _1^*,...,\psi _n^*)\), of the microbial species in planktonic form present in the bulk liquid [7, 14, 16]. According to the experimental evidence, the ability of colonizing a clean surface is a feature of few microbial species, which are able to switch from their planktonic state, attach to the surface and start to secrete a polymeric matrix anchoring the cells to each other and to the surface. Even the formation of a single layer of cells can lead to a change on the electrostatic nature and mechanical properties of the surface, that can facilitate the attachment of new species that were initially unable to colonize the clean surface. According to [16], this is taken into account by considering in the formulation of the attachment flux \(\sigma _{a}=\sum _{i=1}^n v_{a,i}\psi _i^*/\rho _i\) different attachment velocities \(v_{a,i}\) for the single microbial species living in the liquid environment. Such velocities can be assigned constant or can be considered as functions of the environmental conditions affecting biofilm growth, that is, substrate concentrations, biofilm composition itself, electrostatic and mechanical properties of the surface.

The function \(\sigma _{d}\) is usually assumed to be proportional to \(L^2\): \(\sigma _{d}=\delta L^2\), [24], where \(\delta \) depends on the mechanical properties of the biofilm. In the initial phase of biofilm formation, where \(L(0)=0\), the attachment is the prevailing process and \(\sigma _{d}\) is very small, since so is \(L^2\). Therefore, it is \(\sigma _{a}-\sigma _{d}>0\) and the free boundary velocity is greater than the characteristic velocity, \(\dot{L}(t)>u(L,t)\). The free boundary is a space-like line, as illustrated in Fig. 1.

Fig. 1
figure 1

Time evolution of the free boundary with vanishing initial value and characteristic lines when \(\sigma _{a}-\sigma _{d}>0\). The free boundary is a space-like line. The blue dotted line denotes the free boundary evolution. Red dotted lines denote the characteristic-like lines

Fig. 2
figure 2

Time evolution of the free boundary with vanishing initial value. Note that the biofilm thickness undergoes both attachment (\(\sigma _{a}-\sigma _{d}>0\)) and detachment regimes (\(\sigma _{a}-\sigma _{d}<0\)), the latter prevailing for large L. The blue dotted line denotes the free boundary evolution

In the same Figure, the characteristic-like lines of system (2.1) are also depicted. These lines, \(z=c(t_0,t)\), are defined by the differential initial value problem

$$\begin{aligned} \frac{\partial c}{\partial t}(t_0,t) =u(c(t_0,t),t),\ \ c(t_0,t_0)=L(t_0). \end{aligned}$$
(2.6)

For mature biofilms the free boundary L becomes large, the detachment is the prevailing process, it is \(\sigma _{a}-\sigma _{d}<0\), and the free boundary is a time-like line (Fig. 2).

The free boundary value problem (2.1)–(2.4) was discussed in [16] under the following initial-boundary conditions:

$$\begin{aligned} X_{i}(L(t),t)=X_{i,0}(t),\ i=1,...,n, \end{aligned}$$
(2.7)
$$\begin{aligned} \frac{\partial S_j}{\partial z}(0,t)=0,\ S_j(L,t)=S_j^*(t),\ j=1,...,m, \end{aligned}$$
(2.8)
$$\begin{aligned} L(0)=0. \end{aligned}$$
(2.9)

In equations (2.7), \(X_{i,0}(t)\) is the relative abundance of the species i in the biomass attached to the biofilm–bulk liquid interface [25]. More precisely, \(X_{i,0}(t)\) can be evaluated as

$$\begin{aligned} X_{i,0}(t)=\frac{v_{a,i}\psi _i^*(t)}{\sum _{i=1}^n v_{a,i}\psi _i^*(t)}\rho _i,\ i=1,...,n, \end{aligned}$$
(2.10)

where \(\sigma _{a,i}=v_{a,i}\psi _i^*(t)\) denotes the attachment flux of the single species i and \(\sigma _a=\sum _{i=1}^n v_{a,i}\psi _i^*(t)\) the total attachment flux. According to (2.10), the concentration of the microbial species at the biofilm–liquid interface \(X_i(L(t),t)\) for a multispecies biofilm growing under attachment regime, depends on both the concentrations of the same species in planktonic form in the bulk liquid and their attachment propensity. Note that when all the microbial species in the bulk liquid are characterized by the same attachment velocity, equation (2.10) reduces to

$$\begin{aligned} \frac{X_{i,0}(t)}{\rho _i}=\frac{\psi _i^*(t)}{\sum _{i=1}^n\psi _i^*(t)}, \end{aligned}$$

that is the volume fraction of the microbial species i at the biofilm–bulk liquid interface assumes the same value of the volume fraction within the bulk liquid. This reproduces the case of a biofilm that will be initially constituted by all microbial species inhabiting the surrounding liquid environment. However, going on with time the biofilm composition is affected by other factors such as substrate availability, specific microbial growth rate, detachment flux.

For what concerns substrate diffusion, the first boundary condition (2.8) is the no flux condition at substratum. The functions \(S_j^*(t)\) in the second boundary condition (2.8) are prescribed functions in general.

3 Criticism

As outlined in [16], the model for the initial biofilm formation, summarized in the previous section, should be generalized to include the possibility that new attaching bacterial species can move downward within the biofilm matrix and colonize the regions where the conditions for their growth are optimal. An example, referred to as Case 1, could help to better understand the question. To discuss this special problem, an equivalent expression will be used for equations (2.1), where \(X_{i}\) is replaced by the volume fraction \(f_i\) defined by

$$\begin{aligned} f_i(z,t)=X_{i}(z,t)/\rho _i,\ i=1,...,n, \end{aligned}$$
(3.1)

subjected to the constraint

$$\begin{aligned} \sum _{i=1}^{n}f_i(z,t)=1. \end{aligned}$$
(3.2)

Considering (3.1) in (2.1) yields

$$\begin{aligned} \frac{\partial }{\partial t}f_i(z,t)+ \frac{\partial }{\partial z}(u(z,t)f_i(z,t)) =r_{M,i},\ i=1,...,n. \end{aligned}$$
(3.3)

For equations above, conditions (2.7) are replaced by

$$\begin{aligned} f_{i}(L(t),t)=f_{i,0}(t),\ i=1,...,n, \end{aligned}$$
(3.4)

where

$$\begin{aligned} f_{i,0}(t)=X_{i,0}(t)/\rho _i. \end{aligned}$$
(3.5)

Let us consider a three species and substrate biofilm \(n=3, \ m=3\) growing under time-dependent conditions. In particular, the model simulates the case of a biofilm growing in a liquid environment initially inhabited by species \(\psi _1^*\) and \(\psi _2^*\) and continuously fed with substrates \(S_1\) and \(S_2\). At time \(t=t_1>0\), a third species \(\psi _3^*\) is supposed to be fed into the system

$$\begin{aligned} \psi _i^*(t)=\psi _{i,0}^*> 0,\ 0\le t\le T,\ i=1,2,\end{aligned}$$
(3.6)
$$\begin{aligned} \psi _3^*(t)=\left\{ \begin{array}{ll} 0, &{} 0\le t\le t_1, \\ \psi _{3,0}^* \frac{(t-t_1)^{10}}{t_1^{10/t_1}+(t-t_1)^{10}}>0 &{} t_1< t\le T. \\ \end{array} \right. \end{aligned}$$
(3.7)

Species \(\psi _1^*\) and \(\psi _2^*\) start to attach at \(t=0\), while the third at \(t=t_1>0\)

$$\begin{aligned} f_{i,0}(t)>0,\ i=1,2,\ f_{3,0}(t)=0,\ 0\le t< t_1, \end{aligned}$$
(3.8)
$$\begin{aligned} f_{i,0}(t)>0,\ i=1,2,3,\ t \ge t_1. \end{aligned}$$
(3.9)

Functions \(f_{i,0}(t)\) can be derived from equations (2.10), (3.6) and (3.7). Species \(f_1\) and \(f_2\) grow on substrate \(S_1\) and \(S_2\), respectively. Species \(f_1\) by consuming substrate \(S_1\) produces \(S_3\), which is uptaken by \(f_3\). All species are supposed to grow only in sessile form, and the reactor is considered as an infinite reserve of substrates and planktonic species (\(S_j^*(t)=S_{j,0}^*\)). The reaction terms \(r_{M,i}\) and \(r_{S,j}\) in equations (3.3) and (2.4) are modeled by using Monod type kinetics and are expressed as

$$\begin{aligned} r_{M,1} = \mu _{\max ,1} \frac{S_1}{K_1+S_1} f_1,\ r_{M,2} = \mu _{\max ,2} \frac{S_2}{K_2+S_2} f_2,\ r_{M,3} = \mu _{\max ,3} \frac{S_3}{K_3+S_3} f_3, \end{aligned}$$
(3.10)
$$\begin{aligned} r_{S,1} = -\frac{r_{M,1}}{Y_1} \rho _1,\ r_{S,2} = -\frac{r_{M,2}}{Y_2} \rho _2,\ r_{S,3} = \frac{r_{M,1}}{Y_1} \rho _1-\frac{r_{M,3}}{Y_3} \rho _3. \end{aligned}$$
(3.11)

The values of the kinetic parameters and boundary conditions used in the numerical simulations are reported in Table 1. All the sessile species are supposed to have the same density \(\rho _i=\rho , i=1,...,n\). The simulation time adopted for the numerical experiment is \(t=10 \ d\). We are aware that such simulation time will cover both the initial biofilm formation and the maturation phase, where the detachment will be prevalent on the attachment flux. This choice is justified by the fact that we were interested in showing also the mature biofilm configuration, which is achieved under detachment regime.

Table 1 Kinetic parameters used for model simulations

Figure 3 shows the free boundary evolution and the characteristic line \(c(t_1,t)\) starting from \((L(t_1),t_1)\) up to 0.8d simulation time. Figures 4 and 5 show the biofilm composition and substrate trends within the biofilm over time, under attachment and detachment regimes, respectively.

Fig. 3
figure 3

Time evolution of the free boundary (blue open dots) and the characteristic line \(c(t_1,t)\) (red solid dots) under attachment regime (\(\sigma _{a}-\sigma _{d}>0\)) for Case 1. Red open dots denote the characteristic line c(0, t)

Fig. 4
figure 4

Biofilm composition (A1–A2) and substrate distribution (B1–B2) for Case 1, under attachment regime, at time \(t=0.25 \ d\) (top) and \(t=0.50 \ d\) (bottom)

Fig. 5
figure 5

Biofilm composition (A1–A2) and substrate distribution (B1–B2) for Case 1, under detachment regime, at time \(t=1 \ d\) (top) and \(t=10 \ d\) (bottom)

The third species begins to adhere to the biofilm–bulk liquid interface at \(t=t_1\). Substrates \(S_1\) and \(S_2\) are consumed within biofilm by species \(f_1\) and \(f_2\). As a consequence, favorable conditions for \(f_3\) growth occurs within the inner biofilm region due to \(S_3\) production. According to the uniqueness and existence theorem provided in [16], the third species is confined within the region \(z>c(t_1,t)\) and does not colonize the region \(z< c(t_1,t)\) where there are favorable conditions for its growth

$$\begin{aligned} f_3(z,t)\left\{ \begin{array}{lll} =0, &{} 0\le z< c(t_1,t), &{} 0\le t< t_1, \\ >0, &{} z\ge c(t_1,t), &{} t\ge t_1. \\ \end{array} \right. \end{aligned}$$
(3.12)

As shown in Figs. 4 and 5, the third species is unable to penetrate the inner biofilm region. Under detachment regime, its concentration tends to zero and it is completely washed out from the biofilm system. This is a well-known behavior of the model [7], as stated in [17]. The model introduced in this work is intended to eliminate this great limitation.

4 Statement of the free boundary problem

This section presents the free boundary value problem for biofilm growth which considers its initial formation (\(\sigma _a-\sigma _d>0, L(0)=0\)) and the diffusion and colonization of the planktonic species within the biofilm. It is a generalization of the problem discussed in [14, 16], and it is obtained by developing some ideas introduced in [18]. Specifically, an additional state variable is considered, \(\Psi _i\), \({\varvec{\Psi }}=(\Psi _1,..., \Psi _n)\), which represents the concentration of the planktonic species within the biofilm. The differential mass balance equations (2.1) are modified by adding a growth rate term \(r_i\) that accounts for the colonizing bacterial species, and further equations are introduced for the diffusion of the planktonic species. The resulting model is able to overcome the criticism outlined in Sect. 3, as shown through the simple examples reported in Sect. 6.

The biofilm growth is governed by the following equations

$$\begin{aligned} \frac{\partial X_i}{\partial t}+ \frac{\partial }{\partial z}(uX_i)=\rho _ir_{M,i}(\mathbf{X},\mathbf{S}) +\rho _ir_{i}({\varvec{\Psi }},\mathbf{S}),\ 0\le z< L(t), \ t>0,i=1,...,n, \end{aligned}$$
(4.1)
$$\begin{aligned} X_{i}(L(t),t)=X_{i,0}(t),\ t>0,\ i=1,...,n, \end{aligned}$$
(4.2)
$$\begin{aligned} \dot{L}(t)=u(L(t),t)+\sigma _{a}({{\varvec{\psi }}^*}), \ t>0,\ L(0)=0, \end{aligned}$$
(4.3)
$$\begin{aligned} \frac{\partial u}{\partial z}(z,t)=G(\mathbf{X}(z,t),\mathbf{S}(z,t),{\varvec{\Psi }}(z,t)), \ 0< z\le L(t),\ u(0,t)=0, \end{aligned}$$
(4.4)

where

$$\begin{aligned} G(\mathbf{X}(z,t),\mathbf{S}(z,t),{\varvec{\Psi }}(z,t))= \sum _{i=1}^{n}(r_{M,i}+r_{i}), \end{aligned}$$
(4.5)
$$\begin{aligned} -D_j\frac{\partial ^2 S_j}{\partial z^2} = r_{S,j}(\mathbf{X}(z,t),\mathbf{S}(z,t)),\ 0< z< L(t), \ t>0,\ j=1,...,m, \end{aligned}$$
(4.6)
$$\begin{aligned} \frac{\partial S_j}{\partial z}(0,t)=0,\ S_j(L,t))=S_j^*(t),\ t>0,\ j=1,...,m. \end{aligned}$$
(4.7)

The diffusion of the colonizing species within the biofilm is governed by semi-linear parabolic partial differential equations that are considered in quasi-static conditions

$$\begin{aligned} -D_{\Psi ,i}\frac{\partial ^2 \Psi _i}{\partial z^2} = r_{\Psi ,i}({\varvec{\Psi }}(z,t),\mathbf{S}(z,t)),\ 0< z< L(t), \ t>0,\ i=1,...,n, \end{aligned}$$
(4.8)

where \(r_{\Psi ,i}\) indicates the conversion rate due to the switch from planktonic to sessile mode of growth and \(D_{\Psi ,i}\) is the diffusivity coefficient of the planktonic species within the biofilm. Diffusion equations for \({\varvec{\Psi }}\) are considered in quasi-static conditions for the same reason as \(\mathbf{S}\). Equations (4.8) are integrated with the following Neumann–Dirichlet boundary conditions

$$\begin{aligned} \frac{\partial \Psi _i}{\partial z}(0,t)=0,\ \Psi _i(L,t)=\psi _i^*(t),\ t>0,\ i=1,...,n, \end{aligned}$$
(4.9)

where the no flux boundary conditions on the support are evident and the Dirichlet boundary conditions state that the values of the planktonic species on the free boundary are the same as in the bulk liquid.

Note that equation (4.3) refers to the initial phase of biofilm formation, when the detachment flux \(\sigma _d\) is negligible compared to \(\sigma _a\). The free boundary L(t) is a space-like line, and equation (4.2) provides the initial conditions for the microbial species in sessile form on the free boundary. Conversely, during the maturation stage of biofilm growth the detachment flux is predominant, and the free boundary is represented by a time-like line as stated in Sect. 2. The free boundary value problem referring to the mature phase of biofilm growth and considering the interaction between the planktonic and sessile phenotype through the colonization process has been investigated both qualitatively and numerically in [26, 27].

5 Uniqueness and existence of solutions

According to [16], the differential free boundary problem (4.1)–(4.9) can be converted to an equivalent system of integral equations by using the characteristics introduced in (2.6). The integral problem is summarized below by using the following positions

$$\begin{aligned} \mathbf{x}(t_0,t)=\mathbf{X}(c(t_0,t),t),\ \ \mathbf{x}=(x_1,...,x_n), \end{aligned}$$
(5.1)
$$\begin{aligned} \mathbf{s}(t_0,t)=\mathbf{S}(c(t_0,t),t),\ \ \mathbf{s}=(s_1,...,s_m), \end{aligned}$$
(5.2)
$$\begin{aligned} {{\varvec{\psi }}}(t_0,t)={{\varvec{\Psi }}}(c(t_0,t),t),\ \ {{\varvec{\psi }}}=(\psi _1,...,\psi _n). \end{aligned}$$
(5.3)

The integral equations for \(x_i\) follow from (2.6),(4.1)–(4.5)

$$\begin{aligned} x_i(t_0,t)=X_{i,0}(t_0)+\int \limits _{t_0}^t F_i(\mathbf{x}(t_0,\tau ),\mathbf{s}(t_0,\tau ),{\varvec{\psi }}(t_0,\tau ))d\tau , \ 0\le t_0< t\le T, \ i=1,...,n. \end{aligned}$$
(5.4)

The integral equations for \(s_j\) follow from (4.6)–(4.7)

$$\begin{aligned} s_j(t_0,t)= \int \limits _{t_0}^{t} d\theta \int \limits _{0}^{\theta } F_{s,j}(\mathbf{x}(\tau ,t),\mathbf{s}(\tau ,t), \frac{\partial c}{\partial \theta }(\theta ,t), \frac{\partial c}{\partial \tau }(\tau ,t)) d\tau \nonumber \\ + S_j^*(t),\ \ 0< t_0< t\le T, \ j=1,...,m, \end{aligned}$$
(5.5)

where \(F_{s,j}\) is defined in (5.13) at the end of this section.

Similarly to \(\mathbf{s}\), the integral equations for \(\psi _i\) follow from (4.8)–(4.9) and write

$$\begin{aligned} \psi _i(t_0,t)= \int \limits _{t_0}^{t} d\theta \int \limits _{0}^{\theta } F_{\psi ,i}({{\varvec{\psi }}}(\tau ,t),\mathbf{s}(\tau ,t), \frac{\partial c}{\partial \theta }(\theta ,t), \frac{\partial c}{\partial \tau }(\tau ,t)) d\tau \nonumber \\ + \psi _i^*(t),\ \ 0< t_0< t\le T, \ i=1,...,n, \end{aligned}$$
(5.6)

where \(F_{\psi ,i}\) is defined in (5.14).

The integral equation for L follows from (2.6),(4.3),(4.4)

$$\begin{aligned} L(t_0)=\Sigma (t_0)+\int \limits _{0}^{t_0}\ d\theta \int \limits _{0}^{\theta } F_{L}(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta ), \frac{\partial c}{\partial \tau }(\tau ,\theta )) d\tau , \ 0<t_0\le T, \end{aligned}$$
(5.7)

with \(\Sigma (t_0)\) and \(F_{L}\) defined in (5.15)–(5.16).

The integral equations for \(c(t_0,t)\) and \(\partial c/\partial t_0\) can be obtained from (2.6),(4.3)–(4.5) rewritten in terms of characteristic coordinates

$$\begin{aligned} c(t_0,t)= & {} \Sigma (t_0) + \int \limits _{0}^{t_0}d\theta \int \limits _{0}^{\theta } F_{c,1}(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta ), \frac{\partial c}{\partial \tau }(\tau ,\theta )) d\tau \nonumber \\&+\int \limits _{t_0}^{t}d\theta \int \limits _{0}^{t_0} F_{c,1}(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta ), \frac{\partial c}{\partial \tau }(\tau ,\theta )) d\tau ,\ \ 0< t_0< t\le T, \end{aligned}$$
(5.8)
$$\begin{aligned} \frac{\partial c}{\partial t_0}(t_0,t)= & {} \int \limits _{t_0}^{t} F_{c,2}(\mathbf{x}(t_0,\theta ),\mathbf{s}(t_0,\theta ),{{\varvec{\psi }}}(t_0,\theta ), \frac{\partial c}{\partial t_0}(t_0,\theta )) d\theta \nonumber \\&+\sigma _{a}({{\varvec{\psi }}^*}(t_0)), \ \ 0< t_0< t\le T, \end{aligned}$$
(5.9)

where

$$\begin{aligned} F_{c,1}(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta ), \frac{\partial c}{\partial \tau }(\tau ,\theta )) =G(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta )) \frac{\partial c}{\partial \tau }(\tau ,\theta ), \end{aligned}$$
(5.10)
$$\begin{aligned} F_{c,2}(\mathbf{x}(t_0,\theta ),\mathbf{s}(t_0,\theta ),{{\varvec{\psi }}}(t_0,\theta ), \frac{\partial c}{\partial t_0}(t_0,\theta ))=G(\mathbf{x}(t_0,\theta ),\mathbf{s}(t_0,\theta ),{{\varvec{\psi }}}(t_0,\theta )) \frac{\partial c}{\partial t_0}(t_0,\theta ). \end{aligned}$$
(5.11)

The functions introduced in equations (5.4)–(5.7) are defined below

$$\begin{aligned}&F_i=\rho _i(r_{M,i}+r_i)-X_iG,\ \ i=1,...,n, \end{aligned}$$
(5.12)
$$\begin{aligned}&F_{s,j}(\mathbf{x}(\tau ,t),\mathbf{s}(\tau ,t), \frac{\partial c}{\partial \theta }(\theta ,t), \frac{\partial c}{\partial \tau }(\tau ,t)) =D_j^{-1} r_{S,j}(\mathbf{x}(\tau ,t),\mathbf{s}(\tau ,t)) \frac{\partial c}{\partial \theta }(\theta ,t) \frac{\partial c}{\partial \tau }(\tau ,t), \end{aligned}$$
(5.13)
$$\begin{aligned}&F_{\psi ,i}({{\varvec{\psi }}}(\tau ,t),\mathbf{s}(\tau ,t), \frac{\partial c}{\partial \theta }(\theta ,t), \frac{\partial c}{\partial \tau }(\tau ,t)) = D_{\psi ,i}^{-1} \ r_{\psi ,i}({{\varvec{\psi }}}(\tau ,t),\mathbf{s}(\tau ,t)) \frac{\partial c}{\partial \theta }(\theta ,t) \frac{\partial c}{\partial \tau }(\tau ,t), \end{aligned}$$
(5.14)
$$\begin{aligned}&\Sigma (t_0)=\int \limits _{0}^{t_0}\sigma _{a}({{\varvec{\psi }}^*}(\theta )) d\theta , \end{aligned}$$
(5.15)
$$\begin{aligned}&F_{L}(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta ) \frac{\partial c}{\partial \tau }(\tau ,\theta ))=G(\mathbf{x}(\tau ,\theta ),\mathbf{s}(\tau ,\theta ),{{\varvec{\psi }}}(\tau ,\theta )) \frac{\partial c}{\partial \tau }(\tau ,\theta ). \end{aligned}$$
(5.16)

An existence and uniqueness theorem for the integral problem (5.4)–(5.9) can be proved in the space of the continuous functions as generalization of the results in [16].

Theorem 1

Suppose that:

(a) \(x_{i}^{}(t_0^{},t),s_{j}^{}(t_0^{},t),\psi _{i}^{}(t_0^{},t),c(t_0^{},t),c_{t_0}^{}(t_0^{},t) \in C^0([0,\ T_1]\times [0,\ T_1])\), \(T_1>0\), \(i=1,...,n\), \(j=1,...,m\), and \(L(t_0^{})\in C^0([0,\ T_1])\);

(b) \(X_{i,0}(t_0^{}), \sigma _{a}({{\varvec{\psi }}^*}(t_0)), S_j^*(t), \psi _i^*(t) \in C^0([0,\ T_1]), \ i=1,...,n, \ j=1,...,m\);

(c) \(|x_{i}^{}-X_{i,0}|\le h_{x,i}, \ i=1,...,n\); \(|s_{j}^{}-S_j^*|\le h_{s,j}, \ j=1,...,m\); \(|\psi _{i}^{}-\psi _i^*|\le h_{\psi ,i}, \ i=1,...,n\); \(|L-\Sigma |\le h_{L}\); \(|c-\Sigma |\le h_{c,1}\); \(|c_{t_0}^{}-\sigma _a|\le h_{c,2}\), where \(h_{x,i},h_{s,j},h_{\psi ,i},h_{L},h_{c,1},h_{c,2}\) are positive constants;

(d) \(F_i, i=1,...,n\), \(F_{s,j}, j=1,...,m\), \(F_{\psi ,i}, i=1,...,n\), \(F_{L},F_{c,1},F_{c,2}\) are bounded and Lipschitz continuous with respect to their arguments

$$\begin{aligned}&M_i=\max |F_i|,\ i=1,...,n,\ M_{s,j}=\max |F_{s,j}|,\ j=1,...,m,\\&M_{\psi ,i}=\max |F_{\psi ,i}|,\ i=1,...,n,\ M_{L}=\max |F_{L}|,\ M_{c,1}=\max |F_{c,1}|, \ M_{c,2}=\max |F_{c,2}|,\\&|F_i(\mathbf{x},\mathbf{s},{{\varvec{\psi }}})-F_i(\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}})|\le \lambda _i\left[ \sum _{k=1}^{n}|x_{k}^{}-{{\tilde{x}}}_{k}^{}| +\sum _{k=1}^{m}|s_{k}^{}-{\tilde{s}}_{k}^{}|+\sum _{k=1}^{n}|\psi _{k}^{}-{\tilde{\psi }}_{k}^{}|\right] , \ i=1,...n,\\&|F_{s,j}(\mathbf{x},\mathbf{s},c_{t_0}^{})- F_{s,j}(\tilde{\mathbf{x}},\tilde{\mathbf{s}},{\tilde{c}}_{t_0}^{})| \le \lambda _{s,j}\left[ \sum _{k=1}^{n}|x_{k}^{}-{\tilde{x}}_{k}^{}| +\sum _{k=1}^{m}|s_{k}^{}-{\tilde{s}}_{k}^{}|+|c_{t_0}^{}-{\tilde{c}}_{t_0}^{}| \right] , \ j=1,...m,\\&|F_{\psi ,i}({{\varvec{\psi }}},\mathbf{s},c_{t_0}^{})- F_{\psi ,i}(\tilde{{{\varvec{\psi }}}},\tilde{\mathbf{s}},{\tilde{c}}_{t_0}^{})| \le \lambda _{\psi ,i}\left[ \sum _{k=1}^{n}|\psi _{k}^{}-{\tilde{\psi }}_{k}^{}| +\sum _{k=1}^{m}|s_{k}^{}-{\tilde{s}}_{k}^{}|+|c_{t_0}^{}-{\tilde{c}}_{t_0}^{}| \right] , \ i=1,...,n,\\&|F_{L}(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},c_{t_0}^{})- F_{L}(\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}},{\tilde{c}}_{t_0}^{})|\le \lambda _{L}\left[ \sum _{k=1}^{n}|x_{k}^{}-{\tilde{x}}_{k}^{}| +\sum _{k=1}^{m}|s_{k}^{}-{\tilde{s}}_{k}^{}|+\sum _{k=1}^{n}|\psi _{k}^{}-{\tilde{\psi }}_{k}^{}|+|c_{t_0}^{}-{\tilde{c}}_{t_0}^{}| \right] ,\\&|F_{c,1}(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},c_{t_0}^{})-F_{c,1}(\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}},{\tilde{c}}_{t_0}^{})|\le \lambda _{c,1}\left[ \sum _{k=1}^{n}|x_{k}^{}-{\tilde{x}}_{k}^{}| +\sum _{k=1}^{m}|s_{k}^{}-{\tilde{s}}_{k}^{}|+\sum _{k=1}^{n}|\psi _{k}^{}-{\tilde{\psi }}_{k}^{}|+|c_{t_0}^{}-{\tilde{c}}_{t_0}^{}| \right] ,\\&|F_{c,2}(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},c_{t_0}^{})-F_{c,2}(\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}},{\tilde{c}}_{t_0}^{})|\le \lambda _{c,2}\left[ \sum _{k=1}^{n}|x_{k}^{}-{\tilde{x}}_{k}^{}| +\sum _{k=1}^{m}|s_{k}^{}-{\tilde{s}}_{k}^{}|+\sum _{k=1}^{n}|\psi _{k}^{}-{\tilde{\psi }}_{k}^{}|+|c_{t_0}^{}-{\tilde{c}}_{t_0}^{}| \right] , \end{aligned}$$

when \((t_0^{},t)\in [0,\ T_1]\times [0,\ T_1]\) and the functions \(x_{i}^{}\), \(s_{j}^{}\), \(\psi _{i}^{}\), L, c, \(c_{t_0}^{}\) satisfy the assumptions (a)-(c).

Then, integral system (5.4)–(5.9) has a unique solution \(x_{i}^{}\), \(s_{j}^{}\), \(\psi _{i}^{}\), L, c, \(c_{t_0}^{}\), \(\in C^0([0,\ T]\times [0,\ T])\), where

$$\begin{aligned} T=\min \left\{ T_1,\frac{h_{x,1}}{M_1},...,\frac{h_{x,n}}{M_n}, \sqrt{\frac{h_{s,1}}{M_{s,1}}},...,\sqrt{\frac{h_{s,m}}{M_{s,m}}}, \sqrt{\frac{h_{\psi ,1}}{M_{\psi ,1}}},...,\sqrt{\frac{h_{\psi ,n}}{M_{\psi ,n}}}, \sqrt{\frac{h_{L}}{M_{L}}}, \sqrt{\frac{h_{c,1}}{2M_{c,1}}}, \frac{h_{c,2}}{M_{c,2}} \right\} . \end{aligned}$$

Moreover, T satisfies the following condition,

$$\begin{aligned} aT^2+bT<1, \end{aligned}$$
(5.17)

where

$$\begin{aligned} a=\sum _{j=1}^{m}\lambda _{s,j}+\sum _{i=1}^{n}\lambda _{\psi ,i}+\lambda _{L}+2\lambda _{c,1},\ b=\sum _{i=1}^{n}\lambda _{i}+\lambda _{c,2}. \end{aligned}$$
(5.18)

Proof

Denote by \(\Omega \) the space of continuous functions \(x_{i}(t_0^{},t)\), \(s_{j}(t_0^{},t)\), \(\psi _{i}(t_0^{},t)\), \(L(t_0^{})\), \(c(t_0^{},t)\), \(c_{t_0}^{}(t_0^{},t)\), \(t_0^{}\in [0,\ T]\), \(t\in [0,\ T]\), and endow it with the uniform norm

$$\begin{aligned} ||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L,c,c_{t_0}^{})||=\sum _{i=1}^{n}\max _{\Omega }|x_i^{}| +\sum _{j=1}^{m}\max _{\Omega }|s_j^{}|+\sum _{i=1}^{n}\max _{\Omega }|\psi _i^{}| +\max _{\Omega }|L|+ \max _{\Omega }|c|+\max _{\Omega }|c_{t_0}^{}|. \end{aligned}$$

Consider the map \((\mathbf{x}^*,\mathbf{s}^*,{\varvec{\underline{\psi }}^*},L^{*},c^{*},c_{t_0}^{*})=A(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L,c,c_{t_0}^{})\), where \((\mathbf{x}^*,\mathbf{s}^*,{\varvec{\underline{\psi }}^*},L^{*},c^{*},c_{t_0}^{*})=\) RHS of equations (5.4)–(5.9). Let us prove that A maps \(\Omega \) into itself. Indeed,

$$\begin{aligned} |x_{i}^*-X_{i,0}|\le M_iT\le h_{x,i},\ \ i=1,...,n,\\ |s_{j}^*-S_{j}^*|\le M_{s,j}T^2\le h_{s,j}, \ \ |{\underline{\psi }}_{i}^*-\psi _i^*|\le M_{\psi ,i}T^2\le h_{\psi ,i},\ \ \ i=1,...,n, \ j=1,...,m,\\ |L^*-\Sigma |\le M_{L}T^2\le h_{L}, \ |c^{*}-\Sigma |\le 2M_{c,1}T^2 \le h_{c,1}, \ |c_{t_0}^{*}-\sigma _a|\le M_{c,2}T\le h_{c,2}. \end{aligned}$$

Consider \((\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})\in \Omega \) and let \((\tilde{\mathbf{x}}^*,\tilde{\mathbf{s}}^*, \tilde{{{\varvec{\psi }}}}^*, {\tilde{L}}^*, {\tilde{c}}^*, {\tilde{c}}_{t_0}^{*}) =A(\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}},{\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})\). It is possible to obtain

$$\begin{aligned} |x_{i}^{*}-{\tilde{x}}_{i}^{*}|\le \lambda _i T ||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||,\ i=1,...,n,\\ |s_{j}^{*}-{\tilde{s}}_{j}^{*}|\le \lambda _{s,j}T^2||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||, \ j=1,...,m,\\ |{\underline{\psi }}_{i}^{*}-{\tilde{\psi }}_{i}^{*}|\le \lambda _{\psi ,i}T^2||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||, \ i=1,...,n,\\ |L^{*}-{\tilde{L}}^{*}|\le \lambda _{L}T^2||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||,\\ |c^{*}-{\tilde{c}}^{*}|\le 2\lambda _{c,1}T^2||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||,\\ |c_{t_0}^{*}-{\tilde{c}}_{t_0}^{*}|\le \lambda _{c,2}T||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||. \end{aligned}$$

Therefore,

$$\begin{aligned} ||(\mathbf{x}^{*},\mathbf{s}^{*}, {\varvec{\underline{\psi }}^*}, L^{*}, c^{*}, c_{t_0}^{*})- (\tilde{\mathbf{x}}^{*},\tilde{\mathbf{s}}^{*}, \tilde{{{\varvec{\psi }}}}^*, {\tilde{L}}^{*}, {\tilde{c}}^{*}, {\tilde{c}}_{t_0}^{*})|| \le \Lambda ||(\mathbf{x},\mathbf{s},{{\varvec{\psi }}},L, c, c_{t_0}^{})- (\tilde{\mathbf{x}},\tilde{\mathbf{s}},\tilde{{{\varvec{\psi }}}}, {\tilde{L}}, {\tilde{c}}, {\tilde{c}}_{t_0}^{})||, \end{aligned}$$

where

$$\begin{aligned} \Lambda =aT^2+bT. \end{aligned}$$

According to (5.17) \(\Lambda <1\), proving Theorem 1. \(\square \)

6 Numerical experiments

Numerical simulations have been performed to test the behavior of the model formulated in Sect. 4. Specifically, we have considered the same biofilm system of Sect. 3 composed of 3 microbial species and 3 dissolved substrates. The planktonic species present in the bulk liquid are able to initiate the biofilm formation through the attachment process, penetrate the biofilm matrix once constituted and establish where the most appropriate growth conditions are found. We have explored two ideal biological situations. In the first case, the species \(\psi _3^*\) is not initially present in the bulk liquid, but it arrives at time \(t=t_1\) and starts to attach to the external surface of the biofilm as well as penetrate the biofilm matrix. In the second case, the species \(\psi _3^*\) is not able to attach to the biofilm surface (\(v_{a,3}=0\)), but it can establish in sessile form through the colonization process. These biological situations will be referred to as Case 2 and Case 3.

The reaction terms \(r_{M,i}\) and \(r_{S,j}\) in equations (4.1) and (4.6) have been adopted according to (3.10) and (3.11). The values for \(\Psi _i\) on the free boundary have been set according to (3.6) and (3.7). The values for \(S_j\) on the free boundary are reported in Table 1. The reaction terms concerning the colonization process in equations (4.1) and (4.8) are modeled using Monod type kinetics and are expressed as

$$\begin{aligned} r_1= & {} \frac{k_{col,1}}{\rho } \frac{S_1}{K_1+S_1} \Psi _1, \ r_2 = \frac{k_{col,2}}{\rho } \frac{S_2}{K_2+S_2} \Psi _2, \ r_3 = \frac{k_{col,3}}{\rho } \frac{S_3}{K_3+S_3} \Psi _3, \end{aligned}$$
(6.1)
$$\begin{aligned}&r_{\Psi ,1} = - \frac{\rho }{Y_{\Psi ,1}} r_1,\ r_{\Psi ,2} = - \frac{\rho }{Y_{\Psi ,2}} r_2,\ r_{\Psi ,3} = - \frac{\rho }{Y_{\Psi ,3}} r_3, \end{aligned}$$
(6.2)

where \(k_{col,1}\), \(k_{col,2}\) and \(k_{col,3}\) are the maximum colonization rates of motile species and \(Y_{\Psi ,1}\), \(Y_{\Psi ,2}\) and \(Y_{\Psi ,3}\) are the yields of the sessile species on planktonic ones. The values of such kinetic parameters and the diffusion coefficients for \(\Psi _i\) are reported in Table 2. Note that for these ideal biological situations, all the species are supposed to have colonization properties.

Table 2 Invasion parameters used for model simulations

Numerical simulations have been performed for Case 2 and Case 3 by considering a final simulation time \(T=10 \ d\). The results are summarized in Figs. 67 for Case 2 and in Figs. 89 for Case 3.

Case 2: Attachment and colonization of microbial species \(\psi _3^*\)

Fig. 6
figure 6

Biofilm composition (A1–A2) and substrate distribution (B1–B2) for Case 2, under attachment regime, at time \(t=0.25 \ d\) (top) and \(t=0.50 \ d\) (bottom)

Fig. 7
figure 7

Biofilm composition (A1–A2) and substrate distribution (B1–B2) for Case 2, under detachment regime, at time \(t=1 \ d\) (top) and \(t=10 \ d\) (bottom)

The results reported in Figs. 6 and 7 highlight model capability to reproduce both the attachment and colonization phenomena that strongly affect biofilm lifecycle. In particular, it is possible to notice that during the initial phase of biofilm formation, the biofilm undergoes the same development illustrated in Sect. 3 and reported in Fig. 4. However, at time \(t=0.50 \ d\) it is visible that the volume fraction of the third species \(f_3\) is slightly positive even in the region \(z< c(t_1,t)\) due to the colonization phenomenon (Fig. 6(A2)). Going on with the simulation time, \(f_3\) increases all over the biofilm leading to a higher biofilm thickness at time \(t=1 \ d\) (Fig. 7(A1)). At the final simulation time \(t=10 \ d\) and under detachment regime, the biofilm is constituted by all the species inhabiting the bulk liquid (Fig. 7(A2)) conversely to the numerical results reported in Sect. 3 where the complete washout of species \(f_3\) has been observed. The different biofilm stratification affects substrate trends as it is possible to notice that at the final simulation time, \(S_3\) concentration is much lower when compared to the numerical example of pure attachment regime.

Case 3: Pure colonization of microbial species \(\psi _3^*\)

Fig. 8
figure 8

Biofilm composition (A1–A2) and substrate distribution (B1–B2) for Case 3, under attachment regime, at time \(t=0.25 \ d\) (top) and \(t=0.50 \ d\) (bottom)

Fig. 9
figure 9

Biofilm composition (A1–A2) and substrate distribution (B1–B2) for Case 3, under detachment regime, at time \(t=1 \ d\) (top) and \(t=10 \ d\) (bottom)

Figures 8 and 9 illustrate the biofilm development and substrate trends when the species \(\psi _3^*\) is not able to attach to the biofilm surface, but it can penetrate the biofilm matrix and establish in sessile form. According to Figs. 89, numerical results reveal that for all simulation times the biofilm thickness is smaller compared to the pure attachment case. This contributes to have different substrate trends within the biofilm (Figs. 89(B1–B2)). In terms of biomass distribution, it is possible to notice that the third species grow in sessile form in the inner layers of the biofilm where there is the highest \(S_3\) concentration. The biomass stratification and substrate trends at the final simulation time resemble the one achieved for Case 2. Such results highlight an important feature of the model: the attachment and colonization phenomena are both dependent on the planktonic cells present in the bulk liquid. They can occur simultaneously reproducing the case of planktonic cells able to attach to the surface and penetrate the biofilm matrix. Conversely, the planktonic cells can be characterized by a certain motility which drives them to the biofilm region where there are the most appropriate conditions for their growth.

7 Conclusion

The proposed model comprehensively describes the transition from planktonic to sessile phenotype which governs the biofilm dynamics. This allows to properly reproduce the evolution of biofilms starting from the initial formation and including the establishment and growth of new species. The criticism of Wanner-Gujer-type models, discussed in [17], is here emphasized through a numerical example. Such models are not able to properly describe the growth of microbial species which do not participate in the initial biofilm formation attaching later to a pre-existing aggregate. The presented model is able to overcome this issue as it considers both the initial attachment phase and the growth of new sessile species within the biofilm mediated by the invasion process. The modeling of the initial phase of biofilm formation allows to describe the biofilm growth without arbitrarily fixing the initial composition of the biofilm. The existence and uniqueness of solutions is proved in the case of attachment regime. Numerical examples are provided to show model capability to reproduce the different stages of biofilm growth as affected by the planktonic phenotype. Future work may be related to the role of biofilm porosity on planktonic species diffusion and the qualitative analysis in the case of a spherical free boundary domain.