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 | |
---|
17 | using "streams.mso"; |
---|
18 | |
---|
19 | Model Heater_Cooler_Basic |
---|
20 | #===================================================================== |
---|
21 | # Heater or Cooler Basic Equations |
---|
22 | #===================================================================== |
---|
23 | PARAMETERS |
---|
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 | |
---|
28 | VARIABLES |
---|
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 | |
---|
33 | EQUATIONS |
---|
34 | |
---|
35 | "Flow" |
---|
36 | Outlet.F = sum(Inlet.F); |
---|
37 | |
---|
38 | for j in [1 : NComp] |
---|
39 | |
---|
40 | "Composition" |
---|
41 | Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j)); |
---|
42 | |
---|
43 | end |
---|
44 | |
---|
45 | |
---|
46 | "Outlet Vapourisation Fraction" |
---|
47 | Outlet.v = PP.VapourFraction(Outlet.T,Outlet.P,Outlet.z); |
---|
48 | |
---|
49 | end |
---|
50 | |
---|
51 | Model Heater as Heater_Cooler_Basic |
---|
52 | #===================================================================== |
---|
53 | # Heater |
---|
54 | #===================================================================== |
---|
55 | EQUATIONS |
---|
56 | |
---|
57 | "Heat Duty" |
---|
58 | Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h); |
---|
59 | |
---|
60 | end |
---|
61 | |
---|
62 | Model Cooler as Heater_Cooler_Basic |
---|
63 | #===================================================================== |
---|
64 | # Cooler |
---|
65 | #===================================================================== |
---|
66 | EQUATIONS |
---|
67 | |
---|
68 | "Heat Duty" |
---|
69 | Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h; |
---|
70 | |
---|
71 | end |
---|