Nodal projective FEM (npFEM)

Dans le document Digital Blood (Page 29-41)

2.2 Methods

2.2.1 Nodal projective FEM (npFEM)

This section provides a complete review of the methods introduced in the research of Liu et al.

2017 [94] and Bouaziz et al. 2014 [20], and some novel extensions proposed to adapt them to the field of RBC modelling. A validation of these adaptations is provided in later sections, see results section 2.4. A red blood cell is represented by its triangulated membrane, and its total mass is lumped on the membrane vertices (including the interior fluid). This section presents how we realise the dynamics of deformable bodies, as well as all the potential energies that describe the behaviour of a red blood cell, namely local area and global volume conservation, bending and material.

2.2. Methods

Let us assume a surface mesh consisting ofnvertices with positionsx∈Rn×3and velocities v∈Rn×3. The evolution of the system in time follows Newton’s law of motion. The external forces are defined asFext∈Rn×3and come from the fluid-solid interaction, while the internal forces areFi nt∈Rn×3. The internal forces are position dependent, i.e.Fi nt(x)= −P

iEi(x), whereEi(x) is a scalar discrete elemental potential energy. Moreover, the summation of all the elemental potential energies of any type results in the total elastic potential energy of the body. Conservative internal forces, i.e. derived from potentials, are closely related to the assumption of hyperelastic materials [127]. Theimplicit Euler time integrationleads to the following advancement rules (subscriptsnandn+1 refer to timet andt+h, respectively):

vn+1=xn+1xn

h , (2.1)

Fi nt(xn+1)+Fext(xn)−Cvn+1=Mvn+1vn

h , (2.2)

whereM∈Rn×n is the mass matrix,his the time step andC∈Rn×n is the damping matrix acting like a proxy for viscoelasticity (Rayleigh damping, see section 2.2.1.4). The mass matrix is built by lumping the total mass of the body on the mesh vertices, resulting in a diagonal structure. The lumping can be done either by equally distributing the mass or by weighting, based on the corresponding area per vertex. Combining the above equations we derive

M(xe n+1yn)=h2Fi nt(xn+1), (2.3)

where|| · ||F is the Frobenius norm. Indeed, setting the derivative of equation (2.4) to zero (thereby minimising the objective function), we recover Newton’s second law of motion. The solution to the minimisation problem givesxn+1. The choice of implicit Euler integration serves a dual purpose. Firstly, it provides unconditional stability for arbitrary time step.

Secondly, this integration scheme is characterised by some numerical dissipation linked to the time step (the smaller the time step the smaller the numerical dissipation). This dissipation enhances the stability of the coupling (fluid & solid) by reducing energy oscillations that could potentially lead to instabilities. This dissipation term acts like the viscous dissipation provided by Rayleigh damping (matrixC).

A remark at this point is that the variational form of implicit Euler (2.4) is just a reformulation of Newtonian dynamics, which in their turn can be viewed from the Hamiltonian dynamics perspective. Nevertheless, to accurately capture the trajectory and deformation of the bodies (dynamics) we need to guarantee the conservation of linear & angular momenta. For this, one has to be cautious with the selection of the potential energies and the viscoelastic terms.

According to Noether’s theorem, momenta are conserved when the elastic energies are rigid

motion invariant. For the viscoelastic terms, we give an extended discussion on the conserva-tion of momenta in secconserva-tion 2.2.1.4. Taking into consideraconserva-tion all the above, we guarantee that we resolve as accurately as possible the dynamics of the simulated bodies, reproducing the correct physics as dictated by Newton’s laws.

2.2.1.1 Extended projective dynamics method and quasi-Newton optimisation

Projective dynamics method [20] requires a special form of potential energies, based on the notion of constraint projection:

Ei(x)= min

Sip∈Mi

Eei(x,Sip), Eei(x,z)= kGixzk2F, (2.5) whereMiis a constraint manifold defined by a desired undeformed state,pi=Sip∈Rm×3 is an auxiliary projection variable onMi andGi is a mapping fromx to an element-wise deformation representation which depends on the mesh topology and the initial configuration.

