pub struct StressTensor {
pub matrix: Matrix3<f64>,
}Expand description
Cauchy stress tensor — a symmetric 3×3 tensor representing the state of stress at a point.
Fields§
§matrix: Matrix3<f64>The 3×3 symmetric stress matrix [σ_ij]
Implementations§
Source§impl StressTensor
impl StressTensor
Sourcepub fn new(matrix: Matrix3<f64>) -> Self
pub fn new(matrix: Matrix3<f64>) -> Self
Create a new stress tensor from a 3×3 matrix. The matrix is symmetrized by averaging off-diagonal components.
Sourcepub fn from_components(
sxx: f64,
syy: f64,
szz: f64,
txy: f64,
txz: f64,
tyz: f64,
) -> Self
pub fn from_components( sxx: f64, syy: f64, szz: f64, txy: f64, txz: f64, tyz: f64, ) -> Self
Create a stress tensor from individual components. σ = [[σ_xx, τ_xy, τ_xz], [τ_xy, σ_yy, τ_yz], [τ_xz, τ_yz, σ_zz]]
Sourcepub fn hydrostatic(&self) -> f64
pub fn hydrostatic(&self) -> f64
Hydrostatic (mean) stress: σ_m = (σ_xx + σ_yy + σ_zz) / 3
Sourcepub fn deviatoric(&self) -> StressTensor
pub fn deviatoric(&self) -> StressTensor
Deviatoric stress tensor: s_ij = σ_ij - σ_m * δ_ij
Sourcepub fn first_invariant(&self) -> f64
pub fn first_invariant(&self) -> f64
First invariant (trace): I₁ = σ_xx + σ_yy + σ_zz
Sourcepub fn second_invariant(&self) -> f64
pub fn second_invariant(&self) -> f64
Second invariant: I₂ = σ_xxσ_yy + σ_yyσ_zz + σ_zz*σ_xx - τ_xy² - τ_yz² - τ_xz²
Sourcepub fn third_invariant(&self) -> f64
pub fn third_invariant(&self) -> f64
Third invariant (determinant): I₃ = det(σ)
Sourcepub fn principal_stresses(&self) -> Vector3<f64>
pub fn principal_stresses(&self) -> Vector3<f64>
Principal stresses (eigenvalues of the stress tensor), returned in descending order.
Sourcepub fn traction(&self, normal: &Vector3<f64>) -> Vector3<f64>
pub fn traction(&self, normal: &Vector3<f64>) -> Vector3<f64>
Traction vector on a plane with normal n: t = σ · n
Sourcepub fn normal_stress_on_plane(&self, normal: &Vector3<f64>) -> f64
pub fn normal_stress_on_plane(&self, normal: &Vector3<f64>) -> f64
Normal stress on a plane: σ_n = n · (σ · n)
Sourcepub fn shear_stress_on_plane(&self, normal: &Vector3<f64>) -> f64
pub fn shear_stress_on_plane(&self, normal: &Vector3<f64>) -> f64
Shear stress on a plane: τ = |t - σ_n · n|
Sourcepub fn uniaxial(sigma: f64) -> Self
pub fn uniaxial(sigma: f64) -> Self
Create a uniaxial stress state (σ_xx = σ, all others zero).
Sourcepub fn pure_shear(txy: f64) -> Self
pub fn pure_shear(txy: f64) -> Self
Create a pure shear stress state.
Trait Implementations§
Source§impl Add for StressTensor
impl Add for StressTensor
Source§type Output = StressTensor
type Output = StressTensor
+ operator.Source§impl Clone for StressTensor
impl Clone for StressTensor
Source§fn clone(&self) -> StressTensor
fn clone(&self) -> StressTensor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StressTensor
impl Debug for StressTensor
Source§impl<'de> Deserialize<'de> for StressTensor
impl<'de> Deserialize<'de> for StressTensor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Mul<f64> for StressTensor
impl Mul<f64> for StressTensor
Auto Trait Implementations§
impl Freeze for StressTensor
impl RefUnwindSafe for StressTensor
impl Send for StressTensor
impl Sync for StressTensor
impl Unpin for StressTensor
impl UnsafeUnpin for StressTensor
impl UnwindSafe for StressTensor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.