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 | * 6. Heat exchange in a series of tanks |
---|
17 | *---------------------------------------------------------------------- |
---|
18 | * |
---|
19 | * Description: |
---|
20 | * This problem is part of a collection of 10 representative |
---|
21 | * problems in Chemical Engineering for solution by numerical methods |
---|
22 | * developed for Cutlip (1998). |
---|
23 | * |
---|
24 | * Subject: |
---|
25 | * * Heat Transfer |
---|
26 | * |
---|
27 | * Concepts utilized: |
---|
28 | * Unsteady-state energy balances, dynamic response of well mixed |
---|
29 | * heated tanks in series. |
---|
30 | * |
---|
31 | * Numerical method: |
---|
32 | * * Simultaneous first order ODEs |
---|
33 | * |
---|
34 | * Reference: |
---|
35 | * * CUTLIP et al. A collection of 10 numerical problems in |
---|
36 | * chemical engineering solved by various mathematical software |
---|
37 | * packages. Comp. Appl. in Eng. Education. v. 6, 169-180, 1998. |
---|
38 | * * More informations and a detailed description of all problems |
---|
39 | * is available online in http://www.polymath-software.com/ASEE |
---|
40 | * |
---|
41 | *---------------------------------------------------------------------- |
---|
42 | * Author: Rodolfo Rodrigues |
---|
43 | * GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation, |
---|
44 | * Control, and Optimization of Processes |
---|
45 | * $Id$ |
---|
46 | *--------------------------------------------------------------------*# |
---|
47 | using "types"; |
---|
48 | |
---|
49 | |
---|
50 | |
---|
51 | #*--------------------------------------------------------------------- |
---|
52 | * Model of a stream |
---|
53 | *--------------------------------------------------------------------*# |
---|
54 | Model oil_stream |
---|
55 | PARAMETERS |
---|
56 | W as flow_mass (Brief="Mass flow rate", DisplayUnit='kg/min'); |
---|
57 | cp as cp_mass (Brief="Heat capacity of the oil", DisplayUnit='kJ/kg/K'); |
---|
58 | |
---|
59 | VARIABLES |
---|
60 | T as temperature; |
---|
61 | |
---|
62 | SET |
---|
63 | cp = 2*'kJ/kg/K'; |
---|
64 | W = 100*'kg/min'; |
---|
65 | end |
---|
66 | |
---|
67 | Model tank_source |
---|
68 | ATTRIBUTES |
---|
69 | Pallete = true; |
---|
70 | Brief = "Simple inlet stream"; |
---|
71 | Icon = "icon/tank_source"; |
---|
72 | |
---|
73 | VARIABLES |
---|
74 | out Outlet as oil_stream (Brief="Outlet stream", PosX=1, PosY=0.5); |
---|
75 | end |
---|
76 | |
---|
77 | Model tank_sink |
---|
78 | ATTRIBUTES |
---|
79 | Pallete = true; |
---|
80 | Brief = "Simple outlet stream"; |
---|
81 | Icon = "icon/tank_sink"; |
---|
82 | |
---|
83 | VARIABLES |
---|
84 | in Inlet as oil_stream (Brief="Inlet stream", PosX=0, PosY=0.5); |
---|
85 | end |
---|
86 | |
---|
87 | |
---|
88 | Model heat_stream |
---|
89 | VARIABLES |
---|
90 | T as temperature; |
---|
91 | end |
---|
92 | |
---|
93 | Model steam |
---|
94 | ATTRIBUTES |
---|
95 | Pallete = true; |
---|
96 | Brief = "Simple inlet stream"; |
---|
97 | Icon = "icon/tank_source"; |
---|
98 | |
---|
99 | VARIABLES |
---|
100 | out Outlet as heat_stream(Brief="Outlet stream", PosX=1, PosY=0.5); |
---|
101 | end |
---|
102 | |
---|
103 | |
---|
104 | #*--------------------------------------------------------------------- |
---|
105 | * Model of one tank |
---|
106 | *--------------------------------------------------------------------*# |
---|
107 | Model heated_tank |
---|
108 | ATTRIBUTES |
---|
109 | Pallete = true; |
---|
110 | Brief = "Simple model of a steady-state CSTR"; |
---|
111 | Icon = "icon/heated_tank"; |
---|
112 | |
---|
113 | |
---|
114 | PARAMETERS |
---|
115 | UA as Real (Brief="Product of the heat transfer coefficient and the area", Unit='kJ/min/K'); |
---|
116 | |
---|
117 | |
---|
118 | VARIABLES |
---|
119 | in Inlet as oil_stream (Brief="Inlet stream", PosX=0.51, PosY=0); |
---|
120 | out Outlet as oil_stream (Brief="Outlet stream", PosX=1, PosY=0.975); |
---|
121 | in InletQ as heat_stream (Brief="Rate of heat supply", PosX=0, PosY=0.715); |
---|
122 | |
---|
123 | M as mass (Brief="Mass in tank"); |
---|
124 | Q as heat_rate (Brief="Rate of heat transferred", DisplayUnit='kJ/min'); |
---|
125 | |
---|
126 | |
---|
127 | SET |
---|
128 | UA = 10*'kJ/min/K'; |
---|
129 | |
---|
130 | |
---|
131 | EQUATIONS |
---|
132 | "Energy balance" |
---|
133 | (M*Outlet.cp)*diff(Outlet.T) = Inlet.W*Inlet.cp*(Inlet.T - Outlet.T) + Q; |
---|
134 | |
---|
135 | "Rate of heat transferred" |
---|
136 | Q = UA*(InletQ.T - Outlet.T); |
---|
137 | end |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | #*--------------------------------------------------------------------- |
---|
142 | * Three tanks in series |
---|
143 | *--------------------------------------------------------------------*# |
---|
144 | FlowSheet series_of_tanks |
---|
145 | VARIABLES |
---|
146 | feed as oil_stream; |
---|
147 | |
---|
148 | |
---|
149 | DEVICES |
---|
150 | steam1 as steam; |
---|
151 | steam2 as steam; |
---|
152 | steam3 as steam; |
---|
153 | |
---|
154 | tank1 as heated_tank; |
---|
155 | tank2 as heated_tank; |
---|
156 | tank3 as heated_tank; |
---|
157 | |
---|
158 | |
---|
159 | CONNECTIONS |
---|
160 | feed to tank1.Inlet; |
---|
161 | tank1.Outlet to tank2.Inlet; |
---|
162 | tank2.Outlet to tank3.Inlet; |
---|
163 | |
---|
164 | steam1.Outlet to tank1.InletQ; |
---|
165 | steam2.Outlet to tank2.InletQ; |
---|
166 | steam3.Outlet to tank3.InletQ; |
---|
167 | |
---|
168 | |
---|
169 | SPECIFY |
---|
170 | feed.T = (20 + 273.15)*'K'; |
---|
171 | |
---|
172 | steam1.Outlet.T = (250 + 273.15)*'K'; |
---|
173 | steam2.Outlet.T = (250 + 273.15)*'K'; |
---|
174 | steam3.Outlet.T = (250 + 273.15)*'K'; |
---|
175 | |
---|
176 | tank1.M = 1000*'kg'; |
---|
177 | tank2.M = tank1.M; |
---|
178 | tank3.M = tank2.M; |
---|
179 | |
---|
180 | |
---|
181 | INITIAL |
---|
182 | tank1.Outlet.T = (20 + 273.15)*'K'; |
---|
183 | tank2.Outlet.T = tank1.Outlet.T; |
---|
184 | tank3.Outlet.T = tank2.Outlet.T; |
---|
185 | |
---|
186 | |
---|
187 | OPTIONS |
---|
188 | # Dynamic = false; # steady-state |
---|
189 | TimeStart = 0; |
---|
190 | TimeStep = 1; |
---|
191 | TimeEnd = 90; |
---|
192 | TimeUnit = 'min'; |
---|
193 | end |
---|