Skip to main content

LinearElastic

Struct LinearElastic 

Source
pub struct LinearElastic {
    pub young_modulus: f64,
    pub poisson_ratio: f64,
}
Expand description

Linear elastic (isotropic) material defined by Young’s modulus and Poisson’s ratio.

Fields§

§young_modulus: f64

Young’s modulus (Pa)

§poisson_ratio: f64

Poisson’s ratio (dimensionless, typically 0..0.5)

Implementations§

Source§

impl LinearElastic

Source

pub fn new(young_modulus: f64, poisson_ratio: f64) -> Self

Create a new linear elastic material.

Source

pub fn bulk_modulus(&self) -> f64

Bulk modulus K = E / (3 * (1 - 2*nu)).

Source

pub fn shear_modulus(&self) -> f64

Shear modulus G = E / (2 * (1 + nu)).

Source

pub fn p_wave_modulus(&self) -> f64

P-wave (constrained) modulus M = E*(1-nu) / ((1+nu)(1-2nu)).

Source

pub fn lame_lambda(&self) -> f64

First Lame parameter lambda = E * nu / ((1 + nu) * (1 - 2*nu)).

Source

pub fn lame_mu(&self) -> f64

Second Lame parameter mu (same as shear modulus).

Source

pub fn stress_strain_matrix_3d(&self) -> [[f64; 6]; 6]

6x6 stress-strain (stiffness) matrix in Voigt notation for 3-D isotropic elasticity.

Order: [sigma_xx, sigma_yy, sigma_zz, sigma_yz, sigma_xz, sigma_xy].

Source

pub fn compliance_matrix_voigt(&self) -> [f64; 36]

6x6 compliance matrix S = C⁻¹ in Voigt notation.

Voigt order: [eps_xx, eps_yy, eps_zz, eps_yz, eps_xz, eps_xy].

Source

pub fn engineering_strains(&self, stress_voigt: [f64; 6]) -> [f64; 6]

Compute engineering strains from a Voigt stress vector using the compliance matrix.

stress_voigt order: [sigma_xx, sigma_yy, sigma_zz, sigma_yz, sigma_xz, sigma_xy].

Trait Implementations§

Source§

impl Clone for LinearElastic

Source§

fn clone(&self) -> LinearElastic

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LinearElastic

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for LinearElastic

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.