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 | |
---|
16 | using "streams.mso"; |
---|
17 | |
---|
18 | Model Heater_Cooler_Basic |
---|
19 | |
---|
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 | 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 | Vfrac as fraction (Brief = "Vapor fraction Outlet Stream"); |
---|
33 | Lfrac as fraction (Brief = "Liquid fraction Outlet Stream"); |
---|
34 | |
---|
35 | EQUATIONS |
---|
36 | |
---|
37 | "Flow" |
---|
38 | Outlet.F = sum(Inlet.F); |
---|
39 | |
---|
40 | for j in [1 : NComp] |
---|
41 | |
---|
42 | "Composition" |
---|
43 | Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j)); |
---|
44 | |
---|
45 | end |
---|
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 | |
---|
56 | end |
---|
57 | |
---|
58 | Model Heater as Heater_Cooler_Basic |
---|
59 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
60 | # Heater |
---|
61 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
62 | EQUATIONS |
---|
63 | |
---|
64 | "Heat Duty" |
---|
65 | Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h); |
---|
66 | |
---|
67 | end |
---|
68 | |
---|
69 | Model Cooler as Heater_Cooler_Basic |
---|
70 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
71 | # Cooler |
---|
72 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
73 | EQUATIONS |
---|
74 | |
---|
75 | "Heat Duty" |
---|
76 | Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h; |
---|
77 | |
---|
78 | end |
---|