Changes between Initial Version and Version 1 of LanguageChanges


Ignore:
Timestamp:
Jan 11, 2007, 9:10:47 PM (15 years ago)
Author:
Rafael de Pelegrini Soares
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LanguageChanges

    v1 v1  
     1= EMSO Language Changes Suggestions =
     2
     3== '''ext''' keyword for ''global'' parameters ==
     4
     5Currently the '''ext''' keyword is used to obtain a ''global'' parameter.
     6I've observed that this keyword is not well suited for its meaning.
     7
     8The idea from http://www.modelica.org is to have '''outer''' parameters, which means a parameter from one of the ''parents''.
     9Then the simulator will look for the parameter in the '''parent tree''' until it finds it (maybe it is found only on the FlowSheet but it can be matched before).
     10
     11Usage example:
     12{{{
     13#!mso
     14Model stream
     15        PARAMETERS
     16        outer NComp as Integer(Brief = "Number of chemical components", Lower = 1);
     17
     18        VARIABLES
     19        F as flow_mol;
     20        T as temperature;
     21        P as pressure;
     22        z(NComp) as fraction (Brief = "Overall Molar Fraction");
     23        h as enth_mol (Brief = "Overall Molar Enthalpy");
     24        v as fraction (Brief = "Vapourisation fraction");
     25end
     26
     27FlowSheet MyProcess
     28        PARAMETERS
     29        NComp as Integer(Brief = "Number of chemical components", Lower = 1);
     30
     31        DEVICES
     32        feed as stream;
     33end
     34}}}
     35
     36Then when '''feed''' is instantiated on the FlowSheet '''feed.NComp''' will be a reference for '''NComp''' on the FlowSheet.
     37But if the stream is used in a model this model can have a '''NComp''' parameter and this will be referenced.
     38
     39||Who || Opinion || Why ||
     40||Rafael || '''agreed''' || proposed the change ||
     41
     42== CalcObject's ==
     43
     44This is another example of keyword which is not directly understood by the users.
     45I suggest to use just '''Plugin''' instead of '''CalcObject'''.
     46
     47Usage:
     48{{{
     49#!mso
     50Model stream_therm as stream
     51        PARAMETERS
     52        outer  PP   as Plugin(Brief = "External Physical Properties", File="vrpp");
     53       
     54        EQUATIONS
     55        h = (1-v)*PP.LiquidEnthalpy(T, P, z) + v*PP.VapourEnthalpy(T, P, z);
     56end
     57}}}
     58
     59Another problem with the Plugin's is that each Plugin '''call''' (e.g. '''PP.LiquidEnthalpy(T, P, z)''') generates a units of measurement warning.
     60In order to solve this problem I suggest the specification of the '''File''' attribute even for '''outer''' Plugins (as exemplified above).
     61Then the simulator can check the units of measurement and number of arguments when checking the model and not only when the simulation is run.
     62
     63||Who || Opinion || Why ||
     64||Rafael || '''agreed''' || proposed the change ||