1 | #*------------------------------------------------------------------- |
---|
2 | * EMSO Model Library (EML) Copyright (C) 2004 - 2007 ALSOC. |
---|
3 | * |
---|
4 | * This LIBRARY is free software; you can distribute it and/or modify |
---|
5 | * it under the therms of the ALSOC FREE LICENSE as available at |
---|
6 | * http://www.enq.ufrgs.br/alsoc. |
---|
7 | * |
---|
8 | * EMSO Copyright (C) 2004 - 2007 ALSOC, original code |
---|
9 | * from http://www.rps.eng.br Copyright (C) 2002-2004. |
---|
10 | * All rights reserved. |
---|
11 | * |
---|
12 | * EMSO is distributed under the therms of the ALSOC LICENSE as |
---|
13 | * available at http://www.enq.ufrgs.br/alsoc. |
---|
14 | * |
---|
15 | *--------------------------------------------------------------------- |
---|
16 | * Model of a Heater and Cooler |
---|
17 | * |
---|
18 | * Streams: |
---|
19 | * * Inlet(Ninlet) streams .... at least one material stream |
---|
20 | * * Outlet stream .... one material stream |
---|
21 | * |
---|
22 | * Purpose: |
---|
23 | * * Determines thermal and phase conditions of outlet stream |
---|
24 | * |
---|
25 | *---------------------------------------------------------------------- |
---|
26 | * Author: Gerson Balbueno Bicca |
---|
27 | * $Id: heater.mso 78 2006-12-08 19:29:10Z paula $ |
---|
28 | *--------------------------------------------------------------------*# |
---|
29 | |
---|
30 | using "streams.mso"; |
---|
31 | |
---|
32 | Model Heater_Cooler_Basic |
---|
33 | |
---|
34 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
35 | # Heater or Cooler Basic Equations |
---|
36 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
37 | PARAMETERS |
---|
38 | ext PP as CalcObject(Brief="Physical Properties"); |
---|
39 | ext NComp as Integer (Brief="Number of Components"); |
---|
40 | Ninlet as Integer (Brief="Number of Inlet Streams",Lower=1); |
---|
41 | |
---|
42 | VARIABLES |
---|
43 | in Inlet(Ninlet) as stream; #(Brief="Inlet Streams") |
---|
44 | out Outlet as stream_therm;#(Brief="Outlet Stream") |
---|
45 | Q as power (Brief = "Heat Transfer"); |
---|
46 | Vfrac as fraction (Brief = "Vapor fraction Outlet Stream"); |
---|
47 | Lfrac as fraction (Brief = "Liquid fraction Outlet Stream"); |
---|
48 | |
---|
49 | EQUATIONS |
---|
50 | |
---|
51 | "Flow" |
---|
52 | Outlet.F = sum(Inlet.F); |
---|
53 | |
---|
54 | for j in [1 : NComp] |
---|
55 | |
---|
56 | "Composition" |
---|
57 | Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j)); |
---|
58 | |
---|
59 | end |
---|
60 | |
---|
61 | "Outlet Vapourisation Fraction" |
---|
62 | Outlet.v = PP.VapourFraction(Outlet.T,Outlet.P,Outlet.z); |
---|
63 | |
---|
64 | "Vapor fraction Outlet Stream" |
---|
65 | Vfrac = Outlet.v; |
---|
66 | |
---|
67 | "Liquid fraction Outlet Stream" |
---|
68 | Lfrac = 1-Vfrac; |
---|
69 | |
---|
70 | end |
---|
71 | |
---|
72 | Model Heater as Heater_Cooler_Basic |
---|
73 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
74 | # Heater |
---|
75 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
76 | EQUATIONS |
---|
77 | |
---|
78 | "Heat Duty" |
---|
79 | Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h); |
---|
80 | |
---|
81 | end |
---|
82 | |
---|
83 | Model Cooler as Heater_Cooler_Basic |
---|
84 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
85 | # Cooler |
---|
86 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++# |
---|
87 | EQUATIONS |
---|
88 | |
---|
89 | "Heat Duty" |
---|
90 | Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h; |
---|
91 | |
---|
92 | end |
---|