source: mso/eml/heat_exchangers/heater.mso @ 45

Last change on this file since 45 was 45, checked in by gerson bicca, 16 years ago

updated heat exchanger model

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.0 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 45 2006-11-07 16:11:10Z 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                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"Outlet Vapourisation Fraction"
48        Outlet.v = PP.VapourFraction(Outlet.T,Outlet.P,Outlet.z);
49
50"Vapor fraction Outlet Stream"
51        Vfrac = Outlet.v;
52
53"Liquid fraction Outlet Stream"
54        Lfrac = 1-Vfrac;
55       
56end
57
58Model Heater            as Heater_Cooler_Basic
59#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
60#       Heater
61#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#   
62EQUATIONS
63
64"Heat Duty"
65        Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
66       
67end
68
69Model Cooler            as Heater_Cooler_Basic
70#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#
71#       Cooler
72#+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++#   
73EQUATIONS
74
75"Heat Duty"
76        Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
77       
78end
Note: See TracBrowser for help on using the repository browser.