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

Utilities

Coordinate Transforms

The Bond rotation transforms the local (fiber-aligned) 6×6 stiffness matrix to global coordinates:

Sglobal=BTSlocalB

where B is the 6×6 Bond matrix constructed from the 3×3 rotation matrix T.

Sentinel.fiber_rotation_matrix Function
julia
fiber_rotation_matrix(n::AbstractVector) -> SMatrix{3,3,Float64}

Compute the 3×3 rotation matrix T such that the fiber direction n maps to the local 1-axis (x-axis in fiber coordinates).

Columns of T:

  • Column 1 = fiber direction n (maps to local x)

  • Column 2 = transverse direction perpendicular to n in the xy-plane

  • Column 3 = transverse direction completing right-handed frame

Ports fibertox_transformation from FEmesh.f90, lines 851–874.

Arguments

  • n: fiber direction unit vector (3-component, assumed normalized)

Returns

  • T::SMatrix{3,3,Float64}: rotation matrix (orthogonal, det = ±1)

Special case

When the fiber is aligned with z-axis (|n₁| + |n₂| < 1e-8), a special permutation matrix is returned to avoid division by zero.

source
Sentinel.bond_matrix Function
julia
bond_matrix(T::AbstractMatrix) -> SMatrix{6,6,Float64}

Compute the 6×6 Bond transformation matrix for rotating Voigt-notation stiffness/compliance matrices between coordinate frames.

Given a 3×3 rotation matrix T, the bond matrix B satisfies: D_global = Bᵀ · D_local · B

where D is the 6×6 stiffness matrix in Voigt notation (Zienkiewicz ordering).

Ports bondmatrix from FEmesh.f90, lines 881–934.

Arguments

  • T: 3×3 rotation matrix (from fiber_rotation_matrix)

Returns

  • B::SMatrix{6,6,Float64}: 6×6 bond transformation matrix

Voigt ordering (Zienkiewicz)

Position 1 = σ₁₁, Position 2 = σ₂₂, Position 3 = σ₃₃, Position 4 = σ₁₂, Position 5 = σ₂₃, Position 6 = σ₃₁

Reference

Formula 6.24 (Tε) in Zienkiewicz, The Finite Element Method (6th Ed.).

source
Sentinel.rotate_stiffness Function
julia
rotate_stiffness(Slg, fiber_dir) -> Matrix{ComplexF64}

Rotate a 6×6 Voigt stiffness matrix from fiber-local coordinates to global coordinates using the bond transformation.

Implements: S_global = Bᵀ · S_local · B

where B is the bond matrix derived from the fiber rotation matrix.

Arguments

  • Slg: 6×6 local (fiber-aligned) stiffness matrix

  • fiber_dir: fiber direction unit vector (3-component)

Returns

  • Sg::Matrix{ComplexF64}: 6×6 global stiffness matrix
source

Hex27 Node Ordering

Fortran and Ferrite use different local node orderings for hex27 elements.

Sentinel.FORTRAN_TO_FERRITE_HEX27 Constant
julia
FORTRAN_TO_FERRITE_HEX27

Permutation vector mapping Fortran hex27 local node indices to Ferrite (VTK) ordering. ferrite_index = FORTRAN_TO_FERRITE_HEX27[fortran_index]

source
Sentinel.FERRITE_TO_FORTRAN_HEX27 Constant
julia
FERRITE_TO_FORTRAN_HEX27

Inverse permutation mapping Ferrite (VTK) hex27 local node indices to Fortran ordering. fortran_index = FERRITE_TO_FORTRAN_HEX27[ferrite_index]

source

Timing

Sentinel.TimingData Type
julia
TimingData

Accumulates timing measurements for a complete inversion run.

source