1 Introduction

Although Biofilm could be simply described as the aggregation of microorganisms, for example bacteria, on a surface, its formation and evolution is quite complex due to the fact that several physical phenomena account for that. Indeed, bacteria tend to grow in clustered populations instead of individually wandering because this type of living make them more resistant to environmental and external threats. They anchor themselves to a solid surface where sufficient nutrient is available to feed them. An internally secreted matrix called extra polymeric substance (EPS) keep them together and forms a spatially heterogeneous solid like material.

Biofilms may be either beneficial or detrimental to human’s life. In some industrial applications, for example water treatment units, one can take the advantage of biofilms whereas in medical application they are considered to be infectious and harmful. In this research , the focus is on the formation of biofilms on the surface of teeth as well as dental implants. In fact biofilm formation in the mouth cavity significantly contributes to later dental plaque emergence. Aside from their role in human’s life, a great deal of attention has been drawn especially over the last three decades to simulate their formation in order to predict and finally control their behavior.

Early attempts to mathematically model the biofilms date back to 1980s, see [1, 2]. Here it was tried to develop a one dimensional system of partial differential equation describing biofilm growth. Since then, a variety of methods have been proposed to model two and three dimensional biofilm, all of which fall into either continuum-based [37] or Hybrid discrete-continuous models that are known as individual-based methods (IBM) [810]. There are also some cellular automaton (CA) models which are conceptually more or less similar to IBM in this sense that the overall behavior and spatial structure of biofilm comes out of biological interactions taking place at the individual level between discrete agents [1113]. In spite of being simple, such agent based models are capable of reproducing quite complex morphologies such as finger like and fractal shape of biofilm in case that biofilm growth is governed by diffusion-limited aggregation (DLA) model in which the nutrient diffusion is the dominant process [14].

It might be noteworthy to mention that agent based methods are more appealing to biologist because of their inherent simplicity and their capacity to incorporate new local ad hoc rules being inspired from biology such as bacterial binary division, attachment and detachment of bacteria. Furthermore, handling multi species biofilm is not a big deal by defining local interactions between different agents [15]. Nevertheless drawbacks of these methods are introduced stochastic effects and geometrical anisotropy which make the results less physical. So many parameters challenge predictiveness of the model. Non-trivial error estimation and more aesthetically driven results oppose mathematical and physical based predictions [16].

To discuss concisely what has been done with regard to biofilm simulation in the literature, the physics behind the process needs to be deeply understood. Biofilm models are based on three principal concepts. First transport mechanisms (diffusion–advection) which bring nutrients to biofilms, second biological consumption and consequently growth mechanisms which directly contribute to biofilm structural form and third biofilm-fluid interface related mechanisms that account for the effect of a surrounding fluid on biofilms in terms of surface erosion (detachment) or the attachment of planktonic bacteria.

The first mechanism has been well developed in a continuum-based frame work in all existing above mentioned references.

The second mechanism is exactly the point where two different approaches, i.e Individual-based and continuum based methods, branch. The main idea of agent-based methods for growth is that discrete elements mimicking bacteria grow and afterward a contact model handles the overlap between agents and results in overall expansion of the system which is called shoving mechanism. The most recent open source simulator for biofilms is called iDynoMiCS (Individual based Dynamics of Microbial communities Simulator) developed in Java Language [17]. When it comes to a continuum framework for biofilm growth, almost all researcher assume the biofilm to behave like a viscous fluid with a mass source term [1820]. This assumption is favourable although the biofilm is apparently a solid-like material. The fact is that the characteristic time scale of biofilm growth is so larger than its relaxation time scale. Hence in practice no residual stresses remains inside the biofilm and it is fully relaxed like a viscous fluid [21]. It should be noted that the residual stresses are generally an inevitable resultant of biological soft tissues growth when they are assumed to behave like a viscoelastic solid. This has been extensively studied by researchers in a robust continuum framework [2226].

The third and the least understood mechanism is the one occurring at the interface of fluid and biofilm [27]. The fluid flow exerts forces to the biofilm and erodes or sloughs it which change its architecture significantly. This process is of great importance since it contributes to biofilm development in an opposite way in comparison to biological growth. Thus it results in material removal and in some cases a final balance between detachment and growth process is reached which keeps the overall biofilm architecture more or less constant [28]. Although the induced stresses and deformation and even triggered small vibrations in biofilm are not an important factor in its shape, it is necessary to do a stress analysis embedded in a fluid-structure interaction (FSI) analysis in order to correctly capture failure and detachment process in biofilms [29, 30]. Furthermore, the effect of detached material forming streamers and also its oscillation characteristics, has been taken into account by some authors [32, 33]. In general, the biofilm response to external forces has been modeled using FEM in conjunction with a fluid flow solver [31]. However some researchers preferred to use particle based methods such as discrete breakable spring-damper elements to simulate biofilm interaction with the fluid flow [34] and also dissipative particle hydrodynamics (DPD) as a Lagrangian stochastic approach [35]. Besides these approaches some models are relied on empirical or semi analytical detachment description inspired from a 1D biofilm model in which the detachment rate is propositional to \(h^2\) where h is the local biofilm thickness. Of course this method introduce some unknown parameters that need to be identified for each problem [36]. It is noteworthy that in iDynoMiCS, the fluid flow is not resolved and a constant boundary layer for nutrient diffusion in fluid along with such detachment functions has been implemented, instead [17].

Regardless of the method, the presence of moving boundaries in biofilm-fluid interface and how to handle it is a complex task-especially in 3D- in grid based schemes and needs to be dealt with in an accurate and efficient way. In [37] this issue has been addressed using level set methods in the extended finite element framework (XFEM).

The aim of this paper is to develop and present a unified computational approach for biofilm formation modeling based fully on the SPH method. SPH was firstly introduced in [38] and [39] for astrophysical application and nowadays has been applied to simulate several physical processes such as diffusion–advection [4042], fluid flow [43, 44], hydraulic terrain erosion [45], reactive transport and precipitation [46], solid deformation [47, 48] and FSI analysis [50]. Although most of these process are conceptually involved in biofilm formation, to the best of author’s literature surveying, this work is the first one in which biofilm formation as a multi-physics phenomenon has been modeled using a fully SPH based method. Furthermore, a novel SPH expression for biological growth inspired by astrophysical gravitational wind accertion [51] was developed based on soft tissue growth mechanics [52]. Considering the superiority of SPH in terms of handling the before-mentioned issues due to its meshless Lagrangian adaptive nature and also its attractive capacity for parallel computation, a computational FORTRAN code in SPH framework was developed by the author from scratch. Furthermore, parallelized computation was realized using OpenMP to benefit from multi-thread execution.

