Element Kernels
Interface
Sentinel.element_stiffness! Function
element_stiffness!(Ke, cv_disp, cv_press, cell_coords, ::AbstractMaterialModel,
props_at_gp, ω) -> KeCompute the complex element stiffness matrix Ke for one element.
Arguments
Ke: preallocated(ndofs, ndofs)complex matrix, zeroed before entrycv_disp: FerriteCellValuesfor displacement field (updated viareinit!)cv_press: FerriteCellValuesfor pressure field (ornothingif not used)cell_coords: node coordinates for the current cell (from Ferrite)model:AbstractMaterialModelsingleton that selects the physics kernelprops_at_gp: material properties evaluated at each Gauss point (produced byevaluate_material_at_gauss_points)ω: angular frequency [rad/s]
Returns
The modified Ke matrix (also modified in-place).
Notes
Each material model must implement this method. The default fallback throws a MethodError with a descriptive message if a model hasn't been implemented yet.
Gauss Point Material
Sentinel.GaussPointMaterial Type
GaussPointMaterialMaterial properties evaluated at a single Gauss point, ready for use in element integration kernels.
Fields
μ: complex shear modulus G* [Pa]κ: complex bulk modulus K* PaC: full 6×6 complex stiffness tensor (for anisotropic models)fiber: fiber direction unit vector (for TI/orthotropic models)ρ: density [kg/m³]
Sentinel.PoroelasticNodeMaterial Type
PoroelasticNodeMaterialMaterial properties for one node of a tet4 poroelastic element. Properties vary nodally within the element (contrast with GaussPointMaterial which varies per Gauss point on hex27).
Fields
G: complex shear modulus G* Palambda: complex Lamé first parameter λ* Pakappa_poro: hydraulic conductivity κ [m²/(Pa·s)] — already converted from log₁₀eta: porosity φ (dimensionless, 0–1) (Fortran: etak)rhop: solid frame (drained) density [kg/m³]rhof: fluid density [kg/m³]rhoa: added (apparent) mass density [kg/m³]
The three density fields are physically constant per material zone but are embedded here so the element_stiffness! signature stays uniform with the other kernels (no extra arguments needed).
Tet4 Helpers
Sentinel.tet4_basis Function
tet4_basis(coords) -> (dpx, dpy, dpz, vol)Compute constant shape function gradients and element volume for a linear tetrahedron (tet4) from its 4 node coordinates.
Ports the Fortran TETBASIS subroutine from tet4.f90.
Arguments
coords: length-4 indexable collection of node positions, each aVec{3}or 3-element vector with[1]=x, [2]=y, [3]=zcomponents.
Returns
dpx::SVector{4,Float64}: ∂N_i/∂x for nodes 1–4dpy::SVector{4,Float64}: ∂N_i/∂y for nodes 1–4dpz::SVector{4,Float64}: ∂N_i/∂z for nodes 1–4vol::Float64: element volume (positive)
Notes
The Fortran builds the matrix H where column i = [1, x_i, y_i, z_i]ᵀ, computes its determinant dH, and extracts gradients from the adjugate: dpx[i] = Adj[i,2]/dH, dpy[i] = Adj[i,3]/dH, dpz[i] = Adj[i,4]/dH vol = |dH| / 6
Properties:
Gradients satisfy partition-of-unity: ∑dpx = ∑dpy = ∑dpz = 0
∫φᵢ dΩ = vol/4 for each linear basis function
Sentinel.voigt_strain Function
voigt_strain(∇u::Tensor{2,3}) -> SVector{6, Float64}Compute the Voigt notation strain vector from the displacement gradient: ε = [∂u/∂x, ∂v/∂y, ∂w/∂z, ∂u/∂y+∂v/∂x, ∂u/∂z+∂w/∂x, ∂v/∂z+∂w/∂y]
This is the symmetric part of ∇u in Voigt notation.
source