source: branches/gui/eml/heat_exchangers/Mheatex.mso @ 609

Last change on this file since 609 was 544, checked in by gerson bicca, 15 years ago

improved documentation of Mheatex model

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
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* Author: Gerson Balbueno Bicca
16* $Id: Mheatex.mso 544 2008-06-27 15:23:00Z bicca $
17*--------------------------------------------------------------------*#
18
19using "HEX_Engine.mso";
20
21Model Mheatex
22       
23ATTRIBUTES
24        Icon = "icon/Mheatex";
25        Pallete = true;
26        Brief = "Model of a Multistream heat exchangers";
27        Info            =
28"Heat Transfer between multiple hot and cold streams.
29
30== Specify ==
31The user must specify the following variables:
32* The Inlet Hot streams: Any Number
33* The Inlet Cold streams: Any Number
34* The LMTD correction factor
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== Setting The Mheatex Parameters ==
39* FlowDirection: counter or cocurrent flow
40* Number of hot streams (Nhot)
41* Number of cold streams (Ncold)
42";
43
44PARAMETERS
45
46outer PP                        as Plugin       (Brief="Physical Properties", Type="PP");
47outer NComp             as Integer      (Brief="Number of Components");
48        FlowDirection   as Switcher     (Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
49        Ncold                   as Integer      (Brief="Number of Inlet Cold Streams",Lower=1, Symbol = "N_{cold}");
50        Nhot                    as Integer      (Brief="Number of Inlet Hot Streams",Lower=1, Symbol = "N_{hot}");
51       
52VARIABLES
53
54in  InletHot(Nhot)      as stream       (Brief="Inlet Hot Streams", PosX=0, PosY=0.7156, Symbol="_{hot}^{in}");
55out OutletHot(Nhot)     as streamPH (Brief="Outlet Hot Streams", PosX=1, PosY=0.7156, Symbol="_{hot}^{out}");
56in  InletCold(Ncold)    as stream       (Brief="Inlet Cold Streams", PosX=1, PosY=0.2793, Symbol="_{cold}^{in}");
57out OutletCold(Ncold)   as streamPH     (Brief="Outlet Cold Streams", PosX=0, PosY=0.2793, Symbol="_{cold}^{out}");
58
59        Method  as LMTD_Basic   (Brief="Log Mean Temperature Difference Method", Symbol = " ");
60        Q               as power        (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10);
61        UA              as Real     (Brief="UA product",Unit='W/K',Lower=1e-8);
62       
63EQUATIONS
64
65"Hot Flow"
66        OutletHot.F = InletHot.F;       
67
68"Cold Flow"
69        OutletCold.F = InletCold.F;
70       
71"Hot Composition"
72        OutletHot.z = InletHot.z;
73       
74"Cold Composition"
75        OutletCold.z = InletCold.z;
76       
77"Heat Duty Hot Stream"
78        Q =  sum(InletHot.F*(InletHot.h- OutletHot.h));
79       
80"Heat Duty Cold Stream"
81        Q = -sum(InletCold.F*(InletCold.h- OutletCold.h));
82       
83"Heat Duty"
84        Q = UA*Method.LMTD*Method.Fc;
85
86switch FlowDirection
87       
88case    "cocurrent":
89
90"Temperature Difference at Inlet"
91        Method.DT0 = max(InletHot.T) - min(InletCold.T);
92
93"Temperature Difference at Outlet"
94        Method.DTL = min(OutletHot.T) - max(OutletCold.T);
95       
96case "counter":
97       
98"Temperature Difference at Inlet"
99        Method.DT0 = max(InletHot.T) - max(OutletCold.T);
100
101"Temperature Difference at Outlet"
102        Method.DTL = min(OutletHot.T) - min(InletCold.T);
103       
104end
105
106end
Note: See TracBrowser for help on using the repository browser.