Fig. 1
figure 1

Schematics of experimental set up and subdomains of RVE

2 Mathematical framework and model description

2.1 Spatial domain and geometry

In this study, The predictions based on the developed SPH method fro biofilm growth will be validated by experimental results. The main part of experimental set-up conducted by colleagues of the medical school is a flow chamber which is fed with a peristaltic pump. At the center of it, there is titan plate where the biofilm can form. The size of the titan plate is \(12\times 12\,\mathrm{{mm}}\). See Fig. 1. Due to computational costs of resolving the full macro scale, the simulation is limited to several hundred microns in each spatial direction which could be considered as a representative volume element (RVE) at micro-scale. In practice, the modeled domain is expected to be equal to the zooming in Fig. 1 area where the experimental data are gathered using scanning electron microscopy (SEM). The spatial whole domain in the RVE is divided into two subdomains (compartments) i.e the fluid compartment \({\varOmega }_F\) and biofilm compartment \({\varOmega }_B\). The interface between these two \({\varGamma }_{FB}\) is the surface where the field variables are coupled. Unknown field variables in \({\varOmega }_F\) are velocity and nutrient concentration and in \({\varOmega }_B\) are the geometrical profile due to growth phenomena and nutrient concentration.

An order of magnitude argument has been made related to the different time scales associated with processes occurring in biofilm formation [30, 53]. This leads to the assumption that all fast process (smaller time scales) such as fluid flow and nutrient diffusion reach their steady state(temporally homogenized) value when a slower process (large time scale) such as biofilm growth is taking place. In fact it is the main idea of temporal homogenization [54] and consequently different process could by solved efficiently in a staggered nested manner.

2.2 SPH discretization

In SPH an arbitrary function f is expressed as an integral interpolation

$$\begin{aligned} f(\mathbf {r})=\int f({\mathbf {r}}')W(\mathbf {r}-{\mathbf {r}}')d{\mathbf {r}}' \end{aligned}$$
(1)

