Changeset 843 for branches/gui


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

updated emso tutorial

Location:
branches/gui/tutorial
Files:
3 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
  • branches/gui/tutorial/ThreeTank2.mso

    r765 r843  
    1010*
    1111* Arquivo de exemplo do EMSO
    12 *
    13 * Sistema de uma série de tanques.
    14 *
    1512*-------------------------------------------------------------------*#
    1613
    1714Model 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');
    2115
    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');
     16PARAMETERS
     17        pi  as Real (Brief="pi number",Default=3.141592);
     18        k       as Real (Brief="Valve Constant", Unit = 'm^2.5/h', Default=4);
     19        Dh  as Real     (Brief="Hydraulic diameter", Unit = 'm', Default=2);
     20        A       as Real (Brief="Tank area", Unit = 'm^2');
    2621
    27         EQUATIONS
    28         "Mass balance"
    29         diff(A*Level) = Fin - Fout;
     22SET
     23        pi  = 3.141592;
     24        A   = (pi*Dh^2)/4;
    3025
    31         "Valve equation"
    32         Fout = k*sqrt(Level);           
     26VARIABLES
     27        V               as Real (Brief="Tank Volume", Lower = 0, Unit='m^3');
     28        Level   as Real (Brief="Tank level", Lower = 0, Unit='m');
     29in      Fin     as Real (Brief="Input flow", Lower = 0, Unit='m^3/h');
     30out     Fout    as Real (Brief="Output flow",Lower = 0, Unit='m^3/h');
     31
     32EQUATIONS
     33
     34"Mass balance"
     35        diff(V) = Fin - Fout;
     36
     37"Valve equation"
     38        Fout = k*sqrt(Level);
     39
     40"Tank volume"
     41        V = A*Level;
     42
    3343end
    3444
    3545
    3646FlowSheet ThreeTank
    37         VARIABLES
    38         Feed    as Real(Unit='m^3/h');
     47       
     48DEVICES
     49        Feed    as Real (Brief="Feed Stream", Unit='m^3/h');
     50       
     51        Tank1   as tank_simplified (Brief="First Tank");
     52        Tank2   as tank_simplified (Brief="Second Tank");
     53        Tank3   as tank_simplified (Brief="Third Tank");
    3954
    40         DEVICES
    41         Tank1   as tank_simplified;
    42         Tank2   as tank_simplified;
    43         Tank3   as tank_simplified;
    44 
    45         CONNECTIONS
     55CONNECTIONS
    4656        Feed        to  Tank1.Fin;
    4757        Tank1.Fout      to      Tank2.Fin;
    4858        Tank2.Fout      to      Tank3.Fin;
    4959
    50         SPECIFY
     60SPECIFY
    5161        Feed = 10 * 'm^3/h';
    5262       
    53         INITIAL
     63INITIAL
    5464        Tank1.Level = 1 * 'm';
    5565        Tank2.Level = 2 * 'm';
    5666        Tank3.Level = 1 * 'm';
     67
    5768end
  • branches/gui/tutorial/ThreeTank3.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;
    3343end
    3444
    3545
    3646FlowSheet ThreeTank
    37         VARIABLES
    38         Feed    as Real(Unit='m^3/h');
    3947
    40         DEVICES
    41         Tank1   as tank_simplified;
    42         Tank2   as tank_simplified;
    43         Tank3   as tank_simplified;
     48DEVICES
     49        Feed    as Real (Brief="Feed Stream", Unit='m^3/h');
     50       
     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;
    4959
    50         SPECIFY
     60SPECIFY
    5161        Feed = 10 * 'm^3/h';
    5262       
    53         INITIAL
     63INITIAL
    5464        Tank1.Level = 1 * 'm';
    5565        Tank2.Level = 2 * 'm';
    5666        Tank3.Level = 1 * 'm';
    5767       
    58         SET
     68SET
    5969        Tank2.k = 8 * 'm^2.5/h';
    60         Tank2.A = 4 * 'm^2';
     70        Tank2.Dh = 4 * 'm';
    6171       
    62         OPTIONS
     72OPTIONS
    6373        TimeStep = 0.1;
    64         TimeEnd = 2;
     74        TimeEnd = 10;
    6575        TimeUnit = 'h';
     76
    6677end
Note: See TracChangeset for help on using the changeset viewer.