Expand description
Primitive elasticity helpers.
Initial calculations assume SI units unless otherwise documented.
§Examples
use use_material_elasticity::{
ElasticModulus, elastic_deformation, strain_from_modulus, stress_from_modulus,
youngs_modulus,
};
let modulus = ElasticModulus::new(200_000_000_000.0).unwrap();
assert_eq!(modulus.gigapascals(), 200.0);
assert_eq!(youngs_modulus(400_000_000.0, 0.002).unwrap(), 200_000_000_000.0);
assert_eq!(stress_from_modulus(200_000_000_000.0, 0.002).unwrap(), 400_000_000.0);
assert_eq!(strain_from_modulus(400_000_000.0, 200_000_000_000.0).unwrap(), 0.002);
assert_eq!(elastic_deformation(1_000.0, 2.0, 0.01, 200_000_000_000.0).unwrap(), 0.000_001);Structs§
Enums§
Functions§
- elastic_
deformation - Computes axial elastic deformation.
- strain_
from_ modulus - Computes strain from stress and modulus.
- stress_
from_ modulus - Computes stress from modulus and strain.
- youngs_
modulus - Computes Young’s modulus from stress and strain.