units and physical constants
- Subject: units and physical constants
- From: Edward A. Romana
- Date: Sun, 02 Dec 2007 19:56:52 -0800
~~~
Here are 2 units and physical constants mac files,
my_units.mac and my_phycon.mac .
The instructions are in the file headers.
Ed
~~~
/*wxMaxima 0.7.3a http://wxmaxima.sourceforge.netMaxima 5.13.0
http://maxima.sourceforge.netUsing Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima.
The function bug_report()provides bug reporting information.
(%i1) batch(~/my_units.mac")$
batching #pC:~/my_units.mac
(%i2) ttyoff:nolabels:true
(%i86) batch(~/my_phycon.mac")$
batching #pC:~/my_phycon.mac
(%i87) ttyoff:nolabels:true
/* display the units and physical constants */
(%i112) disp_units;
(%o112) [ampere, amp, ampereturn, angstrom, arcdeg, arcmin, arcsec, astronomicalunit, au,
atmosphere, atomicmassunit, amu, dalton, bar, btu, britishthermalunit, calorie, candela, cd ,
centimeter, cm, coulomb, day, dyne, electronvolt, erg, farad, foot, ft, footcandle, gallon,
gamma, gauss, gilbert, gram, gm, henry, hour, inch, in, joule, kilogram, kg, lightyear, liter,
lumen, lux, maxwell, mile, minute, mole, mol, nauticalmile, newton, oersted, ohm, parsec, pc,
pascal, poise, poundforce, poundmass, lbm, radian, rad, second, sec, steradian, ster,
sr, stoke, tesla, torr, volt, watt, weber, yard, yd]
(%i113) disp_phycon;
(%o113) [ Avogadro's Number = %N_a , Bohr radius = %%a_0 , Boltzman constant = %k_b ,
Electron Mass = %m_e , Elementary charge = %%e , Fine structure constant = %alpha ,
First radiation constant = %c1 , Gravitational constant = %%G , Hartree Energy = %E_h ,
Magnetic Flux quantum = %Phi_0 , Neutron Mass = %m_n , Planck's constant = %%h ,
Planck's constant divided by 2pi=%bar , Proton Mass = %m_p , Rydberg constant =%R_inf ,
Second radiation constant = %c2 , Speed of light in vacuum = %%c ,
Stefan-Boltzmann constant = %sigma , Universal Gas = %R_gas , Vacuum permeability = %mu_0 ,
Vacuum permittivity = %epsilon_0 ]
/* 2 examples */
(%i114) 1/sqrt(%epsilon_0*%mu_0); /* should be the light speed */
(%o114) (2.99792458*10^+8*meter)/sec
(%i116) float(%%c); /* get and compare light speed from the constants */
(%o116) (2.99792458*10^+8*meter)/sec /* pass */
(%i121) sqrt(5/3*%R_gas/(4*gram/mol)*temp(27,C)); /* Helium sound velocity at 27 C,
He(Cv/Cp)=5/3, 4gr/mol */
(%o121) (1019.719890214955*meter)/sec /* pass */
~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_units.mac
Type: application/octet-stream
Size: 4535 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20071202/80c15a15/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_phycon.mac
Type: application/octet-stream
Size: 2499 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20071202/80c15a15/attachment-0003.obj