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

Last change on this file since 4 was 1, checked in by Rafael de Pelegrini Soares, 17 years ago

Initial import of the library

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.8 KB
Line 
1#*---------------------------------------------------------------------
2* This file is property of the author and cannot be used, copyed
3* or modified without permission.
4*
5* Copyright (C) 2004-2005  the author
6*
7*
8*                                       Heater and Cooler                                                       
9*
10*
11*----------------------------------------------------------------------
12* Author: Gerson Balbueno Bicca
13* $Id: heater.mso 1 2006-06-20 17:33:53Z rafael $
14*--------------------------------------------------------------------*#
15
16
17using "streams.mso";
18
19Model Heater_Cooler_Basic
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       
33EQUATIONS
34
35"Flow"
36        Outlet.F = sum(Inlet.F);       
37       
38for j in [1 : NComp]
39       
40"Composition"
41        Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j));
42       
43end
44
45
46"Outlet Vapourisation Fraction"
47        Outlet.v = PP.VapourFraction(Outlet.T,Outlet.P,Outlet.z);       
48       
49end
50
51Model Heater            as Heater_Cooler_Basic
52#=====================================================================
53#       Heater
54#=====================================================================
55EQUATIONS
56
57"Heat Duty"
58        Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h);
59       
60end
61
62Model Cooler            as Heater_Cooler_Basic
63#=====================================================================
64#       Cooler
65#=====================================================================
66EQUATIONS
67
68"Heat Duty"
69        Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h;
70       
71end
Note: See TracBrowser for help on using the repository browser.