Changes between Initial Version and Version 1 of LanguageChanges

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



  • LanguageChanges

    v1 v1  
     1= EMSO Language Changes Suggestions =
     3== '''ext''' keyword for ''global'' parameters ==
     5Currently the '''ext''' keyword is used to obtain a ''global'' parameter.
     6I've observed that this keyword is not well suited for its meaning.
     8The idea from 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).
     11Usage example:
     14Model stream
     15        PARAMETERS
     16        outer NComp as Integer(Brief = "Number of chemical components", Lower = 1);
     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");
     27FlowSheet MyProcess
     28        PARAMETERS
     29        NComp as Integer(Brief = "Number of chemical components", Lower = 1);
     31        DEVICES
     32        feed as stream;
     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.
     39||Who || Opinion || Why ||
     40||Rafael || '''agreed''' || proposed the change ||
     42== CalcObject's ==
     44This is another example of keyword which is not directly understood by the users.
     45I suggest to use just '''Plugin''' instead of '''CalcObject'''.
     50Model stream_therm as stream
     51        PARAMETERS
     52        outer  PP   as Plugin(Brief = "External Physical Properties", File="vrpp");
     54        EQUATIONS
     55        h = (1-v)*PP.LiquidEnthalpy(T, P, z) + v*PP.VapourEnthalpy(T, P, z);
     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.
     63||Who || Opinion || Why ||
     64||Rafael || '''agreed''' || proposed the change ||