Expand description
Physical Constants Module for NumRS2
A comprehensive, NIST-compliant physical constants library providing fundamental, atomic, nuclear, and electromagnetic constants based on the CODATA 2022 internationally recommended values.
§Module Organization
fundamental: Fundamental physical constants (speed of light, Planck, Boltzmann, etc.)atomic: Atomic and nuclear constants (Bohr radius, Rydberg, magneton, etc.)electromagnetic: Electromagnetic constants (permittivity, permeability, flux quantum, etc.)units: Unit conversion constants and functions (SI prefixes, energy, temperature, length)
§Usage
use numrs2::new_modules::constants::{SPEED_OF_LIGHT, PLANCK_CONSTANT, BOLTZMANN_CONSTANT};
// Access constant values
let c = SPEED_OF_LIGHT.value;
let h = PLANCK_CONSTANT.value;
// Display full information
println!("{}", SPEED_OF_LIGHT);
// Output: Speed of light in vacuum (c) = 299792458 m/s (exact)§Data Source
All values are from CODATA 2022 (Committee on Data of the International Science Council). Constants defined as exact in the 2019 SI redefinition have zero uncertainty.
§References
- CODATA 2022: https://physics.nist.gov/cuu/Constants/
- 2019 SI Redefinition: https://www.bipm.org/en/measurement-units/si-redefinition
Re-exports§
pub use fundamental::ATOMIC_MASS_UNIT;pub use fundamental::AVOGADRO_CONSTANT;pub use fundamental::BOLTZMANN_CONSTANT;pub use fundamental::ELECTRON_CHARGE_MASS_RATIO;pub use fundamental::ELECTRON_MASS;pub use fundamental::ELEMENTARY_CHARGE;pub use fundamental::FINE_STRUCTURE_CONSTANT;pub use fundamental::GAS_CONSTANT;pub use fundamental::GRAVITATIONAL_CONSTANT;pub use fundamental::NEUTRON_MASS;pub use fundamental::PLANCK_CONSTANT;pub use fundamental::PROTON_MASS;pub use fundamental::REDUCED_PLANCK_CONSTANT;pub use fundamental::SPEED_OF_LIGHT;pub use fundamental::STEFAN_BOLTZMANN_CONSTANT;pub use atomic::BOHR_MAGNETON;pub use atomic::BOHR_RADIUS;pub use atomic::CLASSICAL_ELECTRON_RADIUS;pub use atomic::COMPTON_WAVELENGTH;pub use atomic::ELECTRON_G_FACTOR;pub use atomic::HARTREE_ENERGY;pub use atomic::NUCLEAR_MAGNETON;pub use atomic::PROTON_MAGNETIC_MOMENT;pub use atomic::RYDBERG_CONSTANT;pub use electromagnetic::CONDUCTANCE_QUANTUM;pub use electromagnetic::COULOMB_CONSTANT;pub use electromagnetic::IMPEDANCE_OF_FREE_SPACE;pub use electromagnetic::JOSEPHSON_CONSTANT;pub use electromagnetic::MAGNETIC_FLUX_QUANTUM;pub use electromagnetic::VACUUM_PERMEABILITY;pub use electromagnetic::VACUUM_PERMITTIVITY;pub use electromagnetic::VON_KLITZING_CONSTANT;
Modules§
- atomic
- Atomic and Nuclear Physical Constants (CODATA 2022)
- electromagnetic
- Electromagnetic Physical Constants (CODATA 2022)
- fundamental
- Fundamental Physical Constants (CODATA 2022)
- units
- Unit Conversion Constants and Functions
Structs§
- Physical
Constant - A physical constant with its value, uncertainty, unit, symbol, and name.