For an elastic body, there are many elemental energies of various types, therefore various projections. For compactness, we stack all the projections intop∈Rm×3and define binary selector matricesSi∈Rm×msuch thatpi=Sip. The dimensionmis equal toP

ici(summation over all quadratic energies), whereciis one for the bending energy, two for the local area energy andnfor the global volume conservation, i.e. it depends on the corresponding energy (see section 2.2.1.2). More in details, the matrixGi∈Rm×nformulates the deformation descriptor and places it in the involved rows and columns, where the columns correspond to the involved vertices of thei-th energy and the rows refer to the corresponding projectionpi. The term

“constraint” is used because the energy penalises the deviation from the undeformed state, and thusconstraintsthe body from deformation, and the term “projection” corresponds to finding the minimum distance from the current state onto the manifold.

Generalising the above, all the possible undeformed configurations define the so-called con-straint manifoldM (Cartesian product of the individual constraint manifoldsMi), which mathematically is formulated as the zero level-set of the total potential energy. From a geomet-ric point of view, the potential energy is a distancedwhich quantifies how far the deformed stateGxis from the manifoldM (rest state). The projection of the current state ontoMis denoted byp. There can be many user-defined manifolds. For example, a manifold for volume preservation does not guarantee area conservation and therefore, we have to define another manifold to guarantee the latter constraint. Recapitulating the above, the total potential energy can be formalised as

The minimum is achieved whenpis the projection ofGxontoM. Figure 2.1 summarises the definition of the distance and its correspondence to a potential energy. The generic potential energy of equation (2.6) refers to a discretized energy. Later, we show how from continuous

2.2. Methods

energies using linear basis functions, we retrieve this generic formulation.

Gx

Figure 2.1 –Geometric representation of a potential energy. The more the distance from the undeformed stateMthe higher the energy stored in the body. The body seeks to minimise its potential energy throughGx=p.

The key idea of projective dynamics is to exploit these specialised potential energies and reformulate thevariational form of implicit Euleras

g(xn+1)= 1

wheregis the objective function whose minimum corresponds toxn+1andwi=Aikiis a weighting term acting like a “stiffness” that converts the distance to an energy term (Ai is the area of the element andki is the stiffness factor). As a reminder,||A||2F=t r(ATA). The projectionspare essentially functions ofxand thus developing even further equation (2.5) into the variational form (2.4), we get

g(xn+1)= 1

projective dynamics potential energies: quadratic formulation

, (2.8)

whereL=P

wiGTiGi,J=P

wiGTi SiandS=P

wiSiSTi .

Seeking for greater material expressivity, and thus more general potential energies, we can

straightforwardly extend equation (2.7) as where PD stands for energies that follow the quadratic formulation of projective dynamics, see equation (2.6), and non-PD for arbitrary energies. A remark is the absence of a weighting term in the non-PD energies, which is because the stiffness is already integrated into them. The minimisation ofgis performed using a quasi-Newton technique with a well-suited Hessian approximation, which is deeply rooted in the projective dynamics part. The first step is to compute the gradient of the objective functiong(x) as defined by equation (2.9). An in-depth derivation of the gradient (regarding the PD part) and an explanation on why the derivative of

1 2t r¡

pT(x)Sp(x)¢

vanishes can be found in [94, 93]. The derivative is given by

∇g(x)= 1

The projective dynamics energies demand first the computation ofpfor a givenx. This step can be massively parallelized given the small computational cost of the projection per element.

The objective function could be equivalently minimised by Newton’s method. Newton’s method would proceed by computing the Hessian matrix∇2g(x) and then using it to compute a descent direction asd= −(∇2g(x))1∇g(x). However, Liu et al. 2017 [94] suggested replacing the Hessian byHe =M/he 2+Land thus opting for a quasi-Newton approach avoiding the expensive computation of the Hessian at every time step and the possible definiteness fixes to guarantee thatdis a descent direction. Using only quadratic energies, the minimisation ofg could be realised by an alternating (local/ global) solver [20], which reveals howHe is formed. A detailed presentation can be found in Appendix A.1. The approximated Hessian plays a major role in the fast convergence of our solver and in the overall computational efficiency of the npFEM solver without the expensive computation of the true Hessian. Furthermore, matrixHe is constant, symmetric positive definite and thus can be prefactorized once at the beginning, e.g. using Cholesky factorisation, allowing for very fast computation of the descent direction d= −(H)e −1g(x).

