FEM Simulation of 3D Deformable Solids

Chapter 4

SIGGRAPH 2012 Course Note


Discretization

4.1. Energy and Force Discretization

Why?

  • In actual simulation, we do not know the deformation map \(\phi\)
    • What we do know: only the nodes before and after deformation, \(X, x\)

    ⇒ Looking at the nodes, the deformation map is interpolated to approximate \(\hat{\phi}(X;x)\)

    • ex) tetrahedron interpolation:

      \[\hat{\phi}(\mathbf{X}) = \sum_{i=1}^{4} N_i(\mathbf{X})\,\mathbf{x}_i\]
      • \(\mathbf{x}_i = \phi(\mathbf{X}_i)\): the deformed position of each vertex
      • \(N_i(\mathbf{X})\): the interpolation function for \(\mathbf{X}\) within the tetrahedron. If linear, barycentric coordinates.
  • In a hyperelastic solid, strain energy is composed of the integral of the energy density function (continuous)

    ⇒ Likewise, discretize

    \[E(\mathbf{x}) := E\left[\hat{\phi}(\vec{X};\mathbf{x})\right] = \int_{\Omega} \Psi\left(\hat{\mathbf{F}}(\vec{X};\mathbf{x})\right) d\vec{X}\] \[E(\mathbf{x}) = \sum_e E^e(\mathbf{x}) = \sum_e \int_{\Omega_e} \Psi\left(\hat{\mathbf{F}}(\vec{X};\mathbf{x})\right) d\vec{X}\]

❓

“expressed as a function of the degrees of freedom x”

Gathering all the position vectors of the N nodes across the entire mesh:

\[\mathbf{x} = (x_1, x_2, ... , x_N)\]

= degree of freedom \(\mathbf{x}\)

⇒ Now the elastic force for each mesh node can be computed:

\[\vec{f}_i(\mathbf{x}) = -\frac{\partial E(\mathbf{x})}{\partial \vec{x}_i} \quad \text{or, collectively} \quad \mathbf{f} := (\vec{f}_1, \vec{f}_2, \ldots, \vec{f}_N) = -\frac{\partial E(\mathbf{x})}{\partial \mathbf{x}}\] \[\vec{f}_i(\mathbf{x}) = \sum_{e \in \mathcal{N}_i} \vec{f}_i^{\,e}(\mathbf{x}), \quad \text{where} \quad \vec{f}_i^{\,e}(\mathbf{x}) = -\frac{\partial E^e(\mathbf{x})}{\partial \vec{x}_i}\]
Proof)

Figure

4.2. Linear Tetrahedral Elements

In a tetrahedral mesh

\[\hat{\phi}(\vec{X}) = \mathbf{A}_i \vec{X} + \vec{b}_i \quad \text{for all} \ \ \vec{X} \in \mathcal{T}_i\]
  • \(A_i, b_i\) corresponds to each tetrahedron.
  • However, in the case of the deformation gradient, it is the same at all nodes. (If you differentiate the equation above, it is constant)

⇒ Represented by a single F:

\[\phi(\vec{X}) = \mathbf{F}\vec{X} + \vec{b}\]

Figure

Here, \(x\) can be obtained directly from \(X\) and \(\mathbf{F}\):

\[\left\{\begin{aligned}\vec{x}_1 &= \mathbf{F}\vec{X}_1 + \vec{b}\\ \vec{x}_2 &= \mathbf{F}\vec{X}_2 + \vec{b}\\ \vec{x}_3 &= \mathbf{F}\vec{X}_3 + \vec{b}\\ \vec{x}_4 &= \mathbf{F}\vec{X}_4 + \vec{b}\end{aligned}\right\} \Rightarrow \left\{\begin{aligned}\vec{x}_1 - \vec{x}_4 &= \mathbf{F}\left(\vec{X}_1 - \vec{X}_4\right)\\ \vec{x}_2 - \vec{x}_4 &= \mathbf{F}\left(\vec{X}_2 - \vec{X}_4\right)\\ \vec{x}_3 - \vec{x}_4 &= \mathbf{F}\left(\vec{X}_3 - \vec{X}_4\right)\end{aligned}\right\}\] \[\begin{aligned} \begin{bmatrix} \vec{x}_1 - \vec{x}_4 & \vec{x}_2 - \vec{x}_4 & \vec{x}_3 - \vec{x}_4 \end{bmatrix} &= \begin{bmatrix} \mathbf{F}\left(\vec{X}_1 - \vec{X}_4\right) & \mathbf{F}\left(\vec{X}_2 - \vec{X}_4\right) & \mathbf{F}\left(\vec{X}_3 - \vec{X}_4\right) \end{bmatrix} \\ \begin{bmatrix} \vec{x}_1 - \vec{x}_4 & \vec{x}_2 - \vec{x}_4 & \vec{x}_3 - \vec{x}_4 \end{bmatrix} &= \mathbf{F}\begin{bmatrix} \vec{X}_1 - \vec{X}_4 & \vec{X}_2 - \vec{X}_4 & \vec{X}_3 - \vec{X}_4 \end{bmatrix} \\ \mathbf{D}_s &= \mathbf{F}\mathbf{D}_m \end{aligned}\]
  • \(\mathbf{D}_s\): Deformed shape matrix
