Você está na página 1de 4

Module 7 - Isothermal CSTRs

<b=""vandss.m Generate the steady-state input/output curves for the van de Vusse reactor
To use this m-file to generate Figure M7.8, enter the following at the MATLAB
command window prompt:
k1 = 5/6;
k2 = 5/3;
k3 = 1/6;
cafs = 10;
[fsov,cbs,cas] = vandss(k1,k2,k3,cafs);
to plot Figure M7.8a, enter
plot(fsov,cas)
to plot Figure M7.8b, enter
plot(fsov,cbs)
<b=""vanmax.m The the maximum of the concentration of component B as a function of
F/V for the van de Vusse reactor
Use the command:
fmin('vanmax',0,2)

ans =

1.2921
<b=""vanvusse.m The function routine to be used by ode45 to integrate the two
differential equations which describe the dynamic behavior of the van de Vusse reactor
Use the commands:
x0 = [3;1.117]

[t,x] = ode45('vanvusse',[0 9],x0);


% [t,x] = ode45('vanvusse',0,9,x0); if you are using MATLAB 4.x

plot(t,x)
to find that you are at a steady-state for F/V = 4/7. Modify the function file if you wish to
perform step changes, for example

function [fsov,cbs,cas] = vandss(k1,k2,k3,cafs);


%
% 25 july 94
% (c) b.w. bequette
%
% finds the steady-state input/outputcurves for
% the vand de vusse reactor
%
% fsov = steady-state space velocity, fs/v
% cas = steady-state concentration of a
% cbs = steady-state concentration of b
% cafs = feed concentration of a
%
% example parameters and feed concentration:
%
% k1 = 5/6;
% k2 = 5/3;
% k3 = 1/6;
% cafs = 10;
%
fsov = 0:0.1:10;
%
cas1 = -(k1 + fsov)/(2*k3);
cas2 = sqrt((k1+fsov).^2 + 4*k3*fsov.*cafs)/(2*k3);
cas = cas1 + cas2;
%
% cas = 0.01*cafs:cafs/100:0.80*cafs;
%
% fsov = (k3.*cas.*cas + k1*cas)./(cafs - cas);
%
cbs = k1*cas./(fsov + k2);

function cbsmin = vanmax(x);


%
% 25 july 94
% (c) b.w. bequette
%
% finds the maximum of cbs with respect to fsov for
% the van de vusse reaction
%
% use matlab function fmin which finds the minimum of a function
% take -cbs as the function to be minimized,
% which is equivalent to maximizing cbs
%
% fsov = steady-state space velocity, fs/v
% cas = steady-state concentration of a
% cbs = steady-state concentration of b
% cafs = feed concentratioon of a
%
k1 = 5/6;
k2 = 5/3;
k3 = 1/6;
cafs = 10;
%
fsov = x;
%
cas1 = -(k1 + fsov)/(2*k3);
cas2 = sqrt((k1+fsov)^2 + 4*k3*fsov*cafs)/(2*k3);
cas = cas1 + cas2;
%
cbs = k1*cas/(fsov + k2);
cbsmin = - cbs;

function xdot = vanvusse(t,x);


%
% (c) b.w. bequette
% 25 July 94
% revised 20 July 96
%
% dynamic model for the van de vusse reaction
%
% to use this function file with ode45:
%
% [t,x] = ode45('vanvusse',t0,tf,x0]
%
% where t0 is the initial time (usually 0)
% tf is the final time
% x0 is the initial condition for the states
%
% x = states
% x(1) = concentration of A
% x(2) = concentration of B
% t = time
%
% fov = dilution rate
% ca = concentration of a
% cb = concentration of b
% caf = feed concentration of a
%
% the reaction scheme is
%
% A ---> B ---> C
% (k1) (k2)
% 2A ---> D
% (k3)
%
k1 = 5/6; % rate constant for A --> B (min^-1)
k2 = 5/3; % rate constant for B --> C (min^-1)
k3 = 1/6; % rate constant for A + A --> D (mol/(liter min)
caf = 10; % feed concentration of A, mol/liter
fov = 4/7;% flowrate/volume (min^-1)
%
% for step changes in fov, use the following
% fov = 4/7 + delf;
%
% use familiar notation for the states
%
ca = x(1);
cb = x(2);
%
% modeling equations
%
dcadt = fov*(caf - ca) -k1*ca - k3*ca*ca;
dcbdt = -fov*cb + k1*ca - k2*cb;
%
% derivatives placed in vector notation
%
xdot = [dcadt;dcbdt];

Você também pode gostar