CellML.org - Meeting Minutes 20 March 2001
April 2001 March 2001 29 March 2001 28 March 2001 27 March 2001 26 March 2001 21 March 2001 20 March 2001 15 March 2001 14 March 2001 13 March 2001 |
Author: 1 IntroductionThroughout January and February 2001, one of the biggest headaches for Warren was the specification of a units system for CellML. The problem was that he needed to completely define how a units definition should be recursively expanded in order that the conversion of variable values from one set of units to another would be consistent across all applications. Warren tried to pass his problems on to as many other people as possible, but few really cared. It was not until 20 March 2001 that some real progress was made, with the help of Poul Nielsen. In this document, a range of test units definitions are expanded to demonstrate thoroughly how the proposed expansion technique should be applied. 2 Simple Units Definitions2.1 What the spec saysTo quote from the 2001-03-02 draft of the CellML specification:
A `simple units' definition occurs when units are defined as a linear function of some previously defined simple units or base units. This occurs when a
Terms in square brackets represent the units associated with a term in the expression, 2.2 What the spec should sayThe formula is wrong. The prefix is just another multiplier, and the units previously associated with the multiplier should really be associated with the product of the prefix and multiplier. The correct formula follows.
A proposal for the complete discussion of user-defined simple and complex units is given in Section 4. 2.3 ExamplesSimple units definitions are fairly easy to deal with, because the units of the variables in the equations never feature any products. We will look at an expansion of the units definition for degrees fahrenheit given below.
The expansion follows, where we have abbreviated the name of the units being defined (
3 Complex Units Definition3.1 What the spec saidQuoting from the 2001-03-02 draft of the CellML specification:
`Complex units' are the product of multiple base quantities, and are created by placing several
The It is very important to note that when a complex units definition references a simple units definition, any offset associated with the simple units definition is removed. This means that the conversions such as the one between degrees Fahrenheit per inch and degrees Celsius per centimetre involve only a scale factor. 3.2 What the spec should sayThe formula should be re-arranged so that the prefixes and multipliers are all lumped into a single term which has units representing the entire conversion from the units being defined to the products of all of the constituent units, as shown below.
A proposal for the complete discussion of user-defined simple and complex units is given in Section 4. 3.3 ExamplesFirst of all we will revisit the definitions of the convenience units defined in the CellML specification. The CellML versions of these units definitions and the associated equations are.
Now we'll work through some other examples to thoroughly demonstrate the expansion of units definitions into their constituent base units. First we define an
Next we define the units of
Now things we get more interesting: we expand the definition of
In Equation 11, there is no obvious substitution for the xold term, which has units that are the product of two non-base units definitions. We must expand this term to continue. In order to do this, let's invert the definition of
Now let's consider the multiplication of the definition of
The vnew and ynew variables can be multiplied together to produce a new unknown znew which has units which are the product of the units on vnew and ynew. Similarly zold is the product of vold and yold.
Now we can substitute znew from Equation 14 into Equation 11 in place of xold and simplify the result to give a complete expansion of
In the last example, we'll look at the expansion of the units definition for The initial expansion is shown below.
We can create an expansion for xold by inverting the definition for litre given in Equation 8, and multiplying each side of the equation by 1.0 mole. These terms are absorbed into the variables, and the conversion factor is multiplied by 1.0 mole/mole to keep the units consistent.
Substituting Equation 18 into Equation 16 gives the result below.
4 New Units DiscussionThe full introduction of simple and complex units definitions at the end of Section 5.2.3 in the 2001-03-02 draft of the specification should read:
A simple units definition occurs when units are defined as a linear function of some previously defined simple units or base units. In a simple units definition, a
Terms in square brackets represent the units associated with values in the expression, which are italicized. xold is the value to be transformed from the old units, and xnew is the resulting value in the new units. Units are the units being defined, and multiplier, prefix, units and offset correspond to the values of the appropriate attributes on the Complex units are the product of multiple units. In a complex units definition, a units element contains multiple child unit elements, or some unit element defines an exponent attribute with a value other than 1.0. The conversion between the new units and the product of the constituent units is given by the formula below.
The mi, pi, ui, and ei terms refer to the values of the
The | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||