\[\mathbf{D}_s := \left[ \begin{array}{ccc} x_1 - x_4 & x_2 - x_4 & x_3 - x_4 \\ y_1 - y_4 & y_2 - y_4 & y_3 - y_4 \\ z_1 - z_4 & z_2 - z_4 & z_3 - z_4 \end{array} \right]\]
  • \(\mathbf{D}_m\): Reference shape matrix, constant matrix
\[\mathbf{D}_m := \begin{bmatrix} X_1 - X_4 & X_2 - X_4 & X_3 - X_4 \\ Y_1 - Y_4 & Y_2 - Y_4 & Y_3 - Y_4 \\ Z_1 - Z_4 & Z_2 - Z_4 & Z_3 - Z_4 \end{bmatrix}\]
  • \(W = \frac{1}{6}\vert \det \mathbf{D}_m \vert\), (assuming that the reference shape of tetrahedron is non-degenerate)
\[\mathbf{F} = \mathbf{D}_s \mathbf{D}_m^{-1} \quad \text{or} \quad \mathbf{F}(\mathbf{x}) = \mathbf{D}_s(\mathbf{x}) \mathbf{D}_m^{-1}\]

Since \(F, D_m\) are both constant, the \(E\) of this element is:

\[E_i = \int_{T_i} \Psi(\mathbf{F})\,d\vec{X} = \Psi(\mathbf{F}_i)\int_{T_i} d\vec{X} = W\cdot\Psi(\mathbf{F}_i) \quad \text{or} \quad E(\mathbf{x}) = W\cdot\Psi(\mathbf{F}(\mathbf{x}))\]

Consequently, the force is:

\[\mathbf{H} = \begin{bmatrix} \vec{f}_1 & \vec{f}_2 & \vec{f}_3 \end{bmatrix} = -W\mathbf{P}(\mathbf{F})\mathbf{D}_m^{-T} \quad \text{and} \quad \vec{f}_4 = -\vec{f}_1 - \vec{f}_2 - \vec{f}_3\]
Proof)

Figure

Full Algorithm

Figure

4.3. Force Differentials

  • The Implicit Euler method is nonlinear ⇒ situations arise where force differentials must be computed during the linear approximation process:

    \[\delta \mathbf{f} = \delta \mathbf{f}(\mathbf{x}_*; \delta \mathbf{x}) := \left.\frac{\partial \mathbf{f}}{\partial \mathbf{x}}\right\vert _{\mathbf{x}=\mathbf{x}_*} \cdot \delta \mathbf{x}\]

    ⇒ In this case, compute the force differential without computing the stiffness matrix \(\frac{\partial \mathbf{f}}{\partial x}\)!

  • Considering a single tetrahedron as the basis,

    \[\delta\mathbf{H} = \begin{bmatrix} \delta\vec{f_1} & \delta\vec{f_2} & \delta\vec{f_3} \end{bmatrix}\] \[\mathbf{H} = \begin{bmatrix} \vec{f_1} & \vec{f_2} & \vec{f_3} \end{bmatrix} = -W\mathbf{P}(\mathbf{F})\mathbf{D}_m^{-T}\]

    Differentiating this equation,

    \[\delta\mathbf{H} = -W\,\delta\mathbf{P}(\mathbf{F};\delta\mathbf{F})\,\mathbf{D}_m^{-T}\]

    (1) \(\delta \mathbf{F}\) and

    (2) an appropriate \(\delta \mathbf{P}(\mathbf{F}; \delta\mathbf{F})\) must be found

(1) \(\delta \mathbf{F}\)

  • Since \(\mathbf{F} = \mathbf{D}_s\mathbf{D}_m^{-1}\),
\[\delta\mathbf{F} = (\delta\mathbf{D}_s)\mathbf{D}_m^{-1}\] \[\delta\mathbf{D}_s := \begin{bmatrix} \delta x_1 - \delta x_4 & \delta x_2 - \delta x_4 & \delta x_3 - \delta x_4 \\ \delta y_1 - \delta y_4 & \delta y_2 - \delta y_4 & \delta y_3 - \delta y_4 \\ \delta z_1 - \delta z_4 & \delta z_2 - \delta z_4 & \delta z_3 - \delta z_4 \end{bmatrix}\]

(2) \(\delta \mathbf{P}(\mathbf{F}; \delta\mathbf{F})\)

  • Depends on the constitutive model used

    Figure

4.4. An Implicit Time Integration Scheme

Figure

