pub struct PyElasticMaterial {
pub youngs_modulus: f64,
pub poisson_ratio: f64,
pub density: f64,
}Expand description
Linear elastic isotropic material.
Fields§
§youngs_modulus: f64Young’s modulus E (Pa).
poisson_ratio: f64Poisson’s ratio ν (dimensionless, 0..0.5).
density: f64Mass density ρ (kg/m³).
Implementations§
Source§impl PyElasticMaterial
impl PyElasticMaterial
Sourcepub fn new(youngs_modulus: f64, poisson_ratio: f64, density: f64) -> Self
pub fn new(youngs_modulus: f64, poisson_ratio: f64, density: f64) -> Self
Create a new linear elastic material.
Sourcepub fn stress_from_strain(&self, strain: [f64; 3]) -> [f64; 3]
pub fn stress_from_strain(&self, strain: [f64; 3]) -> [f64; 3]
Compute the Cauchy stress vector \[σxx, σyy, τxy\] from the
engineering strain vector \[εxx, εyy, γxy\] using plane-stress
constitutive relations.
Sourcepub fn strain_energy_density(&self, strain: [f64; 3]) -> f64
pub fn strain_energy_density(&self, strain: [f64; 3]) -> f64
Compute the elastic strain energy density (J/m³) given a strain vector.
Sourcepub fn shear_modulus(&self) -> f64
pub fn shear_modulus(&self) -> f64
Shear modulus G derived from E and ν.
Sourcepub fn bulk_modulus(&self) -> f64
pub fn bulk_modulus(&self) -> f64
Bulk modulus K derived from E and ν.
Trait Implementations§
Source§impl Clone for PyElasticMaterial
impl Clone for PyElasticMaterial
Source§fn clone(&self) -> PyElasticMaterial
fn clone(&self) -> PyElasticMaterial
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PyElasticMaterial
impl Debug for PyElasticMaterial
Source§impl Default for PyElasticMaterial
impl Default for PyElasticMaterial
Source§impl<'de> Deserialize<'de> for PyElasticMaterial
impl<'de> Deserialize<'de> for PyElasticMaterial
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PyElasticMaterial
impl RefUnwindSafe for PyElasticMaterial
impl Send for PyElasticMaterial
impl Sync for PyElasticMaterial
impl Unpin for PyElasticMaterial
impl UnsafeUnpin for PyElasticMaterial
impl UnwindSafe for PyElasticMaterial
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
Mutably borrows from an owned value. Read more
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.