# source:mso/eml/heat_exchangers/heater.mso@26

Last change on this file since 26 was 26, checked in by gerson bicca, 17 years ago

updated heat exchangers model and samples

• Property svn:eol-style set to `native`
• Property svn:keywords set to `Id`
File size: 1.7 KB
Line
1#*---------------------------------------------------------------------
2* Model of a Heater and Cooler
3*
4*       Streams:
5*               * Inlet(Ninlet) streams ....    at least one material stream
6*               * Outlet stream             ....        one material stream
7*
8*       Purpose:
9*               * Determines thermal and phase conditions of outlet stream
10*
11*----------------------------------------------------------------------
12* Author: Gerson Balbueno Bicca
13* \$Id: heater.mso 26 2006-09-19 20:23:27Z bicca \$
14*--------------------------------------------------------------------*#
15
16using "streams.mso";
17
18Model Heater_Cooler_Basic
19
20#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
21#       Heater or Cooler Basic Equations
22#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
23PARAMETERS
24        ext PP                  as CalcObject   (Brief="Physical Properties");
25        ext     NComp           as Integer              (Brief="Number of Components");
26        ext     Ninlet      as Integer          (Brief="Number of Inlet Streams",Lower=1);
27
28VARIABLES
29        in  Inlet(Ninlet)       as stream;              #(Brief="Inlet Streams")
30        out Outlet              as stream_therm;#(Brief="Outlet Stream")
31        Q                               as power                (Brief="Heat Transfer");
32        Vfrac                           as fraction     (Brief = "Vapor fraction Outlet Stream");
33        Lfrac                           as fraction     (Brief = "Liquid fraction Outlet Stream");
34
35EQUATIONS
36
37"Flow"
38        Outlet.F = sum(Inlet.F);
39
40for j in [1 : NComp]
41
42"Composition"
43        Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j));
44
45end
46
47
48"Outlet Vapourisation Fraction"
49        Outlet.v = PP.VapourFraction(Outlet.T,Outlet.P,Outlet.z);
50
51"Vapor fraction Outlet Stream"
52        Vfrac = Outlet.v;
53
54"Liquid fraction Outlet Stream"
55        Lfrac = 1-Vfrac;
56
57end
58
59Model Heater            as Heater_Cooler_Basic
60
61EQUATIONS
62
63"Heat Duty"
64        Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
65
66end
67
68Model Cooler            as Heater_Cooler_Basic
69
70EQUATIONS
71
72"Heat Duty"
73        Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
74
75end
Note: See TracBrowser for help on using the repository browser.