Skip to main content

axial_deformation

Function axial_deformation 

pub fn axial_deformation(
    force: f64,
    length: f64,
    area: f64,
    youngs_modulus: f64,
) -> Option<f64>
Expand description

Computes axial deformation of a prismatic bar under linear elastic loading.

Formula: δ = FL / AE.

Returns None when length is negative, area is less than or equal to zero, youngs_modulus is less than or equal to zero, or when any input or result is not finite.

§Examples

use use_elasticity::axial_deformation;

assert_eq!(axial_deformation(100.0, 10.0, 2.0, 1_000.0), Some(0.5));