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