Skip to content

Commit 31121b8

Browse files
committed
provide some more explanation for the predefined constants
1 parent 3513e81 commit 31121b8

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/unchained/constants.nim

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,38 @@ import si_units, units
55
## in the units of Unchained.
66

77
const
8+
## The speed of light in vacuum.
89
c* = 299792458.0.Meter•Second⁻¹
10+
## The vacuum permitivity / electric constant.
911
ε_0* = 8.8541878128e-12.A•s•V⁻¹•m⁻¹
12+
## Charge of an electron.
1013
e* = 1.602176634e-19.C
14+
## Mass of an electron.
1115
m_e* = 9.1093837015e-31.kg
1216
m_e_c2* = 0.510998928.MeV
17+
## Mass of a muon.
18+
m_μ* = 1.883531627e-28.kg # 105.6583755e3 # MeV / c²
19+
m_μ_eV* = 105.6583755e6.eV # / c²
20+
## The Avogadro constant. The number of particles in one mole of substance, per definition.
1321
N_A* = 6.02214076e23.mol⁻¹
22+
## The 'molar mass constant'. Prior to redefinition in 2019 it was defined as exactly
23+
## M_u = 1 g/mol. It relates the standard atomic weight of an element with its
24+
## mas for one mole of substance.
1425
M_u* = 0.99999999965e-3.kg•mol⁻¹
26+
## The 'atomic mass constant', the "base mass" for atomic scale objects, defined as
27+
## `m_u = 1/12 · m(¹²C) = 1 Dalton`
28+
## i.e. the average mass of a single nucleon in a bound atom.
1529
m_u* = M_u / N_A
16-
m_μ_eV* = 105.6583755e6.eV # / c²
17-
m_μ* = 1.883531627e-28.kg # 105.6583755e3 # MeV / c²
1830
π* = PI
19-
r_e* = e*e / (4 * π * ε_0 * m_e * c * c) # classical electron radius
31+
## The classical electron radius.
32+
r_e* = e*e / (4 * π * ε_0 * m_e * c * c)
2033
#K = 4 * π * N_A * r_e * r_e * m_e_c2 * (100.0^2)# [MeV mol⁻¹ cm²]
34+
## The Boltzmann constant
2135
k_B* = 1.380649e-23.Joule•Kelvin⁻¹
36+
## Planck's constant
2237
hp* = 6.62607015e-34.Joule•Hertz⁻¹
38+
## Reduced Planck's constant
2339
hp_bar* = hp / (2 * π)
40+
## Newton's constant. Note: We do not use the common variabl `G`, as it obviously conflicts
41+
## with the `Giga` prefix in the general case. Feel free to locally define it as such.
2442
G_Newton* = 6.6743e-11.N•m²•kg⁻²

0 commit comments

Comments
 (0)