use-elasticity 0.0.1

Primitive elasticity and Hooke's-law-style helpers
Documentation
  • Coverage
  • 6.25%
    1 out of 16 items documented1 out of 10 items with examples
  • Size
  • Source code size: 6.99 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 395.3 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 7s Average build duration of successful builds.
  • all releases: 6s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-materials
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch
use-elasticity-0.0.1 has been yanked.

Primitive elasticity helpers.

Initial calculations assume SI units unless otherwise documented.

Examples

use use_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.000001);