-
Notifications
You must be signed in to change notification settings - Fork 19
/
Units.jl
36 lines (31 loc) · 1.02 KB
/
Units.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
meV_per_K = 0.086173332621451774
A physical constant. Useful for converting kelvin into the default energy units,
meV.
"""
const meV_per_K = 0.086173332621451774
Base.@kwdef struct PhysicalConsts
μ0::Float64 # Vacuum permeability
μB::Float64 # Bohr magneton
end
"""
Units.meV
Units.theory
The unit system is implicitly determined by the definition of two physical
constants: the vacuum permeability ``μ₀`` and the Bohr magneton ``μ_B``.
Temperatures are effectively measured in units of energy (``k_B = 1``) and time
is effectively measured in units of inverse energy (``ħ = 1``). The default unit
system, `Units.meV`, employs (meV, Å, tesla). Select alternatively
`Units.theory` for a units system defined so that ``μ₀ = μ_B = 1``.
See also [`meV_per_K`](@ref)
"""
const Units = (;
meV = PhysicalConsts(;
μ0 = 201.33545383470705041, # T^2 Å^3 / meV
μB = 0.057883818060738013331, # meV / T
),
theory = PhysicalConsts(;
μ0 = 1.0,
μB = 1.0,
),
)