PROPT Plug-Flow Tubular Reactor: Difference between revisions
No edit summary |
|||
Line 129: | Line 129: | ||
[[File:plugFlowReactor_01.png]] | [[File:plugFlowReactor_01.png]] | ||
[[Category:PROPT Examples]] |
Latest revision as of 05:32, 14 February 2012
This page is part of the PROPT Manual. See PROPT Manual. |
A HYBRID METHOD FOR THE OPTIMAL CONTROL OF CHEMICAL PROCESSES 1998, E F Carrasco, J R Banga
Case Study II: Plug-Flow Tubular Reactor
Problem description
This case study considers a plug-flow reactor as studied by Reddy and Husain, Luus and Mekarapiruk and Luus. The objective is to maximize the normalized concentration of the desired product.
Find u(t) to maximize
subject to:
where x1 denotes the normalized concentration of de desired product, and x2 is the temperature. The initial conditions are:
The rate constants are given by:
where the final time t_f = 5 min. The constraint on the control variable (the normalized coolant flow rate) is:
In addition, there is an upper path constraint on the temperature:
% Copyright (c) 2007-2008 by Tomlab Optimization Inc.
Problem setup
toms t
p = tomPhase('p', t, 0, 5, 30);
setPhase(p);
tomStates x1 x2
tomControls u
% Initial guess
x0 = {icollocate({x1 == 0.6*t/5
x2 == 380})
collocate(u == 0.25)};
% Box constraints
cbox = {0 <= icollocate(x1) <= 10
100 <= icollocate(x2) <= 460
0 <= collocate(u) <= 0.5};
% Boundary constraints
cbnd = initial({x1 == 0; x2 == 380});
% ODEs and path constraints
k1 = 1.7536e5*exp(-1.1374e4/1.9872./x2);
k2 = 2.4885e10*exp(-2.2748e4/1.9872./x2);
ceq = collocate({
dot(x1) == (1-x1).*k1-x1.*k2
dot(x2) == 300*((1-x1).*k1-x1.*k2)-u.*(x2-290)});
% Objective
objective = -final(x1);
Solve the problem
options = struct;
options.name = 'Plug Flow Reactor';
solution = ezsolve(objective, {cbox, cbnd, ceq}, x0, options);
t = subs(collocate(t),solution);
x1 = subs(collocate(x1),solution);
x2 = subs(collocate(x2),solution);
u = subs(collocate(u),solution);
Problem type appears to be: lpcon Time for symbolic processing: 0.18266 seconds Starting numeric solver ===== * * * =================================================================== * * * TOMLAB - TOMLAB Development license 999007. Valid to 2011-12-31 ===================================================================================== Problem: --- 1: Plug Flow Reactor f_k -0.677125737913608190 sum(|constr|) 0.000031723901907782 f(x_k) + sum(|constr|) -0.677094014011700440 f(x_0) -0.599999999999999200 Solver: snopt. EXIT=0. INFORM=1. SNOPT 7.2-5 NLP code Optimality conditions satisfied FuncEv 1 ConstrEv 346 ConJacEv 346 Iter 112 MinorIter 325 CPU time: 0.234001 sec. Elapsed time: 0.227000 sec.
Plot result
subplot(2,1,1)
plot(t,x1,'*-',t,x2/100,'*-');
legend('x1','x2/100');
title('Plug Flow Reactor state variables');
subplot(2,1,2)
plot(t,u,'+-');
legend('u');
title('Plug Flow Reactor control');