pub struct Tri6 {
pub el_id: usize,
pub coords: [[f64; 6]; 2],
pub node_ids: [usize; 6],
pub elastic_modulus: f64,
pub shear_modulus: f64,
pub density: f64,
}Expand description
Six-noded quadratic triangular finite element.
Node ordering: [v0, v1, v2, mid01, mid12, mid20] where v0,v1,v2 are vertices and midXX are mid-edge nodes.
Fields§
§el_id: usizeElement id
coords: [[f64; 6]; 2]Coordinates: coords[0] = x[0..6], coords[1] = y[0..6]
node_ids: [usize; 6]Global node ids
elastic_modulus: f64Elastic modulus
shear_modulus: f64Shear modulus
density: f64Density
Implementations§
Source§impl Tri6
impl Tri6
Sourcepub fn from_points(
el_id: usize,
points: [Point; 6],
node_ids: [usize; 6],
em: f64,
gm: f64,
rho: f64,
) -> Result<Self, FemError>
pub fn from_points( el_id: usize, points: [Point; 6], node_ids: [usize; 6], em: f64, gm: f64, rho: f64, ) -> Result<Self, FemError>
Create a Tri6 element from 6 points and node ids.
Validates that the element has positive orientation (CCW winding).
Returns Err(FemError::InvalidElementOrientation) if the element
is degenerate or has negative Jacobian (CW winding).
Sourcepub fn geometric_properties(&self) -> (f64, f64, f64, f64, f64, f64)
pub fn geometric_properties(&self) -> (f64, f64, f64, f64, f64, f64)
Calculate geometric properties: (area, qx, qy, ixx, iyy, ixy).
Sourcepub fn torsion_properties(&self) -> ([[f64; 6]; 6], [f64; 6], [f64; 6])
pub fn torsion_properties(&self) -> ([[f64; 6]; 6], [f64; 6], [f64; 6])
Calculate torsion stiffness matrix (6×6), load vector (6), and constraint vector (6).
Sourcepub fn shear_load_vectors(
&self,
ixx: f64,
iyy: f64,
ixy: f64,
nu: f64,
) -> ([f64; 6], [f64; 6])
pub fn shear_load_vectors( &self, ixx: f64, iyy: f64, ixy: f64, nu: f64, ) -> ([f64; 6], [f64; 6])
Calculate shear load vectors f_psi and f_phi.
Sourcepub fn shear_warping_integrals(
&self,
ixx: f64,
iyy: f64,
ixy: f64,
omega: &[f64; 6],
) -> (f64, f64, f64, f64, f64, f64)
pub fn shear_warping_integrals( &self, ixx: f64, iyy: f64, ixy: f64, omega: &[f64; 6], ) -> (f64, f64, f64, f64, f64, f64)
Calculate shear centre and warping integrals.
Returns (sc_xint, sc_yint, q_omega, i_omega, i_xomega, i_yomega).
Sourcepub fn shear_coefficients(
&self,
ixx: f64,
iyy: f64,
ixy: f64,
psi_shear: &[f64; 6],
phi_shear: &[f64; 6],
nu: f64,
) -> (f64, f64, f64)
pub fn shear_coefficients( &self, ixx: f64, iyy: f64, ixy: f64, psi_shear: &[f64; 6], phi_shear: &[f64; 6], nu: f64, ) -> (f64, f64, f64)
Calculate shear deformation coefficients (kappa_x, kappa_y, kappa_xy).
Sourcepub fn monosymmetry_integrals(&self, phi: f64) -> (f64, f64, f64, f64)
pub fn monosymmetry_integrals(&self, phi: f64) -> (f64, f64, f64, f64)
Calculate monosymmetry integrals (int_x, int_y, int_11, int_22).
phi is the principal axis angle in radians.
Sourcepub fn torsion_shear_stress(&self, omega: &[f64; 6]) -> (f64, (f64, f64))
pub fn torsion_shear_stress(&self, omega: &[f64; 6]) -> (f64, (f64, f64))
Calculate the St. Venant shear-stress factor at Gauss points.
For pure torsion with torque T, the stress is T / J times the
returned factor: (∂ω/∂x - y, ∂ω/∂y + x).
Returns (max_shear_stress_magnitude, max_shear_stress_vector) where max_shear_stress_vector = (tau_x, tau_y) at the point of max magnitude.
Sourcepub fn element_stress(
&self,
n: f64,
mxx: f64,
myy: f64,
m11: f64,
m22: f64,
mzz: f64,
vx: f64,
vy: f64,
ea: f64,
cx: f64,
cy: f64,
ixx: f64,
iyy: f64,
ixy: f64,
i11: f64,
i22: f64,
phi: f64,
j: f64,
nu: f64,
omega: &[f64; 6],
psi_shear: &[f64; 6],
phi_shear: &[f64; 6],
delta_s: f64,
) -> [[f64; 6]; 11]
pub fn element_stress( &self, n: f64, mxx: f64, myy: f64, m11: f64, m22: f64, mzz: f64, vx: f64, vy: f64, ea: f64, cx: f64, cy: f64, ixx: f64, iyy: f64, ixy: f64, i11: f64, i22: f64, phi: f64, j: f64, nu: f64, omega: &[f64; 6], psi_shear: &[f64; 6], phi_shear: &[f64; 6], delta_s: f64, ) -> [[f64; 6]; 11]
Calculate element stresses at the 6 Gauss points, extrapolated to nodes.
Returns 11 nodal stress arrays (each length 6): (sig_zz_n, sig_zz_mxx, sig_zz_myy, sig_zz_m11, sig_zz_m22, sig_zx_mzz, sig_zy_mzz, sig_zx_vx, sig_zy_vx, sig_zx_vy, sig_zy_vy)