constants.nbt 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. use units::si
  2. ### Physics constants
  3. # The speed of light in vacuum
  4. let speed_of_light: Speed = 299_792_458 m / s
  5. # The Newtonian constant of gravitation
  6. let gravitational_constant: Force × Length^2 / Mass^2 = 6.67430e-11 m³ / (kg s²)
  7. # Standard acceleration of gravity on earth
  8. let gravity: Acceleration = 9.80665 m / s²
  9. # The Planck constant
  10. let planck_constant = 6.62607015e-34 J / Hz
  11. # The reduced Planck constant
  12. let ℏ = planck_constant / 2π
  13. # Mass of the electron
  14. let electron_mass: Mass = 9.1093837015e-31 kg
  15. # Elementary charge (charge of the electron)
  16. let elementary_charge: Charge = 1.602176634e-19 C
  17. let electron_charge: Charge = elementary_charge
  18. # Magnetic constant (vacuum magnetic permeability)
  19. let µ0: Force / Current^2 = 1.25663706212e-6 N / A²
  20. let mu0 = µ0
  21. # Electric constant ( vacuum electric permittivity)
  22. let ε0: Capacitance / Length = 8.8541878128e-12 F / m
  23. let eps0 = ε0
  24. # Bohr magneton
  25. let µ_B: Energy / MagneticFluxDensity = 9.2740100783e-24 J / T
  26. # Fine structure constant
  27. let α: Scalar = 7.2973525693e-3
  28. # Proton mass
  29. let proton_mass: Mass = 1.67262192369e-27 kg
  30. # Avogadro constant
  31. let N_A: 1 / AmountOfSubstance = 6.02214076e23 / mol
  32. # Boltzmann constant
  33. let k_B: Energy / Temperature = 1.380649e-23 J / K
  34. # Ideal gas constant
  35. let R: Energy / (AmountOfSubstance × Temperature) = 8.31446261815324 J / (K mol)
  36. # Planck length
  37. let planck_length: Length = sqrt(ℏ gravitational_constant / speed_of_light^3) -> m
  38. # Planck mass
  39. let planck_mass: Mass = sqrt(ℏ speed_of_light / gravitational_constant) -> kg
  40. # Planck time
  41. let planck_time: Time = sqrt(ℏ gravitational_constant / speed_of_light^5) -> s
  42. # Planck temperature
  43. let planck_temperature: Temperature = sqrt(ℏ speed_of_light^5 / (gravitational_constant * k_B^2)) -> K
  44. # Planck energy
  45. let planck_energy: Energy = sqrt(ℏ speed_of_light^5 / gravitational_constant) -> J
  46. # Bohr radius
  47. let a0: Length = 4 pi ε0 ℏ^2 / (electron_charge^2 electron_mass)