White box / Physical formulations / Solid elements

HEX20 · quadratic serendipity hexahedron

Physical formulation · assumptions, essential equations, full derivation, algorithm, code and verification references.

Browse another sheet Physical formulations / Solid elements
Physical formulationsSolid elementsSheet 4 / 6
Physical formulationQUALIFIED_BOUNDED · nonlinear extensions remain narrower

Twenty-node isoparametric solid with eight corners and twelve edge nodes. The implementation uses complete 3×3×3 integration.

01 Model and scope

Eight corner and twelve edge functions provide a quadratic serendipity interpolation without face or interior nodes. Geometry and displacement share that interpolation; all 27 quadrature contributions depend on the local Jacobian, so midside placement and connectivity affect the result.

Route assumptions and calculation checks

  1. Midside-node ordering is part of the Gmsh-compatible connectivity contract.
  2. Quadratic edges are curved only when midside coordinates follow the intended geometry.
  3. A linear registry row does not imply general nonlinear or contact coverage.

02 Essential equations and symbols

Na=18(1+raξ)(1+saη)(1+taζ)(raξ+saη+taζ−2),a=1,…,8N_a=\frac18(1+r_a\xi)(1+s_a\eta)(1+t_a\zeta)(r_a\xi+s_a\eta+t_a\zeta-2),\quad a=1,\ldots,8Nξe=14(1−ξ2)(1+seη)(1+teζ)(edge parallel to ξ)N_{\xi e}=\frac14(1-\xi^2)(1+s_e\eta)(1+t_e\zeta)\quad\text{(edge parallel to }\xi\text{)}Nηe,Nζe follow by cyclic permutation of (ξ,η,ζ)N_{\eta e},N_{\zeta e}\text{ follow by cyclic permutation of }(\xi,\eta,\zeta)Ke=∑q=127wqdet⁡(Jq)BqTDBq\mathbf K_e=\sum_{q=1}^{27}w_q\det(\mathbf J_q)\mathbf B_q^T\mathbf D\mathbf B_q

Definitions and conventions

Nₐ
Shape function for corner or edge node a.
(rₐ,sₐ,tₐ)
Parent-coordinate signs for a corner.
JJ
Reference-to-physical Jacobian.
∑27\sum{}_{27}
The complete 3 × 3 × 3 integration rule.
123456788 corners + 12 edge nodes60 translational element DOFs27-point 3 × 3 × 3 stiffness and massJacobian checked at the 27 rule points
HEX20 topology and 27-point stiffnessThe serendipity element has no face-centre or interior node. Edge-node connectivity follows the documented Gmsh second-order incomplete-hexahedron order.
5 detailed steps

03 Step by step derivation

Follow the assumptions, equations and discrete operations in order. The full explanation stays visible.

1 · Topology, node order, and DOFs

HEX20 has eight corners and twelve midside edge nodes, with no face-centre or interior nodes. QF Solver follows Gmsh's second-order incomplete-hexahedron ordering (element type 17). Each of the twenty nodes contributes three translations, giving a 60-entry element vector. Edge ordering is part of connectivity correctness.

qe=[u1,v1,w1,…,u20,v20,w20]T∈R60\mathbf q_e=[u_1,v_1,w_1,\ldots,u_{20},v_{20},w_{20}]^T\in\mathbb R^{60}Na(xb)=δab,∑a=120Na=1N_a(\mathbf x_b)=\delta_{ab},\qquad \sum_{a=1}^{20}N_a=1

Reordering only the twelve midside nodes changes the geometry and displacement field, even if the eight corners still look correct.

2 · Corner and edge shape functions

The serendipity basis uses a quadratic correction at each corner and a parabolic factor along each edge. The edge formula is written for a free parent coordinate; the other two coordinates are fixed at the edge signs. There are no face or volume bubbles in this 20-node family.