The non projective dynamic energies could contribute as well to the formulation of the Hessian approximation by considering their contribution toPwiGTiGi, whereGiis the deformation gradient operator for thei-th triangular element andwi=Aiki(Aiis the area of the element andki a stiffness factor which can be computed as described in [94]). If on the other hand there is no contribution from the non-PD part, then the iterations for convergence are slightly increased.

The overall convergence is affected by the selected potential energies. The more the PD energies, the faster the convergence, which is the case for our study since out of the four

2.2. Methods

different potentials (area, volume, bending, material) only the material energy does not fall into the PD category, see sections 2.2.1.2 & 2.2.1.3 for more details. The reason for this, is that the Hessian approximation is mainly built upon the PD part.

It is worth noting that the size of our matrices isn×ninstead of 3n×3n, typically found in other FEM solvers [96], leading to an at least 3×speedup compared to them.

Consequently, moving towards the descent direction, this iterative procedure guarantees to converge to the minimum ofg, i.e. xn+1. A recapitulation of the algorithm is presented in section 2.2.1.5.

2.2.1.2 Quadratic Energies to simulate RBC membrane

In this section, we develop potential energies suitable for projective dynamics and critical for the simulation of the red blood cell membrane, namely local area conservation, bending and global volume preservation. The analysis reveals that the above-mentioned energies can be written in the quadratic form described by equation (2.5). The goal is to develop discrete energies and compute the auxiliary variables, i.e. the projections, in order to quantify the energy term itself. Since the current statexis known, the computation ofp results in the quantification of the energyEfrom equation (2.5).

Let the undeformed surface be a differentiable 2-manifold surfaceSembedded inR3. Let us define piecewise linear coordinate functions of the undeformed and deformed surface,g:S→ R3and f :S→R3, respectively. By introducing a setMof desired point-wise transformations T, we can formulate a potential energy [20] as

E(f,T)=k

where∇Sis the gradient operator onS. The setMdetermines all allowed rest configurations T∇Sg. The energyE¡

f,T¢

is discretized over triangular elements using piecewise linear hat functions [19], and the integral is transformed to a sum over triangle potentials:

Ei(x,T)=ki

2 Ai||DsDm−1T||2F, (2.12) whereAi is the triangle area,Ds=[xjxi,xkxi]∈R2×2contains the triangle edges of the deformed state embedded in 2D andDmcorresponds to the undeformed state. At this point, we have introduced a generic quadratic energy similar to what is described by equation (2.5).

Based on the FEM reminder in Appendix A.2, the generic quadratic energy defined above can be rewritten as

Ei(x,T)=ki

2 Ai||F−T||2F, (2.13)

whereF∈R2×2is the deformation gradient of thei-th triangular element. In this case, the deformation gradient acts like a deformation descriptor, andTcorresponds to the projection

on the manifold defined by the setM.

Area preservation energy.Let us define the setMas the set of matrices with determinant 1, i.e.d et(T)=1. In mathematical terms, this requirement is equivalent toMSL(2), where the special linear group of degree n,SL(n), is the set ofn×nmatrices with determinant 1. Let us consider the singular value decomposition (SVD) of the deformation gradient of a triangular element

F=UΣVT, (2.14)

whereΣis a diagonal matrix storing the singular values orprincipal stretchesλ1,λ2ofF. Area conservation of the element is equivalent to

d et(F)=d et(Σ)=1. (2.15)

Consequently, the generic quadratic energy is rewritten as ki

2 Ai||Σ−Σ||2F s.t. det(Σ)=1, (2.16) which is the distance of the current stateΣfrom the manifold defined bySL(2). A rigorous solution to this projectionΣcan be found in the Appendix of [20]. Essentially, this energy penalises how far the element is from the state that conserves the areaΣ.

Bending Energy. The RBC membrane simulation demands a bending energy, commonly formulated by employing the dihedral angles across edges. The bending energy used in this study [20] measures the squared difference of mean curvaturesHas

E(f,R)=k 2 Z

