pub struct MaterialProperties {
pub name: String,
pub density: f64,
pub youngs_modulus: f64,
pub poisson_ratio: f64,
pub tensile_strength: f64,
pub viscosity: f64,
pub yield_strength: f64,
}Expand description
Material property record returned by query functions.
Fields§
§name: StringMaterial name.
density: f64Density in kg/m³.
youngs_modulus: f64Young’s modulus in Pa.
poisson_ratio: f64Poisson’s ratio (dimensionless).
tensile_strength: f64Ultimate tensile strength in Pa.
viscosity: f64Dynamic viscosity in Pa·s (0 for solids).
yield_strength: f64Yield strength in Pa (0 if not applicable).
Implementations§
Source§impl MaterialProperties
impl MaterialProperties
Sourcepub fn lookup(name: &str) -> Option<Self>
pub fn lookup(name: &str) -> Option<Self>
Lookup a material by name (case-insensitive).
Returns None if the name is unknown.
Sourcepub fn p_wave_speed(&self) -> Option<f64>
pub fn p_wave_speed(&self) -> Option<f64>
Compute the speed of longitudinal acoustic wave (P-wave) in m/s.
Returns None for fluids where youngs_modulus == 0.
Sourcepub fn s_wave_speed(&self) -> Option<f64>
pub fn s_wave_speed(&self) -> Option<f64>
Compute the shear wave speed (S-wave) in m/s.
Returns None for fluids.
Trait Implementations§
Source§impl Clone for MaterialProperties
impl Clone for MaterialProperties
Source§fn clone(&self) -> MaterialProperties
fn clone(&self) -> MaterialProperties
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 MaterialProperties
impl Debug for MaterialProperties
Source§impl PartialEq for MaterialProperties
impl PartialEq for MaterialProperties
impl StructuralPartialEq for MaterialProperties
Auto Trait Implementations§
impl Freeze for MaterialProperties
impl RefUnwindSafe for MaterialProperties
impl Send for MaterialProperties
impl Sync for MaterialProperties
impl Unpin for MaterialProperties
impl UnsafeUnpin for MaterialProperties
impl UnwindSafe for MaterialProperties
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.