# source:branches/gui/tutorial/ThreeTank3.mso

Last change on this file was 843, checked in by gerson bicca, 13 years ago

updated emso tutorial

• Property svn:eol-style set to `native`
• Property svn:keywords set to `Id`
File size: 1.7 KB
RevLine
[1]1#*---------------------------------------------------------------------
2* This file is property of the author and cannot be used, copyed
3* or modified without permission.
4*
5* Copyright (C) 2002-2004  the author
6*----------------------------------------------------------------------
7* Author: Rafael de Pelegrini Soares
8* \$Id: ThreeTank3.mso 843 2009-09-03 18:36:47Z bicca \$
9*----------------------------------------------------------------------
10*
11* Arquivo de exemplo do EMSO
12*
13*-------------------------------------------------------------------*#
14
[765]15Model tank_simplified
[1]16
[843]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');
[765]22
[843]23SET
24        pi  = 3.141592;
25        A   = (pi*Dh^2)/4;
[765]26
[843]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;
[765]43end
44
45
[1]46FlowSheet ThreeTank
[15]47
[843]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");
[1]54
[843]55CONNECTIONS
[15]56        Feed        to  Tank1.Fin;
[1]57        Tank1.Fout      to      Tank2.Fin;
58        Tank2.Fout      to      Tank3.Fin;
59
[843]60SPECIFY
[174]61        Feed = 10 * 'm^3/h';
[1]62
[843]63INITIAL
[397]64        Tank1.Level = 1 * 'm';
65        Tank2.Level = 2 * 'm';
66        Tank3.Level = 1 * 'm';
[1]67
[843]68SET
[174]69        Tank2.k = 8 * 'm^2.5/h';
[843]70        Tank2.Dh = 4 * 'm';
[1]71
[843]72OPTIONS
[128]73        TimeStep = 0.1;
[843]74        TimeEnd = 10;
[174]75        TimeUnit = 'h';
[843]76
[1]77end
Note: See TracBrowser for help on using the repository browser.