{"cells":[{"cell_type":"markdown","source":["# The linear elasticity equation with Coefficient Form PDEs toolbox\n\n","## Introduction\n\n","This notebook deals with the finite element approximation of deformable continuum mechanics problems in three space dimensions.\n","The domain $\\Omega \\subset \\mathbb{R}^3$ represents a deformable medium, initially at rest and to which an external loading $f: \\Omega \\rightarrow \\mathbb{R}^3$ is applied.\n","The objective is to determine the displacement field $u: \\Omega \\rightarrow \\mathbb{R}^3$ induced by this loading once the medium has reached equilibrium.\n","It is assumed that the deformations are small enough to be modeled in the framework of linear elasticity.\n","For simplicity, it is also assumed that the medium is isotropic.\n","We note $\\sigma: \\Omega \\rightarrow \\mathbb{R}^{3,3}$ the stress field.\n","The equilibrium condition is written as follows\n","\n$$\n\\nabla \\cdot \\sigma+f=0 \\quad \\text { in } \\Omega\n$$\n","*Strain tensor.*\\\n","Let us note $\\varepsilon(u): \\Omega \\rightarrow \\mathbb{R}^{3,3}$ the linearized deformation field defined by\n\n","\n$$\n\\varepsilon(u)=\\frac{1}{2}\\left(\\nabla u+\\nabla u^T\\right) .\n$$\n","*Note:* $\\nabla u$ is the field with values in $\\mathbb{R}^{3,3}$ of components $(\\nabla u)_{i j}=\\partial_j u_i, i, j \\in\\{1,2,3\\}$.\n","*Stress-strain relation.*\\\n","In the framework of linear elasticity, the stress field is expressed as a function of the linearized strain field as\n\n","\n$$\n\\sigma(u)=\\lambda \\operatorname{tr}(\\varepsilon(u)) \\mathcal{I}_3+2 \\mu \\varepsilon(u)\n$$\n\n","where $\\lambda$ and $\\mu$ are the Lamé coefficients and $\\mathcal{I}_3$ the identity matrix in $\\mathbb{R}^{3,3}$. Using [the definition of the deformation tensor](#eq-def-epsilon), we get\n\n","\n$$\n\\sigma(u)=\\lambda(\\nabla \\cdot u) \\mathcal{I}_3+\\mu\\left(\\nabla u+\\nabla u^T\\right)\n$$\n","The Lamé coefficients are phenomenological coefficients which, for thermodynamic reasons, are constrained by the relations $\\mu>0$ and $\\lambda+\\frac{2}{3} \\mu \\geq 0$.\n","For simplicity, we assume that $\\lambda \\geq 0$ and that the medium is homogeneous so that the coefficients $\\lambda$ and $\\mu$ are constants.\n","In some applications, it is more convenient to introduce the Young’s modulus $E$ and the Poisson’s ratio $\\nu$ such that\n","*Relation between Lamé coefficients and Young’s modulus.*\\\n","\n$$\n\\left\\{\\begin{aligned}\nE=\\mu \\frac{3 \\lambda+2 \\mu}{\\lambda+\\mu} \\quad \\text { and } \\quad v = \\frac{\\lambda} {2 (\\lambda + \\mu)}\\\\\n\\lambda = \\frac{E \\ \\nu} {(1 + \\nu) \\ (1 - 2\\nu)},\\quad \\mu = \\frac{E} {2 (1 + \\nu)}\n\n\\end{aligned}\n\\right.\n$$\n","The Poisson coefficient is such that $-1 \\leq \\nu<\\frac{1}{2}$; moreover, $\\nu \\geq 0$ if $\\lambda \\geq 0$. A Poisson’s ratio very close to $\\frac{1}{2}$ (i.e. Lamé coefficients such that the ratio $\\frac{1}{2}$ is very large) characterizes a practically incompressible material.\n","The model problem must be completed by boundary conditions. In the following, two cases are considered.\n","*Homogeneous Dirichlet problem*\\\n","we impose the boundary condition\n\n","\n$$\nu=0 \\quad \\text { on } \\partial \\Omega\n$$\n","*Pure traction problem (or Neumann problem)*\\\n","we impose the boundary condition\n\n","\n$$\n\\sigma(u) \\cdot n=g \\quad \\text { on } \\partial \\Omega\n$$\n\n","where $g: \\partial \\Omega \\rightarrow \\mathbb{R}^3$ represents a force field applied on the edge of $\\Omega$ and $n$ the exterior normal to $\\Omega$.\n","Other boundary conditions are possible such as, for example, mixed Dirichlet-Neumann conditions.\n\n","## The mathematical framework\n\n","*Weak formulation.*\\\n","On $\\left[H^1(\\Omega)\\right]^3 \\times\\left[H^1(\\Omega)\\right]^3$, we introduce the bilinear form\n\n","\n$$\na(v, w)=\\int_{\\Omega} \\sigma(v): \\varepsilon(w)=\\int_{\\Omega} \\lambda(\\nabla \\cdot v)(\\nabla \\cdot w)+\\int_{\\Omega} 2 \\mu \\varepsilon(v): \\varepsilon(w).\n$$\n","*Note:* For two matrices $\\sigma$ and $\\varepsilon$ in $\\mathbb{R}^{3,3}, \\sigma: \\varepsilon$ denotes their maximal contraction, which is equal to $\\sum_{i, j=1}^3 \\sigma_{i j} \\varepsilon_{i j}$.\n","It is clear that $a \\in \\mathcal{L}\\left(\\left[H^1(\\Omega)\\right]^3 \\times\\left[H^1(\\Omega)\\right]^3 ; \\mathbb{R}\\right)$.\n","Moreover, the bilinear form $a$ is symmetric and positive.\n","On the other hand, the bilinear form $a$ is singular.\n","Indeed, by introducing the vector space of rigid displacements\n","\n$$\n\\mathcal{R}=\\left\\{z \\in\\left[H^1(\\Omega)\\right]^3 ; \\exists(\\alpha, \\beta) \\in \\mathbb{R}^3 \\times \\mathbb{R}^3, \\forall x \\in \\Omega, z(x)=\\alpha+\\beta \\times x\\right\\}\n$$\n","we have the equivalence\n","\n$$\n(z \\in \\mathcal{R}) \\Longleftrightarrow\\left(\\forall v \\in \\left[H^1(\\Omega)\\right]^3, a(z, v)=0\\right) .\n$$\n","We note that a rigid displacement consists in the compound of a translation and a rotation and that\n","\n$$\n\\mathcal{R} \\cap\\left[H_0^1(\\Omega)\\right]^3=\\{0\\}\n$$\n","since the only rigid displacement that preserves the boundary is the zero displacement.\n","## Homogeneous Dirichlet problem.\n\n","In order to write the homogeneous Dirichlet problem in weak form, we introduce the functional space\n","\n$$\nV_{\\mathrm{D}}=\\left[H_0^1(\\Omega)\\right]^3\n$$\n","and the linear form $f_{\\mathrm{D}} \\in V_{\\mathrm{D}}^{\\prime}$ such that for any $w \\in V_{\\mathrm{D}}$,\n","\n$$\nf_{\\mathrm{D}}(w)=\\int_{\\Omega} f \\cdot w\n$$\n","*Problem Formulation*\\\n","We obtain the following problem:\n\n","\n$$\n\\text { Find } u \\in V_{\\mathrm{D}} \\text { such that }\na(u, w)=f_{\\mathrm{D}}(w), \\quad \\forall w \\in V_{\\mathrm{D}} .\n$$\n","The well-posedness of [the previous problem](#eq-problem-D) follows from the following inequality\n","*Lemma First Korn inequality.*\\\n","Let $\\Omega$ be a domain of $\\mathbb{R}^3$. Let $\\|\\varepsilon(v)\\|_{0, \\Omega}=\\left(\\int_{\\Omega} \\varepsilon(v): \\varepsilon(v)\\right)^{\\frac{1}{2}}$. There exists a constant $\\boldsymbol{\\kappa}_{\\Omega}$ such that\n","[[1st-korn-ineq]]]\n\n","\n$$\n\\forall v \\in\\left[H_0^1(\\Omega)\\right]^3, \\quad \\kappa_{\\Omega}|v\\|_{1, \\Omega}.\n$$\n","The [inequality](#1st-korn-ineq) implies the coercivity of the bilinear form $a$ on $V_{\\mathrm{D}}=\\left[H_0^1(\\Omega)\\right]^3$ since\n","\n$$\n\\forall v \\in\\left[H_0^1(\\Omega)\\right]^3, \\quad a(v, v) \\geq 2 \\mu|\\varepsilon(v)\\|_{0, \\Omega}^2 \\geq 2 \\mu \\kappa_{\\Omega}^2|v||_{1, \\Omega}^2 .\n$$\n","## Pure traction problem\n\n","The mathematical study of the pure traction problem requires some precautions.\n","Indeed, we cannot look for the solution $u$ in $\\left[H^1(\\Omega)\\right]^3$ and ask that for any $w \\in\\left[H^1(\\Omega)\\right]^3$, $a(u, w)=\\int_{\\Omega} f \\cdot w+\\int_{\\partial \\Omega} g \\cdot w$ because the bilinear form $a$ is singular on $\\left[H^1(\\Omega)\\right]^3$.\n","*Necessary condition for the existence of a solution.*\\\n","A necessary condition for the existence of a solution is that\n\n","\n$$\n\\forall z \\in \\mathcal{R}, \\quad \\int_{\\Omega} f \\cdot z+\\int_{\\partial \\Omega} g \\cdot z=0 .\n$$\n","This equation expresses the fact that the resultant of all external forces and their moments are zero.\n","Moreover, the solution $u$, if it exists, is determined only to the nearest rigid displacement.\n","We therefore consider the functional space\n","\n$$\nV_{\\mathrm{N}}=\\left\\{v \\in\\left[H^1(\\Omega)\\right]^3; \\int_{\\Omega} v=0; \\int_{\\Omega} \\nabla \\times v=0\\right\\},\n$$\n","and the linear form $f_{\\mathrm{N}} \\in V_{\\mathrm{N}}^{\\prime}$ such that for any $w \\in V_{\\mathrm{N}}$,\n","\n$$\nf_{\\mathrm{N}}(w)=\\int_{\\Omega} f \\cdot w+\\int_{\\partial \\Omega} g \\cdot w .\n$$\n","We obtain the following problem:\n","\n$$\n\\left\\{\\begin{array}{l}\n\\text { Find } u \\in V_{\\mathrm{N}} \\text { such that } \\\\\na(u, w)=f_{\\mathrm{N}}(w), \\quad \\forall w \\in V_{\\mathrm{N}}\n\\end{array}\\right.\n$$\n","The well-posedness of [this problem](#pure-traction-problem-varf) follows from the following inequality\n","*Lemma Second inequality of Korn.*\\\n","Let $\\Omega$ be a domain of $\\mathbb{R}^3$. There exists a constant $\\kappa_{\\Omega}^{\\prime}$ such that\n","[[2nd-korn-ineq]]\n\n","\n$$\n\\forall v \\in\\left[H^1(\\Omega)\\right]^3, \\quad \\boldsymbol{\\kappa}_{\\Omega}^{\\prime}\\|v\\|_{1, \\Omega} \\leq \\|\\varepsilon(v)\\|_{0, \\Omega}+\\|v\\|_{0, \\Omega}\n$$\n","We show that the [inequality](#2nd-korn-ineq) implies the coercivity of the bilinear form $a$ on $V_{\\mathrm{N}}$.\n","*Note:* ","In continuum mechanics, the test function $w$ involved in the weak formulations is interpreted as an admissible virtual displacement field and the weak formulations express the principle of virtual work. Moreover, the bilinear form $a$ being symmetric and coercive on $V_{\\mathrm{D}}$ and $V_{\\mathrm{N}}$, the unique solution, respectively, minimizes on $V_{\\mathrm{D}}$ and $V_{\\mathrm{N}}$ the energy functional\n","\n$$\n\\mathcal{E}_{\\mathrm{D}}(v)=\\frac{1}{2} \\lambda \\int_{\\Omega}(\\nabla \\cdot v)^2+\\frac{1}{2} \\mu \\int_{\\Omega} \\varepsilon(v): \\varepsilon(v)-f_{\\mathrm{D}}(v)\n$$\n","and\n","\n$$\n\\mathcal{E}_{\\mathrm{N}}(v)=\\frac{1}{2} \\lambda \\int_{\\Omega}(\\nabla \\cdot v)^2+\\frac{1}{2} \\mu \\int_{\\Omega} \\varepsilon(v): \\varepsilon(v)-f_{\\mathbb{N}}(v)\n$$\n","We find the principle of least energy. The quadratic terms in $v$ represent the elastic energy of deformation and the linear terms the potential energy under the external force field.\n","## Conformal approximation\n\n","We consider a conformal approximation of problems by Lagrangian finite elements.\n","We suppose that $\\Omega$ is a polyhedron of $\\mathbb{R}^3$ and we consider a regular and conformal family of affine meshes of $\\Omega$ that we note $\\left\\{\\mathcal{T}_h\\right\\}_{h>0}$.\n","We choose as reference finite element $\\left\\{\\widehat{K}, \\widehat{P}, \\widehat{Sigma}\\right\\}$ a Lagrangian finite element of degree $k \\geq 1$.\n","## Homogeneous Dirichlet problem\n\n","In order to construct a $V_{\\mathrm{D}}$-conformal approximation space, we pose\n","\n$$\nV_{\\mathrm{D} h}=\\left[P_{\\mathrm{c}, h}^k\\right]^3 \\cap\\left[H_0^1(\\Omega)\\right]^3,\n$$\n","The elements of $V_{\\mathrm{D} h}$ are the vector fields of which each component is in $P_{\\mathrm{c}, h}^k$ and which cancel on the boundary of $\\Omega$.\n","We consider the following approximate problem:\n","\n$$\n\\left\\{\\begin{array}{l}\n\\text { Search } u_h \\in V_{\\mathrm{D} h} \\text { such as } \\\\\na\\left(u_h, w_h\\right)=f_{\\mathrm{D}}\\left(w_h\\right), \\quad \\forall w_h \\in V_{\\mathrm{D} h},\n\\end{array}\\right.\n$$\n","which is clearly well-posed since $a$ is coercive on $V_{\\mathrm{D}}$ and $V_{\\mathrm{D}h} \\subset V_{\\mathrm{D}}$.\n","*Theorem Convergence.*\\\n","With the above assumptions, we suppose that the unique solution $u$ is in\n","$\\left[H^{k+1}(\\Omega) \\cap H_0^1(\\Omega)\\right]^3$. Then, there exists a constant $c$ such that for all $h$,\n\n","\n$$\n\\left\\|u-u_h\\right\\|_{1, \\Omega} \\leq c b^k|u|_{k+1, \\Omega}\n$$\n\n","Moreover, if the problem is regularizing (i.e., if there exists a constant $c_s$ such that for any $f \\in\\left[L^2(\\Omega)\\right]^3$, the unique solution satisfies $\\|u|_{2, \\Omega} \\leq c_s\\|f|_{0, \\Omega}$), there exists a constant $c$ such that for any $h$,\n\n","\n$$\n\\left\\|u-u_h\\right\\|_{0, \\Omega} \\leq c h^{k+1}|u|_{k+1, \\Omega} .\n$$\n","*Elements of proof*\\\n","The [estimation](#estimation-conv) results from the lemma of Céa and the interpolation theorem which we apply component by component. The estimate results from the Aubin-Nitsche lemma.\n","## Pure traction problem\n\n","For the pure traction problem, one way to eliminate the arbitrary rigid displacement at the discrete level is to:\n","\n","1. impose that the displacement at one mesh node, $a_0$, is zero;\n","1. choose three other mesh nodes, $a_1, a_2, a_3$, and three unit vectors, $\\tau_1, \\tau_2, \\tau_3$, such that the set $\\left\\{\\left(a_i-a_0\\right) \\times \\tau_i\\right\\}_{1 \\leq i \\leq 3}$ forms a basis of $\\mathbb{R}^3$;\n","1. impose that the displacement at the node $a_i$ along the direction $\\boldsymbol{\\tau}_i$ is zero.\n","\n","*Pure Traction approximation space*\\\n","This leads to the approximation space\n\n","\n$$\n\\begin{aligned}\nV_{\\mathrm{N} h}=\\left\\{v_h \\in\\left[\\mathcal{C}^0(\\bar{\\Omega})\\right]^3 ;\\right. & \\forall K \\in \\mathcal{T}_h, v_h \\circ T_K \\in[\\widehat{P}]^3 ; \\\\ & \\left.v_h\\left(a_0\\right)=0 ; v_h\\left(a_i\\right) \\cdot \\tau_i=0, i \\in\\{1,2,3\\}\\right\\} .\n\\end{aligned}\n$$\n","We consider the following approximated problem:\n","\n$$\n\\left\\{\\begin{array}{l}\n\\text { Find } u_h \\in V_{\\mathrm{N} h} \\text { such as } \\\\\na\\left(u_h, w_h\\right)=f_{\\mathrm{N}}\\left(w_h\\right), \\quad \\forall w_h \\in V_{\\mathrm{N} h} .\n\\end{array}\\right.\n$$\n","Using the second Korn inequality, we show that the bilinear form $a$ is coercive on $V_{\\mathrm{N} h}$ so that the [discrete problem](#approx-problem-N) is well posed.\n","*Theorem Convergence.*\\\n","With the above assumptions, we suppose that the unique solution u of [continuous problem](#pure-traction-problem-varf) is in $\\left[H^{k+1}(\\Omega)\\right]^3 \\cap V_{\\mathrm{N}}$. Then there exists a constant $c$ such that for all $h$,\n\n","\n$$\n\\left\\|u-u_h\\right\\|_{1, \\Omega} \\leq c h^k|u|_{k+1, \\Omega} .\n$$\n\n","Moreover, if $g=0$ and if the [problem](#pure-traction-problem-varf) is regularizing, (i.e. if there exists a constant $c_s$ such that for any $f \\in\\left[L^2(\\Omega)\\right]^3$, the unique solution of [problem](#pure-traction-problem-varf) with $g=0$ satisfies $\\left.\\|u\\|_{2, \\Omega} \\leq c_s\\|f\\|_{0, \\Omega}\\right)$), there exists a constant $c$ such that for any $h$,\n\n","\n$$\n\\left\\|u-u_h\\right\\|_{0, \\Omega} \\leq c h^{k+1}|u|_{k+1, \\Omega}\n$$\n","*Note:* ","A sufficient condition for the problems to be regularizing is that the polyhedron $\\Omega$ is convex and that $g=0$; see, for example, the book by [Grisvard](#grisvard).\n","## Example\n\n"],"metadata":{}},{"cell_type":"code","execution_count":0,"metadata":{"slideshow":{"slide_type":"fragment"}},"outputs":[],"source":["# To be done\n"]},{"cell_type":"markdown","source":["## Virtually incompressible materials: loss of coercivity\n\n","We are now interested in materials whose ratio of Lamé coefficients is such that\n","]\n","\n$$\n\\frac{\\lambda}{\\mu} \\gg 1\n$$\n","This situation occurs when the **Poisson’s ratio** is very close to $\\frac{1}{2}$, i.e. for practically incompressible materials.\n","For such materials, it is observed that if we use a mesh that is not fine enough, the discrete solution is polluted by spurious oscillations. This phenomenon, called ***coercivity loss***.\n","The ratio $\\frac{\\lambda}{\\mu}$ being very large, it is not reasonable to absorb it in the generic constants $c$ appearing in the error estimates.\n","We consider the bilinear form $a$ defined [above](#eq-def-a).\n","*Definition Coercivity and Continuity constants.*\\\n","We pose\n\n","\n$$\n\\begin{aligned}\n& \\alpha_a=\\inf _{v \\in V} \\frac{a(v, v)}{\\|v\\|_{1, \\Omega}^2} \\\\\n& \\omega_a=\\sup _{v \\in V} \\sup _{w \\in V} \\frac{a(v, w)}{\\|v\\|_{1, \\Omega}\\|w\\|_{1, \\Omega}}\n\\end{aligned}\n$$\n\n","where $V$ is the functional space on which the continuous problem is posed.\n","*Note:* Under the [hypothesis](#coercivity-loss), we show that the ratio $\\frac{\\omega_a}{\\alpha_a}$ is of order $\\frac{\\lambda}{\\mu}$.\n","Using the convergence analysis presented in the previous section, we obtain the error estimate\n","\n$$\n\\left\\|u-u_h\\right\\|_{1, \\Omega} \\leq c \\frac{\\lambda}{\\mu} h^k|u|_{k+1, \\Omega}\n$$\n","with a constant $c$ independent of $h$ and the ratio $\\frac{\\lambda}{\\mu}$. This estimate shows that the mesh must be fine enough for the error to be controlled.\n","## Example of coercivity loss\n\n"],"metadata":{}},{"cell_type":"code","execution_count":0,"metadata":{"slideshow":{"slide_type":"fragment"}},"outputs":[],"source":["# TODO\n"]},{"cell_type":"markdown","source":["## Bibliography\n\n","\n","- GRISVARD (P.), Singularities in Boundary Value Problems. Masson, Paris, France, 1992.\n"],"metadata":{"node_name":"ulist"}}],"metadata":{"language_info":{"name":"python","version":"3.9.1"},"kernelspec":{"name":"python3","language":"python"}},"nbformat":4,"nbformat_minor":4}