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 139 2007-01-29 15:50:41Z bicca $ |
---|
28 | *--------------------------------------------------------------------*# |
---|
29 | |
---|
30 | using "streams.mso"; |
---|
31 | |
---|
32 | Model Heater_Cooler_Basic |
---|
33 | |
---|
34 | ATTRIBUTES |
---|
35 | Pallete = false; |
---|
36 | Brief = "Heater or Cooler Basic Equations"; |
---|
37 | Info = |
---|
38 | "write some information"; |
---|
39 | |
---|
40 | PARAMETERS |
---|
41 | outer PP as Plugin (Brief="Physical Properties"); |
---|
42 | outer NComp as Integer (Brief="Number of Components"); |
---|
43 | Ninlet as Integer (Brief="Number of Inlet Streams",Lower=1); |
---|
44 | |
---|
45 | VARIABLES |
---|
46 | in Inlet(Ninlet) as stream (Brief="Inlet Streams"); |
---|
47 | out Outlet as liquid_stream (Brief="Outlet Stream"); |
---|
48 | Q as power (Brief = "Heat Transfer"); |
---|
49 | Vfrac as fraction (Brief = "Vapor fraction Outlet Stream"); |
---|
50 | Lfrac as fraction (Brief = "Liquid fraction Outlet Stream"); |
---|
51 | |
---|
52 | EQUATIONS |
---|
53 | |
---|
54 | "Flow" |
---|
55 | Outlet.F = sum(Inlet.F); |
---|
56 | |
---|
57 | for j in [1 : NComp] |
---|
58 | |
---|
59 | "Composition" |
---|
60 | Outlet.F*Outlet.z(j) = sum(Inlet.F*Inlet.z(j)); |
---|
61 | |
---|
62 | end |
---|
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 | ATTRIBUTES |
---|
75 | Pallete = true; |
---|
76 | Brief = "Heater"; |
---|
77 | Info = |
---|
78 | "write some information"; |
---|
79 | |
---|
80 | EQUATIONS |
---|
81 | |
---|
82 | "Heat Duty" |
---|
83 | Q = Outlet.F*Outlet.h-sum(Inlet.F*Inlet.h); |
---|
84 | |
---|
85 | end |
---|
86 | |
---|
87 | Model Cooler as Heater_Cooler_Basic |
---|
88 | |
---|
89 | ATTRIBUTES |
---|
90 | Pallete = true; |
---|
91 | Brief = "Cooler"; |
---|
92 | Info = |
---|
93 | "write some information"; |
---|
94 | |
---|
95 | EQUATIONS |
---|
96 | |
---|
97 | "Heat Duty" |
---|
98 | Q = sum(Inlet.F*Inlet.h)- Outlet.F*Outlet.h; |
---|
99 | |
---|
100 | end |
---|