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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
//! Physical constants for spintronics simulations
//!
//! This module defines fundamental physical constants used in spin dynamics
//! and spintronics calculations, including constants specific to magnetic
//! phenomena discovered by Prof. Saitoh's research group.
//!
//! # Constants Overview
//!
//! ## Fundamental Constants
//! - `HBAR`: Reduced Planck constant
//! - `E_CHARGE`: Elementary charge
//! - `KB`: Boltzmann constant
//! - `C_LIGHT`: Speed of light in vacuum
//! - `NA`: Avogadro constant
//!
//! ## Electromagnetic Constants
//! - `MU_0`: Vacuum permeability
//! - `EPSILON_0`: Vacuum permittivity
//! - `ALPHA_FS`: Fine structure constant
//!
//! ## Magnetic Constants
//! - `GAMMA`: Gyromagnetic ratio for electron
//! - `MU_B`: Bohr magneton
//! - `G_LANDE`: Landé g-factor for free electron
//!
//! ## Particle Constants
//! - `ME`: Electron mass
//! - `MP`: Proton mass
// =============================================================================
// Fundamental Constants
// =============================================================================
/// Reduced Planck constant (Dirac constant) [J·s]
///
/// ℏ = h / (2π) where h is Planck's constant
pub const HBAR: f64 = 1.054_571_817e-34;
/// Planck constant [J·s]
///
/// The quantum of action
pub const H_PLANCK: f64 = 6.626_070_15e-34;
/// Elementary charge \[C\]
///
/// The electric charge carried by a single proton
pub const E_CHARGE: f64 = 1.602_176_634e-19;
/// Boltzmann constant [J/K]
///
/// Relates temperature to energy
pub const KB: f64 = 1.380_649e-23;
/// Speed of light in vacuum [m/s]
///
/// Exact value by definition since 2019
pub const C_LIGHT: f64 = 299_792_458.0;
/// Avogadro constant [mol⁻¹]
///
/// Number of particles in one mole
pub const NA: f64 = 6.022_140_76e23;
// =============================================================================
// Electromagnetic Constants
// =============================================================================
/// Vacuum permeability [H/m] or [N/A²]
///
/// μ₀ = 4π × 10⁻⁷ (exact before 2019, now derived)
pub const MU_0: f64 = 1.256_637_062_12e-6;
/// Vacuum permittivity [F/m]
///
/// ε₀ = 1 / (μ₀ c²)
pub const EPSILON_0: f64 = 8.854_187_812_8e-12;
/// Fine structure constant (dimensionless)
///
/// α = e² / (4π ε₀ ℏ c) ≈ 1/137
pub const ALPHA_FS: f64 = 7.297_352_569_3e-3;
// =============================================================================
// Magnetic Constants
// =============================================================================
/// Gyromagnetic ratio for electron \[rad/(s·T)\]
///
/// γ = g μ_B / ℏ where g ≈ 2.002319 for free electron
/// This is the magnitude |γ|; note that γ < 0 for electrons
pub const GAMMA: f64 = 1.760_859_630_23e11;
/// Bohr magneton [J/T]
///
/// μ_B = eℏ / (2 m_e)
pub const MU_B: f64 = 9.274_010_078_3e-24;
/// Landé g-factor for free electron (dimensionless)
///
/// Deviation from 2 is due to QED corrections
pub const G_LANDE: f64 = 2.002_319_304_362_56;
/// Nuclear magneton [J/T]
///
/// μ_N = eℏ / (2 m_p)
pub const MU_N: f64 = 5.050_783_746_1e-27;
// =============================================================================
// Particle Constants
// =============================================================================
/// Electron mass \[kg\]
pub const ME: f64 = 9.109_383_701_5e-31;
/// Proton mass \[kg\]
pub const MP: f64 = 1.672_621_923_7e-27;
/// Electron charge-to-mass ratio [C/kg]
///
/// e / m_e
pub const E_OVER_ME: f64 = 1.758_820_010_8e11;
// =============================================================================
// Derived/Useful Constants for Spintronics
// =============================================================================
/// Spin quantum ℏ/2 [J·s]
///
/// Magnitude of electron spin angular momentum along any axis
pub const SPIN_QUANTUM: f64 = HBAR / 2.0;
/// Thermal voltage at 300 K \[V\]
///
/// V_T = k_B T / e at room temperature
pub const THERMAL_VOLTAGE_300K: f64 = 0.025_85;
/// Magnetic flux quantum \[Wb\]
///
/// Φ₀ = h / (2e) - fundamental unit of magnetic flux in superconductors
pub const FLUX_QUANTUM: f64 = 2.067_833_848e-15;
/// Conductance quantum \[S\]
///
/// G₀ = 2e² / h - fundamental unit of conductance
pub const CONDUCTANCE_QUANTUM: f64 = 7.748_091_729e-5;
/// Resistance quantum \[Ω\]
///
/// R_K = h / e² - von Klitzing constant
pub const RESISTANCE_QUANTUM: f64 = 25_812.807_45;