[896] | 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 | * Hydrolysis of propylene glycol in a unsteady-state CSTR |
---|
| 17 | *---------------------------------------------------------------------- |
---|
| 18 | * Solved problem from Fogler (1999). |
---|
| 19 | * Problem number: 9-4, 9-5, and 9-7 |
---|
| 20 | * Page: 504 at 517 (Brazilian version, 2002) |
---|
| 21 | *---------------------------------------------------------------------- |
---|
| 22 | * |
---|
| 23 | * Description: |
---|
| 24 | * The propylene glycol is produced for hydrolysis reaction of |
---|
| 25 | * propylene oxide in a CSTR: |
---|
| 26 | * CH3(O)CHCH3 + H2O -> CH2(OH)CH2(OH)CH3 |
---|
| 27 | * This sample calculates the outlet molar concentration and |
---|
| 28 | * temperature as function of the time in a CSTR jacketed. It is |
---|
| 29 | * possible to identify the MSS (Multiple Steady-State). |
---|
| 30 | * |
---|
| 31 | * Assumptions |
---|
| 32 | * * elementary reactions |
---|
| 33 | * * unsteady-state |
---|
| 34 | * * heat exchange |
---|
| 35 | * * isobaric system |
---|
| 36 | * * gaseous phase |
---|
| 37 | * |
---|
| 38 | * Specify: |
---|
| 39 | * * the inlet stream |
---|
| 40 | * * the kinetic parameters |
---|
| 41 | * * the components parameters |
---|
| 42 | * |
---|
| 43 | *---------------------------------------------------------------------- |
---|
| 44 | * Author: Christiano D. W. Guerra and Rodolfo Rodrigues |
---|
| 45 | * $Id: cstr_startup.mso 574 2008-07-25 14:18:50Z rafael $ |
---|
| 46 | *--------------------------------------------------------------------*# |
---|
| 47 | |
---|
| 48 | using "types"; |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | #*--------------------------------------------------------------------- |
---|
| 52 | * Example 9-4 : Startup of a CSTR |
---|
| 53 | *--------------------------------------------------------------------*# |
---|
| 54 | |
---|
| 55 | Model CSTR_startup |
---|
| 56 | PARAMETERS |
---|
| 57 | NComp as Integer (Brief="Number of components"); |
---|
| 58 | stoic(NComp)as Real (Brief="Stoichiometric number"); |
---|
| 59 | UA as Real (Brief="Exchange heat", Unit='Btu/h/degR'); |
---|
| 60 | V as volume (Brief="Volume of the reactor"); |
---|
| 61 | Ta1 as temperature (Brief="Cooling temperature"); |
---|
| 62 | DH as enth_mol (Brief="Molar reaction enthalpy"); |
---|
| 63 | rho(NComp) as dens_mol (Brief="Molar density"); |
---|
| 64 | cp(NComp) as cp_mol (Brief="Molar heat capacity"); |
---|
| 65 | # Rate of reaction |
---|
| 66 | ko as frequency (Brief="Frequency factor"); |
---|
| 67 | E as energy_mol (Brief="Activation energy"); |
---|
| 68 | R as Real (Brief="Universal gas constant", Unit='Btu/lbmol/degR', Default=1.987); |
---|
| 69 | |
---|
| 70 | VARIABLES |
---|
| 71 | C(NComp) as conc_mol (Brief="Molar concentration", DisplayUnit='lbmol/ft^3', Lower=0); |
---|
| 72 | N(NComp) as mol (Brief="Molar holdup", DisplayUnit='lbmol'); |
---|
| 73 | Co(NComp) as conc_mol (Brief="Initial molar concentration", DisplayUnit='lbmol/ft^3', Lower=0); |
---|
| 74 | Fo(NComp) as flow_mol (Brief="Initial molar flow", DisplayUnit='lbmol/h'); |
---|
| 75 | T as temperature (Brief="Reactor temperature", DisplayUnit='degR'); |
---|
| 76 | To as temperature (Brief="Initial reactor temperature", DisplayUnit='degR'); |
---|
| 77 | Ta2 as temperature (Brief="Temperature of heat exchange", DisplayUnit='degR'); |
---|
| 78 | r(NComp) as reaction_mol (Brief="Rate of reaction", DisplayUnit='lbmol/ft^3/h'); |
---|
| 79 | k as frequency (Brief="Specific rate of reaction", DisplayUnit='1/h', Upper=1e5); |
---|
| 80 | mc as flow_mol (Brief="Molar flow of cooling water", DisplayUnit='lbmol/h'); |
---|
| 81 | Q as heat_rate (Brief="Heat exchange", DisplayUnit='Btu/h'); |
---|
| 82 | Theta(NComp)as Real (Brief="Parameter Theta"); |
---|
| 83 | vo as flow_vol (Brief="Volumetric flow", DisplayUnit='ft^3/h'); |
---|
| 84 | tau as time_h (Brief="Residence time", DisplayUnit='h'); |
---|
| 85 | |
---|
| 86 | EQUATIONS |
---|
| 87 | "Molar balance" |
---|
| 88 | diff(C) = r + (Co - C)/tau; |
---|
| 89 | |
---|
| 90 | "Energy balance" |
---|
| 91 | diff(T)*sumt(N*cp) = (Q - Fo(1)*sumt(Theta*cp)*(T - To) + DH*r(1)*V); |
---|
| 92 | |
---|
| 93 | "Rate of reaction" |
---|
| 94 | r = stoic*k*C(1); |
---|
| 95 | |
---|
| 96 | "Specific rate of reaction" |
---|
| 97 | k = ko*exp(-E/(R*T)); |
---|
| 98 | |
---|
| 99 | "Residence time" |
---|
| 100 | tau = V/vo; |
---|
| 101 | |
---|
| 102 | "Volumetric flow" |
---|
| 103 | vo = sumt(Fo/rho); |
---|
| 104 | |
---|
| 105 | "Temperature of heat exchange" |
---|
| 106 | Ta2 = T - (T - Ta1)*exp(-UA/(cp(2)*mc)); |
---|
| 107 | |
---|
| 108 | "Exchange Heat" |
---|
| 109 | Q = mc*cp(2)*(Ta1 - Ta2); |
---|
| 110 | |
---|
| 111 | "Inlet Concentration" |
---|
| 112 | Co = Fo/vo; |
---|
| 113 | |
---|
| 114 | "Molar holdup" |
---|
| 115 | N = C*V; |
---|
| 116 | |
---|
| 117 | "Relation among molar fractions of components" |
---|
| 118 | Theta = Fo/Fo(1); |
---|
| 119 | |
---|
| 120 | SET |
---|
| 121 | NComp = 4; # A, B, C and M |
---|
| 122 | stoic = [-1, -1, 1, 0]; # A + 2B -> C + D |
---|
| 123 | |
---|
| 124 | UA = 16000*'Btu/h/degR'; |
---|
| 125 | V = 500*'gal'; |
---|
| 126 | Ta1 = (60 + 460)*'degR'; |
---|
| 127 | DH =-3.6e4*'Btu/lbmol'; |
---|
| 128 | rho = [0.923, 3.45, 1, 1.54]*'lbmol/ft^3'; |
---|
| 129 | cp = [35, 18, 46, 19.5]*'Btu/lbmol/degR'; |
---|
| 130 | |
---|
| 131 | ko = 16.96e12*'1/h'; |
---|
| 132 | E = 32400*'Btu/lbmol'; |
---|
| 133 | end |
---|
| 134 | |
---|
| 135 | |
---|
| 136 | FlowSheet CSTR_stopped |
---|
| 137 | DEVICES |
---|
| 138 | CSTR as CSTR_startup; |
---|
| 139 | |
---|
| 140 | SPECIFY |
---|
| 141 | CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; |
---|
| 142 | CSTR.To = (75 + 460)*'degR'; |
---|
| 143 | CSTR.mc = 1e3*'lbmol/h'; |
---|
| 144 | |
---|
| 145 | INITIAL |
---|
| 146 | "Molar concentration" |
---|
| 147 | CSTR.C = [0, 3.45, 0, 0]*'lbmol/ft^3'; |
---|
| 148 | "Reactor temperature" |
---|
| 149 | CSTR.T = CSTR.To; |
---|
| 150 | |
---|
| 151 | OPTIONS |
---|
| 152 | TimeStep = 0.05; |
---|
| 153 | TimeEnd = 4; |
---|
| 154 | TimeUnit = 'h'; |
---|
| 155 | end |
---|
| 156 | |
---|
| 157 | |
---|
| 158 | #*--------------------------------------------------------------------- |
---|
| 159 | * Example 9-5 : Falling off the upper steady-state |
---|
| 160 | *--------------------------------------------------------------------*# |
---|
| 161 | |
---|
| 162 | Model CSTR_ss as CSTR_startup |
---|
| 163 | VARIABLES |
---|
| 164 | X as fraction (Brief="Molar conversion"); |
---|
| 165 | XMB as fraction (Brief="Molar conversion of Material balance"); |
---|
| 166 | XEB as fraction (Brief="Molar conversion of Energy balance"); |
---|
| 167 | |
---|
| 168 | EQUATIONS |
---|
| 169 | "Molar conversion" |
---|
| 170 | X = 1 - C(1)/Co(1); |
---|
| 171 | |
---|
| 172 | "Molar conversion of Material balance" |
---|
| 173 | XMB = tau*k/(1 + tau*k); |
---|
| 174 | |
---|
| 175 | "Molar conversion of Energy balance" |
---|
| 176 | XEB = (sumt(Theta*cp)*(T - To) + Q/Fo(1))/(-DH); |
---|
| 177 | end |
---|
| 178 | |
---|
| 179 | |
---|
| 180 | FlowSheet CSTR_stopped2 |
---|
| 181 | DEVICES |
---|
| 182 | CSTR as CSTR_ss; |
---|
| 183 | |
---|
| 184 | SPECIFY |
---|
| 185 | CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; |
---|
| 186 | CSTR.To = (70 + 460)*'degR'; # Reduction of temperature: 75°F to 70°F |
---|
| 187 | CSTR.mc = 1e3*'lbmol/h'; |
---|
| 188 | |
---|
| 189 | INITIAL |
---|
| 190 | "Molar concentration" |
---|
| 191 | CSTR.C = [0.039, 2.12, 0.143, 0.226]*'lbmol/ft^3'; # Final values of SS in 9-4 |
---|
| 192 | "Reactor temperature" |
---|
| 193 | CSTR.T = (138.5 + 460)*'degR'; # Final values of SS in 9-4 |
---|
| 194 | |
---|
| 195 | OPTIONS |
---|
| 196 | TimeStep = 0.05; |
---|
| 197 | TimeEnd = 4; |
---|
| 198 | TimeUnit = 'h'; |
---|
| 199 | end |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | #*--------------------------------------------------------------------- |
---|
| 203 | * Example 9-7 : PI Controller |
---|
| 204 | *--------------------------------------------------------------------*# |
---|
| 205 | |
---|
| 206 | Model CSTR_control_PI as CSTR_startup |
---|
| 207 | PARAMETERS |
---|
| 208 | Tsp as temperature (Brief="Reference temperature"); |
---|
| 209 | mco as flow_mol (Brief="Molar flow of cooling water"); |
---|
| 210 | kc as Real (Brief="Gain", Unit='lbmol/degR/h'); |
---|
| 211 | |
---|
| 212 | VARIABLES |
---|
| 213 | I as Real (Brief="Integral action", Unit='degR*h'); |
---|
| 214 | X as fraction (Brief="Fraction conversion"); |
---|
| 215 | |
---|
| 216 | EQUATIONS |
---|
| 217 | "Integral action" |
---|
| 218 | diff(I) = T - Tsp; |
---|
| 219 | |
---|
| 220 | "Molar flow of cooling water" |
---|
| 221 | mc = mco + kc/tau*I + kc*(T - Tsp); |
---|
| 222 | |
---|
| 223 | "Molar conversion" |
---|
| 224 | X = 1 - C(1)/Co(1); |
---|
| 225 | end |
---|
| 226 | |
---|
| 227 | |
---|
| 228 | FlowSheet CSTR_stopped3 |
---|
| 229 | DEVICES |
---|
| 230 | CSTR as CSTR_control_PI; |
---|
| 231 | |
---|
| 232 | SET |
---|
| 233 | CSTR.mco = 1000*'lbmol/h'; |
---|
| 234 | CSTR.Tsp = (138 + 460)*'degR'; |
---|
| 235 | CSTR.kc = 8.5*'lbmol/degR/h'; |
---|
| 236 | |
---|
| 237 | SPECIFY |
---|
| 238 | CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; |
---|
| 239 | CSTR.To = (70 + 460)*'degR'; |
---|
| 240 | |
---|
| 241 | INITIAL |
---|
| 242 | "Molar concentration" |
---|
| 243 | CSTR.C = [0.03789, 2.12, 0.143, 0.2265]*'lbmol/ft^3'; |
---|
| 244 | "Reactor temperature" |
---|
| 245 | CSTR.T = (138.53 + 460)*'degR'; |
---|
| 246 | "Integral action" |
---|
| 247 | CSTR.I = 0*'degR*h'; |
---|
| 248 | |
---|
| 249 | OPTIONS |
---|
| 250 | TimeStep = 0.01; |
---|
| 251 | TimeEnd = 4; |
---|
| 252 | TimeUnit = 'h'; |
---|
| 253 | end |
---|