Application Center - Maplesoft

App Preview:

The ScientificConstants Package

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

Scientific Constants in Maple 8

Copyright 2002 Waterloo Maple Inc.

The new ScientificConstants  package in Maple 8 provides the values, symbols, uncertainty and units of over 13,000 physical constants.  Never again do you have to search the internet or grab a reference book to look up such values.  This extensive package gives you access to the basic chemical properties of any element or isotope from the Periodic Table.  Also available are 70 physical constants, such as Planck's constant, the Newtonian constant of gravitation, magnetic flux quantum, and speed of light in a vacuum.  If a specific physical constant that you need is not included, simply add the constants you commonly use to Maple's database.  This flexible package also allows you to modify properties or change the system associated with a constant.  

The ScientificConstants  package in conjunction with the comprehensive Units  package introduced in Maple 7 together provide valuable tools for scientists and engineers.

Overview of the Scientific Constants Package

>    with(ScientificConstants);

[AddConstant, AddElement, AddProperty, Constant, Element, GetConstant, GetConstants, GetElement, GetElements, GetError, GetIsotopes, GetProperties, GetProperty, GetUnit, GetValue, HasConstant, HasEleme...
[AddConstant, AddElement, AddProperty, Constant, Element, GetConstant, GetConstants, GetElement, GetElements, GetError, GetIsotopes, GetProperties, GetProperty, GetUnit, GetValue, HasConstant, HasEleme...

Which constants does the ScientificConstants package recognize?

Access the name, symbol, value, uncertainty, and units associated with the mass of the sun.

>    GetConstant(M[Sun]);

mass_of_Sun, symbol = M[Sun], value = .199e31, uncertainty = .5e28, units = kg

Retrieve the same information for the speed of light in a vacuum.

>    GetConstant(c);

speed_of_light_in_vacuum, symbol = c, value = 299792458, uncertainty = 0, units = m/s

If you are not sure of the symbol associated with a constant, you can use the name of the constant.

>    GetConstant(Planck_constant);

Planck_constant, symbol = h, value = .662606876e-33, uncertainty = .52e-40, units = J*s

>    GetConstant(Avogadro_constant);

Avogadro_constant, symbol = N[A], value = .602214199e24, uncertainty = .47e17, units = 1/mol

The ScientificConstants  package includes values of 70 common physical constants.

>    GetConstants();

E[h], F, G, G[0], K[J], M[Earth], M[Sun], N[A], Phi[0], R, R[Earth], R[K], R[infinity], V[m], Z[0], a[0], a[e], a[mu], alpha, b, c, c[1,L], c[1], c[2], e, epsilon[0], g, g[e], g[mu], g[n], g[p], gamma[...
E[h], F, G, G[0], K[J], M[Earth], M[Sun], N[A], Phi[0], R, R[Earth], R[K], R[infinity], V[m], Z[0], a[0], a[e], a[mu], alpha, b, c, c[1,L], c[1], c[2], e, epsilon[0], g, g[e], g[mu], g[n], g[p], gamma[...
E[h], F, G, G[0], K[J], M[Earth], M[Sun], N[A], Phi[0], R, R[Earth], R[K], R[infinity], V[m], Z[0], a[0], a[e], a[mu], alpha, b, c, c[1,L], c[1], c[2], e, epsilon[0], g, g[e], g[mu], g[n], g[p], gamma[...

Let's list the names of all supported constants.

>    GetConstants(names);

Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...
Avogadro_constant, Bohr_magneton, Bohr_radius, Boltzmann_constant, Compton_wavelength, Faraday_constant, Hartree_energy, Josephson_constant, Loschmidt_constant, Newtonian_constant_of_gravitation, Planc...

>   

Which chemical elements does the ScientificConstants package recognize?

You can also retrieve the value, uncertainty and units of numerous properties associated with elements from the Periodic Table, including electron affinity, ionization energy, melting point, boiling point, density, etc.

We can easily retrieve the properties associated with the element gold.

>    GetElement(Au);

79, symbol = Au, name = gold, names = {gold}, electronaffinity = [value = 2.30863, uncertainty = .3e-4, units = eV], density = [value = 19.3, uncertainty = undefined, units = g/cm^3], boilingpoint = [v...
79, symbol = Au, name = gold, names = {gold}, electronaffinity = [value = 2.30863, uncertainty = .3e-4, units = eV], density = [value = 19.3, uncertainty = undefined, units = g/cm^3], boilingpoint = [v...
79, symbol = Au, name = gold, names = {gold}, electronaffinity = [value = 2.30863, uncertainty = .3e-4, units = eV], density = [value = 19.3, uncertainty = undefined, units = g/cm^3], boilingpoint = [v...
79, symbol = Au, name = gold, names = {gold}, electronaffinity = [value = 2.30863, uncertainty = .3e-4, units = eV], density = [value = 19.3, uncertainty = undefined, units = g/cm^3], boilingpoint = [v...

Again, if the symbol name is uncertain, display this information using the name of the element.

>    GetElement(iron);

26, symbol = Fe, name = iron, names = {iron}, electronaffinity = [value = .151, uncertainty = .3e-2, units = eV], density = [value = 7.87, uncertainty = undefined, units = g/cm^3], boilingpoint = [valu...
26, symbol = Fe, name = iron, names = {iron}, electronaffinity = [value = .151, uncertainty = .3e-2, units = eV], density = [value = 7.87, uncertainty = undefined, units = g/cm^3], boilingpoint = [valu...
26, symbol = Fe, name = iron, names = {iron}, electronaffinity = [value = .151, uncertainty = .3e-2, units = eV], density = [value = 7.87, uncertainty = undefined, units = g/cm^3], boilingpoint = [valu...
26, symbol = Fe, name = iron, names = {iron}, electronaffinity = [value = .151, uncertainty = .3e-2, units = eV], density = [value = 7.87, uncertainty = undefined, units = g/cm^3], boilingpoint = [valu...

If you are interested in specific properties associated with an element, simply state those properties in the expression.

>    GetElement(terbium, symbol, boilingpoint, density, electronegativity);

65, symbol = Tb, boilingpoint = [value = 3494., uncertainty = undefined, units = K], density = [value = 8.23, uncertainty = undefined, units = g/cm^3], electronegativity = [value = 1.1, uncertainty = u...
65, symbol = Tb, boilingpoint = [value = 3494., uncertainty = undefined, units = K], density = [value = 8.23, uncertainty = undefined, units = g/cm^3], electronegativity = [value = 1.1, uncertainty = u...

List all the elements known in the ScientificConstants  package.

>    GetElements();

H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, K, Ca, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ga, Ge, As, Se, Br, Kr, Rb, Sr, Y, Zr, Nb, Mo, Tc, Ru, Rh, Pd, Ag, Cd, In, Sn, Sb, Te, I, X...
H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, K, Ca, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ga, Ge, As, Se, Br, Kr, Rb, Sr, Y, Zr, Nb, Mo, Tc, Ru, Rh, Pd, Ag, Cd, In, Sn, Sb, Te, I, X...
H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, K, Ca, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ga, Ge, As, Se, Br, Kr, Rb, Sr, Y, Zr, Nb, Mo, Tc, Ru, Rh, Pd, Ag, Cd, In, Sn, Sb, Te, I, X...
H, He, Li, Be, B, C, N, O, F, Ne, Na, Mg, Al, Si, P, S, Cl, Ar, K, Ca, Sc, Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Zn, Ga, Ge, As, Se, Br, Kr, Rb, Sr, Y, Zr, Nb, Mo, Tc, Ru, Rh, Pd, Ag, Cd, In, Sn, Sb, Te, I, X...

You can also display the isotopes of an element.  The following example lists the isotopes of the element californium.

>    GetIsotopes(element=Cf);

Cf[237], Cf[238], Cf[239], Cf[240], Cf[241], Cf[242], Cf[243], Cf[244], Cf[245], Cf[246], Cf[247], Cf[248], Cf[249], Cf[250], Cf[251], Cf[252], Cf[253], Cf[254], Cf[255], Cf[256]
Cf[237], Cf[238], Cf[239], Cf[240], Cf[241], Cf[242], Cf[243], Cf[244], Cf[245], Cf[246], Cf[247], Cf[248], Cf[249], Cf[250], Cf[251], Cf[252], Cf[253], Cf[254], Cf[255], Cf[256]

If the output=atomicnumbers  option is given, the isotopes are returned in the form [atomic_number, mass_number].

>    GetIsotopes(electronaffinityisotopic, output=atomicnumbers);

[1, 1], [1, 2]

>   

Adding your own constants

You can extend the set of constants and elements or change the existing properties supported.

>    AddConstant( hydrogen_mass, symbol=m[H], value=1.67353404*10^(-27), units=kg );

>    GetConstant(m[H]);

hydrogen_mass, symbol = m[H], value = .1673534040e-26, uncertainty = undefined, units = kg

>   

Solved Problems

Molecular Weight
How many molecules of acetone are in a 10 gram sample?

The chemical formula for acetone is C[3]*H[6]*O .  

>    acetoneMole:=3*Element( C, atomicweight )+6*Element( H, atomicweight )+Element( O, atomicweight );

acetoneMole := 3*Element(C,atomicweight)+6*Element(H,atomicweight)+Element(O,atomicweight)

The molecular weight is evaluated according to the default system of units SI.  Therefore this measures in kilograms (kg).

>    evalf( acetoneMole );

.9644274675e-25

Let's convert this from kilograms (kg) to atomic mass units (amu), using the convert/units  function.

>    convert( %, units, kg, amu );

58.07914000

By definition, the number of atomic mass units per molecule is equal to the number of grams per mole. Hence, divide 10 by the above result to determine the number of moles in the sample.

>    10./%;

.1721788580

To calculate the number of molecules, multiply the above result by Avogadro's constant.

>    %*evalf( Constant( N['A'] ) );

.1036885531e24

>   

Geostationary Orbit
Find the radius of a geostationary orbit.

The formula for circular orbital velocity around a spherically symmetric body is sqrt(GM/R)  where G is the gravitational constant, M is the mass of the body and R is the radius of orbit..

>    vCirc := sqrt( G*M/R );

vCirc := (G*M/R)^(1/2)

For geostationary orbit, an orbital velocity of 2*Pi*R  meters per day is required.  Convert this to meters per second.

>    convert( 2*Pi*R, units, m/d, m/s );

1/43200*Pi*R

Equate this to vCirc

eqn1:= vCirc = %;

eqn1 := (G*M/R)^(1/2) = 1/43200*Pi*R

Solve for R . To disregard non-real solutions, use the RealDomain  package.

>    use RealDomain in
    rGeo := solve( eqn1, R );
end use;

rGeo := 720/Pi*5^(1/3)*(G*M*Pi)^(1/3)

Replace G  with its value and M  with the mass of the Earth and then evaluate  

>    evalf( eval( rGeo, {G=Constant( G ), M=Constant( M[Earth] ) } ) );

42233240.09

>    convert( %, units, m, km );

42233.24009

The result is the radius in kilometers (km) of a geostationary orbit.

>   

Periodicity of Ionization Energy

Plot the ionization energies in electronvolts of the elements of the periodic table ordered by increasing atomic number.

>    ionEn := map( an -> [an, evalf( Element( an, ionizationenergy ) )],[ GetElements(ionizationenergy,output=atomicnumbers)]):

>    plots[pointplot]( ionEn, style=line, labels=["atomic number","eV"] );

[Maple Plot]

>   

Decay Activity
Plot the decrease in the radioactive decay activity for a sample of iodine-131.

The expression for the activity is defined as A where A0  is the initial activity, lambda  is the mean lifetime of the isotope, and t  is the elapsed time   

>    A := A0*exp(-lambda*t);

A := A0*exp(-lambda*t)

The mean lifetime is related to the half-life by lambda = .693/H .

>    lambda := 0.693/evalf( Element( I[131], halflife ) );

lambda := .1000141319e-5

Plot with A0 = 1 .

>    A0:=1:
plot( A, t=0..6e6, labels=["time (s)","Activity"] );

[Maple Plot]

>   

Simple Chart of Nuclides

List all of the isotopes

>    isos := map( i -> [i[2]-i[1],i[1]], {GetIsotopes( output=atomicnumbers )} ):

>    nops( isos );

2941

List only the stable isotopes

>    isos_stable := map( i -> [i[2]-i[1],i[1]], {GetIsotopes( abundance, output=atomicnumbers )}  ):

>    nops( isos_stable );

288

List the unstable isotopes

>    isos_unstable := isos minus isos_stable:

>    isos_st_p := plots[pointplot]( isos_stable,  color=green, legend="stable" ):

>    isos_unst_p := plots[pointplot]( isos_unstable,  color=grey, legend="unstable" ):

>    plots[display]( [isos_st_p, isos_unst_p],  symbol=CROSS, labels=["neutron number", "atomic number"], labeldirections=[HORIZONTAL,VERTICAL] );

[Maple Plot]

>   

Binding Energy per Nucleon
Plot the average binding energy per nucleon as a function of mass number.

Selecting odd-even nuclei (i.e. A odd) that are stable

>    bindEn := map( i -> [i[2], convert( evalf( Element( i, bindingenergy ) ), units, J, MeV )/i[2]], select( j -> type( j[2], odd ), [GetIsotopes( abundance, bindingenergy, output=atomicnumbers )]) ):

>    nops(bindEn);

111

>    plots[pointplot]( bindEn, symbol=CIRCLE, symbolsize=5, labels=["mass number", "MeV per nucleon"], labeldirections=[HORIZONTAL,VERTICAL], view=[0..220, 7.5..9] );

[Maple Plot]