Hello all,

Having spent a while grappling with the units sections of the CellML 1.0 
specification whilst writing my validation tool, I have a few comments 
and queries on the model CellML uses for units.

For the most part, I like it.  However, when dealing with units with 
offsets, things get rather confusing.  In the first place, the way in 
which an offset is defined works in the opposite sense to the way in 
which the multiplier and prefix are defined.  The standard units litre 
are defined by:

  |<units|| ||name="||litre||"||>||
    
||<unit|| ||multiplier="||1000||"|| ||prefix="||centi||"|| 
||units="||metre||"|| ||exponent="||3||"|| />||
  ||</units>
|

|The multiplier and prefix both 'modify' the referenced unit metre, 
which makes sense.  In the definition of celsius, however:|

|  <units name="celsius">
    <unit units="kelvin" offset="-273.15"/>
  </units>
|

|Here the offset gives the offset of the Kelvin zero from the Celsius 
zero, which (to me at least) seems to be the opposite sense from what 
one would expect.  It would be more natural to read the above as 
defining a celsius scale offset from the kelvin scale by -273.15 degrees 
C, and this would be consistent with the semantics for the multiplier, 
prefix and exponent.
|

|It may well be too late to make such a fundamental change, but some 
documentation to clarify the issue could well help others to avoid being 
confused.
|

|
The second point I have also involves units with offsets.  Consider the 
expression
  <apply><plus/>
    <cn cellml:units="celsius">2</cn>
    <||cn cellml:units="celsius">2</cn>
  </apply>
|

|What should the result be?  4 degrees celsius?  Or 277.15 degrees 
celsius?  The latter comes from converting to Kelvin, then adding.  This 
issue becomes more important when we consider something like
||  <apply><minus/>
    <cn cellml:units="celsius">2</cn>
    <||cn cellml:units="celsius">2</cn>
  </apply>
|

|Here saying the result is 0 degrees celsius is much less convincing.  
When celsius is viewed as a complex unit (i.e. without the offset) it 
makes more sense, so since such an expression will generally (always?) 
occur in the context of a temperature difference per something, this may 
not be an issue in actuality.  Again however something should probably 
be mentioned in the specification to warn the unwary.
|

|Any comments?
|

|Jonathan.
|

_______________________________________________
cellml-discussion mailing list
[email protected]
http://www.cellml.org/mailman/listinfo/cellml-discussion

Reply via email to