Constants#
- class Constants#
Constantssubset of physical constants and unit helpers.Values are SI by default and accessible via
SI(). For convenience,Micro()loads a scaled set for micron–microsecond–kilogram contexts. All values are scalars in base SI unless otherwise stated.Example:
hbar = Constants.SI("hbar"); Constants.SI(); % load named constants into caller Constants.Micro(); % load scaled constants into caller
- Property Summary
- BohrMagneton = 9.27400915e-24#
\(\mu_B\) [J/T].
- BohrRadius = 0.52917720859e-10#
\(a_0\) [m].
- BoltzmannConstant = 1.3806504e-23#
\(k_B\) [J/K].
- ElectronGFactor = 2.0023193043622#
\(g_S\).
- ElectronMass = 9.10938215e-31#
\(m_e\) [kg].
- ElectronSpin = 0.5#
\(S_e\).
- ElementaryCharge = 1.602176487e-19#
\(e\) [C].
- ReducedPlanckConstant = 1.054571628e-34#
\(\hbar\) [J·s].
- SpeedOfLight = 2.99792458e8#
c [m/s].
- VacuumImpedance = 1/Constants.VacuumPermittivity/Constants.SpeedOfLight#
\(Z_0\) [Ohm].
- VacuumPermeability = 4*pi*1e-7#
\(\mu_0\) [H/m].
- VacuumPermittivity = 8.854187817e-12#
\(\epsilon_0\) [F/m].
- Method Summary
- static Micro(constantName)#
Load constants in micron–microsecond–kilogram units into caller.
- Parameters:
constantName (
string, optional) – If provided, return the named constant value instead- Returns:
Constant value when
constantNameis provided- Return type:
double, optional
- static SI(constantName)#
Load constants in SI units into the caller workspace.
- Parameters:
constantName (
string, optional) – If provided, return the named constant value instead- Returns:
Constant value when
constantNameis provided- Return type:
double, optional