Do problem 22.19 in your text. Use ode45. Plot the results. Find the maximum tem
ID: 2902890 • Letter: D
Question
Do problem 22.19 in your text. Use ode45. Plot the results. Find the maximum temperature and corresponding time.
A nonisothermal batch reactor can be described by the following equations:
where C is the concentration of the reactant and T is the temperature of the reactor. Initially, the reactor is at 16
Do problem 22.19 in your text. Use ode45. Plot the results. Find the maximum temperature and corresponding time. A nonisothermal batch reactor can be described by the following equations: where C is the concentration of the reactant and T is the temperature of the reactor. Initially, the reactor is at 16 A degree C and has a concentration of reactant C of 1.0 gmol/L. Find the concentration and temperature of the reactor as a function of time.Explanation / Answer
create the following function script to define the equations. Save it.
% ---------------------------------------------------------------------------------
function dy = my_ode(t,y)
dy = zeros(2,1);
dy(1) = -exp(-10/(273+y(2))) * y(1);
dy(2) = 1000* exp(-10/(273+y(2))) * y(1) - 10*(y(2) - 20);
% -------------------------------------------------------------------------------------
now save the following script and run it.
% ------------------------------------------------------------------------------------
% initial conditions
T0 = 16; % in centigrade
C0 = 1; % in gmol/lit
% initial and final time
t0 = 0;
tf = 5; % this is not given, we have to choose
% calling the solver ode45
[t y] = ode45(@my_ode,[t0 tf], [C0; T0]);
figure
plot(t,y(:,2))
title('Temp vs time')
xlabel('t')
ylabel('T')
figure
plot(t,y(:,1))
title('Conc vs time')
xlabel('t')
ylabel('C')
% --------------------------------------------------------------------------------------
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.