Variational form and the discretised equations#

This chapter develops the linear-elastic finite-element equations femorph-solver assembles and solves. The treatment follows Bathe (2014) §4 and Zienkiewicz & Taylor (2013) §2 + §8 closely; readers familiar with FE foundations can skip to Isoparametric mapping for the geometric mapping.

Strong form: Cauchy momentum#

For a linear-elastic body \(\Omega \subset \mathbb{R}^{3}\) with displacement field \(\mathbf{u}(\mathbf{x})\), body force \(\mathbf{b}(\mathbf{x})\), and surface traction \(\mathbf{t}(\mathbf{x})\) prescribed on \(\partial \Omega_{t} \subseteq \partial \Omega\), static equilibrium reads

(1)#\[\nabla \cdot \boldsymbol{\sigma} + \mathbf{b} = \mathbf{0} \quad \text{in } \Omega,\]

with the constitutive law \(\boldsymbol{\sigma} = \mathbf{C} \boldsymbol{\varepsilon}\) (Hooke) and the small-strain kinematics

\[\boldsymbol{\varepsilon} = \tfrac{1}{2}\! \bigl(\nabla \mathbf{u} + (\nabla \mathbf{u})^{\!\top}\bigr).\]

Boundary conditions partition \(\partial \Omega\) into

  • a Dirichlet portion \(\partial \Omega_{u}\) where \(\mathbf{u} = \bar{\mathbf{u}}\) is prescribed, and

  • a Neumann portion \(\partial \Omega_{t}\) where \(\boldsymbol{\sigma}\,\hat{\mathbf{n}} = \mathbf{t}\) is prescribed,

with \(\partial \Omega_{u} \cap \partial \Omega_{t} = \varnothing\). The dynamic generalisation adds the inertia term \(\rho\, \ddot{\mathbf{u}}\) on the left.

Weak form: principle of virtual work#

Multiplying (1) by a test function \(\delta \mathbf{u}\) that vanishes on \(\partial \Omega_{u}\), integrating over \(\Omega\), and using integration by parts (Gauss–Ostrogradsky) on the divergence term gives

(2)#\[\int_{\Omega} \boldsymbol{\varepsilon}(\delta \mathbf{u})^{\!\top} \mathbf{C} \boldsymbol{\varepsilon}(\mathbf{u}) \,\mathrm{d}V \;=\; \int_{\Omega} \delta \mathbf{u}^{\!\top}\, \mathbf{b} \,\mathrm{d}V + \int_{\partial \Omega_{t}} \delta \mathbf{u}^{\!\top}\, \mathbf{t} \,\mathrm{d}A.\]

Equation (2) is the principle of virtual work: the internal virtual strain energy (left) balances the external virtual work (right) for every admissible \(\delta \mathbf{u}\). No second derivatives appear, so the trial / test spaces only need \(H^{1}(\Omega)\) regularity — a key relaxation that admits piecewise-polynomial finite- element approximations.

Galerkin discretisation#

Approximate \(\mathbf{u}\) and \(\delta \mathbf{u}\) in the same finite-dimensional space (Bubnov-Galerkin):

\[\mathbf{u}(\mathbf{x}) \approx \mathbf{N}(\mathbf{x})\, \mathbf{u}_e, \qquad \delta \mathbf{u}(\mathbf{x}) \approx \mathbf{N}(\mathbf{x})\, \delta \mathbf{u}_e,\]

where \(\mathbf{N}\) is a per-element shape-function matrix of size \((\dim, n_\mathrm{dof,e})\) and \(\mathbf{u}_e\) collects the element-local nodal DOFs. The strain follows from the strain-displacement matrix \(\mathbf{B}(\mathbf{x})\),

\[\boldsymbol{\varepsilon}(\mathbf{u}) = \mathbf{B}(\mathbf{x})\, \mathbf{u}_e,\]

with \(\mathbf{B}\) containing the spatial derivatives of \(\mathbf{N}\). Substituting into (2) and requiring the equation to hold for every \(\delta \mathbf{u}_e\) yields the per-element bilinear forms

