diff --git a/changelog.org b/changelog.org index dc9c3bc..cda9aac 100644 --- a/changelog.org +++ b/changelog.org @@ -1,3 +1,6 @@ +* v0.4.3 +- add ~Dalton~ as a unit +- add some more explanations for predefined constants * v0.4.2 - minor fix to ~to~ such that we use exactly the type as given by the user, instead of ~yCT.toNimType()~. This is to guarantee the diff --git a/src/unchained/constants.nim b/src/unchained/constants.nim index 4eb5cd2..3ece342 100644 --- a/src/unchained/constants.nim +++ b/src/unchained/constants.nim @@ -5,20 +5,38 @@ import si_units, units ## in the units of Unchained. const + ## The speed of light in vacuum. c* = 299792458.0.Meter•Second⁻¹ + ## The vacuum permitivity / electric constant. ε_0* = 8.8541878128e-12.A•s•V⁻¹•m⁻¹ + ## Charge of an electron. e* = 1.602176634e-19.C + ## Mass of an electron. m_e* = 9.1093837015e-31.kg m_e_c2* = 0.510998928.MeV + ## Mass of a muon. + m_μ* = 1.883531627e-28.kg # 105.6583755e3 # MeV / c² + m_μ_eV* = 105.6583755e6.eV # / c² + ## The Avogadro constant. The number of particles in one mole of substance, per definition. N_A* = 6.02214076e23.mol⁻¹ + ## The 'molar mass constant'. Prior to redefinition in 2019 it was defined as exactly + ## M_u = 1 g/mol. It relates the standard atomic weight of an element with its + ## mas for one mole of substance. M_u* = 0.99999999965e-3.kg•mol⁻¹ + ## The 'atomic mass constant', the "base mass" for atomic scale objects, defined as + ## `m_u = 1/12 · m(¹²C) = 1 Dalton` + ## i.e. the average mass of a single nucleon in a bound atom. m_u* = M_u / N_A - m_μ_eV* = 105.6583755e6.eV # / c² - m_μ* = 1.883531627e-28.kg # 105.6583755e3 # MeV / c² π* = PI - r_e* = e*e / (4 * π * ε_0 * m_e * c * c) # classical electron radius + ## The classical electron radius. + r_e* = e*e / (4 * π * ε_0 * m_e * c * c) #K = 4 * π * N_A * r_e * r_e * m_e_c2 * (100.0^2)# [MeV mol⁻¹ cm²] + ## The Boltzmann constant k_B* = 1.380649e-23.Joule•Kelvin⁻¹ + ## Planck's constant hp* = 6.62607015e-34.Joule•Hertz⁻¹ + ## Reduced Planck's constant hp_bar* = hp / (2 * π) + ## Newton's constant. Note: We do not use the common variabl `G`, as it obviously conflicts + ## with the `Giga` prefix in the general case. Feel free to locally define it as such. G_Newton* = 6.6743e-11.N•m²•kg⁻² diff --git a/src/unchained/si_units.nim b/src/unchained/si_units.nim index 3ad50cd..56055cb 100644 --- a/src/unchained/si_units.nim +++ b/src/unchained/si_units.nim @@ -154,6 +154,11 @@ declareUnits: quantity: Length conversion: 30856775814913673.0.m # 1 AU * 180° * 60 * 60 / π + Dalton: # unified atomic mass, m_u = 1/12 m(¹²C) = 1 Da. + short: Da + quantity: Mass + conversion: 1.66053906892e-27.kg # 1.66053906892(52)×10−27 + # given that we have base units & derived base units defined, we can now just # dump everything together. Everything that is referenced before, can now be # used to define new units.