Changeset 309 for trunk/sample/reactors/fogler/chap2/series_reactors.mso
- Timestamp:
- Jul 10, 2007, 4:28:27 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sample/reactors/fogler/chap2/series_reactors.mso
r188 r309 149 149 150 150 #*--------------------------------------------------------------------- 151 * Estimation of rate of reaction 152 *--------------------------------------------------------------------*# 153 154 FlowSheet rate 155 PARAMETERS 156 a1 as Real (Brief="Parameter to estimate", Default=0.01); 157 a2 as Real (Brief="Parameter to estimate", Default=0.01); 158 a3 as Real (Brief="Parameter to estimate", Default=0.01); 159 a4 as Real (Brief="Parameter to estimate", Default=0.01); 160 161 VARIABLES 162 r as reaction_mol (Brief="Rate of reaction", DisplayUnit='mol/l/s'); 163 X as fraction (Brief="Molar conversion", Unit='mol/mol'); 164 165 EQUATIONS 166 "Rate of reaction" # Attributed expression 167 (-r) = (a4*X^3 + a3*X^2 + a2*X + a1)*'mol/l/s'; 168 169 SPECIFY 170 X = 0.5; 171 172 OPTIONS 173 Dynamic = false; 174 end 175 176 Estimation rate_of_reaction as rate 177 ESTIMATE 178 # PAR START LOWER UPPER UNIT 179 a1 0.01 -1 1; 180 a2 0.01 -1 1; 181 a3 0.01 -1 1; 182 a4 0.01 -1 1; 183 184 EXPERIMENTS 185 # FILE WEIGTH 186 "raw_data.dat" 1; 187 188 OPTIONS 189 NLPSolver(File = "ipopt_emso", 190 ObjTol = 1e-6, 191 AcceptableObjTol = 1e-6); 192 Dynamic = false; 193 end 194 195 196 #*--------------------------------------------------------------------- 151 197 * Example 2-2: Scale-up an isotermic CSTR in gaseous phase 152 198 *--------------------------------------------------------------------*# … … 154 200 FlowSheet cstr_sample 155 201 PARAMETERS 202 NT as Integer (Brief="Number of terms of rate of reaction expression", Default=4); 203 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 204 156 205 R as Real (Brief="Universal gas constant", Unit='atm*l/mol/K', Default=0.082); 157 206 T as temperature (Brief="Temperatura in the reactor"); … … 175 224 176 225 "Rate of reaction" 177 (-R1.r) = ( 0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*'mol/l/s';226 (-R1.r) = (a(4)*R1.Outlet.X^3 + a(3)*R1.Outlet.X^2 + a(2)*R1.Outlet.X + a(1))*'mol/l/s'; 178 227 179 228 "Total reactor volume" 180 229 Vt = R1.V; 181 230 182 SPECIFY 183 "Inlet conversion" 184 Inlet.X = 0.0; 185 "Required conversion" 186 R1.Outlet.X = 0.8; 187 188 SET 231 SET 232 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 189 233 v0 = 6.0*'l/s'; 190 234 T = 422.2*'K'; … … 192 236 zin = 0.5; 193 237 238 SPECIFY 239 "Inlet conversion" 240 Inlet.X = 0.0; 241 "Required conversion" 242 R1.Outlet.X = 0.8; 243 194 244 OPTIONS 195 245 Dynamic = false; … … 202 252 203 253 FlowSheet pfr_sample 254 PARAMETERS 255 NT as Integer (Brief="Number of terms", Default=4); 256 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 257 204 258 DEVICES 205 259 Inlet as stream; # Inlet stream … … 211 265 EQUATIONS 212 266 "Rate of reaction" 213 (-R1.r) = (0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*'mol/l/s'; 267 (-R1.r) = (a(4)*R1.Outlet.X^3 + a(3)*R1.Outlet.X^2 + a(2)*R1.Outlet.X + a(1))*'mol/l/s'; 268 269 SET 270 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 214 271 215 272 SPECIFY … … 234 291 235 292 FlowSheet pfr_d_sample 293 PARAMETERS 294 NT as Integer (Brief="Number of terms", Default=4); 295 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 296 236 297 VARIABLES 237 298 Vt as volume (Brief="Total reactor volume", DisplayUnit='l'); … … 246 307 EQUATIONS 247 308 "Rate of reaction" 248 (-R1.r) = ( 0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*'mol/l/s';309 (-R1.r) = (a(4)*R1.X^3 + a(3)*R1.X^2 + a(2)*R1.X +a(1))*'mol/l/s'; 249 310 250 311 "Total reactor volume" 251 312 Vt = R1.V(R1.N); 252 313 253 # SET 254 # R1.N = 100; 314 SET 315 # R1.N = 100; 316 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 255 317 256 318 SPECIFY … … 275 337 276 338 FlowSheet comparative 339 PARAMETERS 340 NT as Integer (Brief="Number of terms", Default=4); 341 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 342 277 343 VARIABLES 278 344 V_cstr as volume (Brief="CSTR volume", DisplayUnit='l'); … … 290 356 EQUATIONS 291 357 "Rate of reaction in CSTR" 292 (-CSTR.r) = ( 0.0092*CSTR.Outlet.X^3 - 0.0153*CSTR.Outlet.X^2 + 0.0013*CSTR.Outlet.X + 0.0053)*'mol/l/s';358 (-CSTR.r) = (a(4)*CSTR.Outlet.X^3 + a(3)*CSTR.Outlet.X^2 + a(2)*CSTR.Outlet.X + a(1))*'mol/l/s'; 293 359 "Rate of reaction in PFR" 294 (-PFR.r) = ( 0.0092*PFR.X^3 - 0.0153*PFR.X^2 + 0.0013*PFR.X + 0.0053)*'mol/l/s';360 (-PFR.r) = (a(4)*PFR.X^3 + a(3)*PFR.X^2 + a(2)*PFR.X + a(1))*'mol/l/s'; 295 361 296 362 "CSTR volume" … … 299 365 V_pfr = PFR.V(PFR.N); 300 366 301 # SET 302 # PFR.N = 100; 367 SET 368 # PFR.N = 100; 369 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 303 370 304 371 SPECIFY … … 326 393 327 394 FlowSheet cstr_cstr 395 PARAMETERS 396 NT as Integer (Brief="Number of terms", Default=4); 397 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 398 328 399 VARIABLES 329 400 V1 as volume (Brief="1st reactor volume", DisplayUnit='l'); … … 342 413 EQUATIONS 343 414 "Rate of reaction in 1st reactor" 344 (-R1.r) = ( 0.0092*R1.Outlet.X^3 - 0.0153*R1.Outlet.X^2 + 0.0013*R1.Outlet.X + 0.0053)*'mol/l/s';415 (-R1.r) = (a(4)*R1.Outlet.X^3 + a(3)*R1.Outlet.X^2 + a(2)*R1.Outlet.X + a(1))*'mol/l/s'; 345 416 "Rate of reaction in 2nd reactor" 346 (-R2.r) = ( 0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*'mol/l/s';417 (-R2.r) = (a(4)*R2.Outlet.X^3 + a(3)*R2.Outlet.X^2 + a(2)*R2.Outlet.X + a(1))*'mol/l/s'; 347 418 348 419 "1st volume reactor" … … 353 424 Vt = V1 + V2; 354 425 426 SET 427 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 428 355 429 SPECIFY 356 430 "Inlet molar flow" … … 374 448 375 449 FlowSheet pfr_pfr 450 PARAMETERS 451 NT as Integer (Brief="Number of terms", Default=4); 452 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 453 376 454 VARIABLES 377 455 V1 as volume (Brief="1st reactor volume", DisplayUnit='l'); … … 390 468 EQUATIONS 391 469 "Rate of reaction in 1st reactor" 392 (-R1.r) = ( 0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*'mol/l/s';470 (-R1.r) = (a(4)*R1.X^3 + a(3)*R1.X^2 + a(2)*R1.X + a(1))*'mol/l/s'; 393 471 "Rate of reaction in 2nd reactor" 394 (-R2.r) = ( 0.0092*R2.X^3 - 0.0153*R2.X^2 + 0.0013*R2.X + 0.0053)*'mol/l/s';472 (-R2.r) = (a(4)*R2.X^3 + a(3)*R2.X^2 + a(2)*R2.X + a(1))*'mol/l/s'; 395 473 396 474 "1st reactor volume" … … 401 479 Vt = V1 + V2; 402 480 481 SET 482 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 483 403 484 SPECIFY 404 485 "Inlet molar flow" … … 427 508 428 509 FlowSheet pfr_cstr 510 PARAMETERS 511 NT as Integer (Brief="Number of terms", Default=4); 512 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 513 429 514 VARIABLES 430 515 V1 as volume (Brief="1st reactor volume", DisplayUnit='l'); … … 443 528 EQUATIONS 444 529 "Rate of reaction in 1st reactor" 445 (-R1.r) = ( 0.0092*R1.X^3 - 0.0153*R1.X^2 + 0.0013*R1.X + 0.0053)*'mol/l/s';530 (-R1.r) = (a(4)*R1.X^3 + a(3)*R1.X^2 + a(2)*R1.X + a(1))*'mol/l/s'; 446 531 "Rate of reaction in 2nd reactor" 447 (-R2.r) = ( 0.0092*R2.Outlet.X^3 - 0.0153*R2.Outlet.X^2 + 0.0013*R2.Outlet.X + 0.0053)*'mol/l/s';532 (-R2.r) = (a(4)*R2.Outlet.X^3 + a(3)*R2.Outlet.X^2 + a(2)*R2.Outlet.X + a(1))*'mol/l/s'; 448 533 449 534 "1st reactor volume" … … 454 539 Vt = V1 + V2; 455 540 456 # SET 457 # R1.N = 100; 541 SET 542 # R1.N = 100; 543 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 458 544 459 545 SPECIFY … … 481 567 482 568 FlowSheet cstr_pfr 569 PARAMETERS 570 NT as Integer (Brief="Number of terms", Default=4); 571 a(NT) as Real (Brief="Parameter of rate of reaction expression"); 572 483 573 VARIABLES 484 574 V1 as volume (Brief="1st reactor volume", DisplayUnit='l'); … … 497 587 EQUATIONS 498 588 "Rate of reaction in 1st reactor" 499 (-R1.r) = ( 9.2*R1.Outlet.X^3 - 15.3*R1.Outlet.X^2 + 1.3*R1.Outlet.X + 5.3)*1e-3*'mol/l/s';589 (-R1.r) = (a(4)*R1.Outlet.X^3 + a(3)*R1.Outlet.X^2 + a(2)*R1.Outlet.X + a(1))*'mol/l/s'; 500 590 "Rate of reaction in 2nd reactor" 501 (-R2.r) = ( 9.2*R2.X^3 - 15.3*R2.X^2 + 1.3*R2.X + 5.3)*1e-3*'mol/l/s';591 (-R2.r) = (a(4)*R2.X^3 + a(3)*R2.X^2 + a(2)*R2.X + a(1))*'mol/l/s'; 502 592 503 593 "1st reactor volume" … … 508 598 Vt = V1 + V2; 509 599 510 # SET 511 # R2.N = 100; 600 SET 601 # R2.N = 100; 602 a = [0.00526633, 0.00133478, -0.0153321, 0.0092151]; # Estimated 512 603 513 604 SPECIFY
Note: See TracChangeset
for help on using the changeset viewer.