Volumetric Flow Rate Q 50 Total Volume V 2000 Concentration at Inlet C 2 Rate Constant K 0.198 Velocity V 3.8
Volumetric Flow Rate Q 50 Total Volume V 2000 Concentration at Inlet C 2 Rate Constant K 0.198 Velocity V 3.8
Volumetric Flow Rate Q 50 Total Volume V 2000 Concentration at Inlet C 2 Rate Constant K 0.198 Velocity V 3.8
(2015-pe-08) (2015-pe-10)
Question #1:
The schematics of a plug flow reactor are shown in fig.1. Solve for the
concentration distribution in a plug flow reactor governed by the following
equations using MATLAB
Given Data:
Volumetric flow rate=Q=50
Total volume=V=2000
Concentration at inlet=Cin=2
Rate constant=k=0.198
Velocity=v=3.8
Formula:
Qdc/dVr=-RC
C(0)=Cin
R(C)=k*c/c+v
Solution:
We use the MATLAB code to find the solution
MATLAB SCRIPT
Function file:
%Group # 13
%summiya iftikhar(2015-pe-08)
%Hafsa Afzal(2015-pe-10)
%question#1:
function y=plug(c,Q)
% plug flow reactor
global k v
R=(k*c)/(c+v);
y=-R/Q;
end
Run file:
%call file
global k v Cin Q
%given data :
k=0.198;%reaction rate constant
1
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)
v=3.8;
Cin=2;%concentration in
C=2;%concentration
Q=50; %volumetric flow rate
V=[0 2000];%volume
[V,R]=ode45(@plug,V,C);
%graph plotation
plot(V,R)
xlabel('volume')
ylabel('concentration')
title('concentration vs volume of plug flow reactor')
Conclusion:
Results will be displayed by running this code
Given Data:
2
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)
Qdc/dVr=-RC
C(0)=Cin
R(C)=k*c/(1+K1c)2
Solution:
We use the MATLAB code to find the solution
MATLAB Script
Function file:
%Group 13:
%summiya iftikhar(2015-pe-08)
%Hafsa Afzal(2015-Pe-10)
function y=flow(c,v )
global k K1 Q
R=(k*c)/((1+(K1*c))^2);
y=-R/Q;
end
Call File:
%call file
global k K1 V Cin Q
k=2;
K1=4;
Q=2.2;
V=[0 50];
Cin=1;
c=1;
[V,R]=ode45(@flow,V,c);
plot(V,R)
xlabel('volume')
ylabel('concentration')
3
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)
title('volume vs concentration')
Conclusion:
Results will be displayed on execution
Question #3:
The schematics of a CSTR are shown fig 2.
Call file:
5
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)
plot(t,xc)
xlabel('time')
ylabel('concentration')
title('time vs concentration')
Conclusion:
Results will be displayed on execution of the code
Part b:
Given Data:
Volumetric flow rate=Q=2.2
Total volume=V=50
Concentration at inlet=Cin=1
Rate constant=k=2
Rate constant=K1=4
Formula:
R(C)=k*c/(1+K1c)2
Solution:
We use MATLAB code to solve the problem
6
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)
MATLAB Script
Function file:
function y=cstr1_b(t,v)
Q=2.2;
cin=1;
V=50;
k1=4;
k=2;
y=-V*(k*c)/(1+k1*c)^2-Q*(c-cin);
end
Call file:
c=2; %initial guess
tspan=[0 1]
[t,xc]=ode45(@cstr1_a,tspan,c)
plot(t,xc)
xlabel('time')
ylabel('concentration')
title('time vs concentration')
Conclusion:
Results will be displayed on execution of the MATLAB code
7
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)
8
Assignmnet#4 Summiya Iftikhar Hafsa Afzal
(2015-pe-08) (2015-pe-10)