use-thermal-expansion 0.0.1

Primitive thermal-expansion helpers
Documentation
  • Coverage
  • 7.14%
    1 out of 14 items documented1 out of 10 items with examples
  • Size
  • Source code size: 7.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 405.35 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s 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

Primitive thermal-expansion helpers.

Initial calculations assume SI units unless otherwise documented. For temperature differences, ΔK and Δ°C are treated equivalently.

Examples

use use_thermal_expansion::{
    LinearExpansionCoefficient, area_expansion_coefficient, coefficient_from_lengths,
    final_length, linear_expansion, volume_expansion_coefficient,
};

let coefficient = LinearExpansionCoefficient::new(12.0e-6).unwrap();
let expansion = linear_expansion(2.0, 12.0e-6, 50.0).unwrap();
let expanded_length = final_length(2.0, 12.0e-6, 50.0).unwrap();
let inferred = coefficient_from_lengths(2.0, 2.0012, 50.0).unwrap();

assert_eq!(coefficient.per_kelvin(), 12.0e-6);
assert!((expansion - 0.0012).abs() < 1.0e-12);
assert!((expanded_length - 2.0012).abs() < 1.0e-12);
assert!((inferred - 12.0e-6).abs() < 1.0e-12);
assert_eq!(area_expansion_coefficient(12.0e-6).unwrap(), 24.0e-6);
assert_eq!(volume_expansion_coefficient(12.0e-6).unwrap(), 36.0e-6);