Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
documentation:language_reference:constants:physical_constants [2016/10/10 09:41] – external edit 127.0.0.1 | documentation:language_reference:constants:physical_constants [2017/08/02 15:38] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 2: | Line 2: | ||
### | ### | ||
- | alligned paragraph text | + | PhysicalConstants is a global table giving the values units and definitions of many constants needed for calculations. Each constant is a table with three elements, value, unit and description. For the electron mass one has for example: |
+ | <code Quanty Example.Quanty> | ||
+ | print(PhysicalConstants.me.value) | ||
+ | </ | ||
+ | which returns: | ||
+ | <file Quanty_Output> | ||
+ | 9.10938356e-31 | ||
+ | </ | ||
+ | the electron mass. The unit of the constant is stored in the variable .unit, for the electron mass this is: | ||
+ | <code Quanty Example.Quanty> | ||
+ | print(PhysicalConstants.me.units) | ||
+ | </ | ||
+ | which returns: | ||
+ | <file Quanty_Output> | ||
+ | kg | ||
+ | </ | ||
+ | A description of the constant can be obtained from the variable .description: | ||
+ | <code Quanty Example.Quanty> | ||
+ | print(PhysicalConstants.me.description) | ||
+ | </ | ||
+ | which returns: | ||
+ | <file Quanty_Output> | ||
+ | Electron mass in kilogram | ||
+ | </ | ||
+ | A printout of all information can be obtained when one directly prints the original variable. For the electron mass this is: | ||
+ | <code Quanty Example.Quanty> | ||
+ | print(PhysicalConstants.me) | ||
+ | </ | ||
+ | which returns: | ||
+ | <file Quanty_Output> | ||
+ | -- Electron mass in kilogram | ||
+ | | ||
+ | </ | ||
### | ### | ||
- | |||
- | ===== Example ===== | ||
### | ### | ||
- | description text | + | A list of all implemented constants can be obtained by printing all elements in the global table PhysicalConstants: |
- | ### | + | |
- | + | ||
- | ==== Input ==== | + | |
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
- | -- some example code | + | for constant, |
+ | io.write(string.format(" | ||
+ | io.write(string.format(" | ||
+ | io.write(string.format(" | ||
+ | end | ||
</ | </ | ||
- | + | which returns: | |
- | ==== Result ==== | + | <file Quanty_Output> |
- | <WRAP center box 100> | + | PhysicalConstants.RK |
- | text produced as output | + | |
- | </WRAP> | + | Klaus von Klitzing constant in units of Ohm |
+ | PhysicalConstants.ge | ||
+ | -2.0023193044E+00 [] | ||
+ | | ||
+ | PhysicalConstants.R | ||
+ | | ||
+ | Molar gas constant in Joule per mole per Kelvin | ||
+ | PhysicalConstants.NA | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.a0 | ||
+ | | ||
+ | Bohr radius in meter | ||
+ | PhysicalConstants.mun | ||
+ | -9.6623650000E-27 [J T^-1] | ||
+ | | ||
+ | PhysicalConstants.me | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.lPlanck | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mPlanck | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mumu | ||
+ | -4.4904482600E-26 [J T^-1] | ||
+ | Muon magnetic moment in Joule per Tesla | ||
+ | PhysicalConstants.lambdaCtau | ||
+ | | ||
+ | Tau Compton wavelength in units of meter | ||
+ | PhysicalConstants.e | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.muN | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.c | ||
+ | | ||
+ | speed of light in vacuum in meter per second | ||
+ | PhysicalConstants.tPlanck | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mue | ||
+ | -9.2847646200E-24 [J T^-1] | ||
+ | | ||
+ | PhysicalConstants.malpha | ||
+ | | ||
+ | alpha particle mass in kilogram | ||
+ | PhysicalConstants.h | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mu | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mmu | ||
+ | | ||
+ | Muon mass in kilogram | ||
+ | PhysicalConstants.gd | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.alpha | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.lambdaCn | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.hbar | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.gmu | ||
+ | -2.0023318418E+00 [] | ||
+ | Muon g factor | ||
+ | PhysicalConstants.kB | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.md | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.muB | ||
+ | | ||
+ | Bohr magneton in Joule per Tesla | ||
+ | PhysicalConstants.mu0 | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.lambdaCp | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.epsilon0 | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.G0 | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.gn | ||
+ | -3.8260854500E+00 [] | ||
+ | | ||
+ | PhysicalConstants.re | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.F | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.sigma | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mud | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mn | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.TPlanck | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mup | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.R0 | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.KJ | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.G | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.lambdaCe | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.Phi0 | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mp | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.mtau | ||
+ | | ||
+ | Tau mass in kilogram | ||
+ | PhysicalConstants.gp | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.Z0 | ||
+ | | ||
+ | | ||
+ | PhysicalConstants.lambdaCmu | ||
+ | | ||
+ | Muon Compton wavelength in units of meter | ||
+ | </file> | ||
+ | ### | ||
===== Sub pages ===== | ===== Sub pages ===== | ||
{{indexmenu> | {{indexmenu> | ||
- |