The integral reproduces f exactly if W is delta function. In SPH, W is called kernel function mimicking the delta function; it has a maximum value at point \({\mathbf {r}}'\) and gradually goes to zero within a compact support. In this work, a cubic spline [55] kernel was chosen. The discrete notation of the above integral leads to the following expression which is the starting point of all SPH based methods:

$$\begin{aligned} f(\mathbf {r_a})=\sum _{b}\frac{m_b}{\rho _b}f(\mathbf {r_b})W(\mathbf {r_b}-\mathbf {r_a},h) \end{aligned}$$
(2)

\(m_b\) and \(\rho _b\) represent the mass and density at point b. h is the kernel support length which determines the maximum neighborhood radius. Consequently it describes if two particles interact with each other or not. In general h must be slightly larger but in the order of particle average distance [57] for convergence purposes. In this work it is taken to be 1.5 times the average particle distance (\(h=1.5\Delta \)).

It must be noted that in equation (2) the \(\frac{m_b}{\rho _b}\) replaced \(d{\mathbf {r}}'\) in the integral which is nothing else that volume element. In fact the value of f at point a is estimated using the values of its neighborhood. Differentiating the equation (2) with respect to r provides an estimation for the derivative of f

$$\begin{aligned} \nabla f(\mathbf {r_a})=\sum _{b}\frac{m_b}{\rho _b}f(\mathbf {r_b})\nabla W(\mathbf {r_b}-\mathbf {r_a},h) \end{aligned}$$
(3)

For the second derivative of f, instead of twice differentiating the integral interpolant a much better approach was proposed by [38]

$$\begin{aligned}&\nabla ^{2} f(\mathbf {r_a})\nonumber \\&\quad = \sum _{b}2\frac{m_b}{\rho _b}(f(\mathbf {r_b})-f(\mathbf {r_a}))\frac{(\mathbf {r_b}-\mathbf {r_a}).\nabla W(\mathbf {r_b}-\mathbf {r_a},h)}{|\mathbf {r_b}-\mathbf {r_a}|^2+\epsilon } \end{aligned}$$
(4)

in which \( \epsilon \) is a small parameter to avoid singularity. Considering that the maximum order of derivative in most physical phenomenon is two, higher order derivatives are not required in practice.

2.2.1 Symmetrization of discretized mathematical operators in SPH

In its discretized form, Eq. (3) looses even the zeroth order consistency especially near the boundaries. This situation is worse if the distribution of the particles is irregular. It means that the Eq. (3) can not properly reproduce the derivative of a constant field, which must be equal to zero. Furthermore, the equation is not symmetric. This is important from the physical point of view. The SPH discretized equation are translated finally into inter-particle interactions. If it is intended to model a system of particles, any interaction between two particle must not violate the third law of Newton. otherwise, the total angular or linear momentum is not conserved, see [57]. In order to make the derivative operator symmetrized and exactly zero order consistent, one can use a differentiable test function \(\phi \) in constructing the first derivative of the function f. Starting with the identity

$$\begin{aligned} \nabla f=\frac{1}{\phi }(\nabla (\phi f)-f\nabla \phi ) \end{aligned}$$
(5)

If now the Eq. (3) is applied to the both terms of the right hand side of Eq. (5), one can obtain

$$\begin{aligned} \nabla f(\mathbf {r_a})=\frac{1}{\phi _a}\sum _{b}\frac{m_b}{\rho _b}\phi _b(f(\mathbf {r_b})-f(\mathbf {r_a}))\nabla _a W(\mathbf {r_b}-\mathbf {r_a},h) \end{aligned}$$
(6)

The Eq. (6) vanishes if f is a constant function. Choosing \(\phi =1\) gives

$$\begin{aligned} \nabla f(\mathbf {r_a})=\sum _{b}\frac{m_b}{\rho _b}(f(\mathbf {r_b})-f(\mathbf {r_a}))\nabla _a W(\mathbf {r_b}-\mathbf {r_a},h) \end{aligned}$$
(7)

The Eq. (7) is the practical and final version of the first derivative which is symmetric and exactly zero order consistent. It is obvious that in this equation, the effect of particle a on b is the same as that of b on a but in opposite direction. Comparing Eqs. (7) and (3) one can notice that they are slightly different. In fact, the Eq. (7) has an extra term (\(\sum _{b}m_b f(r_a) \nabla W_{ba}\)) which is identical to zero in continuum, provided that the support of kernel is complete. Assuming a single phase material with negligible density fluctuation, the extra term can be approximated as follows

$$\begin{aligned} f(r_a)\rho _a \sum _{b}\frac{m_b}{\rho _a}\nabla W_{ba} \approx f(r_a)\rho _a \sum _{b}\frac{m_b}{\rho _b}\nabla W_{ba} \end{aligned}$$
(8)

where \(W_{ba}:=\nabla W(\mathbf {r_b}-\mathbf {r_a},h)\). It is obvious that the summation in right hand side of Eq. (8) is zero. It is in fact the discretized form of kernel gradient integral over the kernel support. It is zero if the support is complete (far from the boundaries), see [48]. In the Sects. (2.3.1) and (2.3.4) the Eq. (7) is applied to discretize the continuity equation in which \(f:=v\).

Assuming \(\phi =\frac{1}{\rho }\), one can find

$$\begin{aligned} \frac{\nabla f(\mathbf {r_a})}{\rho _a}=\sum _{b}m_b \left( \frac{f(\mathbf {r_b})}{\rho _b^2}+\frac{f(\mathbf {r_a})}{\rho _a^2}\right) \nabla _a W(\mathbf {r_b}-\mathbf {r_a},h) \end{aligned}$$
(9)

This equation is utilized in Sect. (2.3.2) for discretization of momentum equation in which the aim is to discretize the expression \(\frac{\nabla . \sigma }{\rho }\).

2.3 Governing equations

2.3.1 Mass balance (continuity)

Recalling from continuum mechanics, the local form of the mass balance equation of a regular body not undergoing growth is

$$\begin{aligned} \frac{\partial \rho }{\partial t}+\nabla .(\rho v)=0 \end{aligned}$$
(10)

where \(\rho \) and v are the density and the velocity field, respectively. When it comes to a biological body which may experience growth, the mass balance equation needs to be modified and indeed the right hand side of equation (10) is replaced by a source term \(\gamma \) accounting for mass generation due to growth [21]. \(\gamma \) could be in general a function of other field variables. Here it is assumed that \(\gamma \) is only a function of the nutrient concentration according to Monod kinematic [1].

$$\begin{aligned} \gamma =Y \frac{K_1 C}{K_2+C} \end{aligned}$$
(11)

where Y is the true yield of bacterial mass per unit of nutrient consumption, \(K_1\) and \(K_2\) are biological constants related to the type of bacteria species and C is the concentration of nutrient. In general adding a scalar source term into continuity equation is not sufficient to capture inhomogeneous growth which generally results in residual stresses and it is required to start from a multiplicative decomposition of deformation in a tensorial sense. But here, due to the fact, that the focus is on time periods whose order of magnitude is larger than biological growth time scale, the biofilm behaves like a viscous fluid and all internal stresses are released [21, 22] and hence the scalar source term in the continuity equation is sufficient.

Taking the source term into account and applying the Eq. (7), SPH discretization of mass balance equation follows

$$\begin{aligned} \frac{\partial \rho _a}{\partial t}=\sum _{b}m_b(\mathbf {v_a}-\mathbf {v_b}).\nabla W(\mathbf {r_a}-\mathbf {r_b},h)+\gamma _a \end{aligned}$$
(12)

In this study, another version of continuity equation which is equivalent to Eq. (12) has been implemented [48], for the growth process. It will be discussed in Sect. (2.4).

$$\begin{aligned} \rho _a=\sum _{b}m_b W(\mathbf {r_a}-\mathbf {r_b},h) \end{aligned}$$
(13)

Both Eqs., (12) and (13) are equivalent and theoretically gives identical results except at boundaries. It can be shown that the Eq. (12) is the rate form of Eq. (13). Taking derivative from Eq. (13) with respect to time and using the chain rule (\(\frac{\mathrm {d} }{\mathrm {d} t}=\frac{\mathrm {d} }{\mathrm {d} x_b}.\frac{\mathrm {d} x_b}{\mathrm {d} t}\)) in the right hand side, the Eq. (13) is achieved. Recalling the Sect. (2.2.1) it should be noted that a zero term needs to be added to the right hand side in order to have zeroth order consistency and symmetric discretized gradient operator. For further, detail the interested readers may refer to [48].

2.3.2 Momentum balance

In general, every mass source stemming from growth phenomena is an inherent momentum source as well. This makes both the linear and angular momentum equation complicated. In such cases the Cauchy stress tensor is not symmetric anymore owing to a source term in the angular momentum equation. However, under certain assumptions these effects could be neglected and introducing the growth effect in the continuity equation suffices. The fundamental assumption is that the momentum of the newly deposited material is equal to that of the existing material and this is the case for biological slow growth [56] and hence the linear momentum equation has the regular and well-known structure.

$$\begin{aligned} \rho \dot{v}=\nabla .\sigma +\rho b \end{aligned}$$
(14)

in which \(\sigma \) and b are the Cauchy stress and body force, respectively. The angular momentum leads to symmetricity of Cauchy stress. Using equation (9) SPH approximation of equation (25) is obtained, see [48], as

$$\begin{aligned} \frac{\mathrm {D}v_{a}^{\alpha }}{\mathrm {D} t} = -\sum _{b} m_{j}\left( \frac{\sigma _{a}^{\alpha \beta }}{{\rho _{a}}^{2}}+\frac{\sigma _{b}^{\alpha \beta }}{{\rho _{b}}^{2}}\right) W_{ab,\beta } \end{aligned}$$
(15)

where \(W_{ab,\beta }\) is an abbreviation for \(W_{ab,\beta }=\frac{\partial W_{ba}}{\partial x_{a}^{\beta }}\).

2.3.3 Diffusion–advection-reaction

In the biofilm domain (\({\varOmega }_{b}\) the nutrient concentration C is an unknown field variable and is computed using diffusion–advection-reaction equation (Eq. 20).

$$\begin{aligned} \frac{\partial C}{\partial t}+\nabla Cv= D \nabla ^{2} C-\frac{\gamma }{Y} \end{aligned}$$
(16)

where D is the diffusivity coefficient and \(\frac{\gamma }{Y}\) is the consumption term expressed in Eq. 11. Since the SPH is based on a Lagrangian description, in the discretized form the advection term(\(\nabla C.v\)) does not exist explicitly.

$$\begin{aligned} \frac{\mathrm {D}C_{a}}{\mathrm {D}t}= & {} \sum _{b}2D\frac{m_b}{\rho _b}(C_{b}-C_{a})\frac{(\mathbf {r_b}-\mathbf {r_a}).\nabla W(\mathbf {r_b}-\mathbf {r_a},h)}{|\mathbf {r_b}-\mathbf {r_a}|^2+\epsilon } \nonumber \\&+\,\frac{\gamma _{a}}{Y}. \end{aligned}$$
(17)

2.3.4 Constitutive equations

Fluid flow

It is common that the stress tensor can be decomposed into isotropic(pressure) P and deviatoric S parts according to the following equation

$$\begin{aligned} \sigma _{ij}=-P\delta _{ij}+S_{ij} \end{aligned}$$
(18)

where \(\delta _{ij}\) is the Kronecker tensor. Assuming a Newtonian fluid, the deviatoric stress is proportional to the deviatoric strain rate.

$$\begin{aligned} S_{ij}=2\mu _f \epsilon _{ij} \end{aligned}$$
(19)

where \(\mu _f\) is the fluid dynamic viscosity and

$$\begin{aligned} \epsilon _{ij}=\frac{1}{2}\left( \frac{\partial v_i}{\partial x_j}+\frac{\partial v_j}{\partial x_i}\right) -\frac{1}{3}\frac{\partial v_k}{\partial x_k}\delta _{ij} \end{aligned}$$
(20)

in which Einstein’s summation rule has been applied for index k and v is the velocity field.

Elastic solid

As mentioned before, biofilm behaves like a fluid in the growth process, but in short time scales it acts like a solid [34]. In other words, it is necessary to model biofilm as a deformable solid if its interaction with the surrounding fluid is considered. Due to the nature of SPH, it is more convenient to use hypo-elastic approach instead of hyper-elastic one when dealing with deformable solid. In this approach rate constitutive equations are used to reflect the material behavior. Such constitutive laws are similar to Eqs. (18)–(20) with the modification that the stress rate is proportional to the strain rate and \(\mu _f\) is replaced by \(\mu _s\) representing the shear modulus of the solid. The important point is that the stress rate must be objective to fulfill frame indifference. The Jaumann rate is the most widely adopted [47, 48]

$$\begin{aligned} \dot{S_{ij}}-S_{ik}\omega _{jk}-\omega _{ik}S_{kj}=2\mu _s \epsilon _{ij} \end{aligned}$$
(21)

recalling Einstein summation notation and material time derivative \(\dot{()}\), the whole left hand side is indeed the Jaumann stress rate and the tensor \(\omega _{ij}\) is called spin tensor and it is calculated

$$\begin{aligned} \omega _{ij}=\frac{1}{2}\left( \frac{\partial v_i}{\partial x_j}-\frac{\partial v_j}{\partial x_i}\right) \end{aligned}$$
(22)

All equations are finally translated into the first derivative of the velocity field and hence can be calculated using an SPH approximation according to Eq. (7).

Remark

The application of such rate constitutive equations while assuming spatially constant coefficient, is quite questionable and in fact incompatible with elasticity when large deformation and especially severe volume change takes place [49]. Nevertheless, in this paper with the assumption of moderate deformations, this effect has been neglected.

Equation of state

In the standard SPH which is also called weakly compressible SPH (WCSPH) the pressure is computed from the density using a thermodynamically consistent equation of state. Such approach enjoys the benefit of decoupled pressure and velocity field but suffers from a small time step that is conversely propositional to the sound velocity in the material due to the CFL (Courant, Friedrichs and Levy 1928) stability condition. Here the following equation for the pressure is used

$$\begin{aligned} P=\frac{c_0^2 \rho _0}{\gamma }\left( \left( \frac{\rho }{\rho _0}\right) ^\gamma -1\right) \end{aligned}$$
(23)

where \(c_s\) and \(\rho _0\) are sound velocity and rest density of the bulk material. The parameter \(\gamma \) is set to be “7” for the fluid and and “1” the solid. It should be emphasized that the value of \(c_0\) for the fluid is in fact a penalty parameter rather than a true physical sound speed and hence it can be selected in a way that is large enough to insure density fluctuation less than 0.01 and keep the Mach number less than 0.1, and small enough to avoid unnecessary small time steps [57]. In practice, if \(c_0\) is taken at least 10 times the maximum velocity, it is sufficient [60]. Nevertheless, for the solid it is a real material constant related to the bulk modulus(K) and density(\(\rho \)) according to

$$\begin{aligned} c_0=\sqrt{\frac{K}{\rho }} \end{aligned}$$
(24)

Since here SPH is applied to solid deformation using rate-based constitutive equation, this is in the spirit equivalent to the method of explicit dynamic relaxation in finite element (FE) discretizations. In terms of computational cost using SPH for FSI problems is justified if the elastic modulus of the solid is in the order as the assumed fluid bulk modulus . It means that applying SPH to FSI problems is computationally efficient if the characterized time scale of fluid and solid are of the same order, otherwise use of SPH is not recommended because a much smaller time step is associated with the stiff solid and hence rules the whole process. In this paper, fortunately the biofilm is a soft material with elastic modulus in the order of several Pa and Poisson ratio not close to 0.5 [31].

Remark

In case of fully incompressible solid (for example rubber like materials) whose Poisson ratio approaches the limit 0.5, the bulk modulus tends to infinity and using this approach is unjustifiable. but some authors have shown that an artificial decrease in bulk modulus (or Poisson ratio) would be a remedy for this issue while not affecting the results that much [50]. In this case, the material is allowed to behave nearly incompressible.

2.4 Growth modeling

It was found by the authors that the Eq. (13) is much more suitable for the growth process rather than Eq. (12). In this paper the growth process is handled incrementally. At the beginning of each increment, the new mass is instantaneously generated according to Eq. (11) once the diffusion-reaction equation is solved. It should be clarified that the new mass is added to the existing particles and no new particle is generated. This results in a density increase and consequently a pressure field according to Eqs. (13) and (23). Then the expansion process (growth) starts and the relaxation of accumulated density takes place . As a result, the biofilm expands and this expansion in particle distribution is reflected in more relative distances between the particles and that is exactly the spirit of Eq. (13) which is explicitly a function of particle distribution rather than particle velocity. This is the reason why Eq. (13) has been adopted.

Three important remarks about the growth process need to be clarified. First, the growth process is governed by mass and momentum balance equation in each increment. The only point is that it is driven by internal local density accumulation rather than external forces. Second, the internal energy associated to the initial density accumulation at the beginning of each increment is entirely dissipated by the artificial viscosity at the end of the increment. Third, the relaxation occurring in growth process is not of our primary interest, but rather the final configuration at the end of each increment in which the internal pressure is released is important. It is obvious that the magnitude of dissipative force determines how fast the energy is dissipated and the equilibrium state is reached. It should be highlighted that this approach was inspired by a seemingly irrelevant work to this research [51] in which astrophysical gravitational wind accertion has been simulated using SPH method with particles whose masses were varying.

2.5 Boundary conditions and interface modeling

2.5.1 Boundary conditions

The treatment of boundary conditions in SPH is still a controversial issue and not fully solved. The reason stems from the nature of SPH as a collocational method based on the strong form of the governing equations. The completeness condition which means consistency of the method fails at boundaries where the kernel of smoothing function is truncated [58]. Several techniques have been proposed which are based on one of three basic concepts. First using some imaginary particles at the boundary, second using predefined repulsive forces and the third deriving corrective formula for kernel and kernel gradient at free boundaries [57, 59]. The aim of this paper is not to discuss these methods in detail, however it should be expressed that the method presented in [60] has been implemented in this paper for fluid-solid interface interaction. This method has been appreciated as a plausible, accurate and stable method by Monaghan, one of the first developer and pioneers of SPH [62].

Fig. 2
figure 2

Pressure and velocity extrapolation through interface particles

The main essence of this approach is to consider three layers of solid particle to be dummy (wall) particles through which the pressure and velocity fields of the fluid are extrapolated, see Fig. 2

$$\begin{aligned} v_w=2v_s-\frac{\sum _{b\in {\varOmega }_f} v_{b}^{f}}{\sum _{b\in {\varOmega }_f}W_{ba}} \end{aligned}$$
(25)

where \(v_w\), \(v_{b}^{f}\) and \(v_s\) are wall (dummy), fluid and solid particle velocities, respectively. It can be said that each interface particle has two identities, the real and dummy one. Although interface particle are solid particles in reality and contribute to the computation of solid phase with the real values such as \(v_s\), they convey dummy values (\(v_w, p_w\)) as well. An interface particle with dummy value contributes to the fluid domain computation in order to enforce the interface compatibility conditions. It needs to be stressed that a no-slip condition (velocity compatibility) is implied in Eq. (25) via an approximate mirror projection, see [60] . In addition to the velocity compatibility, an accurate coupling of traction is also required. The novelty of this method is the incorporation of the wall acceleration into the pressure calculation of the dummy particles. It should be noted that it is not an ad hoc formula but it comes from the momentum balance at the interface, see [60]. To do this, we start with the Navier Stockes equation for the fluid close to the solid boundaries (dummy particles), neglecting the viscous term:

$$\begin{aligned} a_w=\frac{\mathrm {d} v_f}{\mathrm {d} t}=-\frac{\nabla P}{\rho }+g \end{aligned}$$
(26)

in which \(a_w\) is the acceleration of a dummy fluid particles at the interface or boundary. The key assumption is that we have a no-slip boundary condition and it means that that the acceleration of a dummy fluid particle is equal to that of solid wall at the boundary (\(a_w=a_s\)). Rearranging the Eq. (26), one can find an estimation for pressure gradient near the interface. Applying a Taylor series for pressure, yields

$$\begin{aligned} p_w=p_f+\nabla p.r_{wf}=p_f+\rho _f(g-a_w).r_{wf} \end{aligned}$$
(27)

where \(r_{wf}=r_w-r_f\), see Fig. 2. Taking all the neighbors contribution into account for the Eq. (27) using SPH discretization, one can find the final formula for computing the pressure in dummy particles

$$\begin{aligned} p_w=\frac{\sum _{b\in {\varOmega }_f} p_{b}^{f} W_{ba}+(\mathbf {g}-\mathbf {a_w}).\sum _{b\in {\varOmega }_f}\rho _{b}^f \mathbf {r_{ba}} W_{ba}}{\sum _{b\in {\varOmega }_f}W_{ba}}\quad \end{aligned}$$
(28)

Here \(p_w\) and \(p_{b}^{f}\) are wall (dummy) and fluid pressure, respectively.

It is true to say that interface modeling in a FSI problem is crucial. It can affect the output significantly. The more accurate the interface quantities are computed the more correct the fluid-solid coupling is modeled and consequently more realistic and physically sound results are achieved. Finally the exerted force per unit mass on a solid particle \(\mathbf {F_{f\rightarrow s}}\) can be evaluated using the extrapolated pressure. It should be clarified that the viscous forces at the interface have been neglected in spite of no-slip boundary condition [60].

$$\begin{aligned} \mathbf {F_{f\rightarrow s}}=-\frac{\nabla P}{\rho _s}=\frac{1}{\rho _s}\sum _{b\in {\varOmega }_s}\frac{m_b}{\rho _b}P_b \nabla W_{ba} \end{aligned}$$
(29)

Here one of the most appealing features of SPH shows up. It is its automatically handling of the interface relations which can not be achieved so easily e.g. in FEM. The pressure interface force is always normal to deformed surface of biofilm (it is so-called follower load) and due to updated Lagrangian nature of SPH it is explicitly treated and there is no linearization and computational challenge to encounter [61].

Note that in the solid phase, the above calculated force is added explicitly to the right hand side of momentum equation (15) and the SPH summation is extended only to solid particles, whereas in the fluid phase the SPH summation includes dummy wall particles and no such explicit term is added to momentum equation. In fact, the velocity and pressure of dummy particles which in reality belong to solid phase contribute to the reaction force applied to fluid from solid. It means a two way coupling of fluid and solid in which the kinematic and traction compatibility at the interface is fulfilled in a collocational sense. In other words, the continuity of traction and normal velocity holds true [50]. It should be reminded that the presented boundary treatment has been applied to both deformable solid boundaries (fluid-solid interface) and also rigid fix boundaries (essential boundary conditions). The only difference is that in fixed boundaries the velocity and acceleration are identical to zero (\(v_s=a_w=0\)).

2.5.2 Erosion (detachment)

The detachment process in biofilm formation has different mechanisms such as erosion, sloughing, abrasion, predator grazing and human intervention [30]. The ones which have a hydrodynamical root are erosion and sloughing. In this work, the focus is on interface erosion in which the bacteria (particles) are gradually washed away because of the shear forces of the flow. To avoid any ambiguity, some important aspects of biofilm detachment need to be clarified.

First, the process is local and taking place at micro-scale and it is almost impossible to have a real-time experimental measurement from which a macroscopic balance of mass could be deduced [30]. In practice, most experiments on biofilm are solely measurement of average height in some points of interests obtained during large time scales of order hours and days. The outcome is indeed a resultant of all processes contributing to biofilm formation and decomposing the real portion of impact for these processes is not possible. In other words, the numerical erosion model of biofilm could not be quantitatively verified through experiments that have been conducted in this research. Nevertheless, it is still a powerful tool to understand qualitatively the physics behind the erosion process in biofilms and to predict detachment.

Second, it has been assumed that the erosion is taking place at the fluid-biofilm interface in the form of a single particle removal when the shear stress induced by the fluid exceeds a failure criteria based on biofilm strength

$$\begin{aligned} \tau _{inter face}>\tau _{y} \end{aligned}$$
(30)

Here \(\tau _{interface}\) represents the shear stress induced by the fluid flow and \(\tau _{y}\) is the shear yield stress in biofilm.

Third, It is well known that the biofilm is a heterogeneous material and its cohesion strength varies from the order of 10Pa in the base where it is attached to the substratum to the order of 0.1Pa near the interface [30]. Unfortunately, measuring the mechanical properties of a biofilm which govern its response is a very challenging issue and there is no unique reference value for mechanical properties in the literature. Thus a wide range of values has been reported. On the other hand , it is obvious that the mechanical stress in the biofilm must be higher at the substratum where it is cantilevered [31]. It means it is likely that sloughing as an another failure mode in which a bunch of bacteria as a whole are detached, occurs in addition to surface erosion especially in high Reynolds flow. However, in this study the flow conditions are such that the dominant detachment process is surface erosion and the stresses near the substratum are less than the biofilm strength there. Definitely, a continuum damage or crack propagation model is required to be incorporated for capturing bulky failure modes within the biofilm and it could be the matter of further future research.

Fig. 3
figure 3

Interface modification due to erosion (top) before erosion (bottom) after erosion

Fourth, capturing the dynamically changing interface accurately is of great importance because this is the region where biofilm-fluid coupling is taking place. If the interface is not recognized properly several artifacts might appear and finally lead to a crash of the numerical method. Penetration of the fluid into the biofilm, local non-physical tearing of the biofilm due to abrupt change in the interface geometry and forces are two common issues in case that the interface geometry is naively tackled. In this work an algorithm so-called “Alpha shape” has been employed to find the boundary particles in pre-processing stage of the analysis. This has proved to be a robust method especially in case of a general irregular set of particles. This algorithm is based on Delauney triangulation and circumscribed circles. It is available MATLAB software. The input is an arbitrary point cloud and a value corresponding to a rolling circle on the boundary points. The out put is the boundary particles. Figure 4 illustrates how the algorithm works. The associated subroutine has been invoked within our FORTRAN code. Furthermore, a dynamic modification of the interface is performed. The procedure of up-dating the interface had been depicted in Fig. 3. Detached (eroded) particle are members of interface (dummy) particles. As soon as a particle is detached, the thickness of interface (about three layers of solid particles) decreases and hence it needs to be updated. New solid particles are added to the interface particles set to make up for the detached ones.

Fig. 4
figure 4

Recognizing boundary particles using alpha shape algorithm

Finally, the fact that the minimum size of detached material at the interface is equal to the size of the particle might be physically arguable. This is the case not only in mesh-less method but also in element based methods when they are applied to model damage and failure phenomena using “death” of elements. Generally such mesh dependency of material behavior, which is undesirable, is a matter of discussion when the equations are transformed from continuum to discretization level. Nonetheless, here it can be argued that the biofilm micro structure in reality is a composite made of bacteria as inclusions being glued together with EPS as a matrix and the damage always happens in the weaker compartment of this composite which is the matrix. It is implied that a single bacteria is not torn apart but removed as a whole. Consequently the minimum size of material removal is confined to the size of a single bacteria. Since here the size of mesh (particles) is the same as a single bacteria, this modeling of material erosion is justifiable.

2.6 Numerical remedies and integration method

2.6.1 Tensile instability

In spite of its robustness and simple appearance, SPH like any other computational method has some shortcomings. A great deal of literature has been dedicated to remedy such issues. One of the most cumbersome instabilities in SPH is called tensile instability. It manifests itself in particle clumping when a body is in tension state of stress. Several techniques have been proposed to circumvent this instability. Belytschko [63] was the first who diagnosed this problem in a general framework and found the root and cure of this disorder although it had been already identified by earlier researchers. In [63], it was discovered that the Eulerian nature of the SPH kernel (in current configuration) is the main cause of this instability. So if one uses a Lagrangian kernel (in reference configuration), this instability is cured. Here it is not intended to deeply go through such matters and the reader is referred to a comprehensive review in [58]. In this paper, the method of using artificial stress developed by Monaghan [64] has been employed to deal with tensile instability. The main idea is to introduce a certain amount of artificial stress into the momentum equation in the direction of principal stress whose amount is positive. This kind of stress perturbation removes or at lease postpone the emergence of this instability while not changing the physical behavior too much.

2.6.2 Artificial viscosity

in SPH an artificial viscosity term must be added to the momentum equation in order to suppress unphysical oscillation and stabilize the numerical scheme [65]. While in the fluid phase the intrinsic real viscosity of fluid is enough to stabilize the solution, in solid phase an artificial viscosity has to be be introduced. This dissipation term could be interpreted as inherent viscous behavior of the solid associated with a certain relaxation time. The final momentum equation including artificial stress and viscosity follows from equation (15)

$$\begin{aligned} \frac{\mathrm {D}v_{a}^{\alpha }}{\mathrm {D} t} = -\sum _{b} m_{b}\left( \frac{\sigma _{a}^{\alpha \beta }}{{\rho _{a}}^{2}}+\frac{\sigma _{b}^{\alpha \beta }}{{\rho _{b}}^{2}}-{\varPi }_{ba}\delta _{\alpha \beta }+R_{ba}^{\alpha \beta }\right) W_{ab,\beta } \end{aligned}$$
(31)

where \({\varPi }_{ba}\delta _{\alpha \beta }\) and \(R_{ba}^{\alpha \beta }\) are artificial viscosity and artificial stress terms, respectively. Artificial viscosity can be evaluated, see [65], by

$$\begin{aligned} {\varPi }_{ba}= & {} {\left\{ \begin{array}{ll} \frac{-\alpha c_{ba} \mu _{ba}}{\rho _{ba}}&{} \quad \mathbf {v_{ba}}.\mathbf {r_{ba}} \le 0 \\ 0 &{}\quad \mathbf {v_{ba}}.\mathbf {r_{ba}}>0 \end{array}\right. } \nonumber \\ \mu _{ba}= & {} \frac{h \mathbf {v_{ba}}.\mathbf {r_{ba}}}{ |\mathbf {r_{ba}}|^2+0.01h^2} \end{aligned}$$
(32)

where \(\mathbf {r_{ba}}=\mathbf {r_a}-\mathbf {r_b}\), \(\mathbf {v_{ba}}=\mathbf {v_a}-\mathbf {v_b}\), \(c_{ba}=\frac{1}{2}(c_a+c_b)\), \(\rho _{ba}=\frac{1}{2}(\rho _a+\rho _b)\) and \(\alpha \) is a parameter in the order of unity. The artificial stress is calculated using the formula

$$\begin{aligned} R_{ba}^{ij}= & {} R_a^{ij}+R_b^{ij} \nonumber \\ R_\xi ^{ij}= & {} {\left\{ \begin{array}{ll} -e\frac{\sigma _\xi ^{ij}}{\rho _\xi ^2}&{}\quad \sigma _\xi ^{ij}>0 \\ 0 &{}\quad \sigma _\xi ^{ij}<0 \end{array}\right. } ,\quad \xi :=a\ or\ b \end{aligned}$$
(33)

Unlike in equation (31) the superscript ij has been used instead of \(\alpha ,\beta \) in this equation. The reason is that the artificial stress tensor is computed using the value of principal stresses and directions(ij) and afterward it is returned to the regular basis \(\alpha ,\beta \) by a transformation matrix Q.

$$\begin{aligned} R_{ba}^{\alpha \beta }=Q_{ba}^{\alpha i} R_{ba}^{ij}Q_{ba}^{\beta j} \left( \frac{W(|\mathbf {r_b}-\mathbf {r_a}|,h)}{W(\Delta )}\right) ^n \end{aligned}$$
(34)

The parameter \(e=0.3\) and \(n=4\) were taken [64]. \(\Delta \) denotes the average particle spacing in the neighborhood of particle a.

2.6.3 Integration method

For the time integration a velocity verlet proposed by [60] was selected and implemented. This integrator is explicit, second order accurate (hence consistent with the SPH nature), symplectic (conserves important quantities like momentum and energy in long term and consequently it is reversible) and efficient due to just one time force calculation per time step.

$$\begin{aligned} \mathbf {v_a^{n+\frac{1}{2}}}= & {} \mathbf {v_a^n}+\frac{\Delta t}{2}\left( \frac{\mathrm {D} \mathbf {v_a}}{\mathrm {D} t}\right) ^n \end{aligned}$$
(35)
$$\begin{aligned} \mathbf {r_a^{n+\frac{1}{2}}}= & {} \mathbf {r_a^n}+\frac{\Delta t}{2}\mathbf {v_a^{n+\frac{1}{2}}} \end{aligned}$$
(36)
$$\begin{aligned} \mathbf {\rho _a^{n+1}}= & {} \mathbf {\rho _a^n}+\Delta t \left( \frac{\mathrm {D} \rho _a}{\mathrm {D} t}\right) ^{n+\frac{1}{2}} \end{aligned}$$
(37)
$$\begin{aligned} \mathbf {r_a^{n+1}}= & {} \mathbf {r_a^{n+\frac{1}{2}}}+\frac{\Delta t}{2}\mathbf {v_a^{n+\frac{1}{2}}} \end{aligned}$$
(38)
$$\begin{aligned} \mathbf {v_a^{n+1}}= & {} \mathbf {v_a^{n+\frac{1}{2}}}+\frac{\Delta t}{2}\left( \frac{\mathrm {D} \mathbf {v_a}}{\mathrm {D} t}\right) ^{n+1} \end{aligned}$$
(39)

As mentioned before, to guarantee stability of the computational method the time step is determined by the CFL stability condition in conjunction with extra viscous and force conditions, see [60].

$$\begin{aligned} \Delta t=min \left\{ 0.25\frac{h}{c_{max}+|\mathbf {v_{max}}|},0.125 \frac{h^2}{\nu } ,0.25\left( \frac{h}{|\frac{\mathrm {D} \mathbf {v}}{\mathrm {D} t}|_{max}}\right) ^\frac{1}{2} \right\} \nonumber \\ \end{aligned}$$
(40)

Here \(\nu \) is the kinematic viscosity of the fluid. It should be noted that in case of diffusion equation, the time step is similar to viscous term above and is evaluated as follows

$$\begin{aligned} \Delta t=0.125 \frac{h^2}{D} \end{aligned}$$
(41)

in which D is diffusivity coefficient.

3 Numerical examples and discussion

In order to examine the validity of the developed code for the fluid flow and biofilm deformation, first a conceptual example presented in [34] is simulated. In the second example a 2D deformable biofilm undergoing erosion is modeled and in the third example the biological growth process of 3D biofilm is computed and the results are compared with those measured in experiments.

3.1 Fluid-biofilm interaction

In this example an artificially shaped 2D biofilm in the form of a rectangular block is deformed as a result of its interaction with the surrounding fluid. The fluid condition, material constants and geometric dimensions can be found in Table 1. The upper plate velocity was set to V and its motion moves the bulk fluid around the biofilm. It exerts forces on the biofilm structure and finally causes it to deform until a final steady state is reached. Figure 5 depicts the normalized hydrostatic pressure profile prior to applying the horizontal velocity. The reference pressure for normalization is the one computed analytically at the bottom of the domain, namely \(P_{ref}=\rho _{f}gH\).

Table 1 Model parameters and constants [34]
Fig. 5
figure 5

The initial configuration of a rectangular biofilm in fluid flow under hydrostatic condition

The results which are based on a fully continuum approach show good agreement with those achieved in [34] in which discrete mass-spring elements have been used to model the biofilm deformation. Figure 6 illustrates the final (steady state) configuration of the deformable biofilm in the fluid flow as well as the flow streamlines. It should be noted that the real time having been simulated is much less than characteristic growth time of biofilm and in fact no growth occurs in this test case.

Fig. 6
figure 6

The steady state configuration of a rectangular biofilm in fluid flow

Table 2 Model parameters and constants (Material property from [31])

3.2 Biofilm erosion and streamer formation

Two dimensional simulation has been performed in the second example to show the process of biofilm erosion due to induced shear forces at the biofilm surface. Table 2 contains material properties, constants and parameters required for this case.

Fig. 7
figure 7

Biofilm erosion a initial velocity profile b velocity profile and eroded bacteria after \(\tau =1500\) c mechanical stress development in not eroded biofilm during time

In this case an initial single biofilm hump is considered which is located at the center of flow chamber. It is exposed to the fluid flow. For the sake of simplicity in visualization, the 2D results (plane stress assumption) are presented. It is observed that the biofilm colony looses gradually some bacteria at the interface where the interfacial shear stress exceeds the biofilm cohesion strength. The detached bacteria are washed away by the fluid forces and form a filamentous streamer-like tail floating in the fluid flow downstream. In some cases, especially when the biofilm is too soft, this streamer formation may happen even prior to detachment and in fact the biofilm is highly deformed and elongated. Such phenomena have been repeatedly reported in the literature, see [32, 36, 66, 67]. An animation of this process can be viewed in the supplementary online materials.

It should be noted that the time has been non-dimensionalized using \(t_{ref}=\frac{100h}{C_{0}}\). Two important points can be extracted from Fig. 7. First, before the horizontal fluid velocity is applied and consequently the erosion starts (at time \(\tau =\frac{t}{t_{ref}}=10\)) , the biofilm is in a tension state of stress. The reason is that in a hydrostatic equilibrium an effective upward buoyancy force, originating from density difference between fluid and biofilm, tends to lift up the biofilm. Once the fluid moves, the effective drag force on the biofilm bends it and changes the stress state. As it is expected the mechanical stress has the maximum value at the lower part of the biofilm where it is anchored to the substratum. However the value of stress is less than biofilm strength in this region and no sloughing happens. In Fig. 8 it can be seen that the biofilm experiences a vibrational micro-motion in the fluid flow direction. This is due to continuous erosion which results in sequential impulses on the biofilm structure and triggering the first vibration mode of biofilm structure. It means that the biofilm response to the fluid flow is dynamic during erosion process. It is expected that such movements are gradually suppressed when the erosion process stops due to the reduction of shear forces once enough material is washed out and the fluid velocity decreases in the vicinity of biofilm.

Fig. 8
figure 8

Displacement of the biofilm center in time during the erosion process

Table 3 Model parameters and constants (material property from [31])
Fig. 9
figure 9

Biofilm growth and nutrient concentration a after T\(=\)6 h b after T\(=\)12 h c after T\(=\)24 h

3.3 Biofilm growth

The material properties and parameters are listed in Table 3 for this example. The biological growth process of a 3D biofilm was simulated in this case study. It is assumed that an initial semi spherical colony of bacteria exists on the surface and it starts to grow. In other words, the initial condition is a priori because this is due to the fact that the initial colonization of a surface by the microorganism is a very complex process, taking place in much smaller length scale in the order of molecules size. It is still a not truly understood phenomenon and rare computational modeling could be found in literature, nevertheless some researchers employed theories like DVLO (Derjaguin Landau VerweyOverbeek) incorporating Van der Waals and electrostatic forces to simulate initial adherence of bacteria [68].

Although in reality bacteria need several nutritional substrates, for the sake of simplicity it is assumed that the growth process is limited and affected by the concentration of just one type of nutrient and the other components are unlimitedly supplied. It implies that there is only one diffusion–advection-reaction equation in the computational method corresponding to this substrate [4, 35].

Figure 9 illustrates the biofilm growth and the nutrient normalized (non-dimensionelized) concentration during 24 h. The reference concentration is that of the bulk fluid (\(C_{f}\)) which is in fact the maximum available nutrient concentration. It is a common assumption that the fluid is well mixed due to the dominancy of advection transport mechanism and the nutrient concentration is a prescribed variable in bulk fluid but it is computed in the biofilm using the diffusion-consumption equation. It should be noted that the RVE has a periodic boundary condition at all lateral sides and that is why the biofilm can take the whole spaces around itself as it grows up. Figure 6c reveals that the more the biofilm grows the less nutrient is available inside. Of course there is always a nutrient flux from fluid to biofilm through the interface via the diffusion mechanism. This makes up for the consumed nutrient by the bacteria, however as the biofilm expands spatially the overall nutrient amount in lower region of biofilm decreases. It means that the biofilm has a larger growth rate at the interface and a slower rate in the interior region. In some cases the shortage of nutrient may result in death of bacteria. They form an inactive region in the biofilm which even shrinks because of chemical decay instead of growing. Presence of inactive biomass has been reported in biological observation and was detected by our experimental colleagues as well. In this research the effect of inert biomass shrinkage was neglected because it was found that the portion of inactive biomass is much less than the total active biomass especially in small time period of order 1 day. Some researchers who use individual based methods have introduced this consolidation effect in their model [17]. But it seems that it is much more challenging to incorporate this phenomenon in a continuum based framework. In Fig. 10 the average height of the biofilm has been plotted after 24 h which reflects the biofilm growth. The experiments were repeated 3 times and the data were collected from several point of interest. It can bee seen that the relatively large standard deviation implies how nondeterministic the process is. Additionally the portion of inert (dead) biofilm is so small that it could be neglected at least in small time period simulation that was assumed here for the numerical modeling. The computational results are satisfactorily in comparison with those measured in experiments. It is obvious that the parameters of the problem could be calibrated using the experimental results in such a way that the experimental and numerical results fit better. However it does not necessarily mean that such calibrated parameters can be applicable to different environmental conditions other than that of this experiment, because the process has an intrinsic stochasticity.

Fig. 10
figure 10

Experimental results versus numerical simulation of 3D biofilm growth

It should be stressed out that the induced fluid velocity from biofilm growth is so small (of order one micron per hour, Fig. 11) that the fluid flow is not disturbed in practice. It means that it is not required to explicitly resolve the fluid flow field variable as a function of growing. In other words, capturing the interface is sufficient to update the geometrical domain of the fluid flow. That is why some researchers who focus just on the biofilm growth, never deal with the Navier Stokes equation at all [17] and they assume to have a pre-known boundary layer as the fluid-biofilm interface. These are fundamental assumptions in biofilm simulation due to separation of several time-scales corresponding to different phenomena and need to be thoroughly understood.

Fig. 11
figure 11

Streamline of biofilm growth after T\(=\)12 h

4 Conclusion

In this article a fully continuum based numerical scheme for biofilm formation was presented in the SPH framework. The method was motivated by the goal to benefit from the Lagrangian and meshless features of SPH in order to handle several complexities in the problem due to geometrical and physical coupling between the biofilm and the surrounding fluid. The biofilm was modeled in small time scales as a deformable solid submerged in the fluid flow and experienced mechanical deformations and surface erosion due to the forces from the fluid. Furthermore, assuming a viscous fluid, biofilm growth was simulated in large time scales and the results were verified by experiments, conducted by our partners in medical school. It was found that the hydrodynamical conditions of the fluid flow have a significant impact on how biofilm grows and its geometry changes as a result of environmental conditions. The authors believe that the developed computational tool is robust. It can be extended in order to incorporate other aspects and determinant factors of biofilm formation such as a multi species colony of bacteria, shrinkage of biofilm due to bacteria decay in the long term, other detachment processes, different non-linearity in material behavior, turbulent flow around biofilm, to benefit from GPU implementation and more parallelization concepts like MPI.