Changes between Version 25 and Version 26 of LanguageChanges


Ignore:
Timestamp:
Mar 5, 2007, 12:51:50 PM (15 years ago)
Author:
Rafael de Pelegrini Soares
Comment:

Added comments about the final and DisplayUnit?

Legend:

Unmodified
Added
Removed
Modified
  • LanguageChanges

    v25 v26  
    217217||Paula || '''agreed''' || I prefer single quote ||
    218218
     219== Another UOM problems ==
     220
     221Currently EMSO support Units Of Measurement (UOM) for variables, parameters, equations, etc.
     222But there is a potential problem when deriving types with a UOM:
     223
     224{{{
     225#!mso
     226Model MyModel
     227    VARIABLES
     228    P as pressure(Unit = 'm')
     229    ...
     230end
     231}}}
     232
     233The above model has serious problems:
     234 - '''P''' derived from a pressure type but has a ''length'' unit
     235 - What about the limits if the UOM changed?
     236
     237In order to fix this kind of problem the following changes are proposed:
     238 - add a '''final''' modifier for the attributes, preventing it to be changed
     239 - add another attribute called '''DisplayUnit''', which should be compatible with '''Unit''' (the GUI will report all results converted to this UOM)
     240 - the limits are considered to be in respect to the '''Unit''' and not '''DisplayUnit'''
     241 - declare all UOM in '''types.mso''' as '''final'''
     242
     243Sample code in the with the propositions included:
     244{{{
     245#!mso
     246# Pressure
     247pressure as Real (Brief = "Pressure", Default=1, Lower=1e-30, Upper=5e7, final Unit = 'atm');
     248press_delta as pressure (Brief = "Pressure Difference", Default=0.01, Lower=-5e6);
     249head as Real (Brief = "Head", Default=50, Lower=-1e6, Upper=1e6, final Unit = 'kJ/kg');
     250
     251Model reactor
     252  VARIABLES
     253  C(NComp)      as conc_mol(Brief="Concentration", DisplayUnit='mol/l', Lower=0);
     254  Co(NComp)     as conc_mol(Brief="Inlet concentration", DisplayUnit='mol/l', Lower=0);
     255  ...
     256end
     257}}}
     258
     259
     260||Who || Opinion || Why ||
     261||Rafael || '''agreed''' || Proposed the change ||
     262
    219263== OPTIONS section ==
    220264