source: branches/newlanguage/eml/heat_exchangers/Mheatex.mso @ 197

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

modified and fixed comments in heat exchangers equations

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.0 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*
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
33using "HEX_Engine.mso";
34
35Model Mheatex
36       
37ATTRIBUTES
38        Pallete = true;
39        Brief = "Multistream heat exchangers";
40        Info =
41        "Heat Transfer between multiple hot and cold streams.";
42       
43PARAMETERS
44
45outer PP                                        as Plugin       (Brief="Physical Properties", Type="PP");
46outer   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       
51VARIABLES
52
53in      InletHot(Nhot)                  as stream               (Brief="Inlet Hot Streams");           
54out     OutletHot(Nhot)                 as streamPH     (Brief="Outlet Hot Streams");
55in      InletCold(Ncold)                as stream               (Brief="Inlet Cold Streams");           
56out     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       
62EQUATIONS
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
85switch FlowDirection
86       
87case    "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       
95case "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       
103end
104
105end
Note: See TracBrowser for help on using the repository browser.