source: trunk/eml/heat_exchangers/Mheatex.mso @ 307

Last change on this file since 307 was 307, checked in by Argimiro Resende Secchi, 16 years ago

Changing icons position.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.6 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 307 2007-07-05 01:54:54Z arge $
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       
30PARAMETERS
31
32outer PP                                        as Plugin       (Brief="Physical Properties", Type="PP");
33outer   NComp                   as Integer      (Brief="Number of Components");
34        FlowDirection           as Switcher(Brief="Flow Direction",Valid=["counter","cocurrent"],Default="cocurrent");
35        Ncold                                           as Integer      (Brief="Number of Inlet Cold Streams",Lower=1);
36        Nhot                                            as Integer      (Brief="Number of Inlet Hot Streams",Lower=1);
37       
38VARIABLES
39
40in      InletHot(Nhot)                  as stream               (Brief="Inlet Hot Streams");           
41out     OutletHot(Nhot)                 as streamPH     (Brief="Outlet Hot Streams");
42in      InletCold(Ncold)                as stream               (Brief="Inlet Cold Streams");           
43out     OutletCold(Ncold)       as streamPH     (Brief="Outlet Cold Streams");
44
45        Method  as LMTD_Basic   (Brief="Log Mean Temperature Difference Method");
46        Q               as power                        (Brief="Heat Transfer", Default=7000, Lower=1e-6, Upper=1e10);
47        UA              as Real                 (Brief="UA product",Unit='W/K',Lower=1e-8);
48       
49EQUATIONS
50
51"Hot Flow"
52        OutletHot.F = InletHot.F;       
53
54"Cold Flow"
55        OutletCold.F = InletCold.F;
56       
57"Hot Composition"
58        OutletHot.z = InletHot.z;
59       
60"Cold Composition"
61        OutletCold.z = InletCold.z;
62       
63"Heat Duty Hot Stream"
64        Q =  sum(InletHot.F*(InletHot.h- OutletHot.h));
65       
66"Heat Duty Cold Stream"
67        Q = -sum(InletCold.F*(InletCold.h- OutletCold.h));
68       
69"Heat Duty"
70        Q = UA*Method.LMTD*Method.Fc;
71
72switch FlowDirection
73       
74case    "cocurrent":
75
76"Temperature Difference at Inlet"
77        Method.DT0 = max(InletHot.T) - min(InletCold.T);
78
79"Temperature Difference at Outlet"
80        Method.DTL = min(OutletHot.T) - max(OutletCold.T);
81       
82case "counter":
83       
84"Temperature Difference at Inlet"
85        Method.DT0 = max(InletHot.T) - max(OutletCold.T);
86
87"Temperature Difference at Outlet"
88        Method.DTL = min(OutletHot.T) - min(InletCold.T);
89       
90end
91
92end
Note: See TracBrowser for help on using the repository browser.