S||∆SfR∆Sg||22d A, (2.17) whereRSO(3) are rotation matrices that best match the initial to the deformed state,Sis the Laplace-Beltrami operator onS. As a reminder, this operator applied on the coordinate function {g,f} of the surface, givesS{g,f}= −2H{g,f}n, whereHis the mean curvature and nis the surface normal. The discretized version [20] of the bending energy per vertexi, using piecewise linear hat functions, is

whereAiis the Voronoi area of the vertexi,Xf andXgcontain the one-ring edges of the vertex in the current and initial configuration, respectively, andc stores the common cotangent weights divided by the Voronoi area. The projectionRhas a closed form solution and is presented in the Appendix of [20]. For a thorough analysis on the different bending energy algorithms, consider the work of Guckenberger et al. 2016 [62].

Global volume conservation. The volumeV of a body embedded in 3D can be computed

2.2. Methods

where∂V is the boundary of the 3D bodyV (RBC membrane in our case) andnis the surface normal. Given the tessellation of the membrane in triangular elements, we can further simplify [10] the volume as the above toolset, we can now formulate the global volume conservation manifold asC = V(x)−V0=0, whereV0is the volume at rest. Therefore, the global volume conservation energy can be written as

The deformation descriptor is the absolute positions of the deformed body, and the projection corresponds to a state vector which respects the volume conservation.

To find the projectionp, we reformulate the above energy into a minimisation problem as minp

the second constraint that restricts∆xto be in the direction of∇Cis a requirement for linear and angular momentum conservation [10]. The solution to the above optimisation problem using Lagrange multipliers is [10, 20]

x= − C(x)

k∇C(x)k2F∇C(x), (2.23)

while the gradient can be approximated [10] by

C(x)≈1

3[ ¯n1T, ..., ¯nnT]T, (2.24) where ¯nk =PAjnjis the sum of the area weighted normals of all elements which contain vertexk.

Global area conservation could be imposed by a similar approach. Nevertheless, after extensive testing we found out that only the local area preservation term is enough to describe the RBC behaviour, without increasing more the computational cost. Essentially, since the area preservation is a property of the material, it is sufficient to encode it locally, through the

elements that compose the body.

The energies developed in this section follow the quadratic formulation described by equation (2.5). However, to build the stacked system of projections as described by equation (2.8), the user has to place carefully each deformation descriptor and projection to the sparse matrices Gixandpi. Additionally, the descriptors and projections isometrically embedded inR2, have to be re-embedded back inR3, since the equations of motion refer to three dimensions.

2.2.1.3 Non-PD energies & internal forces

There are many energies following the above-mentioned quadratic distance formulation but the simulated materials are quite limited. Even classical models from continuum mechanics, such as Neo-Hookean, St. Venant-Kirchhoff, Mooney-Rivlin, are not supported. More impor-tantly, the RBC falls into the latter category and for this reason, we develop the non projective dynamic energies and forces.

Consequence of elastic deformation is the accumulation of potential energy in the body. Our focus is on hyperelastic materials for which the potential energyE[φ] is determined by the deformation functionφ(see Appendix A.2) and is independent of the deformation history. To describe a deformed body, we introduce the energy density functionΨ[φ;X] which measures the potential energy per unit undeformed volume/area on an infinitesimal domaindV around the material pointX. The total potential energy is

E[φ]= Z

VΨ[φ;X]dX = Z

VΨ[F]dX. (2.25)

Every material follows a specific constitutive model which links the stresses with the strains.

There is a variety of stress descriptors; for our discussion we use the 1st Piola-Kirchhoff stress tensorPwhich for hyperelastic materials is

P(F)=∂Ψ(F)/F. (2.26)

The assumption of isotropy and rotation invariance allows us to express the energy density functionΨas a function of the principal stretches of the deformation gradient (λ12for triangular elements). To simplify the material space, we use theValanis-Landel hypothesis [141] which assumes that

Ψ(λ1,λ2)=f(λ1)+f(λ2)+g(λ1λ2), (2.27) wheref,gare scalar non-linear elastic strain energy density functions. The original formula-tion of the hypothesis is for solid bodies (typically rubber-like materials) and not for surfaces, thus involving the three principal stretches (λ1,λ2,λ3) of the deformation gradient and three scalar functions (f,g,h). It covers a vast amount of materials, such as St. Venant-Kirchhoff,

