source: branches/gui/tutorial/ThreeTank2.mso @ 808

Last change on this file since 808 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.3 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: ThreeTank2.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
[765]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');
[1]21
[765]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
[1]36FlowSheet ThreeTank
[15]37        VARIABLES
[765]38        Feed    as Real(Unit='m^3/h');
[15]39
[1]40        DEVICES
41        Tank1   as tank_simplified;
42        Tank2   as tank_simplified;
43        Tank3   as tank_simplified;
44
45        CONNECTIONS
[15]46        Feed        to  Tank1.Fin;
[1]47        Tank1.Fout      to      Tank2.Fin;
48        Tank2.Fout      to      Tank3.Fin;
49
50        SPECIFY
[174]51        Feed = 10 * 'm^3/h';
[1]52       
53        INITIAL
[397]54        Tank1.Level = 1 * 'm';
55        Tank2.Level = 2 * 'm';
56        Tank3.Level = 1 * 'm';
[1]57end
Note: See TracBrowser for help on using the repository browser.