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 | |
---|
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 | 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 | 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 | |
---|
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 | |
---|
57 | end |
---|
58 | |
---|
59 | Model Heater as Heater_Cooler_Basic |
---|
60 | |
---|
61 | EQUATIONS |
---|
62 | |
---|
63 | "Heat Duty" |
---|
64 | Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h); |
---|
65 | |
---|
66 | end |
---|
67 | |
---|
68 | Model Cooler as Heater_Cooler_Basic |
---|
69 | |
---|
70 | EQUATIONS |
---|
71 | |
---|
72 | "Heat Duty" |
---|
73 | Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h; |
---|
74 | |
---|
75 | end |
---|