Ignore:
Timestamp:
Sep 3, 2009, 3:36:47 PM (13 years ago)
Author:
gerson bicca
Message:

updated emso tutorial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/tutorial/ThreeTank1.mso

    r765 r843  
    1111* Arquivo de exemplo do EMSO
    1212*
    13 * Sistema de uma série de tanques.
    14 *
    1513*-------------------------------------------------------------------*#
    1614
    1715Model tank_simplified
    18         PARAMETERS
    19         k as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4);
    20         A as Real (Brief="Tank area", Default=2, Unit = 'm^2');
    2116
    22         VARIABLES
    23         Level as Real(Brief="Tank level", Unit='m');
    24 in      Fin  as Real(Brief="Input flow", Unit='m^3/h');
    25 out     Fout as Real(Brief="Output flow", Unit='m^3/h');
     17PARAMETERS
     18        pi  as Real (Brief="pi number",Default=3.141592);
     19        k       as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4);
     20        Dh  as Real     (Brief="Hydraulic diameter", Unit = 'm', Default=2);
     21        A       as Real (Brief="Tank area", Unit = 'm^2');
    2622
    27         EQUATIONS
    28         "Mass balance"
    29         diff(A*Level) = Fin - Fout;
     23SET
     24        pi  = 3.141592;
     25        A   = (pi*Dh^2)/4;
    3026
    31         "Valve equation"
    32         Fout = k*sqrt(Level);           
     27VARIABLES
     28        V               as Real (Brief="Tank Volume", Lower = 0, Unit='m^3');
     29        Level   as Real (Brief="Tank level", Lower = 0, Unit='m');
     30in      Fin     as Real (Brief="Input flow", Lower = 0, Unit='m^3/h');
     31out     Fout    as Real (Brief="Output flow",Lower = 0, Unit='m^3/h');
     32
     33EQUATIONS
     34
     35"Mass balance"
     36        diff(V) = Fin - Fout;
     37
     38"Valve equation"
     39        Fout = k*sqrt(Level);
     40
     41"Tank volume"
     42        V = A*Level;
     43
    3344end
    3445
     46FlowSheet ThreeTank
    3547
    36 FlowSheet ThreeTank
    37         VARIABLES
    38         Feed    as Real(Unit='m^3/h');
     48DEVICES
     49        Feed    as Real (Brief="Feed Stream", Unit='m^3/h');
    3950       
    40         DEVICES
    41         Tank1   as tank_simplified;
    42         Tank2   as tank_simplified;
    43         Tank3   as tank_simplified;
     51        Tank1   as tank_simplified (Brief="First Tank");
     52        Tank2   as tank_simplified (Brief="Second Tank");
     53        Tank3   as tank_simplified (Brief="Third Tank");
    4454
    45         CONNECTIONS
     55CONNECTIONS
    4656        Feed        to  Tank1.Fin;
    4757        Tank1.Fout      to      Tank2.Fin;
    4858        Tank2.Fout      to      Tank3.Fin;
     59
    4960end
Note: See TracChangeset for help on using the changeset viewer.