Finite Element Framework for Computational Fluid Gerard A. Ateshian FEBIO Department of Mechanical Engineering, Dynamics in Columbia University, New York, NY 10027 The mechanics of biological fluids is an important topic in biomechanics, often requiring the use of computational tools to analyze problems with realistic geometries and material Jay J. Shim properties. This study describes the formulation and implementation of a finite element Department of Mechanical Engineering, framework for computational fluid dynamics (CFD) in FEBIO, a free software designed to Columbia University, meet the computational needs of the biomechanics and biophysics communities. This for- New York, NY 10027 mulation models nearly incompressible flow with a compressible isothermal formulation Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021 that uses a physically realistic value for the fluid bulk modulus. It employs fluid velocity Steve A. Maas and dilatation as essential variables: The virtual work integral enforces the balance of linear momentum and the kinematic constraint between fluid velocity and dilatation, Department of Bioengineering, while fluid density varies with dilatation as prescribed by the axiom of mass balance. University of Utah, Using this approach, equal-order interpolations may be used for both essential variables Salt Lake City, UT 84112 over each element, contrary to traditional mixed formulations that must explicitly satisfy the inf-sup condition. The formulation accommodates Newtonian and non-Newtonian vis- Jeffrey A. Weiss cous responses as well as inviscid fluids. The efficiency of numerical solutions is Department of Bioengineering, enhanced using Broyden’s quasi-Newton method. The results of finite element simulations University of Utah, were verified using well-documented benchmark problems as well as comparisons with Salt Lake City, UT 84112 other free and commercial codes. These analyses demonstrated that the novel formulation introduced in FEBIO could successfully reproduce the results of other codes. The analogy between this CFD formulation and standard finite element formulations for solid mechan- ics makes it suitable for future extension to fluid–structure interactions (FSIs). [DOI: 10.1115/1.4038716]
8 9 1 Introduction SOLVER uses an octree finite volume discretization, and COOLFLUID uses either a spectral finite difference solver or a finite element The mechanics of biological fluids is an important topic in bio- solver. Currently, the CFD code most relevant to biomechanics is mechanics, most notably for the study of blood flow through the SIMVASCULAR, a finite element code specifically designed for cardi- cardiovascular system and related biomedical devices, cerebrospi- ovascular fluid mechanics, “providing a complete pipeline from nal fluid flow, airflow through the respiratory system, biotribology medical image data segmentation to patient-specific blood flow by fluid film lubrication, and flow through microfluidic biomedical simulation and analysis.”10 This open-source code [1] is based on devices. Therefore, the application domain of multiphysics com- the original work of Taylor [2]; it uses the flow solver from the putational frameworks geared toward biomechanics and biophy- 11 1 PHASTA project [3]. sics, such as the free finite element software FEBIO, can be In contrast, FEBIO was originally developed with a focus on the expanded by incorporating solvers for computational fluid dynam- biomechanics of soft tissues, providing the ability to model non- ics (CFD). Biological fluids are generally modeled as incompres- linear anisotropic tissue responses under finite deformation. It sible materials, though compressible flow may be needed to accommodates hyperelastic, viscoelastic, biphasic (poroelastic), and analyze wave propagation, for example, in acoustics (airflow multiphasic material responses which can combine solid mechanics through vocal folds) and the analysis of ultrasound propagation and mass (solvent and solute) transport, with a wide range of constitu- for imaging blood flow. tive models relevant to biological tissues and cells [4–6]. It also pro- Many open-source CFD codes are currently available in the vides robust algorithms to model tied or sliding contact under large public domain, though few are geared specifically for applications 2 deformations between elastic, biphasic, or multiphasic materials [7,8]. in biomechanics. OpenFOAM has many solvers applicable to a very More recently, FEBIO has incorporated reactive mechanisms, including broad range of fluid analyses, using the finite volume method. chemical reactions in multiphasic media, growth mechanics, reactive Other open-source CFD codes are typically more specialized: 3 4 viscoelasticity, and reactive damage mechanics [9–11]. Many of these SU2 is geared toward aerospace design, FLUIDITY is well suited 5 features are specifically geared toward applications in biomechanics, for geophysical fluid dynamics, and REEF3D is focused on marine including growth and remodeling and mechanobiology. applications. Some CFD codes explore alternative solution meth- 6 7 Our medium-term goal is to expand the capabilities of FEBIO by ods: PALABOS uses the lattice Boltzmann method, LIGGGHTS uses a including robust fluid–structure interactions (FSIs). Such interac- discrete-element method particle simulation, the GERRIS FLOW tions occur commonly in biomechanics and biophysics, most nota- bly in cardiovascular mechanics where blood flows through the deforming heart and vasculature [12–14], diarthrodial joint lubri- cation where pressurized synovial fluid flows between deforming 1 febio.org articular layers [15], cerebrospinal mechanics where fluid flow 2openfoam.org 3su2.stanford.edu through ventricular cavities may cause significant deformation of 4fluidityproject.github.io 5reef3d.wordpress.com 6freecode.com/projects/xflows-2 8gfs.sourceforge.net/wiki/ 7www.cfdem.com 9coolfluid.github.io Manuscript received May 4, 2017; final manuscript received December 5, 2017; 10simvascular.org published online January 12, 2018. Editor: Victor H. Barocas. 11secure.cci.rpi.edu/wiki/index.php/PHASTA
Journal of Biomechanical Engineering Copyright VC 2018 by ASME FEBRUARY 2018, Vol. 140 / 021001-1 surrounding soft tissues [16–18], vocal fold and upper airway compressibility of the fluid, using the dilatation as the only mechanics [19,20], viscous flow over endothelial cells [21,22], required component of the strain tensor, since fluids are isotropic canalicular and lacunar flow around osteocytes resulting from and cannot sustain shear stresses under steady shear strains. In this bone deformation [23–25], and many applications in biomedical approach, fluid velocity and dilatation may be obtained by satisfy- device design [26–28]. Some FSI capabilities already exist in sev- ing the momentum balance equation as well as the fundamental eral of the open-source CFD codes referenced previously; these kinematic relation between the material time derivative of the dil- implementations were developed as addendums to sophisticated atation and the divergence of the velocity. The finite element fluid analyses, often employing a limited range of solid material implementation, using a standard Galerkin residual formulation, responses, such as small strain analyses of linear isotropic elastic produces accurate numerical solutions even when using equal- solids. By formulating a CFD code in FEBIO, we expect to capital- order interpolation for the velocity and dilatation. ize on the much broader library of solid and multiphasic material models already available in that framework to considerably 2 Finite Element Implementation expand the range of FSI analyses in biomechanics. Our long-term goal is to expand these FSI features to incorporate chemical 2.1 Governing Equations. In a spatial (Eulerian) frame, the reactions within the fluid and at the fluid–solid interface, growth, momentum balance equation for a continuum is Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021 and remodeling of the solid matrix of multiphasic domains inter- faced with the fluid, active transport of solutes across cell mem- qa ¼ div r þ qb (2.1) branes as triggered by mechanical, electrical, or chemical signals at fluid–membrane interfaces, cellular and muscle contraction where q is the density, r is the Cauchy stress, b is the body force mechanisms, and a host of other mechanisms relevant to biome- per mass, and a is the acceleration, given by the material time chanics, biophysics, and mechanobiology, complementing many derivative of the velocity v in the spatial frame of the similar features already implemented in FEBIO’s elastic, biphasic, and multiphasic domain frameworks. The FEBIO CFD @v a ¼ v_ ¼ þ L v (2.2) formulation proposed in this study represents a significant mile- @t stone toward that long-term goal. Since FEBIO uses the finite element method, this study formu- where L ¼ grad v is the spatial velocity gradient. The mass bal- lates a finite element CFD code. Finite element analyses of incom- ance equation is pressible flow typically enforce the incompressibility condition using either mixed formulations [29], which solve for the fluid q_ þ q div v ¼ 0 (2.3) pressure by enforcing zero divergence of the velocity, or the pen- alty method [30,31], where the fluid pressure is proportional to the where the material time derivative of the density in the spatial divergence of the fluid velocity via a penalty factor [32]. The frame is mixed formulation results in a coefficient matrix that must pass @q the inf-sup condition to produce accurate results, using a finite ele- q_ ¼ þ grad q v (2.4) ment interpolation of the fluid pressure with a lower order than @t that of the fluid velocity [32–34]. The most broadly adopted CFD schemes today rely on stabili- Let F denote the deformation gradient (the gradient of the motion zation methods, such as streamline-upwind/Petrov–Galerkin with respect to the material coordinate). The material time deriva- (SUPG), pressure-stabilizing/Petrov–Galerkin and Galerkin/least- tive of F is related to L via squares [35–39]. These schemes have three principal benefits: They stabilize the flow and produce smooth results even on coarse F_ ¼ L F (2.5) meshes; they allow the use of equal interpolation for the velocity and pressure; and the resulting equations are amenable to iterative Let J ¼ det F denote the Jacobian of the motion (the volume ratio, solving, with suitable preconditioning. They also have some draw- or ratio of current to referential volume, J > 0); then, the dilatation backs: The finite element formulation is more complex because it (relative change in volume between current and reference configu- requires additional terms to supplement the standard Galerkin rations) is given by e ¼ J 1. Using the chain rule, J’s material residual; these terms involve second-order spatial derivatives, time derivative is J_ ¼ JF T : F_ which, when combined with Eq. which may be neglected in linear elements [40] but must be (2.5), produces a kinematic constraint between J_ and div v included in higher-order interpolations [39,41,42]; and they require the careful formulation of a weight factor, called the stabi- J_ ¼ J div v (2.6) lization parameter s, whose value depends on the local Reynolds number, some characteristic element length along the streamline Substituting this relation into the mass balance, Eq. (2.3), pro- direction, and some special considerations for the element shape duces q_J ¼ 0, which may be integrated directly to yield and interpolation order [41,42]; this parameter critically controls the effectiveness of this stabilization scheme. q ¼ qr=J (2.7) In this study, we overcame the constraint of the inf-sup condi- tion by employing a novel approach to analyze isothermal com- where qr is the density in the reference configuration (when pressible flow using fluid dilatation (the relative change in fluid J ¼ 1). Since qr is obtained by integrating the above-mentioned volume) as an essential variable, instead of fluid pressure or material time derivative of qJ, it is an intrinsic material property density. This approach also allowed us to forgo the application of that must be invariant in time and space. stabilization methods, reducing the complexity of the implementa- The Cauchy stress is given by tion and avoiding the need to formulate and use a stabilization parameter suitable for various element types and orders. Just like r ¼ pI þ s (2.8) fluid velocity, dilatation is a kinematic quantity that may further serve as a state variable in the formulation of functions of state (such as viscous stress and elastic pressure). Another benefit of where I is the identity tensor, s is the viscous stress, p is the pres- this approach is that the dependence of density on dilatation is sure arising from the elastic response obtained by analytically integrating the mass balance equation, as dW ðÞJ conventionally done in finite elasticity. In effect, we adapted an p ¼ r (2.9) approach from finite deformation elasticity to describe the elastic dJ
021001-2 / Vol. 140, FEBRUARY 2018 Transactions of the ASME ð ð and Wr is the free energy density of the fluid (free energy per vol- ume of the continuum in the reference configuration). The axiom dWint ¼ s : grad dv dv þ dv ðÞgrad p þ qa dv X X of entropy inequality dictates that Wr cannot be a function of the ð T J_ rate of deformation D ¼ðL þ L Þ=2. In contrast, the viscous dJ þ grad dJ v dv (2.14) stress s is generally a function of J and D. X J Boundary conditions may be derived by satisfying mass and momentum balance across a moving interface C. Let C divide the and material domain V into subdomains Vþ and V and let the outward ð ð ð normal to Vþ on C be denoted by n. The jump condition across C s dWext ¼ dv t da þ dv qb dv dJvn da (2.15) derived from the axiom of mass balance requires that @X X @X
½½quC n ¼ 0 (2.10) Here, @X is the boundary of X and da is a differential area on s @X; t ¼ s n is the viscous component of the traction t, and vn ¼ where uC v vC on C and vC is the velocity of the interface C. v n is the velocity normal to the boundary @X, with n represent-
Thus, uC represents the velocity of the fluid relative to C. The ing the outward normal on @X. From these expressions, it Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021 double bracket notation denotes ½½f ¼ fþ f , where fþ and f becomes evident that essential (Dirichlet) boundary conditions represent the value of f on C in Vþ and V , respectively. This jump may be prescribed on v and J, while natural (Neumann) boundary s condition implies that the mass flux normal to C must be continu- conditions may be prescribed on t and vn. The appearance of ous. In particular, if Vþ is a fluid domain and V is a solid velocity in both essential and natural boundary conditions may domain, and C denotes the solid boundary (e.g., a wall), we use seem surprising at first. To better understand the nature of these qþ ¼ q; vþ ¼ v for the fluid, and v ¼ vC for the solid, such that boundary conditions, it is convenient to separate the velocity into Eq. (2.10) reduces to qðv vCÞ n ¼ 0. The jump condition its normal and tangential components, v ¼ vnn þ vt, where derived from the axiom of linear momentum balance similarly vt ¼ðI n nÞ v. In particular, for inviscid flow, the viscous s requires that stress s and its corresponding traction t are both zero, leaving vn as the sole natural boundary condition; similarly, J becomes the r qu u n 0 (2.11) ½½ C C ¼ only essential boundary condition in such flows, since vt is unknown a priori on a frictionless boundary and must be obtained This condition implies that the jump in the traction r n across C from the solution of the analysis. must be balanced by the jump in momentum flux normal to C.In In general, prescribing J is equivalent to prescribing the elastic addition to jump conditions dictated by axioms of conservation, fluid pressure, since p is only a function of J. On a boundary viscous fluids require the satisfaction of the no-slip condition where no conditions are prescribed explicitly, we conclude that s vn ¼ 0 and t ¼ 0, which represents a frictionless wall. Con- s ðI n nÞ ½½uC ¼ 0 (2.12) versely, it is possible to prescribe vn and t on a boundary to pro- duce a desired inflow or outflow while simultaneously stabilizing which implies that the velocity component tangential to C is con- the flow conditions by prescribing a suitable viscous traction. Pre- tinuous across that interface. scribing essential boundary conditions vt and J determines the tan- In our finite element treatment, we use v and J as nodal varia- gential velocity on a boundary as well as the elastic fluid pressure bles, implying that our formulation automatically enforces conti- p, leaving the option to also prescribe the normal component of s s nuity of these variables across element boundaries, thus the viscous traction, tn ¼ t n, to completely determine the nor- mal traction t (or else ts naturally equals zero). Mixed ½½v ¼ ½½uC ¼ 0 and ½½J ¼ 0. Based on Eqs. (2.7) and (2.9),it n ¼ t n n follows that the density and elastic pressure are continuous across boundary conditions represent common physical features: Pre- element boundaries in this formulation, ½½q ¼ 0 and ½½p ¼ 0. scribing vn and vt completely determines the velocity v on a s Thus, the mass jump in Eq. (2.10) is automatically satisfied, and boundary; prescribing t and J completely determines the traction the momentum jump in Eq. (2.11) reduces to ½½r n ¼ 0, requir- t ¼ r n on a boundary. Note that vn and J are mutually exclusive ing continuity of the traction, or more specifically according to boundary conditions, and the same holds for vt and the tangential s s Eq. (2.8), the continuity of the viscous traction s n, since p is component of the viscous traction, tt ¼ðI n nÞ t . automatically continuous.
2.3 Temporal Discretization and Linearization. The time 2.2 Virtual Work and Weak Form. The nodal unknowns in derivatives, @v=@t which appears in the expression for a in Eq. this formulation are v and J (or e), which may be solved using the (2.2), and @J=@t which similarly appears in J_, may be discretized momentum balance in Eq. (2.1) and the kinematic constraint upon the choice of a time integration scheme, such as the general- between J and v given in Eq. (2.6). The virtual work integral for a ized-a method [44] (Appendix). The solution of the nonlinear Galerkin finite element formulation [43] is given by equation dW ¼ 0 is obtained by linearizing this relation as ð dW þ DdW½Dv þDdW½DJ 0 (2.16) dW ¼ dv ðÞdiv r þ qðÞb a dv ðX where the operator DdW½ represents the directional derivative of J_ dW at ðv; JÞ along an increment Dv of v,orDJ of J [43]. Using the þ dJ div v dv (2.13) X J split form of dW between external and internal work contribu- tions, this relation may be expanded as where dv is a virtual velocity and dJ is a virtual energy density, X DdW Dv DdW DJ DdW Dv is the fluid finite element domain, and dv is a differential volume int½ þ int½ ext½ in X. This virtual work statement may be directly related to the DdWext½DJ dWext dWint (2.17) axiom of energy balance, specialized to conditions of isothermal flow of viscous compressible fluids (see Appendix). Using the In this framework, the finite element mesh is defined on the spa- divergence theorem, we may rewrite the weak form of this inte- tial domain X, which is fixed (time-invariant) in conventional gral as the difference between external and internal virtual work, CFD treatments. Thus, we can linearize dWint along increments dW ¼ dWext dWint, where Dv in the velocity and DJ in the volume ratio, by simply bringing
Journal of Biomechanical Engineering FEBRUARY 2018, Vol. 140 / 021001-3 the directional derivative operator into the integrals of Eqs. (2.14) follows that grad J ¼ grad e and @J=@t ¼ @e=@t. Therefore, the and (2.15). The linearization of @v=@t and @J=@t is given by changes to the above-mentioned equations are minimal, simply requiring the substitution J ¼ 1 þ e and DJ ¼ De. Steady-state @v Dv analyses may be obtained by setting the terms involving Dt 1 to D ½ Dv ¼ n (2.18) dt Dt zero in Eqs. (2.18)–(2.20), and (2.22). @J DJ D ½ Dv ¼ n (2.19) 2.4 Constitutive Relations. The most common family of @t Dt constitutive relations employed for viscous fluids, including New- tonian fluids, is given by Here, Dt is the current time increment and n is a parameter chosen as described in Ref. [44]; for example, n ¼ 1 yields the backward 2 Euler scheme, in which case @v=@t ðv v DtÞ=Dt and sðÞJ; D ¼ j l ðÞtr D I þ 2l D (2.26) 3 @J=@t ðJ J DtÞ=Dt, where v Dt and J Dt are the velocity and volume ratio, respectively, at the previous time t Dt. More gen- where l and j are, respectively, the dynamic shear and bulk vis- Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021 erally, n is evaluated from the spectral radius for an infinite time- cosity coefficients (both positive), which may generally depend step, q (see Appendix). 1 on J and, for non-Newtonian fluids, on invariants of D. In practice, The linearization of dWint along an increment Dv is then most constitutive models forpffiffiffiffiffiffiffiffiffiffiffiffiffiffi non-Newtonian viscous fluids only ð use a dependence on c_ ¼ 2D : D, since it is the only nonzero s DðÞdWint ½ Dv ¼ grad dv : C : grad Dv dv invariant in viscometric flows [45]. In this case, substituting Eq. ðX (2.26) into Eq. (2.21) produces nI þ dv q þ L Dv þ grad Dv v dv Dt s 2 @j 2 @l ðX C ¼ j l I I þ 2=c_ ðÞtr D I D dJ 3 @c_ 3 @c_ grad J þ grad dJ Dv dv (2.20) @l X J þ22=c_ D D þ l I I (2.27) @c_ where we have introduced the fourth-order tensor Cs representing the tangent of the viscous stress with respect to the rate of The term containing I D is the only one that does not exhibit deformation major symmetry. In Newtonian fluids, l and j are independent of D; in incompressible fluids, they are independent of J (since J ¼ 1 s @s remains constant and tr D 0). Thus, for both of these cases the C ¼ (2.21) ¼ @D term containing I D drops out and Cs exhibits major symmetry. 0 Similarly, using Eq. (2.26), the tangent sJ in Eq. (2.23) reduces Note that Cs exhibits minor symmetries because of the symmetries to s s of s and D; in Cartesian components, we have Cijkl ¼Cjikl and s s s Cijkl ¼Cijlk. In general, C does not exhibit major symmetry 0 @j 2 @l @l s s sJ ¼ ðÞtr D I þ 2 D (2.28) (Cijkl 6¼Cklij), though the common constitutive relations adopted in @J 3 @J @J fluid mechanics produce such symmetry as shown below. The linearization of dWint along an increment DJ is Explicit forms for the dependence of l or j on J are not illustrated ð ð here, since viscosity generally shows negligible dependence on q pressure (thus J) over typical ranges of pressures in fluids, hence ½ 0 DðÞdWint DJ ¼ DJ sJ : grad dv dv dv DJ a dv s0 0 in most analyses. ðb X J J Many fluid mechanics textbooks employ Stoke’s condition þ dv p0 grad DJ þ DJp00 grad J dv (j ¼ 0) for the purpose of equating the elastic pressure p with the ðX mean normal stress 1=3trr [46]; in FEBIO, j is kept as a user- dJ n J_ defined material property, which may be set to zero if desired. DJ þ grad DJ v dv Several constitutive models for non-Newtonian viscous fluids X J Dt J have been implemented in FEBIO to date, including the Carreau, (2.22) Carreau–Yasuda, Powell-Eyring, and Cross models [47]. Their where we have used DJ½DJ ¼DJ; p0 and p00, respectively, repre- implementation is achieved using a Cþþ class that provides func- l j ; c_ sent the first and second derivatives of pðJÞ. We have also defined tions to return and as functions of ðJ Þ, and others functions s s0 s0 as the tangent of the viscous stress s with respect to J that return C , evaluated as shown in Eq. (2.27), and J as shown J in Eq. (2.28). For example, the Carreau model, where s ¼ 2lðc_ ÞD, is a special case of Eq. (2.26), with j ¼ 2l=3 and 0 @s sJ ¼ (2.23) @J 2 ðn 1Þ=2 l ¼ l1 þðl0 l1Þð1 þðkc_ Þ Þ (2.29) s For the external work, when t ; b, and vn are prescribed, these linearizations simplify to where k is a time constant, n is a parameter governing the power- law response, l0 is the viscosity when c_ ¼ 0 and l1 is the viscos- DðdWextÞ½Dv ¼0 (2.24) ity as c_ !1. For nearly incompressible fluids, a simple constitutive relation and may be adopted for the pressure ð q pðJÞ¼Kð1 JÞ (2.30) DðÞdWext ½ DJ ¼ dv DJ b dv (2.25) b J where K is the bulk modulus of the fluid in the limit when J ¼ 1; We may define the fluid dilatation e ¼ J 1 as an alternative it is a physical property that may be measured or looked up in a essential variable, since initial and boundary conditions e ¼ 0 are handbook. It follows that p0ðJÞ¼ K and p00ðJÞ¼0 in Eq. (2.22). more convenient to handle in a numerical scheme than J ¼ 1. It This constitutive relation is adopted for nearly incompressible
021001-4 / Vol. 140, FEBRUARY 2018 Transactions of the ASME X X CFD analyses in FEBIO, though alternative formulations may be vJ vJ DðdWintÞ½DJ ¼ dva ðk þ m Þ DJb easily implemented. For example, for an ideal gas, the equation of ab ab aX Xb state for its absolute pressure is p ¼ Rhq=M, where R is the uni- a dJ kJJ DJ (2.37) versal gas constant, h is the absolute temperature, and M is the gas þ a ab b a b molar mass. The ambient pressure pr may be obtained from this formula when the gas is at some reference density q . Thus, using r where Eq. (2.7), the gauge pressure p ¼ pa pr is given by ð ÂÃ Rhq 1 kvJ ¼ N s0 grad N þ N p0 grad N þ N p00 grad J dv pJðÞ¼ r 1 (2.31) ab b J a a b b M J ðX q mvJ ¼ N N a dv 0 ab a b By definition, the effective bulk modulus of a fluid is K Jp, X J e ¼ ð and K is the value of Ke evaluated at J ¼ 1. Thus, for an ideal gas _ JJ Na n J we have K ¼ Rhqr=M, which is the absolute pressure in the refer- kab ¼ Nb þ grad Nb v dv (2.38)
J Dt J Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021 ence state. X For the external work in Eq. (2.15), its discretized form is X 2.5 Spatial Discretization. The velocity vðx; tÞ and Jacobian t b v Jðx; tÞ are spatially interpolated over the domain X using the same dWext ¼ dva ðfa þ faÞþdJafa (2.39) a interpolation functions NaðxÞ, with a ¼ 1ton where n is the num- ber of nodes in an element) where Xn Xn ð vðx; tÞ¼ NaðxÞva ; Jðx; tÞ¼ NaðxÞJa (2.32) t s fa ¼ Nat da a¼1 a¼1 ð@X b Here, va and Ja are nodal values of v and J that evolve with time. fa ¼ Naqb dv (2.40) In contrast to classical mixed formulations for incompressible ðX flow [32], which solve for the pressure p using div v ¼ 0 instead v fa ¼ Navn da of Eq. (2.6), equal-order interpolation is acceptable in this formu- X lation since the governing equations for v and J involve spatial derivatives of both variables ( grad v and grad J). The expressions The discretized form of DðdWextÞ½DJ in Eq. (2.25) is of Eq. (2.32) may be used to evaluate L; div v; a; grad J, J_, etc. X X b Similar interpolations are used for virtual increments dv and dJ, DðdWextÞ½DJ ¼ dva kab DJb (2.41) as well as real increments Dv and DJ. a b When substituted into Eq. (2.14), we find that the discretized form of dWint may be written as where X ð q dW ¼ dv ðfr þ fqÞþf JdJ (2.33) b int a a a a a kab ¼ NaNb b dv (2.42) a X J where ð 2.6 Condition Number. The nonsymmetric tangent stiffness fr s grad N N grad p dv a ¼ ðÞ a þ a matrix ½Kint resulting from the linearization of the internal work ðX may be constructed from Eqs. (2.35)–(2.41) q fa ¼ Naqa dv (2.34) "# X vv vv vJ vJ ð Kab þ Mab kab þ mab J_ ½Kint ¼ (2.43) J kJv kJJ fa ¼ Na þ grad Na v dv ab ab X J vJ The effective fluid bulk modulus Ke only appears within kab,asa Similarly, the discretized form of DdWint½Dv in Eq. (2.20) linear term, as may be construed from Eqs. (2.38) and (2.23). Fur- becomes JJ thermore, kab is not zero in general, as may be noted from Eq. X X (2.38). For this matrix structure, it can be shown that the condition DðdW Þ½Dv ¼ dv ðKvv þ Mvv Þ Dv int a ab ab b number becomes proportional to the bulk modulus as Ke !1. aX Xb Nevertheless, similar to the argument presented by Ryzhakov Jv JJ þ dJa kab Dvb (2.35) et al. [48], the stabilization provided by the nonzero kab submatrix a b is sufficient to produce a well-behaved solution even for very large values of Ke. where In contrast, mixed formulations solve for the velocity v and ð pressure p using the momentum balance, Eq. (2.1), supplemented Kvv ¼ grad N Cv grad N dv by the mass balance div v ¼ 0 for incompressible flow. The ab a b resulting tangent matrix has a zero entry in lieu of kJJ , and this ðX ab type of matrix must pass the inf-sup condition to prevent an over- vv n M ¼ Naq Nb I þ grad v þ ðÞgrad Nb v I dv (2.36) constrained system of equations [32–34]. Stabilization methods ab Dt ðX such as the SUPG method, which have been introduced to mini- Jv Na mize spurious velocity oscillations on coarse meshes [35], popu- kab ¼ grad J þ grad Na Nb dv X J late this matrix entry [2,36], allowing the use of equal-order interpolations for velocity and pressure. The characteristic-based whereas that of DdWint½DJ in Eq. (2.22) becomes split algorithm presented by Zienkiewicz and Codina similarly
Journal of Biomechanical Engineering FEBRUARY 2018, Vol. 140 / 021001-5 produces a nonzero entry for arbitrary velocity and pressure inter- flow instabilities. It is possible to minimize these effects by pre- polations, when using a suitable dual time-stepping scheme scribing a tangential viscous traction onto the boundary surface, [49,50]. Indeed, these and other investigators have solved for the which opposes this tangential flow. Optionally, this condition may pressure p using the relation p_ ¼ Ke div v [48–50], which may be combined with the backflow stabilization described previously. be reproduced from our treatment by evaluating p_ ¼ p0J_ (valid at Similar to Sec. 2.7.1, we introduce a nondimensional parameter constant temperature), substituting J_ from Eq. (2.6), and using the b, with the tangential traction given by definition of Ke above. However, it should be noted that these s prior studies [48–50] used this relation with p_ ¼ @p=@t, which is tt ¼ bqrjvtjvt (2.50) only appropriate in a material description, whereas the above- s mentioned derivations show that p_ ¼ @p=@t þ grad p v should be This form shows that tt opposes tangential flow. The external vir- evaluated in a spatial description for consistency. tual work for this traction is ð 2.7 Special Boundary Conditions s dG ¼ dv tt da (2.51) @X
2.7.1 Backflow Stabilization. For arterial blood flow, back- Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021 flow stabilization has been proposed previously to deal with trun- Its linearization along an increment Dv is cated domains where the entire artery is not modeled explicitly ð [51,52]; for these types of problems, letting t ¼ 0 or prescribing a constant pressure at the outflow boundary may not prevent flow DdG½Dv ¼ dv Kt Dv da (2.52) @X reversals that compromise convergence of an analysis. Instead, these authors proposed a velocity-dependent traction boundary where it can be shown that condition, t ¼ bqðv vÞ n with a tensile normal component, that counters the backflow (only when vn < 0). Here, b is a nondi- vt vt mensional user-defined parameter; a value of b ¼ 0 turns off this Kt ¼ bqrjvtj I n n þ (2.53) jvtj jvtj feature, while a value of b ¼ 1 generally shows good numerical performance. We adapt this previously proposed formulation by The discretized form of dG is letting the normal component of the viscous traction be given by ð ( X 2 dG ¼ dv fs ; fs ¼ N ts da (2.54) bqrvn vn < 0 a a a a t s @X tn ¼ (2.44) a 0 vn 0 The discretized form of DdG½Dv is q q The choice of r in lieu of is for convenience, to avoid the X X ð dependence of q on J (which is negligible for nearly incompressi- DdG½Dv ¼ dv Kt Dv ; Kt ¼ N N K da ble flow). Then, the contribution of this traction to the virtual a ab b ab a b t a b @X external work dWext is ð (2.55) s dG ¼ dv tnn da (2.45) @X 2.7.3 Flow Resistance. Flow resistance is typically imple- The linearization of dG along an increment Dv in the velocity is mented when modeling arterial flow, where the finite element given by domain only describes a portion of an arterial network [53]. A flow resistance may be imposed on downstream boundaries to ð simulate the resistance produced by the vascular network with its DdG½Dv ¼ dv Kn Dv da (2.46) branches and bifurcations. The resistance is equivalent to a mean @X pressure which is proportional to the volumetric flow rate Q ð where ( p ¼ RQ ; Q ¼ vn da @X 2bqrvnðn nÞ vn < 0 Kn ¼ (2.47) 0 vn 0 where R is the resistance. Using the pressure–dilatation relation Eq. (2.30), equivalent to p ¼ K e, this pressure may be pre- The discretized form of dG is scribed as an essential boundary condition on the dilatation e. X ð n n s dG ¼ dva fa ; fa ¼ Natnn da (2.48) 2.8 Solver. The numerical solution of the nonlinear system of a @X equations is performed using Newton’s method for the first itera- tion of a time point, followed by Broyden quasi-Newton updates whereas the discretized form of DdG½Dv is [54], until convergence is achieved at that time-step. The stiffness X X ð matrix is thus evaluated only once for that time-step. Optionally, n n the stiffness matrix evaluation and Newton update may be post- DdG½Dv ¼ dva Kab Dvb ; Kab ¼ NaNbKn da a b @X poned at the start of subsequent time-steps until Broyden updates (2.49) exceed a user-defined value (e.g., 50 updates); this approach offers considerable numerical efficiency as illustrated in the results later. Relative convergence is achieved at each discrete A (viscous) tangential traction is implemented as a separate flow ðkÞ stabilization method in Sec. 2.7.2, applicable to inlet or outlet time tn when the vector DU of nodal degree-of-freedom (DOF) increments (consisting of Dv or DJ values at all unconstrained surfaces, without a conditional requirement based on the sign of ðkÞ ð1Þ nodes) at the kth iteration satisfies kDU k erkDU k, where er vn. 3 represents the relative tolerance criterion (er ¼ 10 for both 2.7.2 Tangential Flow Stabilization. For certain outlet condi- Dv and DJ in the problems analyzed later, unless specified other- s tions, using the natural boundary condition tt ¼ 0 may lead to wise). An absolute convergence criterion is also set based on the
021001-6 / Vol. 140, FEBRUARY 2018 Transactions of the ASME Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021
Fig. 1 Lid-driven cavity flow: Unstructured tetrahedral mesh (left column) and structured hexahedral mesh (right column). Vorticity contours are shown for Re 5 400 (middle row) and Re 5 5000 (bottom row). magnitude of the residual vector. For Newton updates, FEBIO uses a variety of linear equation solvers, among which the most effi- cient is the PARDISO parallel direct sparse solver for the solution Fig. 2 Velocity profiles in lid-driven cavity flow, for hexahedral of a linear system of equations with nonsymmetric coefficient and tetrahedral meshes, compared to Ghia et al. [56]: (a) v1 ver- matrix [55].12 Results reported later employ the Intel Math Kernel sus x2 along vertical centerline (x1 5 0:5); and (b) v2 versus x1 along horizontal centerline (x 5 0:5) Library implementation of PARDISO.13 2
3 Verifications and Validations In the sections below, we report the results of standard bench- 3.1 Lid-Driven Cavity Flow. This is a benchmark 2D steady mark problems for computational fluid dynamics, followed by flow problem, defined over a square region with boundary condi- some comparisons of FEBIO simulations with SIMVASCULAR and the tions described in Fig. 1. In the current implementation, it was 14 commercial code ANSYS FLUENT. All analyses use a Newtonian necessary to set the dilatation e to zero at the top corners, as they fluid with j ¼ 0; similarly, all analyses use the backward Euler represent singularity points where e would otherwise blow up in a time integration scheme unless specified. Additional analyses are numerical analysis (since @v1=@x1 !1 at those points). The described in the Supplementary Materials section, which is avail- Reynolds number for this problem, Re ¼ qVL=l, is based on the able under “Supplemental Data” tab for this paper on the ASME length L of the square sides, and the velocity V of the lid. FEBIO Digital Collection, including two-dimensional (2D) flow past a results are shown for Re ¼ 400 and Re ¼ 5000 (with q ¼ 1, cylinder at Re ¼ 100 (Sec. S3 of the Supplementary Materials sec- V ¼ 1; L ¼ 1), using an unstructured mesh of linear (four-node) tion, which is available under “Supplemental Data” tab for this tetrahedral elements with mesh refinement near the boundaries paper on the ASME Digital Collection.), exhibiting the character- (96,318 elements, 26,838 nodes), as well as a biased mesh of lin- istic K arm an vortex street and fluctuations in drag and lift coeffi- ear (eight-node) hexahedral elements (128 128 elements, 33,282 cients, and flow in a model of an ascending and descending aorta, nodes). All analyses used a bulk modulus K ¼ 109. Transient illustrating flow resistance, backflow stabilization, and tangential analyses were performed using increasing time increments up to stabilization. time 103, at which point a steady response was observed. Repre- sentative vorticity contours are shown in Fig. 1. A comparison of
12 steady-state horizontal and vertical velocity profiles across the www.pardiso-project.org 13software.intel.com/en-us/intel-mkl/ midsections of the domain is provided against the benchmark 14www.ansys.com numerical solution of Ghia et al. [56] in Fig. 2. The results show
Journal of Biomechanical Engineering FEBRUARY 2018, Vol. 140 / 021001-7 Downloaded from http://asmedigitalcollection.asme.org/biomechanical/article-pdf/140/2/021001/5989031/bio_140_02_021001.pdf by guest on 26 September 2021
Fig. 3 Flow past backward facing step with Re 5 229. Top panel shows the geometry, tetrahedral mesh, and boundary condi- tions. Middle panel shows contours of horizontal velocity component v1; bottom panel shows pressure contours. equally good velocity agreement for structured hexahedral and velocity was naturally zero (vn ¼ 0) on all boundaries, except the unstructured tetrahedral meshes, though contour plots of pressure leftmost face where the velocity was prescribed as vn ¼ and vorticity are evidently smoother when using the structured 1=2ð1 cos 2pt=TÞ for 0 t T, with T ¼ 3 10 4. The mesh. analysis was run for 1200 uniform time-steps, to a final time 3 5 6 10 , using a relative convergence criterion er ¼ 10 . Euler 3.2 Flow Past a Backward Facing Step. This benchmark 2D time integration was used in one case; three additional analyses flow problem, described in Ref. [50], may be compared to experi- were performed using generalized a-integration with q1 ¼ 0, mental measurements of fluid velocity [57], thus serving as a code 1=2, and 1. In all cases, a pressure wave was produced at the left- most face, which propagated over time to the rightmost face, then validation problem. The domain dimensions in the x1 x2 plane and mesh are shown in Fig. 3, with a step height L ¼ 1; the reflected back (Fig. 5(a)). For Euler integration, the pressure wave unstructured mesh consisted of 27,008 four-node tetrahedral ele- markedly decreased in height and increased in width as the wave propagated to the right, then reflected back in the leftward direc- ments (28,872 nodes) with a thickness 0.1 along x3. The fluid properties were K ¼ 109; q ¼ 1, and l ¼ 1 and the prescribed tion; for q1 ¼ 1 the pressure wave profile showed much more r subtle changes. To quantify numerical damping caused by the inlet velocity v1 varied along x2 according to experimental data, integration scheme, the total internal and kinetic energy EðtÞ at with a mean value V producing Re ¼ qrVL=l ¼ 229. A steady- state analysis was performed in FEBIO, producing velocity and time t was evaluated from the results using pressure contours as shown in Fig. 3. Velocity profiles were com- ð 1 pared to experimental results in Fig. 4, showing very good E ¼ qwþ v v dV (3.1) agreement. V 2