(3)#\[\mathbf{K}_e = \int_{\Omega_e} \mathbf{B}^{\!\top} \mathbf{C}\, \mathbf{B} \,\mathrm{d}V, \qquad \mathbf{M}_e = \int_{\Omega_e} \rho\, \mathbf{N}^{\!\top}\, \mathbf{N} \,\mathrm{d}V, \qquad \mathbf{f}_e = \int_{\Omega_e} \mathbf{N}^{\!\top}\, \mathbf{b} \,\mathrm{d}V + \int_{\partial \Omega_e \cap \partial \Omega_t} \mathbf{N}^{\!\top}\, \mathbf{t} \,\mathrm{d}A.\]

Assembling per-element contributions into the global vectors gives the linear-elastic static problem

(4)#\[\mathbf{K}\, \mathbf{U} = \mathbf{F},\]

and its dynamic counterpart

(5)#\[\mathbf{M}\, \ddot{\mathbf{U}} + \mathbf{K}\, \mathbf{U} = \mathbf{F}(t),\]

from which the modal eigenvalue problem \(\mathbf{K}\, \boldsymbol{\phi} = \omega^{2}\, \mathbf{M}\, \boldsymbol{\phi}\) falls out by separation of variables.

How femorph-solver evaluates each integral#

  • \(\mathbf{B}\) is supplied by the element kernel (HEX8.ke, TET10.ke, …) — see Element kernels.

  • \(\mathbf{C}\) is built from the element’s material via femorph_solver.elements._stress.elasticity_matrix() for isotropic linear elasticity (Lamé constants from \(E, \nu\)).

  • \(\rho\) is read off the material’s DENS field.

  • \(\mathrm{d}V\) is computed via the isoparametric mapping (Isoparametric mapping) and the integral is evaluated by Gauss quadrature on the reference element.

  • \(\mathbf{f}_e\) is currently assembled from explicit nodal forces (Model.apply_force) — distributed-pressure surface integrals land alongside the PLOAD4 / DSLOAD interop work (TA-11).

Reduction with Dirichlet BCs#

Prescribed-displacement DOFs (Model.fix(node, dof, value)) are eliminated by row/column partitioning of \(\mathbf{K}\) into free / constrained blocks:

\[\begin{split}\begin{bmatrix} \mathbf{K}_{ff} & \mathbf{K}_{fc} \\ \mathbf{K}_{cf} & \mathbf{K}_{cc} \end{bmatrix} \begin{bmatrix} \mathbf{u}_f \\ \mathbf{u}_c \end{bmatrix} = \begin{bmatrix} \mathbf{f}_f \\ \mathbf{f}_c \end{bmatrix}.\end{split}\]

Solving for \(\mathbf{u}_f\) reduces to

\[\mathbf{K}_{ff}\, \mathbf{u}_f = \mathbf{f}_f - \mathbf{K}_{fc}\, \mathbf{u}_c,\]

and the constrained-DOF reactions follow as \(\mathbf{r}_c = \mathbf{K}_{cf}\, \mathbf{u}_f + \mathbf{K}_{cc}\, \mathbf{u}_c - \mathbf{f}_c\).

References#

  • Bathe, K.-J. (2014) Finite Element Procedures, 2nd ed., Watertown, MA, §4 (linear FE for solid mechanics).

  • Zienkiewicz, O. C. and Taylor, R. L. (2013) The Finite Element Method: Its Basis and Fundamentals, 7th ed., Butterworth-Heinemann, §2 (variational principles), §8 (general elastic body equations).

  • Hughes, T. J. R. (2000) The Finite Element Method — Linear Static and Dynamic Finite Element Analysis, Dover, §1 (linear elastostatics) + §3 (Galerkin discretisation).

  • Cook, R. D., Malkus, D. S., Plesha, M. E., Witt, R. J. (2002) Concepts and Applications of Finite Element Analysis, 4th ed., Wiley, §4 (variational methods).

  • Reddy, J. N. (2004) An Introduction to Nonlinear Finite Element Analysis, Oxford UP, §2 (weak-form derivation including dynamic and damping terms).