[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 843 2009-09-03 18:36:47Z bicca $ |
---|
| 9 | *---------------------------------------------------------------------- |
---|
| 10 | * |
---|
| 11 | * Arquivo de exemplo do EMSO |
---|
| 12 | *-------------------------------------------------------------------*# |
---|
| 13 | |
---|
[765] | 14 | Model tank_simplified |
---|
[1] | 15 | |
---|
[843] | 16 | PARAMETERS |
---|
| 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'); |
---|
[765] | 21 | |
---|
[843] | 22 | SET |
---|
| 23 | pi = 3.141592; |
---|
| 24 | A = (pi*Dh^2)/4; |
---|
[765] | 25 | |
---|
[843] | 26 | VARIABLES |
---|
| 27 | V as Real (Brief="Tank Volume", Lower = 0, Unit='m^3'); |
---|
| 28 | Level as Real (Brief="Tank level", Lower = 0, Unit='m'); |
---|
| 29 | in Fin as Real (Brief="Input flow", Lower = 0, Unit='m^3/h'); |
---|
| 30 | out Fout as Real (Brief="Output flow",Lower = 0, Unit='m^3/h'); |
---|
| 31 | |
---|
| 32 | EQUATIONS |
---|
| 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 | |
---|
[765] | 43 | end |
---|
| 44 | |
---|
| 45 | |
---|
[1] | 46 | FlowSheet ThreeTank |
---|
[843] | 47 | |
---|
| 48 | DEVICES |
---|
| 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"); |
---|
[15] | 54 | |
---|
[843] | 55 | CONNECTIONS |
---|
[15] | 56 | Feed to Tank1.Fin; |
---|
[1] | 57 | Tank1.Fout to Tank2.Fin; |
---|
| 58 | Tank2.Fout to Tank3.Fin; |
---|
| 59 | |
---|
[843] | 60 | SPECIFY |
---|
[174] | 61 | Feed = 10 * 'm^3/h'; |
---|
[1] | 62 | |
---|
[843] | 63 | INITIAL |
---|
[397] | 64 | Tank1.Level = 1 * 'm'; |
---|
| 65 | Tank2.Level = 2 * 'm'; |
---|
| 66 | Tank3.Level = 1 * 'm'; |
---|
[843] | 67 | |
---|
[1] | 68 | end |
---|