[773] | 1 | #*------------------------------------------------------------------- |
---|
| 2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
| 3 | * |
---|
| 4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
| 5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
| 6 | * http://www.enq.ufrgs.br/alsoc. |
---|
| 7 | * |
---|
| 8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
| 9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
| 10 | * All rights reserved. |
---|
| 11 | * |
---|
| 12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
| 13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
| 14 | * |
---|
| 15 | *--------------------------------------------------------------------- |
---|
| 16 | * Author: Gerson Bicca |
---|
| 17 | *$Id$ |
---|
| 18 | *-------------------------------------------------------------------*# |
---|
| 19 | |
---|
| 20 | using "streams"; |
---|
| 21 | |
---|
| 22 | Model flow_measurement |
---|
| 23 | ATTRIBUTES |
---|
| 24 | Pallete = true; |
---|
| 25 | Icon = "icon/flow_measurement"; |
---|
| 26 | Brief = "Model to measure the flow rate in a pipe line. "; |
---|
| 27 | |
---|
| 28 | PARAMETERS |
---|
| 29 | |
---|
| 30 | outer PP as Plugin(Type="PP"); |
---|
| 31 | outer NComp as Integer; |
---|
| 32 | FlowConst as flow_mol (Brief = "Flow Constant", Hidden=true); |
---|
| 33 | |
---|
| 34 | VARIABLES |
---|
[790] | 35 | in Inlet as stream (Brief = "Inlet stream", PosX=0, PosY=0.78,Protected=true); |
---|
| 36 | out Outlet as stream (Brief = "Outlet stream", PosX=1, PosY=0.78,Protected=true); |
---|
| 37 | out FlowSignal as control_signal (Brief="Flow Signal", PosX=0.5, PosY=0,Protected=true); |
---|
[773] | 38 | |
---|
| 39 | SET |
---|
| 40 | |
---|
[790] | 41 | FlowConst = 1*'kmol/h'; |
---|
[773] | 42 | |
---|
| 43 | EQUATIONS |
---|
| 44 | "Overall Molar Balance" |
---|
| 45 | Outlet.F = Inlet.F; |
---|
| 46 | |
---|
| 47 | "Temperature" |
---|
| 48 | Outlet.T = Inlet.T; |
---|
| 49 | |
---|
| 50 | "Pressure" |
---|
| 51 | Outlet.P = Inlet.P; |
---|
| 52 | |
---|
| 53 | "Energy Balance" |
---|
| 54 | Outlet.h = Inlet.h; |
---|
| 55 | |
---|
| 56 | "Vapour fraction" |
---|
| 57 | Outlet.v = Inlet.v; |
---|
| 58 | |
---|
| 59 | "Componente Molar Balance" |
---|
| 60 | Outlet.z = Inlet.z; |
---|
| 61 | |
---|
[790] | 62 | "Flow Measurement in kmol/h" |
---|
[773] | 63 | FlowSignal*FlowConst = Inlet.F; |
---|
| 64 | |
---|
| 65 | end |
---|
| 66 | |
---|