ScientificConstants - Maple Programming Help

Home : Support : Online Help : Science and Engineering : Scientific Constants : Functions : ScientificConstants/AddElement

ScientificConstants

 add an element or isotope definition

 Calling Sequence AddElement( descriptor, opts )

Parameters

 descriptor - name, symbol, or atomic number of an element, or isotope syntax of an isotope. For a description of the isotope syntax, see Element opts - (optional) equation(s) of the form option=value, where option is one of 'name', 'names', 'symbol', or property_name; specify the element or isotope definition

Description

 • The AddElement(descriptor, opts) command adds an element or isotope definition to the ScientificConstants package for the current session.
 • The opts argument can contain one or more of the following equations that specify the element or isotope.
 'name' = symbol
 This option defines the element name. It cannot be used when adding an isotope. If not specified, the International Union of Pure and Applied Chemistry (IUPAC) temporary name is assigned to the name. For more information about the IUPAC convention, see convert/iupac.
 'names' = symbol or {symbol, symbol, ...}
 This option is used to define multiple names for an element.  If this option is given, the 'name' option must also be given.  It cannot be used when adding an isotope.
 The element name specified by the 'name' option need not be specified by the 'names' option. However, it is automatically included in the 'names' set.
 'symbol' = symbol
 This option defines the element symbol. It cannot be used when adding an isotope. If not specified, the International Union of Pure and Applied Chemistry (IUPAC) temporary symbol is assigned to the name. For more information about the IUPAC convention, see convert/iupac.
 property_name = numeric, expression that evaluates to a numeric, procedure, or list of the form ['value'=value_obj, 'uncertainty'=uncertainty_obj, 'units'=units_obj]
 This option specifies an accepted property of an element or isotope. The property_name can be any accepted property name. For a list of element and isotope properties, see Initial Properties for Elements and Isotopes. To specify multiple properties, use multiple property_name equations. To specify a property not accepted by the package, the property must first be added by using the AddProperty function.
 property_name = numeric, expression that evaluates to a numeric, or procedure
 If only a numeric, an expression containing an Element() object such that it evaluates to type numeric, or a procedure is specified, it is assigned to the value of property property_name. The property unit is assigned one 1 and the uncertainty is assigned undefined.
 property_name = ['value' = value_obj, 'uncertainty' = uncertainty_obj, 'units' = units_obj]
 If a list is specified, then the 'value' equation is required and the 'uncertainty' and 'units' equations are optional.
 'value' = value_obj
 The value_obj option defines the property value. It must be of type numeric, contain an Element() object such that it evaluates to type numeric, or be of type procedure.
 'uncertainty' = uncertainty_obj
 The uncertainty_obj option defines the precision to which the property value is known. It must be of type numeric, contain an Element() object such that it evaluates to type numeric, be of type procedure, or be a list of the form $\left[\mathrm{uncer},\mathrm{uncertainty_opt}\right]$, where uncertainty_opt is 'relative' or 'uld'.
 If no uncertainty option uncertainty_opt is included, the numeric value represents the absolute uncertainty of the property. That is, the value is measured in units determined by the 'units' option.
 If uncertainty_obj is of the form $\left[\mathrm{uncer},'\mathrm{relative}'\right]$, uncer is the relative uncertainty in the property's value.  The quantity uncer*value_obj is the absolute uncertainty of the property.
 If uncertainty_obj is of the form $\left[\mathrm{uncer},'\mathrm{uld}'\right]$, uncer is the uncertainty in "units in the least digit" in the property's value.  The quantity $\mathrm{uncer}\mathrm{SFloatExponent}\left(\mathrm{value_obj}\right)$ is the absolute uncertainty of the property.  This form of uncertainty cannot be used with a non-float value_obj.
 If the 'uncertainty' option is not specified, the uncertainty is undefined.
 procedure objects for value or uncertainty
 An Element object can refer to an element with a property that has its value or uncertainty defined by a procedure.  When such an object is evaluated (by evalf, GetValue, or GetError), the the value or uncertainty is obtained by evaluating the stored procedure. Any error is rethrown.  The result is then passed to the required units conversion.
 Furthermore, any parameters to the property given in the Element object are passed as arguments to the procedure when it is evaluated.  In such a case, the property is said to be parameterized.
 See Element for more information regarding the construction and evaluation of Element objects that refer to elements with properties defined by procedures, or that have parameterized properties.
 'units' = units_obj
 The units_obj option defines the units in which the property value, and possibly uncertainty, are measured. The units_obj option can be an expression that Units[Unit] interprets as a unit or a Unit() standard form. For more information, see Units.
 If the 'units' option is not specified, the units is unity, that is, one (1). This means that the property is dimensionless.
 • Properties for the element or isotope do not have to be defined in the AddElement command. They can be defined later by using ModifyElement.

Examples

 > $\mathrm{with}\left(\mathrm{ScientificConstants}\right):$
 > $\mathrm{AddElement}\left(120\right)$
 > $\mathrm{GetElement}\left(120\right)$
 ${120}{,}{\mathrm{symbol}}{=}{\mathrm{Ubn}}{,}{\mathrm{name}}{=}{\mathrm{unbinilium}}{,}{\mathrm{names}}{=}\left\{{\mathrm{unbinilium}}\right\}$ (1)
 > $\mathrm{AddElement}\left({\mathrm{Ubn}}_{297},\mathrm{atomicmass}=\left[\mathrm{value}=297.0,\mathrm{units}=\mathrm{amu}\right]\right)$
 > $\mathrm{GetIsotopes}\left(\mathrm{element}=\mathrm{Ubn}\right)$
 ${{\mathrm{Ubn}}}_{{297}}$ (2)

Display the stored procedure for a property of a particular element.

 > $\mathrm{interface}\left(\mathrm{verboseproc}=2\right):$
 > $\mathrm{GetElement}\left(C,\mathrm{boilingpoint}\right)$

 6, boilingpoint = [value = (proc() option Copyright (c) 2002 Waterloo Maple Inc. All rights reserved.; if nargs = 0 then error "no boiling point at standard pressure, access sublimation point with parameter 'sp'" elif args[1] = 'sp' then 3915. else error "incorrect parameters" end if end proc), uncertainty = undefined, units = K]

 > $\mathrm{interface}\left(\mathrm{verboseproc}=1\right):$