[78] | 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. |
---|
[1] | 14 | *---------------------------------------------------------------------- |
---|
| 15 | * Author: Gerson Balbueno Bicca |
---|
| 16 | * $Id: Mheatex.mso 359 2007-08-31 20:57:03Z bicca $ |
---|
| 17 | *--------------------------------------------------------------------*# |
---|
[45] | 18 | |
---|
[164] | 19 | using "HEX_Engine.mso"; |
---|
[1] | 20 | |
---|
| 21 | Model Mheatex |
---|
[135] | 22 | |
---|
| 23 | ATTRIBUTES |
---|
[307] | 24 | Icon = "icon/Mheatex"; |
---|
[139] | 25 | Pallete = true; |
---|
[284] | 26 | Brief = "Model of a Multistream heat exchangers"; |
---|
[359] | 27 | Info = |
---|
| 28 | "Heat Transfer between multiple hot and cold streams. |
---|
| 29 | |
---|
| 30 | == Specify == |
---|
| 31 | * The Inlet Hot streams: Any Number |
---|
| 32 | * The Inlet Cold streams: Any Number |
---|
| 33 | * The LMTD correction factor |
---|
| 34 | * Specify: |
---|
| 35 | **The outlet temperature and the outlet pressure for each stream on one side (hot or cold) of the heat exchanger |
---|
| 36 | ** On the other side the user must leave at least one unespecified outlet stream. |
---|
| 37 | |
---|
| 38 | |
---|
| 39 | == Setting The Mheatex Parameters == |
---|
| 40 | *FlowDirection: counter or cocurrent |
---|
| 41 | *Nhot |
---|
| 42 | *Ncold |
---|
| 43 | "; |
---|
| 44 | |
---|
[1] | 45 | PARAMETERS |
---|
| 46 | |
---|
[325] | 47 | outer PP as Plugin (Brief="Physical Properties", Type="PP"); |
---|
| 48 | outer NComp as Integer (Brief="Number of Components"); |
---|
| 49 | FlowDirection as Switcher (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent"); |
---|
[359] | 50 | Ncold as Integer (Brief="Number of Inlet Cold Streams",Lower=1, Symbol = "N_{cold}"); |
---|
| 51 | Nhot as Integer (Brief="Number of Inlet Hot Streams",Lower=1, Symbol = "N_{hot}"); |
---|
[45] | 52 | |
---|
[1] | 53 | VARIABLES |
---|
| 54 | |
---|
[359] | 55 | in InletHot(Nhot) as stream (Brief="Inlet Hot Streams", PosX=0, PosY=0.7156, Symbol="^{inHot}"); |
---|
| 56 | out OutletHot(Nhot) as streamPH (Brief="Outlet Hot Streams", PosX=1, PosY=0.7156, Symbol="^{outHot}"); |
---|
| 57 | in InletCold(Ncold) as stream (Brief="Inlet Cold Streams", PosX=1, PosY=0.2793, Symbol="^{inCold}"); |
---|
| 58 | out OutletCold(Ncold) as streamPH (Brief="Outlet Cold Streams", PosX=0, PosY=0.2793, Symbol="^{outCold}"); |
---|
[1] | 59 | |
---|
[359] | 60 | Method as LMTD_Basic (Brief="Log Mean Temperature Difference Method", Symbol = " "); |
---|
[325] | 61 | Q as power (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10); |
---|
| 62 | UA as Real (Brief="UA product",Unit='W/K',Lower=1e-8); |
---|
[131] | 63 | |
---|
[1] | 64 | EQUATIONS |
---|
| 65 | |
---|
| 66 | "Hot Flow" |
---|
[164] | 67 | OutletHot.F = InletHot.F; |
---|
[1] | 68 | |
---|
| 69 | "Cold Flow" |
---|
[164] | 70 | OutletCold.F = InletCold.F; |
---|
[1] | 71 | |
---|
| 72 | "Hot Composition" |
---|
[164] | 73 | OutletHot.z = InletHot.z; |
---|
[1] | 74 | |
---|
| 75 | "Cold Composition" |
---|
[164] | 76 | OutletCold.z = InletCold.z; |
---|
[1] | 77 | |
---|
| 78 | "Heat Duty Hot Stream" |
---|
[164] | 79 | Q = sum(InletHot.F*(InletHot.h- OutletHot.h)); |
---|
[1] | 80 | |
---|
| 81 | "Heat Duty Cold Stream" |
---|
[164] | 82 | Q = -sum(InletCold.F*(InletCold.h- OutletCold.h)); |
---|
[1] | 83 | |
---|
| 84 | "Heat Duty" |
---|
[168] | 85 | Q = UA*Method.LMTD*Method.Fc; |
---|
[1] | 86 | |
---|
[144] | 87 | switch FlowDirection |
---|
[1] | 88 | |
---|
[140] | 89 | case "cocurrent": |
---|
| 90 | |
---|
[131] | 91 | "Temperature Difference at Inlet" |
---|
[164] | 92 | Method.DT0 = max(InletHot.T) - min(InletCold.T); |
---|
[131] | 93 | |
---|
| 94 | "Temperature Difference at Outlet" |
---|
[164] | 95 | Method.DTL = min(OutletHot.T) - max(OutletCold.T); |
---|
[131] | 96 | |
---|
[140] | 97 | case "counter": |
---|
[1] | 98 | |
---|
[131] | 99 | "Temperature Difference at Inlet" |
---|
[164] | 100 | Method.DT0 = max(InletHot.T) - max(OutletCold.T); |
---|
[131] | 101 | |
---|
| 102 | "Temperature Difference at Outlet" |
---|
[164] | 103 | Method.DTL = min(OutletHot.T) - min(InletCold.T); |
---|
[131] | 104 | |
---|
[1] | 105 | end |
---|
| 106 | |
---|
| 107 | end |
---|