[221] | 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 | *---------------------------------------------------------------------- |
---|
[228] | 16 | * 6. Heat exchange in a series of tanks |
---|
[221] | 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 | * |
---|
[228] | 27 | * Concepts utilized: |
---|
| 28 | * Unsteady-state energy balances, dynamic response of well mixed |
---|
| 29 | * heated tanks in series. |
---|
| 30 | * |
---|
[221] | 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. |
---|
[228] | 38 | * * More informations and a detailed description of all problems |
---|
| 39 | * is available online in http://www.polymath-software.com/ASEE |
---|
[221] | 40 | * |
---|
| 41 | *---------------------------------------------------------------------- |
---|
| 42 | * Author: Rodolfo Rodrigues |
---|
[228] | 43 | * GIMSCOP/UFRGS - Group of Integration, Modeling, Simulation, |
---|
| 44 | * Control, and Optimization of Processes |
---|
[221] | 45 | * $Id$ |
---|
| 46 | *--------------------------------------------------------------------*# |
---|
| 47 | using "types"; |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | #*--------------------------------------------------------------------- |
---|
| 52 | * Model of a stream |
---|
| 53 | *--------------------------------------------------------------------*# |
---|
[443] | 54 | Model oil_stream |
---|
[376] | 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 | |
---|
[221] | 59 | VARIABLES |
---|
| 60 | T as temperature; |
---|
[376] | 61 | |
---|
| 62 | SET |
---|
| 63 | cp = 2*'kJ/kg/K'; |
---|
| 64 | W = 100*'kg/min'; |
---|
[221] | 65 | end |
---|
| 66 | |
---|
[443] | 67 | Model tank_source |
---|
[376] | 68 | ATTRIBUTES |
---|
| 69 | Pallete = true; |
---|
| 70 | Brief = "Simple inlet stream"; |
---|
[443] | 71 | Icon = "icon/tank_source"; |
---|
[376] | 72 | |
---|
| 73 | VARIABLES |
---|
[443] | 74 | out Outlet as oil_stream (Brief="Outlet stream", PosX=1, PosY=0.5); |
---|
[376] | 75 | end |
---|
[221] | 76 | |
---|
[443] | 77 | Model tank_sink |
---|
[376] | 78 | ATTRIBUTES |
---|
| 79 | Pallete = true; |
---|
| 80 | Brief = "Simple outlet stream"; |
---|
[443] | 81 | Icon = "icon/tank_sink"; |
---|
[376] | 82 | |
---|
| 83 | VARIABLES |
---|
[443] | 84 | in Inlet as oil_stream (Brief="Inlet stream", PosX=0, PosY=0.5); |
---|
[376] | 85 | end |
---|
| 86 | |
---|
| 87 | |
---|
[443] | 88 | Model heat_stream |
---|
[376] | 89 | VARIABLES |
---|
| 90 | T as temperature; |
---|
| 91 | end |
---|
| 92 | |
---|
| 93 | Model steam |
---|
| 94 | ATTRIBUTES |
---|
| 95 | Pallete = true; |
---|
| 96 | Brief = "Simple inlet stream"; |
---|
[443] | 97 | Icon = "icon/tank_source"; |
---|
[376] | 98 | |
---|
| 99 | VARIABLES |
---|
[443] | 100 | out Outlet as heat_stream(Brief="Outlet stream", PosX=1, PosY=0.5); |
---|
[376] | 101 | end |
---|
| 102 | |
---|
| 103 | |
---|
[221] | 104 | #*--------------------------------------------------------------------- |
---|
| 105 | * Model of one tank |
---|
| 106 | *--------------------------------------------------------------------*# |
---|
[376] | 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 | |
---|
[221] | 114 | PARAMETERS |
---|
| 115 | UA as Real (Brief="Product of the heat transfer coefficient and the area", Unit='kJ/min/K'); |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | VARIABLES |
---|
[443] | 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); |
---|
[221] | 122 | |
---|
| 123 | M as mass (Brief="Mass in tank"); |
---|
| 124 | Q as heat_rate (Brief="Rate of heat transferred", DisplayUnit='kJ/min'); |
---|
| 125 | |
---|
| 126 | |
---|
[376] | 127 | SET |
---|
| 128 | UA = 10*'kJ/min/K'; |
---|
| 129 | |
---|
| 130 | |
---|
[221] | 131 | EQUATIONS |
---|
| 132 | "Energy balance" |
---|
[376] | 133 | (M*Outlet.cp)*diff(Outlet.T) = Inlet.W*Inlet.cp*(Inlet.T - Outlet.T) + Q; |
---|
[221] | 134 | |
---|
| 135 | "Rate of heat transferred" |
---|
[376] | 136 | Q = UA*(InletQ.T - Outlet.T); |
---|
[221] | 137 | end |
---|
| 138 | |
---|
| 139 | |
---|
| 140 | |
---|
| 141 | #*--------------------------------------------------------------------- |
---|
| 142 | * Three tanks in series |
---|
| 143 | *--------------------------------------------------------------------*# |
---|
| 144 | FlowSheet series_of_tanks |
---|
| 145 | VARIABLES |
---|
[443] | 146 | feed as oil_stream; |
---|
[221] | 147 | |
---|
| 148 | |
---|
| 149 | DEVICES |
---|
[376] | 150 | steam1 as steam; |
---|
| 151 | steam2 as steam; |
---|
| 152 | steam3 as steam; |
---|
[221] | 153 | |
---|
[376] | 154 | tank1 as heated_tank; |
---|
| 155 | tank2 as heated_tank; |
---|
| 156 | tank3 as heated_tank; |
---|
[221] | 157 | |
---|
[376] | 158 | |
---|
[221] | 159 | CONNECTIONS |
---|
| 160 | feed to tank1.Inlet; |
---|
| 161 | tank1.Outlet to tank2.Inlet; |
---|
| 162 | tank2.Outlet to tank3.Inlet; |
---|
| 163 | |
---|
[376] | 164 | steam1.Outlet to tank1.InletQ; |
---|
| 165 | steam2.Outlet to tank2.InletQ; |
---|
| 166 | steam3.Outlet to tank3.InletQ; |
---|
[221] | 167 | |
---|
[376] | 168 | |
---|
[221] | 169 | SPECIFY |
---|
| 170 | feed.T = (20 + 273.15)*'K'; |
---|
| 171 | |
---|
[376] | 172 | steam1.Outlet.T = (250 + 273.15)*'K'; |
---|
| 173 | steam2.Outlet.T = (250 + 273.15)*'K'; |
---|
| 174 | steam3.Outlet.T = (250 + 273.15)*'K'; |
---|
[221] | 175 | |
---|
[376] | 176 | tank1.M = 1000*'kg'; |
---|
| 177 | tank2.M = tank1.M; |
---|
| 178 | tank3.M = tank2.M; |
---|
| 179 | |
---|
| 180 | |
---|
[221] | 181 | INITIAL |
---|
| 182 | tank1.Outlet.T = (20 + 273.15)*'K'; |
---|
[376] | 183 | tank2.Outlet.T = tank1.Outlet.T; |
---|
| 184 | tank3.Outlet.T = tank2.Outlet.T; |
---|
[221] | 185 | |
---|
| 186 | |
---|
| 187 | OPTIONS |
---|
| 188 | # Dynamic = false; # steady-state |
---|
| 189 | TimeStart = 0; |
---|
| 190 | TimeStep = 1; |
---|
| 191 | TimeEnd = 90; |
---|
| 192 | TimeUnit = 'min'; |
---|
| 193 | end |
---|