Next: Functions and Variables for ezunits, Previous: Introduction to ezunits, Up: ezunits-pkg [Contents][Index]
physical_constants is a collection of physical constants,
copied from CODATA 2006 recommended values
(https://physics.nist.gov/cuu/Constants/).
load ("physical_constants") loads this package,
and loads ezunits also, if it is not already loaded.
A physical constant is represented as a symbol which has a property
which is the constant value.
The constant value is a dimensional quantity, as represented by ezunits.
The function constvalue fetches the constant value;
the constant value is not the ordinary value of the symbol,
so symbols of physical constants persist in evaluated expressions until their
values are fetched by constvalue.
physical_constants includes some auxiliary information,
namely, a description string for each constant,
an estimate of the error of its numerical value,
and a property for TeX display.
To identify physical constants, each symbol has the
physical_constant property;
propvars(physical_constant) therefore shows the list
of all such symbols.
physical_constants comprises the following constants.
%cspeed of light in vacuum
%mu_0magnetic constant
%e_0electric constant
%Z_0characteristic impedance of vacuum
%GNewtonian constant of gravitation
%hPlanck constant
%h_barPlanck constant
%m_PPlanck mass
%T_PPlanck temperature
%l_PPlanck length
%t_PPlanck time
%%eelementary charge
%Phi_0magnetic flux quantum
%G_0conductance quantum
%K_JJosephson constant
%R_Kvon Klitzing constant
%mu_BBohr magneton
%mu_Nnuclear magneton
%alphafine-structure constant
%R_infRydberg constant
%a_0Bohr radius
%E_hHartree energy
%ratio_h_mequantum of circulation
%m_eelectron mass
%N_AAvogadro constant
%m_uatomic mass constant
%FFaraday constant
%Rmolar gas constant
%%kBoltzmann constant
%V_mmolar volume of ideal gas
%n_0Loschmidt constant
%ratio_S0_RSackur-Tetrode constant (absolute entropy constant)
%sigmaStefan-Boltzmann constant
%c_1first radiation constant
%c_1Lfirst radiation constant for spectral radiance
%c_2second radiation constant
%bWien displacement law constant
%b_primeWien displacement law constant
Reference: https://physics.nist.gov/cuu/Constants/
Examples:
The list of all symbols which have the physical_constant property.
(%i1) load ("physical_constants")$
(%i2) propvars (physical_constant);
(%o2) [%c, %mu_0, %e_0, %Z_0, %G, %h, %h_bar, %m_P, %T_P, %l_P,
%t_P, %%e, %Phi_0, %G_0, %K_J, %R_K, %mu_B, %mu_N, %alpha,
%R_inf, %a_0, %E_h, %ratio_h_me, %m_e, %N_A, %m_u, %F, %R, %%k,
%V_m, %n_0, %ratio_S0_R, %sigma, %c_1, %c_1L, %c_2, %b, %b_prime]
Properties of the physical constant %c.
(%i1) load ("physical_constants")$
(%i2) constantp (%c);
(%o2) true
(%i3) get (%c, description);
(%o3) speed of light in vacuum
(%i4) constvalue (%c);
m
(%o4) 299792458 ` -
s
(%i5) get (%c, RSU);
(%o5) 0
(%i6) tex (%c);
$$c$$
(%o6) false
The energy equivalent of 1 pound-mass.
The symbol %c persists until its value is fetched by constvalue.
(%i1) load ("physical_constants")$
(%i2) m * %c^2;
2
(%o2) %c m
(%i3) %, m = 1 ` lbm;
2
(%o3) %c ` lbm
(%i4) constvalue (%);
2
lbm m
(%o4) 89875517873681764 ` ------
2
s
(%i5) E : % `` J;
Computing conversions to base units; may take a moment.
366838848464007200
(%o5) ------------------ ` J
9
(%i6) E `` GJ;
458548560580009
(%o6) --------------- ` GJ
11250000
(%i7) float (%);
(%o7) 4.0759872051556356e+7 ` GJ
Categories: Physical units Share packages Package physical_constants
Next: Functions and Variables for ezunits, Previous: Introduction to ezunits, Up: ezunits-pkg [Contents][Index]