2.2. Methods

Neo-Hookean and Mooney-Rivlin.

The well-known energy introduced by Skalak et al. 1973 [129] for the description of the membrane of a red blood cell falls into the category of the Valanis-Landel materials. Given I1=λ2122−2 andI2=λ21λ22−1 the energy density function is

whereBandCare membrane material properties. The above energy density function can be alternatively written in the Valanis-Landel form as

f(λi)=B

Given that we enforce area conservation through the projective dynamics part, i.e.λ1λ2=1,g can be neglected and onlyf should be considered.

Since we are dealing with linear finite elements, the deformation gradient is constant over each element (Ti), see Appendix A.2, and this observation reduces the elemental potential energy to

Ei= Z

Ti

Ψ(F)dX =Wi·Ψ(Fi), (2.31)

whereWiis the undeformed area of the element. The contribution of elementTito the elastic forces isFi ntnonP D= −∇Eiwhich can be further simplified for a triangular element to [127]

[~f1 ~f2]= −WiP(F)Dm−T and ~f3= −~f1−~f2, (2.32) where~f1,~f2,~f3are the internal forces on the vertices ofTi. Moreover, the 1st Piola-Kirchhoff stress tensor can be further simplified to [152]

P(F)=P(UΣVT)=UP(Σ)VT, (2.33)

Stability.Special care is needed when designing new materials to satisfy Drucker’s first stability criterion (also known as Hill’s stability criterion), which requires a monotonic increase of strain energy density with increase in strain [39]. In practice, this stability criterion is satisfied by demanding f00,g00>0 [152].

Modification on Skalak’s Energy.This energy behaves quite well for small deformations as we present in section 2.4, but for larger deformations it fails to robustly describe the mechanics of the RBC membrane. For this reason, we enhance the strain hardening behaviour by adding

one more term in f. The modified version is as follows:

f(λi)=B 8λ4iB

4λ2i+D

4(λi−1)4 (2.34)

whereDis a material property likeB. The modified Skalak’s energy satisfies Drucker’s stability criterion and has a superior behaviour than the original one, see section 2.4. The correction term has zero contribution at rest, whereλi=1, and its form was defined through fitting on the available experimental data.

2.2.1.4 Membrane viscoelasticity

Membrane viscoelasticity is tackled in a two-way approach. Initially, through the addition of the Rayleigh dissipation term in Newton’s equation (2.2) and secondly through a post-convergence step.

Typically, the Rayleigh damping matrix is a blend of the mass and stiffness matrices

C=αDM+βDK, (2.35)

whereM∈Rn×nis the mass matrix,K∈Rn×nis the stiffness matrix andαD,βDare coefficients.

In our analysis we do not construct explicitly the stiffness matrix (Hessian of the elastic potential energy), and thus we are bypassing this issue by using matrixL=P

wiGTi Giinstead [88]. Essentially, we make use of a part of the Hessian approximation instead of the Hessian itself. A critical point to consider is that Rayleigh damping can affect the rigid body motions (translation, rotation) if the damping ratio is high. The damping ratio (ζ) is defined asζ(ωn)= 0.5(αDω−1n +βDωn), whereωn is then-th modal frequency [96]. In our study, we do an approximate modal analysis by solving Lx=ω2Mx. For our analysis, we setαD =0 and make sure thatζ(ωn)¿1 for every mode. In this way, we guarantee that the trajectory of the simulated bodies follows the proper dynamics and that the momenta are conserved.

Due to the above restriction of Rayleigh damping, we cannot fully emulate the viscoelastic behaviour of the RBC membrane. This is why we introduce the post-convergence step that complements Rayleigh damping, does not affect the rigid body dynamics, and also conserves

Due to the above restriction of Rayleigh damping, we cannot fully emulate the viscoelastic behaviour of the RBC membrane. This is why we introduce the post-convergence step that complements Rayleigh damping, does not affect the rigid body dynamics, and also conserves

Dans le document Digital Blood (Page 29-41)