Skip to main content

conspire/units/constants/
mod.rs

1//! The defining constants.
2
3#[cfg(test)]
4mod test;
5
6use super::{Action, Charge, Entropy, MolarEntropy, ReciprocalAmount, Temperature, Velocity};
7use crate::math::Quantity;
8
9/// The Avogadro constant.
10pub const AVOGADRO_CONSTANT: Quantity<ReciprocalAmount> =
11    ReciprocalAmount::per_mole(6.022_140_76e23);
12
13/// The Boltzmann constant.
14pub const BOLTZMANN_CONSTANT: Quantity<Entropy> = Entropy::joules_per_kelvin(1.380_649e-23);
15
16/// The molar gas constant.
17pub const GAS_CONSTANT: Quantity<MolarEntropy> =
18    MolarEntropy::joules_per_mole_kelvin(8.314_462_618_153_24);
19
20/// The elementary charge.
21pub const ELEMENTARY_CHARGE: Quantity<Charge> = Charge::coulombs(1.602_176_634e-19);
22
23/// The speed of light in vacuum.
24pub const LIGHT_SPEED: Quantity<Velocity> = Velocity::meters_per_second(2.997_924_58e8);
25
26/// The Planck constant.
27pub const PLANCK_CONSTANT: Quantity<Action> = Action::joule_seconds(6.626_070_15e-34);
28
29/// Standard room temperature.
30pub const ROOM_TEMPERATURE: Quantity<Temperature> = Temperature::celsius(20.0);