Entries for April 2018

  1. Portrait of Onur Solmaz
    Onur Solmaz · Post · /2018/04/24

    Lumped L2 Projection

    $ \newcommand{\rowsum}{\mathop{\rm rowsum}\nolimits} \newcommand{\nnode}{n} \newcommand{\suml}[2]{\sum\limits_{#1}^{#2}} $

    When utilizing Galerkin-type solutions for IBVPs, we often have to compute integrals using numerical methods such as Gauss quadrature. In such a solution, we solve for the values of a function at mesh nodes, whereas the integration takes place at the quadrature points. Depending on the case, we may need to compute the values of a function at mesh nodes, given their values at quadrature points, e.g. stress recovery for mechanical problems.

    There are many ways of achieving this, such as superconvergent patch recovery. In this post, I wanted to document a widely used solution which is easy to implement, and which is used in research oriented codebases such as FEAP.

    L2 Projection

    Given a function uL2(Ω)u \in L^2(\Omega), its projection into a finite element space VhL2(Ω)V_h\subset L^2(\Omega) is defined through the following optimization problem:

    Find uhVhu_h\in V_h such that

    Π(uh):=12uhuL2(Ω)2min\begin{equation} \Pi(u_h) := \frac{1}{2}\lVert u_h-u \rVert^2_{L^2(\Omega)} \quad\rightarrow\quad \text{min} \tag{1}\end{equation}

    There is a unique solution to the problem since Π()\Pi(\cdot) is convex. Taking its variation, we have $DΠ(uh)vh=uhu,vh=0\begin{equation} D \Pi(u_h) \cdot v_h = \langle u_h-u, v_h \rangle = 0 \tag{2}\end{equation}$

    for all vhVhv_h\in V_h. Thus we have the following variational formulation

    Find uhVhu_h\in V_h such that

    uh,vh=u,vh\begin{equation} \langle u_h,v_h\rangle = \langle u, v_h\rangle \tag{3}\end{equation}

    for all vhVhv_h\in V_h.

    Here,

    m(uh,vh)=uh,vh=Ωuhvhdxandb(vh)=u,vh=Ωuvhdx\begin{equation} \begin{alignedat}{3} m(u_h,v_h) &= \langle u_h,v_h\rangle && = \int_\Omega u_hv_h \,dx \quad\text{and} \\ b(v_h) &= \langle u, v_h\rangle && = \int_\Omega u v_h \,dx \end{alignedat} \tag{4}\end{equation}

    are our bilinear and linear forms respectively. Substituting FE discretizations uh=J=1nuJNJu_h = \sum_{J=1}^{\nnode} u^JN^J and vh=I=1nvINIv_h = \sum_{I=1}^{\nnode} v^IN^I, we have

    J=1nMI ⁣JuJ=bI\begin{equation} \suml{J=1}{\nnode} M^{I\!J} u^J = b^I \htmlId{eq:projectionsystem1}{} \tag{5}\end{equation}

    for I=1,,nI=1,\dots,\nnode, where the FE matrix and vector are defined as

    MI ⁣J=m(NJ,NI)=ΩNJNIdxandbI=b(NI)=ΩuNIdx\begin{equation} \begin{alignedat}{3} M^{I\!J} &= m(N^J,N^I) &&= \int_\Omega N^JN^I \,dx \quad\text{and} \\ b^{I} &= b(N^I) &&= \int_\Omega u N^I \,dx \end{alignedat} \tag{6}\end{equation}

    Thus L2 projection requires the solution of a linear system

    Mu=b\boldsymbol{M}\boldsymbol{u}=\boldsymbol{b}

    which depending on the algorithm used, can have a complexity of at least O(n2)O(n^2) and at most O(n3)O(n^3).

    Lumped L2 Projection

    The L2 projection requires the solution of a system which can be computationally expensive. It is possible to convert the matrix—called the mass matrix in literature—to a diagonal form through a procedure called lumping.

    The operator for row summation is defined as

    rowsum()i:=j=1n()ij\begin{equation} \rowsum{(\cdot)}_i := \suml{j=1}{\nnode} (\cdot)_{ij} \tag{7}\end{equation}

    For the mass matrix, we have

    rowsumMI=J=1nΩNJNIdx=ΩNIdx=:mI\begin{equation} \rowsum M^{I} = \suml{J=1}{\nnode} \int_\Omega N^JN^I \,dx = \int_\Omega N^I \,dx =: m^I \tag{8}\end{equation}

    since J=1nNJ=1\sum_{J=1}^{\nnode} N^J = 1. Substituting the lumped mass matrix allows us to decouple the linear system of equations in (5) and instead write

    mIuI=bI\begin{equation} m^I u^I = b^I \tag{9}\end{equation}

    for I=1,,nI=1,\dots,\nnode. The lumped L2 projection is then as simple as

    uI=bImI=ΩuNIdxΩNIdx\begin{equation} u^I = \frac{b^I}{m^I} = \frac{\displaystyle\int_\Omega u N^I\,dx}{\displaystyle\int_\Omega N^I \,dx} \tag{10}\end{equation}

    This results in a very efficient algorithm with O(n)O(n) complexity.

    Conclusion

    Lumped L2 projection is a faster working approximation to L2 projection that is easy to implement for quick results. You can use it when developing a solution for an IBVP, and don’t want to wait too long when debugging, while not forgetting that it introduces some error.

  2. Portrait of Onur Solmaz
    Onur Solmaz · Post · /2018/04/13

    Disadvantages of Engineering Notation in Finite Elements

    Suppose we have the following stiffness matrix of linear elasticity:

    AijI ⁣J=ΩBkICikjlBlJdv\begin{equation} A^{I\!J}_{ij} = \int_\Omega B^I_k \, C_{ikjl} \, B^J_l \,dv \htmlId{eq:engnot1}{} \tag{1}\end{equation}

    where BI=NI\boldsymbol{B}^I = \nabla N^I are the gradients of the shape functions NIN^I and C\mathbb{C} is the linear elasticity tensor (you see the contraction of their components in the equation).

    Despite being of the most explicit form, these types of indicial expressions are avoided in most texts on finite elements. There are two reasons for this:

    • Engineers are not taught the Einstein summation convention.
    • The presence of indices result in a seemingly cluttered expression.

    They avoid the indicial expression by reshaping it into matrix multiplications. In engineering notation, the left- and right-hand sides are reshaped as

    Aαβ=ΩBγαCγδBδβdv\begin{equation} A_{\alpha\beta} = \int_\Omega B_{\gamma\alpha}C_{\gamma\delta}B_{\delta\beta} \,dv \htmlId{eq:engnot2}{} \tag{2}\end{equation}

    which allows us to write

    A=ΩB~TC~B~dv\begin{equation} \boldsymbol{A} = \int_\Omega \tilde{\boldsymbol{B}}^T\tilde{\boldsymbol{C}}\tilde{\boldsymbol{B}} \,dv \htmlId{eq:engnot3}{} \tag{3}\end{equation}

    The matrices B~\tilde{\boldsymbol{B}} and C~\tilde{\boldsymbol{C}} are set on with tildes in order to differentiate them from the boldface symbols used in the previous sections. Here,

    • C~\tilde{\boldsymbol{C}} is a matrix containing the unique components of the elasticity tensor C\mathbb{C}, according to the Voigt notation. In this reshaping, only the minor symmetries are taken into account. If the dimension of the vectorial problem is dd, then C~\tilde{\boldsymbol{C}} is of the size d(d+1)/2×d(d+1)/2d(d+1)/2 \times d(d+1)/2. For example, if the problem is 3 dimensional, C~\tilde{\boldsymbol{C}} is of the size 6×66\times 6:
    [C~]=[C1111C1122C1133C1112C1123C1113C2211C2222C2233C2212C2223C2213C3311C3322C3333C3312C3323C3313C1211C1222C1233C1212C1223C1213C2311C2322C2333C2312C2323C2313C1311C1322C1333C1312C1323C1313]\begin{equation} [\tilde{\boldsymbol{C}}] = \begin{bmatrix} C_{1111} & C_{1122} & C_{1133} & C_{1112} & C_{1123} & C_{1113} \\ C_{2211} & C_{2222} & C_{2233} & C_{2212} & C_{2223} & C_{2213} \\ C_{3311} & C_{3322} & C_{3333} & C_{3312} & C_{3323} & C_{3313} \\ C_{1211} & C_{1222} & C_{1233} & C_{1212} & C_{1223} & C_{1213} \\ C_{2311} & C_{2322} & C_{2333} & C_{2312} & C_{2323} & C_{2313} \\ C_{1311} & C_{1322} & C_{1333} & C_{1312} & C_{1323} & C_{1313} \\ \end{bmatrix} \htmlId{eq:engnotC}{} \tag{4}\end{equation}
    • B~\tilde{\boldsymbol{B}} is a nd×d(d+1)/2nd\times d(d+1)/2 matrix whose components are adjusted so that (2) is equivalent to (1). It has the components of BI\boldsymbol{B}^I for I=1,,nI=1,\dots,n where nn is the number of basis functions. Since B~\tilde{\boldsymbol{B}} is adjusted to account for the reshaping of C\mathbb{C}, it has many zero components. A 3d example:
    [B~]=[B1100B1200B1n000B2100B2200B2n000B3100B3200B3nB21B110B22B120B2nB1n00B31B210B32B220B3nB2nB310B11B320B12B3n0B1n]\begin{equation} [\tilde{\boldsymbol{B}}] = \begin{bmatrix} B^1_1 & 0 & 0 & B^2_1 & 0 & 0 & \cdots & B^n_1 & 0 & 0 \\ 0 & B^1_2 & 0 & 0 & B^2_2 & 0 & \cdots & 0 & B^n_2 & 0 \\ 0 & 0 & B^1_3 & 0 & 0 & B^2_3 & \cdots & 0 & 0 & B^n_3 \\ B^1_2 & B^1_1 & 0 & B^2_2 & B^2_1 & 0 & \cdots & B^n_2 & B^n_1 & 0 \\ 0 & B^1_3 & B^1_2 & 0 & B^2_3 & B^2_2 & \cdots & 0 & B^n_3 & B^n_2 \\ B^1_3 & 0 & B^1_1 & B^2_3 & 0 & B^2_1 & \cdots & B^n_3 & 0 & B^n_1 \\ \end{bmatrix} \htmlId{eq:engnotB}{} \tag{5}\end{equation}

    Although (3) looks nice on paper, it is much less optimal for implementation. Implementing it requires the implementation of (5), which adds another layer of complexity to the algorithm. The same cannot be said for (4), because using Voigt notation might be more efficient in inelastic problems. In the most complex problems, the most efficient method is to implement (1) in conjunction with Voigt notation.

    To prove the inefficiency of (3) we can readily compare it with (1) in terms of required number of iterations. Indices in (1) have the following ranges:

    I,J=1,,nandi,j,k,l=1,,d\begin{equation} I,J = 1,\dots,n \quad\text{and}\quad i,j,k,l = 1,\dots,d \tag{6}\end{equation}

    so n2d4n^2d^4 iterations are required. Indices in (2) have the following ranges:

    α,β=1,,ndandγ,δ=1,,d(d+1)/2\begin{equation} \alpha,\beta=1,\dots,nd \quad\text{and}\quad \gamma,\delta=1,\dots,d(d+1)/2 \tag{7}\end{equation}

    so

    (nd)2(d(d+1)2)2=n2d4(d+1)24\begin{equation} (nd)^2\left(\frac{d(d+1)}{2}\right)^2 = n^2d^4\frac{(d+1)^2}{4} \tag{8}\end{equation}

    iterations are required. So engineering notation requires (d+1)2/4(d+1)^2/4 times more equations than index notation. For d=2d=2, engineering notation is 2.252.25 times slower and for d=3d=3 it is 44 times slower. For example, calculation of a stiffness matrix for n=8n=8 and d=3d=3 requires 2073620736 iterations for engineering notation, whereas it only requires 51845184 iterations for index notation.

    Although (3) seems less cluttered, what actually happens is that one trades off complexity in one expression for a much increased complexity in another one, in this case (5). And to make it worse, it results in a slower algorithm.

    The only obstacle to the widespread adoption of index notation seems to be its lack in undergraduate engineering curricula. If engineers were taught the index notation and summation convention as well as the formal notation, such expressions would not be as confusing at first sight. A good place would be in elementary calculus and physics courses, where one heavily uses vector calculus.

  3. Portrait of Onur Solmaz
    Onur Solmaz · Post · /2018/04/01

    Variational Formulation of Elasticity

    $ \newcommand{\argmin}{\mathop{\rm argmin}\nolimits} \newcommand{\cof}{\mathop{\rm cof}\nolimits} \newcommand{\sym}{\mathop{\rm sym}\nolimits} \newcommand{\invtra}{^{-T}} \newcommand{\eps}{\epsilon} \newcommand{\var}{\Delta} \newcommand{\Vvphi}{\Delta\Bvarphi} \newcommand{\vvphi}{\delta\Bvarphi} \newcommand{\BFC}{\boldsymbol{\mathsf{C}}} \newcommand{\BFc}{\boldsymbol{\mathsf{c}}} \newcommand{\push}{\Bvarphi_\ast} \newcommand{\pull}{\Bvarphi^\ast} $

    There are many books that give an outline of hyperelasticity, but there are few that try to help the reader implement solutions, and even fewer that manage to do it in a concise manner. Peter Wriggers’ Nonlinear Finite Element Methods is a great reference for those who like to roll up their sleeves and get lost in theory. It helped me understand a lot about how solutions to hyperelastic and inelastic problems are implemented.

    One thing did not quite fit my taste though—it was very formal in the way that it didn’t give out indicial expressions. And if it wasn’t clear up until this point, I love indicial expressions, because they pack enough information to implement a solution in a single line. Almost all books skip these because they seem cluttered and the professors who wrote them think they’re trivial to derive. In fact, they are not. So below, I’ll try to derive indicial expressions for the update equations of hyperelasticity.

    In the case of a hyperelastic material, there exists a strain energy function

    Ψ:FΨ(F)\begin{equation} \Psi: \BF \mapsto \Psi(\BF) \tag{1}\end{equation}

    which describes the elastic energy stored in the solid, i.e. energy density per unit mass of the reference configuration. The total energy stored in B\CB is described by the the stored energy functional

    E(φ):=BΨ(F)dm=Bρ0Ψ(F)dV\begin{equation} E(\Bvarphi) := \int_{\CB} \Psi(\BF)\, \dif m = \int_{\CB} \rho_0 \Psi(\BF) \dV \tag{2}\end{equation}

    The loads acting on the body also form a potential:

    L(φ):=Bρ0ΓˉφdV+BtTˉφdA\begin{equation} L(\Bvarphi) := \int_{\CB} \rho_0\bar{\BGamma}\dtp\Bvarphi \dV + \int_{\del\CB_t} \bar{\BT}\dtp\Bvarphi \dA \tag{3}\end{equation}

    where Γˉ\bar{\BGamma} and Tˉ\bar{\BT} are the prescribed body forces per unit mass and surface tractions respectively, where T=PN\BT=\BP\BN with Cauchy’s stress theorem.

    The potential energy of B\CB for deformation φ\Bvarphi is defined as

    Π(φ):=E(φ)L(φ)\begin{equation} \Pi(\Bvarphi) := E(\Bvarphi) - L(\Bvarphi) \tag{4}\end{equation}

    Thus the variational formulation reads

    Find φV\Bvarphi\in V such that the functional

    Π(φ)=Bρ0Ψ(F)dVBρ0ΓˉφdVBtTˉφdA\begin{equation} \Pi(\Bvarphi) = \int_{\CB} \rho_0\Psi(\BF) \dV - \int_{\CB} \rho_0\bar{\BGamma}\dtp\Bvarphi \dV - \int_{\del\CB_t} \bar{\BT}\dtp\Bvarphi \dA \tag{5}\end{equation}

    is minimized for φ=φˉ\Bvarphi=\bar{\Bvarphi} on Bu\del\CB_u.

    The solution is one that minimizes the potential energy:

    φ=argminφVΠ(φ)\begin{equation} \Bvarphi^\ast = \argmin_{\Bvarphi\in V} \Pi(\Bvarphi) \tag{6}\end{equation}

    A stationary point for Π\Pi means that its first variation vanishes: ΔΠ=0\var\Pi=0.

    ΔΠ=DφΠδφ=:G(φ,δφ)=Bρ0ΨF:(δφ)dVBρ0ΓˉδφdVBTˉδφdA\begin{equation} \begin{aligned} \var\Pi &= \varn{\Pi}{\Bvarphi}{\vvphi} =: G(\Bvarphi,\vvphi) \\ &= \int_{\CB} \rho_0\partd{\Psi}{\BF}: \nabla(\vvphi) \dV - \int_{\CB} \rho_0\bar{\BGamma}\dtp\vvphi \dV - \int_{\del\CB} \bar{\BT}\dtp\vvphi \dA \end{aligned} \tag{7}\end{equation}

    Using P=FS\BP=\BF\BS and P=ρ0Ψ/F\BP = \rho_0\del\Psi/\del\BF,

    ρ0ΨF:(δφ)=FS:(δφ)=S:FT(δφ)\begin{equation} \rho_0\partd{\Psi}{\BF}: \nabla(\vvphi) = \BF\BS:\nabla(\vvphi) = \BS:\BF\tra\nabla(\vvphi) \tag{8}\end{equation}

    The symmetric part of the term on the right hand side of the contraction is equal to the variation of the Green-Lagrange strain tensor:

    ΔE=DφEδφ=ddϵ12[(φ+ϵδφ)T(φ+ϵδφ)I]ϵ=0=12[(δφ)TF+FT(δφ)]\begin{equation} \begin{aligned} \var\BE = \varn{\BE}{\Bvarphi}{\vvphi} &= \deriv{}{\eps} \frac{1}{2} [\nabla(\Bvarphi+\eps\vvphi)\tra\nabla(\Bvarphi+\eps\vvphi) - \BI]\evat_{\eps=0} \\ &= \frac{1}{2} [\nabla(\vvphi)\tra\BF + \BF\tra\nabla(\vvphi)] \end{aligned} \tag{9}\end{equation}

    Substituting, we obtain the semilinear form GG in terms of the second Piola-Kirchhoff stress tensor:

    G(φ,δφ)=BS:ΔEdVBρ0ΓˉδφdVBTˉδφdA=0\begin{equation} \boxed{ G(\Bvarphi,\vvphi) = \int_{\CB} \BS: \var\BE \dV - \int_{\CB} \rho_0\bar{\BGamma}\dtp\vvphi \dV - \int_{\del\CB} \bar{\BT}\dtp\vvphi \dA = 0 } \htmlId{eq:lagrangianform1}{} \tag{10}\end{equation}

    We can write a Eulerian version of this form by pushing-forward the stresses and strains. The Almansi strain e\Be is the pull-back of the Green-Lagrange strain E\BE and vice versa:

    e=φ(E)=FTEF1andE=φ(e)=FTEF\begin{equation} \Be = \push(\BE) = \BF\invtra \BE \BF\inv \eqand \BE = \pull(\Be) = \BF\tra \BE \BF \tag{11}\end{equation}
    Commutative diagram for the pull-back and push-forward relationships of the Green-Lagrange and Almansi strain tensors.

    Thus we can deduce the variation of the Almansi strain

    Δe=FTΔEF1=12[(δφ)F1+FT(δφ)T]=12[x(δφ)+x(δφ)T]\begin{equation} \begin{aligned} \var \Be = \BF\invtra \var\BE\BF\inv &= \frac{1}{2} [\nabla(\vvphi)\BF\inv+\BF\invtra \nabla(\vvphi)\tra] \\ &= \frac{1}{2} [\nabla_x(\vvphi)+ \nabla_x(\vvphi)\tra] \end{aligned} \tag{12}\end{equation}

    where we have used the identity

    X()F1=x().\begin{equation} \nabla_X(\cdot)\BF\inv = \nabla_x(\cdot). \htmlId{eq:defgradidentity1}{} \tag{13}\end{equation}

    The second Piola-Kirchhoff stress is the pull-back of the Kirchhoff stress τ\Btau:

    S=φ(τ)=F1τFT\begin{equation} \BS = \pull(\Btau) = \BF\inv\Btau\BF\invtra \tag{14}\end{equation}

    Then it is evident that

    S:ΔE=(F1τFT):(FTΔeF)=τ:Δe\begin{equation} \BS:\var\BE = (\BF\inv\Btau\BF\invtra):(\BF\tra\var\Be\BF) = \Btau:\var\Be \tag{15}\end{equation}

    We can thus write the Eulerian version of (10):

    G(φ,δφ)=Bτ:ΔedVBρ0ΓˉδφdVBTˉδφdA=0\begin{equation} \boxed{ G(\Bvarphi,\vvphi) = \int_{\CB} \Btau: \var\Be \dV - \int_{\CB} \rho_0\bar{\BGamma}\dtp\vvphi \dV - \int_{\del\CB} \bar{\BT}\dtp\vvphi \dA = 0 } \tag{16}\end{equation}

    Introducing the Cauchy stresses σ=τ/J\Bsigma=\Btau/J, we can also transport the integrals to the current configuration

    G(φ,δφ)=Sσ:ΔedvSργˉδφdvSttˉδφda=0\begin{equation} \boxed{ G(\Bvarphi,\vvphi) = \int_{\CS} \Bsigma:\var\Be \dv - \int_{\CS} \rho\bar{\Bgamma}\dtp\vvphi \dv - \int_{\del\CS_t} \bar{\Bt}\dtp\vvphi \da = 0 } \tag{17}\end{equation}

    Here, we substituted the following differential identities:

    ρ0ΓdV=ργdv\begin{equation} \rho_0\BGamma\dV = \rho\Bgamma\dv \tag{18}\end{equation}

    for the body forces, and

    TdA=PNdA=σJFTNdA=σnda=tda\begin{equation} \BT\dA = \BP\BN \dA = \Bsigma J\BF\invtra\BN \dA = \Bsigma\Bn \da = \Bt \da \tag{19}\end{equation}

    for the surface tractions, where we used the Piola identity.

    Linearization of the Variational Formulation

    We linearize GG:

    LinGφˉ=G(φˉ,δφ)+ΔGφˉ=0\begin{equation} \Lin G \evat_{\bar{\Bvarphi}} = G(\bar{\Bvarphi}, \vvphi) + \Var G \evat_{\bar{\Bvarphi}} = 0 \tag{20}\end{equation}

    Then we have the variational setting

    a(Δφ,δφ)=b(δφ)\begin{equation} a(\Vvphi,\vvphi)=b(\vvphi) \tag{21}\end{equation}

    where

    a(Δφ,δφ)=ΔGφˉandb(δφ)=G(φˉ,δφ)\begin{equation} a(\Vvphi,\vvphi) = \Var G \evat_{\bar{\Bvarphi}} \eqand b(\vvphi) = -G(\bar{\Bvarphi}, \vvphi) \tag{22}\end{equation}
    Commutative diagram of the linearized solution procedure. Each iteration brings the current iterate φˉ\bar{\Bvarphi} closer to the optimum value φ\Bvarphi^\ast.
    Mappings between line elements belonging to the tangent spaces of the linearization.

    The variation ΔG\Var G is calculated as

    ΔG=DφGΔφ=B[ΔS:ΔE+S:Δ(ΔE)]dV\begin{equation} \Var G = \varn{G}{\Bvarphi}{\Vvphi} = \int_{\CB} [\Var\BS:\var\BE + \BS:\Var(\var\BE)] \dV \tag{23}\end{equation}

    Consecutive variations of the Green-Lagrange strain tensor is calculated as

    Δ(ΔE)=DφΔEΔφ=12[(δφ)T(Δφ)+(Δφ)T(δφ)]\begin{equation} \Var(\var\BE) = \varn{\var\BE}{\Bvarphi}{\Vvphi} = \frac{1}{2}[\nabla(\vvphi)\tra\nabla(\Vvphi) + \nabla(\Vvphi)\tra\nabla(\vvphi)] \tag{24}\end{equation}

    The term on the left is calculated as

    ΔS=DφSΔφ=SC:ΔC=2SC:ΔE\begin{equation} \Var\BS = \varn{\BS}{\Bvarphi}{\Vvphi} = \partd{\BS}{\BC}:\Var\BC = 2 \partd{\BS}{\BC}:\Var\BE \tag{25}\end{equation}

    where we substitute the Lagrangian elasticity tensor

    C:=2SC=4ρ02ΨCC\begin{equation} \BFC := 2 \partd{\BS}{\BC} = 4\rho_0 \frac{\del^2\Psi}{\del\BC\del\BC} \tag{26}\end{equation}

    and ΔE\Var\BE is calculated in the same manner as ΔE\var\BE:

    ΔE=12[(Δφ)TF+FT(Δφ)]\begin{equation} \Var\BE = \frac{1}{2} [\nabla(\Vvphi)\tra\BF + \BF\tra\nabla(\Vvphi)] \tag{27}\end{equation}

    Then the variational forms of the linearized setting are

    a(Δφ,δφ)=BΔEˉ:Cˉ:ΔEˉ+Sˉ:[(δφ)T(Δφ)]dVb(δφ)=BSˉ:ΔEˉdV+Bρ0ΓˉδφdV+BTˉδφdA\begin{equation} \boxed{ \begin{aligned} a(\Vvphi,\vvphi) &= \int_{\CB} \var\bar{\BE}:\bar{\BFC}:\Var\bar{\BE} + \bar{\BS} : [\nabla(\vvphi)\tra\nabla(\Vvphi)] \dV \\ b(\vvphi) &= - \int_{\CB} \bar{\BS}: \var\bar{\BE} \dV + \int_{\CB} \rho_0\bar{\BGamma}\dtp\vvphi \dV + \int_{\del\CB} \bar{\BT}\dtp\vvphi \dA \end{aligned} } \tag{28}\end{equation}

    where the bars denote evaluation φ=φˉ\Bvarphi=\bar{\Bvarphi} of dependent variables.

    Eulerian Version of the Linearization

    We also have the following relationship between the Lagrangian and Eulerian elasticity tensors

    cabcd=FaAFbBFcCFdDCABCD\begin{equation} c_{abcd} = F_{aA}F_{bB}F_{cC}F_{dD} C_{ABCD} \tag{29}\end{equation}

    Substituting Eulerian expansions, we obtain the following identity:

    ΔE:C:ΔE=(FTΔeF):C:(FTΔeF)=FaAΔeabFbBCABCDFcCΔecdFdD=ΔeabcabcdΔecd=Δe:c:Δe\begin{equation} \begin{aligned} \var\BE:\BFC:\Var\BE &= (\BF\tra\var\Be\BF):\BFC:(\BF\tra\Var\Be\BF) \\ &=F_{aA}\var e_{ab} F_{bB} C_{ABCD} F_{cC}\Var e_{cd}F_{dD} \\ &=\var e_{ab} c_{abcd} \Var e_{cd} \\ &= \var\Be:\BFc:\Var\Be \end{aligned} \tag{30}\end{equation}

    Thus we have

    S:[(δφ)T(Δφ)]=[F1τFT]:[(δφ)T(Δφ)]=τ:[((δφ)F1)T(Δφ)F1]=τ:[x(δφ)Tx(Δφ)]\begin{equation} \begin{aligned} \BS:[\nabla(\vvphi)\tra\nabla(\Vvphi)] &= [\BF\inv\Btau\BF\invtra] :[\nabla(\vvphi)\tra\nabla(\Vvphi)] \\ &= \Btau : [(\nabla(\vvphi)\BF\inv)\tra\nabla(\Vvphi)\BF\inv] \\ &= \Btau : [\nabla_x(\vvphi)\tra\nabla_x(\Vvphi)] \\ \end{aligned} \tag{31}\end{equation}

    With these results at hand, we can write the Eulerian version of our variational formulation:

    a(Δφ,δφ)=BΔeˉ:cˉ:Δeˉ+τˉ:[xˉ(δφ)Txˉ(Δφ)]dVb(δφ)=Bτˉ:ΔeˉdV+Bρ0ΓˉδφdV+BTˉδφdA\begin{equation} \boxed{ \begin{aligned} a(\Vvphi,\vvphi) &= \int_{\CB} \var\bar{\Be}:\bar{\BFc}:\Var\bar{\Be} + \bar{\Btau} : [\nabla_{\bar{x}}(\vvphi)\tra\nabla_{\bar{x}}(\Vvphi)] \dV \\ b(\vvphi) &= - \int_{\CB} \bar{\Btau}:\var\bar{\Be} \dV + \int_{\CB} \rho_0\bar{\BGamma}\dtp\vvphi \dV + \int_{\del\CB} \bar{\BT}\dtp\vvphi \dA \end{aligned} } \tag{32}\end{equation}

    If we introduce the Cauchy stress tensor σ\Bsigma and corresponding elasticity tensor cσ=c/J\BFc^\sigma = \BFc/J, our variational formulation can be expressed completely in terms of Eulerian quantities:

    a(Δφ,δφ)=SˉΔeˉ:cˉσ:Δeˉ+σˉ:[xˉ(δφ)Txˉ(Δφ)]dvˉb(δφ)=Sˉσˉ:Δeˉdvˉ+Sˉργˉδφdvˉ+Sˉttˉδφdaˉ\begin{equation} \boxed{ \begin{aligned} a(\Vvphi,\vvphi) &= \int_{\bar{\CS}} \var\bar{\Be}:\bar{\BFc}^\sigma:\Var\bar{\Be} + \bar{\Bsigma} : [\nabla_{\bar{x}}(\vvphi)\tra\nabla_{\bar{x}}(\Vvphi)] \,\dif\bar{v} \\ b(\vvphi) &= - \int_{\bar{\CS}} \bar{\Bsigma}:\var\bar{\Be} \,\dif\bar{v} + \int_{\bar{\CS}} \rho\bar{\Bgamma}\dtp\vvphi \,\dif\bar{v} + \int_{\del\bar{\CS}_t} \bar{\Bt}\dtp\vvphi \,\dif\bar{a} \end{aligned} } \tag{33}\end{equation}

    We have the following relationships of the differential forms:

    dvˉ=Jˉdvandnˉdaˉ=cofFˉNdA\begin{equation} \dif \bar{v} = \bar{J}\dv \eqand \bar{\Bn} \,\dif \bar{a} = \cof \bar{\BF}\BN \dA \tag{34}\end{equation}

    where Fˉ=Xφˉ\bar{\BF} = \nabla_X\bar{\Bvarphi} and Jˉ=detFˉ\bar{J} = \det\bar{\BF}.

    Discretization of the Lagrangian Form

    We use the following FE discretization:

    φh=γ=1nnφγNγ=γ=1nna=1ndφaγeaNγ\begin{equation} \Bvarphi_h = \suml{\gamma=1}{\nnode} \Bvarphi^\gamma N^\gamma = \suml{\gamma=1}{\nnode}\suml{a=1}{\ndim} \varphi_a^\gamma \Be_a N^\gamma \tag{35}\end{equation}

    where nn\nnode is the number of element nodes and nd\ndim is the number of spatial dimensions.

    We use the same discretization for δφ\vvphi and Δφ\Vvphi. Then the linear system at hand becomes

    δ=1nnb=1ndAabγδΔφbδ=baγ\begin{equation} \suml{\delta=1}{\nnode}\suml{b=1}{\ndim}A_{ab}^{\gamma\delta} \Var\varphi_b^\delta = b_a^\gamma \tag{36}\end{equation}

    for a=1,,nda=1,\dots,\ndim and γ=1,,nn\gamma=1,\dots,\nnode where the A\BA and b\Bb are calculated from the variational forms as

    Aabγδ=a(ebNδ,eaNγ)baγ=b(eaNγ)\begin{equation} \begin{aligned} A_{ab}^{\gamma\delta} &= a(\Be_bN^\delta, \Be_aN^\gamma) \\ b_a^\gamma &= b(\Be_aN^\gamma) \end{aligned} \tag{37}\end{equation}

    For detailed derivation, see the post Vectorial Finite Elements.

    For discretized gradients, we have the following relationship

    X(eaNγ)=(eaBγ)\begin{equation} \nabla_X(\Be_aN^\gamma) = (\Be_a\dyd\BB^\gamma) \tag{38}\end{equation}

    where Bγ:=XNγ\BB^\gamma:= \nabla_X N^\gamma. For the first term in aa, we can get rid of the symmetries:

    sym(FˉT(eaNγ)):Cˉ:sym(FˉT(ebNδ))=(FˉT(eaBγ)):Cˉ:(FˉT(ebBδ))=FˉaABBγCˉABCDFˉbCBDδ\begin{equation} \begin{aligned} \sym&(\bar{\BF}\tra\nabla(\Be_aN^\gamma)):\bar{\BFC}: \sym(\bar{\BF}\tra\nabla(\Be_bN^\delta)) \\ &= (\bar{\BF}\tra(\Be_a\dyd\BB^\gamma)):\bar{\BFC}: (\bar{\BF}\tra(\Be_b\dyd\BB^\delta)) \\ &= \bar{F}_{aA}B^\gamma_B\bar{C}_{ABCD}\bar{F}_{bC}B^\delta_D \end{aligned} \tag{39}\end{equation}

    and for the second term, we have

    Sˉ:[(eaNγ)T(ebNδ)]=Sˉ:[(eaBγ)T(ebBδ)]=Sˉ:[BγBδ]gab=BAγSˉABBBδgab\begin{equation} \begin{aligned} \bar{\BS}:[\nabla(\Be_aN^\gamma)\tra \nabla(\Be_bN^\delta)] &= \bar{\BS}:[(\Be_a\dyd \BB^\gamma)\tra (\Be_b \dyd \BB^\delta)] \\ &= \bar{\BS}:[\BB^\gamma\dyd\BB^\delta] g_{ab} \\ &= B^\gamma_A \bar{S}_{AB}B^\delta_B g_{ab} \end{aligned} \tag{40}\end{equation}

    where gabg_{ab} are the components of the Eulerian metric tensor.

    For the first term in bb, we have

    Sˉ:sym(FˉT(eaNγ))=Sˉ:(FˉT(eaBγ))=SˉABFˉaABBγ\begin{equation} \bar{\BS} : \sym(\bar{\BF}\tra\nabla(\Be_aN^\gamma)) = \bar{\BS} : (\bar{\BF}\tra(\Be_a \dyd \BB^\gamma)) = \bar{S}_{AB} \bar{F}_{aA} B^\gamma_B \tag{41}\end{equation}

    Remaining terms can be calculated in a straightforward manner. We then have for A\BA and b\Bb:

    Aabγδ=BFˉaABBγCˉABCDFˉbCBDδ+BAγSˉABBBδgabdVbaγ=BSˉABFˉaABBγdV+Bρ0ΓˉaNγdV+BtTˉaNγdA\begin{equation} \boxed{ \begin{aligned} A_{ab}^{\gamma\delta} &= \int_{\CB} \bar{F}_{aA}B^\gamma_B\bar{C}_{ABCD}\bar{F}_{bC}B^\delta_D + B^\gamma_A \bar{S}_{AB}B^\delta_B g_{ab} \dV \\ b_a^\gamma &= -\int_{\CB} \bar{S}_{AB} \bar{F}_{aA} B^\gamma_B \dV + \int_{\CB}\rho_0\bar{\Gamma}_aN^\gamma \dV + \int_{\del\CB_t}\bar{T}_aN^\gamma \dA \end{aligned} } \tag{42}\end{equation}

    The lowercase indices in γˉ\bar{\Bgamma} and Tˉ\bar{\BT} might be confusing, but in fact

    Γa(X,t)=γa(x,t)φ(X,t)Ta(X,t)=ta(x,t)φ(X,t)\begin{equation} \begin{aligned} \Gamma_a(\BX,t) &= \gamma_a(\Bx, t) \circ \Bvarphi(\BX,t) \\ T_a(\BX,t) &= t_a(\Bx, t) \circ \Bvarphi(\BX,t) \\ \end{aligned} \tag{43}\end{equation}

    The system is solved for Δφ\Vvphi at each Newton iteration with the following update equation:

    φφˉ+Δφ\begin{equation} \Bvarphi \leftarrow \bar{\Bvarphi} + \Vvphi \htmlId{eq:lagrangianupdate1}{} \tag{44}\end{equation}

    Discretization of the Eulerian Form

    Discretization of the Eulerian formulation parallels that of Lagrangian.

    Aabγδ=BBˉcγcˉacbdBˉdδ+BˉeγτˉefBˉfδgabdVbaγ=BτˉabBˉbγdV+Bρ0ΓˉaNγdV+BtTˉaNγdAorAabγδ=SˉBˉcγcˉacbdσBˉdδ+BˉeγσˉefBˉfδgabdvˉbaγ=SˉσˉabBˉbγdvˉ+SˉργˉaNγdvˉ+SˉttˉaNγdaˉ\begin{gather} \boxed{ \begin{aligned} A_{ab}^{\gamma\delta} &= \int_{\CB} \bar{B}^\gamma_c \bar{c}_{acbd}\bar{B}^\delta_d + \bar{B}^\gamma_e \bar{\tau}_{ef}\bar{B}^\delta_f g_{ab} \dV \\ b_a^\gamma &= -\int_{\CB} \bar{\tau}_{ab} \bar{B}^\gamma_b \dV + \int_{\CB}\rho_0 \bar{\Gamma}_aN^\gamma \dV + \int_{\del\CB_t}\bar{T}_aN^\gamma \dA \end{aligned} } \tag{45}\\ \text{or} \nonumber \\ \boxed{ \begin{aligned} A_{ab}^{\gamma\delta} &= \int_{\bar{\CS}} \bar{B}^\gamma_c \bar{c}^\sigma_{acbd}\bar{B}^\delta_d + \bar{B}^\gamma_e \bar{\sigma}_{ef}\bar{B}^\delta_f g_{ab} \,\dif\bar{v} \\ b_a^\gamma &= -\int_{\bar{\CS}} \bar{\sigma}_{ab} \bar{B}^\gamma_b \,\dif\bar{v} + \int_{\bar{\CS}}\rho \bar{\gamma}_aN^\gamma \,\dif\bar{v} + \int_{\del\bar{\CS}_t}\bar{t}_aN^\gamma \,\dif\bar{a} \end{aligned} } \tag{46}\end{gather}

    Here, Bˉγ=xˉNγ\bar{\BB}^\gamma = \nabla_{\bar{x}} N^\gamma denote the spatial gradients of the shape functions. One way of calculating is Bˉγ=FˉTBγ\bar{\BB}^\gamma = \bar{\BF}\invtra\BB^\gamma, similar to (13).

    The update equation (44) holds for the Eulerian version.

    Conclusion

    The equations above in boxes contain all the information needed to implement the nonlinear solution scheme of hyperelasticity.