# source:branches/gui/tutorial/ThreeTank1.mso@828

Last change on this file since 828 was 765, checked in by Rafael de Pelegrini Soares, 14 years ago

Tutorial files simplified.

• Property svn:eol-style set to `native`
• Property svn:keywords set to `Id`
File size: 1.2 KB
Line
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: ThreeTank1.mso 765 2009-06-16 13:15:20Z rafael \$
9*----------------------------------------------------------------------
10*
11* Arquivo de exemplo do EMSO
12*
13* Sistema de uma série de tanques.
14*
15*-------------------------------------------------------------------*#
16
17Model 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');
21
22        VARIABLES
23        Level as Real(Brief="Tank level", Unit='m');
24in      Fin  as Real(Brief="Input flow", Unit='m^3/h');
25out     Fout as Real(Brief="Output flow", Unit='m^3/h');
26
27        EQUATIONS
28        "Mass balance"
29        diff(A*Level) = Fin - Fout;
30
31        "Valve equation"
32        Fout = k*sqrt(Level);
33end
34
35
36FlowSheet ThreeTank
37        VARIABLES
38        Feed    as Real(Unit='m^3/h');
39
40        DEVICES
41        Tank1   as tank_simplified;
42        Tank2   as tank_simplified;
43        Tank3   as tank_simplified;
44
45        CONNECTIONS
46        Feed        to  Tank1.Fin;
47        Tank1.Fout      to      Tank2.Fin;
48        Tank2.Fout      to      Tank3.Fin;
49end
Note: See TracBrowser for help on using the repository browser.