◆ FORGE Suite
GitHubMechanical Neuroimaging Lab · Univ. of Delaware
Skip to content

Element Kernels

Interface

Sentinel.element_stiffness! Function
julia
element_stiffness!(Ke, cv_disp, cv_press, cell_coords, ::AbstractMaterialModel,
                   props_at_gp, ω) -> Ke

Compute the complex element stiffness matrix Ke for one element.

Arguments

  • Ke: preallocated (ndofs, ndofs) complex matrix, zeroed before entry

  • cv_disp: Ferrite CellValues for displacement field (updated via reinit!)

  • cv_press: Ferrite CellValues for pressure field (or nothing if not used)

  • cell_coords: node coordinates for the current cell (from Ferrite)

  • model: AbstractMaterialModel singleton that selects the physics kernel

  • props_at_gp: material properties evaluated at each Gauss point (produced by evaluate_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.

source

Gauss Point Material

Sentinel.GaussPointMaterial Type
julia
GaussPointMaterial

Material properties evaluated at a single Gauss point, ready for use in element integration kernels.

Fields

  • μ: complex shear modulus G* [Pa]

  • κ: complex bulk modulus K* Pa

  • C: full 6×6 complex stiffness tensor (for anisotropic models)

  • fiber: fiber direction unit vector (for TI/orthotropic models)

  • ρ: density [kg/m³]

source
Sentinel.PoroelasticNodeMaterial Type
julia
PoroelasticNodeMaterial

Material 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* Pa

  • lambda: complex Lamé first parameter λ* Pa

  • kappa_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).

source

Tet4 Helpers

Sentinel.tet4_basis Function
julia
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 a Vec{3} or 3-element vector with [1]=x, [2]=y, [3]=z components.

Returns

  • dpx::SVector{4,Float64}: ∂N_i/∂x for nodes 1–4

  • dpy::SVector{4,Float64}: ∂N_i/∂y for nodes 1–4

  • dpz::SVector{4,Float64}: ∂N_i/∂z for nodes 1–4

  • vol::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

source
Sentinel.voigt_strain Function
julia
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