pub struct Material {
pub name: Cow<'static, str>,
pub youngs_modulus: f64,
pub poisson_ratio: f64,
pub yield_strength: f64,
pub ultimate_tensile_strength: f64,
pub density: f64,
pub thermal_expansion: f64,
}Expand description
Engineering material with mechanical properties.
Fields§
§name: Cow<'static, str>Material name / identifier.
youngs_modulus: f64Young’s modulus (Pa).
poisson_ratio: f64Poisson’s ratio (dimensionless, typically 0.2-0.5).
yield_strength: f64Yield strength (Pa).
ultimate_tensile_strength: f64Ultimate tensile strength (Pa).
density: f64Density (kg/m^3).
thermal_expansion: f64Coefficient of thermal expansion (1/K).
Implementations§
Source§impl Material
impl Material
Sourcepub fn new(
name: impl Into<Cow<'static, str>>,
youngs_modulus: f64,
poisson_ratio: f64,
yield_strength: f64,
ultimate_tensile_strength: f64,
density: f64,
thermal_expansion: f64,
) -> Result<Self>
pub fn new( name: impl Into<Cow<'static, str>>, youngs_modulus: f64, poisson_ratio: f64, yield_strength: f64, ultimate_tensile_strength: f64, density: f64, thermal_expansion: f64, ) -> Result<Self>
Create a validated material.
Checks: E > 0, -1 < v < 0.5, sigma_y >= 0, UTS >= sigma_y, rho > 0.
Sourcepub fn shear_modulus(&self) -> f64
pub fn shear_modulus(&self) -> f64
Shear modulus G = E / (2(1 + v)).
Sourcepub fn bulk_modulus(&self) -> f64
pub fn bulk_modulus(&self) -> f64
Bulk modulus K = E / (3(1 - 2v)).
Sourcepub fn lame_lambda(&self) -> f64
pub fn lame_lambda(&self) -> f64
First Lame parameter.
Sourcepub fn thermal_strain(&self, delta_t: f64) -> f64
pub fn thermal_strain(&self, delta_t: f64) -> f64
Thermal strain for a given temperature change: e_th = alpha * dT.
Sourcepub fn thermal_stress(&self, delta_t: f64) -> f64
pub fn thermal_stress(&self, delta_t: f64) -> f64
Thermal stress under full constraint: sigma = E * alpha * dT.
Sourcepub fn glass() -> Self
pub fn glass() -> Self
Soda-lime glass.
Note: glass is brittle — yield_strength represents tensile fracture
strength, not a ductile yield point.
Sourcepub fn rubber() -> Self
pub fn rubber() -> Self
Natural rubber (vulcanized).
Note: rubber properties are highly compound-dependent.
yield_strength represents approximate tensile strength.
Sourcepub fn concrete() -> Self
pub fn concrete() -> Self
Normal-strength concrete (C30).
Note: yield_strength is the compressive strength. Concrete has
negligible tensile strength (~3 MPa) and is primarily a
compressive material.
Sourcepub fn wood_oak() -> Self
pub fn wood_oak() -> Self
Oak wood (along grain).
Note: wood is anisotropic — all values are longitudinal (along grain). Cross-grain properties differ significantly.
Sourcepub fn carbon_fiber() -> Self
pub fn carbon_fiber() -> Self
Carbon fiber composite (unidirectional, ~60% Vf, intermediate modulus).
Note: values are longitudinal. Transverse properties are much lower.
yield_strength represents ultimate tensile strength (composites
are brittle — no ductile yield).
Sourcepub fn stainless_steel_304() -> Self
pub fn stainless_steel_304() -> Self
Stainless steel 304 (austenitic).