Show
Ignore:
Timestamp:
10/10/2007 03:46:10 PM (15 months ago)
Author:
otter
Message:

Introduced Dymola_absoluteValue annotation for some temperature types,
as suggested by Sven Erik

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Modelica/branches/maintenance/2.2.2/Modelica/SIunits.mo

    r659 r663  
    1010<i>Length</i>, <i>Time</i>, based on the international standard 
    1111on units.</p> 
    12  
     12  
    1313</HTML>")); 
    1414     
     
    2323for example: 
    2424</p> 
    25  
     25  
    2626<pre>   <b>model</b> MassOnGround 
    2727     <b>parameter</b> Real m(quantity=\"Mass\", unit=\"kg\") \"Mass\"; 
     
    3434   <b>end</b> MassOnGround; 
    3535</pre> 
    36  
     36  
    3737<p> 
    3838This means that the equations in the equation section are only correct 
     
    4949for a variable of type Real: 
    5050</p> 
    51  
     51  
    5252<ul> 
    5353<li><b>quantity</b> to define the physical quantity (e.g. \"Length\", or \"Energy\").</li> 
     
    5757    user interface as default display unit for input and/or output.</li> 
    5858</ul> 
    59  
     59  
    6060<p> 
    6161Note, a unit, such as \"N.m\", is not sufficient to define uniquely the 
     
    6565a unit for the corresponding variable. 
    6666</p> 
    67  
     67  
    6868<p> 
    6969For example, after providing a value for \"m\" and \"f\" in a parameter  
    7070menu of an instance of MassOnGround, a tool might generate the following code: 
    7171</p> 
    72  
     72  
    7373<pre> 
    7474   MassOnGround myObject(m(displayUnit=\"g\")=2, f=3); 
    7575</pre> 
    76  
     76  
    7777<p> 
    7878The meaning is that in the equations a value of \"2\" is used 
     
    8282a tool might ignore the \"displayUnit\" attribute. 
    8383</p> 
    84  
     84  
    8585<p> 
    8686In order to help the Modelica model developer, the Modelica.SIunits 
     
    9494might therefore be alternatively also defined as: 
    9595</p> 
    96  
     96  
    9797<pre>   <b>model</b> MassOnGround 
    9898     <b>parameter</b> Modelica.SIunits.Mass  m \"Mass\"; 
     
    101101   <b>end</b> MassOnGround; 
    102102</pre> 
    103  
     103  
    104104<p> 
    105105or in a short hand notation as 
    106106</p> 
    107  
     107  
    108108<pre> 
    109109   <b>model</b> MassOnGround 
     
    114114   <b>end</b> MassOnGround; 
    115115</pre> 
    116  
     116  
    117117<p> 
    118118For some often 
     
    122122in the declaration as in the example at the beginning. 
    123123</p> 
    124  
     124  
    125125</html>")); 
    126126       
     
    176176<p> This package is based on the following references 
    177177</p> 
    178  
     178  
    179179<dl> 
    180180<dt>ISO 31-1992:</dt> 
    181181<dd> <b>General principles concerning 
    182182    quantities, units and symbols</b>.<br>&nbsp;</dd> 
    183  
     183  
    184184<dt>ISO 1000-1992:</dt> 
    185185<dd> <b>SI units and recommendations for the use 
    186186    of their multiples and of certain other units</b>.<br>&nbsp;</dd> 
    187  
     187  
    188188<dt>Cardarelli F.:</dt> 
    189189<dd> <b>Scientific Unit Conversion - A Practical 
    190190     Guide to Metrication</b>. Springer 1997.</dd> 
    191191</dl> 
    192  
     192  
    193193</html> 
    194194")); 
     
    209209    email: <A HREF=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</A><br> 
    210210</dl> 
    211  
    212  
     211  
     212  
    213213<p><b>Acknowledgements:</b></p> 
    214214<ul> 
     
    241241on units, e.g.,  
    242242</p> 
    243  
     243  
    244244<pre>   <b>type</b> Angle = Real(<b>final</b> quantity = \"Angle\", 
    245245                     <b>final</b> unit     = \"rad\", 
    246246                     displayUnit    = \"deg\"); 
    247247</pre> 
    248  
     248  
    249249<p> 
    250250as well as conversion functions from non SI-units to SI-units 
     
    252252<a href=\"Modelica://Modelica.SIunits.Conversions\">Conversions</a>. 
    253253</p> 
    254  
     254  
    255255<p> 
    256256For an introduction how units are used in the Modelica standard library 
     
    258258<a href=\"Modelica://Modelica.SIunits.UsersGuide.HowToUseSIunits\">How to use SIunits</a>. 
    259259</p> 
    260  
     260  
    261261<p> 
    262262Copyright &copy; 1998-2007, Modelica Association and DLR. 
     
    268268<a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i> 
    269269</p> 
    270  
     270  
    271271</html>", revisions="<html> 
    272272<ul> 
     
    980980      final unit="K", 
    981981      min = 0, 
    982       displayUnit="degC"); 
     982      displayUnit="degC") annotation(__Dymola_absoluteValue=true); 
    983983  type Temp_K = ThermodynamicTemperature; 
    984984  type Temperature = ThermodynamicTemperature; 
    985985  type TemperatureDifference = Real ( 
    986986      final quantity="ThermodynamicTemperature", 
    987       final unit="K"); 
     987      final unit="K") annotation(__Dymola_absoluteValue=false); 
    988988  type CelsiusTemperature = Real (final quantity="CelsiusTemperature", final unit 
    989         =    "degC"); 
     989        =    "degC") annotation(__Dymola_absoluteValue=true); 
    990990  type Temp_C = CelsiusTemperature; 
    991991  type LinearExpansionCoefficient = Real (final quantity=