Now the position and velocity are actually updated using the implicit Euler method.

Notations

  • \(\mathbf{f}_e(\mathbf{x*})\): elastic force
  • \(\mathbf{K}(\mathbf{x*}) \ - \frac{\partial \mathbf{f}_e}{\partial \mathbf{x*}}\): elasticity stiffness matrix
  • \(\mathbf{f}_d(\mathbf{x*, v*}) = - \gamma \mathbf{K}(\mathbf{x*}) \mathbf{v*}\): Damping force at position x*
  • \(\mathbf{f}(\mathbf{x*, v*}) = \mathbf{f}_e(\mathbf{x*}) + \mathbf{f}_d(\mathbf{x*, v*})\): The aggregate forces, elastic + damping
  • \(\mathbf{M}\): diagonal, mass matrix

Backward Euler

For time \(t^{n+1} = t^n + \Delta t\):

\[\begin{aligned} \mathbf{x}^{n+1} &= \mathbf{x}^n + \Delta t\,\mathbf{v}^{n+1} \\ \mathbf{v}^{n+1} &= \mathbf{v}^n + \Delta t\,\mathbf{M}^{-1}\mathbf{f}(\mathbf{x}^{n+1},\mathbf{v}^{n+1}) \\ &= \mathbf{v}^n + \Delta t\,\mathbf{M}^{-1}\big(\mathbf{f}_e(\mathbf{x}^{n+1}) + \mathbf{f}_d(\mathbf{x}^{n+1},\mathbf{v}^{n+1})\big) \end{aligned}\]

Since the Backward Euler system is nonlinear, it is approximated by iterating with the Newton-Raphson method:

Figure

Figure

Linearizing \(( \mathbf{x}^{n+1}_{(k)}, \mathbf{v}^{n+1}_{(k)})\):

\[\begin{aligned}\mathbf{v}_{(k)}^{n+1} + \Delta\mathbf{v} &= \mathbf{v}^n + \Delta t\mathbf{M}^{-1}\Big(\mathbf{f}_e(\mathbf{x}_{(k)}^{n+1}) + \frac{\partial\mathbf{f}_e}{\partial\mathbf{x}}\Big\vert _{\mathbf{x}_{(k)}^{n+1}}\cdot\Delta\mathbf{x}\\ &\quad -\gamma\mathbf{K}(\mathbf{x}_{(k)}^{n+1})(\mathbf{v}_{(k)}^{n+1} + \Delta\mathbf{v})\Big)\end{aligned}\]

\(\Delta \mathbf{x}\) is computed below.

\[\begin{aligned} \frac{1}{\Delta t^2}\mathbf{M}\Delta\mathbf{x} &= \frac{1}{\Delta t}\mathbf{M}(\mathbf{v}^n - \mathbf{v}^{n+1}_{(k)}) + \Big(\mathbf{f}_e(\mathbf{x}^{n+1}_{(k)}) \\ &\quad -\mathbf{K}(\mathbf{x}^{n+1}_{(k)})\Delta\mathbf{x} - \gamma\mathbf{K}(\mathbf{x}^{n+1}_{(k)})(\mathbf{v}^{n+1}_{(k)} + \frac{1}{\Delta t}\Delta\mathbf{x})\Big) \\[2ex] \left[\left(1 + \frac{\gamma}{\Delta t}\right)\mathbf{K}(\mathbf{x}^{n+1}_{(k)}) + \frac{1}{\Delta t^2}\mathbf{M}\right]\Delta\mathbf{x} &= \\ &= \frac{1}{\Delta t}\mathbf{M}(\mathbf{v}^n - \mathbf{v}^{n+1}_{(k)}) + \Big(\mathbf{f}_e(\mathbf{x}^{n+1}_{(k)}) - \gamma\mathbf{K}(\mathbf{x}^{n+1}_{(k)})\mathbf{v}^{n+1}_{(k)}\Big) \\ &= \frac{1}{\Delta t}\mathbf{M}(\mathbf{v}^n - \mathbf{v}^{n+1}_{(k)}) + \Big(\mathbf{f}_e(\mathbf{x}^{n+1}_{(k)}) + \mathbf{f}_d(\mathbf{x}^{n+1}_{(k)}, \mathbf{v}^{n+1}_{(k)})\Big) \\ &= \frac{1}{\Delta t}\mathbf{M}(\mathbf{v}^n - \mathbf{v}^{n+1}_{(k)}) + \mathbf{f}(\mathbf{x}^{n+1}_{(k)}, \mathbf{v}^{n+1}_{(k)}) \end{aligned}\]
  • The left-hand side here is symmetric and positive definite, and therefore the solution can be obtained by several methods.

Quasistatic Simulation

If the goal is simply to find a static solution that balances the external and internal forces, the time increment can be sent to infinity. That is, an infinite time step means that the object moves slowly enough that there is no need to consider inertia or damping forces.

Figure