Na=18(1+raξ)(1+saη)(1+taζ)(raξ+saη+taζ−2)cornerN_a=\frac18(1+r_a\xi)(1+s_a\eta)(1+t_a\zeta)(r_a\xi+s_a\eta+t_a\zeta-2)\quad\text{corner}Ne=14(1−ξ2)(1+seη)(1+teζ)edge parallel to ξN_e=\frac14(1-\xi^2)(1+s_e\eta)(1+t_e\zeta)\quad\text{edge parallel to }\xiNe=14(1−η2)(1+reξ)(1+teζ)edge parallel to ηN_e=\frac14(1-\eta^2)(1+r_e\xi)(1+t_e\zeta)\quad\text{edge parallel to }\etaNe=14(1−ζ2)(1+reξ)(1+seη)edge parallel to ζN_e=\frac14(1-\zeta^2)(1+r_e\xi)(1+s_e\eta)\quad\text{edge parallel to }\zeta

3 · Isoparametric map and 27-point stiffness

The same basis interpolates x and u. The Jacobian varies over a distorted cell, and physical derivatives are evaluated at the integration points. The production rule is complete 3×3×3 Gauss integration: three Gauss points along each parent direction, 27 total.

x=∑a=120Naxa,uh=∑a=120Naua\mathbf x=\sum_{a=1}^{20}N_a\mathbf x_a,\qquad \mathbf u_h=\sum_{a=1}^{20}N_a\mathbf u_aJ=∂x∂ξ,∇ ⁣xNa=J−T∇ ⁣ξNa\mathbf J=\frac{\partial\mathbf x}{\partial\boldsymbol\xi},\qquad \nabla_{\!x}N_a=\mathbf J^{-T}\nabla_{\!\xi}N_aKe=∑q=127wqdet⁡(Jq)BqTDBq\mathbf K_e=\sum_{q=1}^{27}w_q\det(\mathbf J_q)\mathbf B_q^T\mathbf D\mathbf B_q

The implementation checks the determinant at all 27 Gauss points and rejects non-positive or near-zero values. A finite sample set is not a global positivity proof for every curved mapping.

4 · Mass and constitutive integration

Consistent mass is integrated from NᵀN with the same 27-point rule and requires positive density. The nonlinear trial-state/tangent path keeps a state at each integration point. Optional row-sum mass lumping exists as a helper; do not infer that a lumped modal route is qualified unless a registry row says so.

Me=∑q=127ρwqdet⁡(Jq)[NqTNq⊗I3]\mathbf M_e=\sum_{q=1}^{27}\rho w_q\det(\mathbf J_q)[\mathbf N_q^T\mathbf N_q\otimes\mathbf I_3]fint,e=∑qwqdet⁡(Jq)BqTσq\mathbf f_{int,e}=\sum_qw_q\det(\mathbf J_q)\mathbf B_q^T\boldsymbol\sigma_qKt,e=∑qwqdet⁡(Jq)BqTDt,qBq\mathbf K_{t,e}=\sum_qw_q\det(\mathbf J_q)\mathbf B_q^T\mathbf D_{t,q}\mathbf B_q

5 · Proof obligations and limitations

The meaningful checks are not only matrix symmetry: verify partition of unity, affine reproduction, six free rigid modes, mass positivity, Jacobian orientation, and mesh-order conversion. A curved edge requires a physically placed midside node; a straight midside placement produces straight edges. The 3×3×3 rule and a passing patch do not establish all nonlinear, contact, or distorted-cell combinations. Consult the versioned maturity row for the exact scope.

04 Algorithm and implementation

Source excerpt · v0.2.11

The element validates geometry, forms the physical B matrix at every Gauss point, and accumulates the 60 × 60 stiffness using the local Jacobian determinant.

Functions shown: stiffness

Code
def stiffness(self, coords: np.ndarray) -> np.ndarray:
    stiffness = np.zeros((60, 60), dtype=float)
    for _, weight, b_matrix, determinant in self.integration_data(coords):
        stiffness += weight * determinant * (
            b_matrix.T @ self.material.elasticity_matrix @ b_matrix
        )
    return symmetrize(stiffness)
Read the complete versioned implementation →

05 Verification and limitations

QUALIFIED_BOUNDED · nonlinear extensions remain narrower

Linear elasticity and bounded J2 extension evidence; inspect the exact row before applying it.

Each reference supports its own model, observable and analysis route. Read the original contract and limitations before transferring a conclusion.

06 Sources and related sheets

Continue the reasoning

Back to sheet contents ↑