Question: How do I do this in matlab with a deltaCp=10 please n-butane is to be isomerised to isobutane in a PFR. For this example, the
How do I do this in matlab with a deltaCp=10 please
n-butane is to be isomerised to isobutane in a PFR. For this example, the reaction is elementary and not reversible (ie neglect equilibrium). The new specific reaction rate constant of 10 h-1 was re-measured at 380K after a students data was found to be erroneous. The feed for this reactor will enter at 330K and will use an existing reactor of 6m3. It will process 200kmol/hr of a mixture of 40% butane and 60% N2.
Plot the conversion X and reactor Temperature along the reactor assuming adiabatic conditions, then plot the conversion X and reactor Temperature along the reactor using an assumed constant ambient temperature Ta of 25C and a overall heat transfer constant Ua of 2 kJ/h. K
Then, conduct a hot spot sensitivity analysis for ambient temperatures of 10, 20, 30, 40, 50C to determine the hottest temperature in the reactor and where it occurs. Also determine the overall conversion at the end of the reactor in each case.
deltaHrxn = -9000 J/mol butane (ie. Exothermic),
Activation energy 50 kJ/mol Concentration butane0 =15 kmol/m3 CPbutane = 141 J/mol.K,
CPi-butane = 151 J/mol.K,
CP N2 = 29.14 J/mol.K
I have this code
vspan=0:0.01:6; % R-Vol varying from 0 to 6 m^3 To=330; % Feed Inlet Temp in (K) Xo=0; % Intial Conv. IC=[To,Xo]; % Initial Cond. [vsol,varsol]=ode23(@od_sys,vspan,IC); % Call ODE function to solve eqns. subplot(2,1,1) a=vsol; b=varsol(:,1); bmax=max(b);% used to find T Max. f=find(b==bmax); abmax=a(f); % Location Max T disp(' At Ambient Temperature 50 deg C'); p=['Maximum Temperature in the reactor is found to be ',num2str(bmax),' K at volume = ', num2str(abmax),' m^3']; disp(p); c=varsol(:,2); p=['Overall Conversion at the end of reactor found to be ',num2str(c(end)*100),'%']; disp(p); plot(vsol,varsol(:,2),'m') title('Conversion of N-Butane along the Reactor at ambient temperature 50^o C','FontName','TimesNewRoman','fontsize',12,'color','k'); xlabel('Volume (m^3)','FontName','TimesNewRoman','fontsize',12,'color','k'); ylabel('X_A','FontName','TimesNewRoman','fontsize',12,'color','k') subplot(2,1,2) plot(vsol,varsol(:,1),'r') title('Temperature along the Reactor at ambient temperature 50^o C ','FontName','TimesNewRoman','fontsize',12,'color','k'); xlabel('Volume (m^3)','FontName','TimesNewRoman','fontsize',12,'color','k'); ylabel('Temperature (K)','FontName','TimesNewRoman','fontsize',12,'color','k'); %_____________ End_____________
function contdiff = od_sys(T,var) T=var(1); % Input of temperature (K) X=var(2); % Input of Conversion Ua=2*10^3; Fao= 0.4*200000;% Flow rate of Component mol/hr Cao=15000;% Initial Concentration of A (mol/m^3) dCp=151-141; k= 10*exp((50000/8.314)*((1/380)-(1/T))); % Rate constant at any temperature T ra= -k*Cao*(1-X); % Rate of Reaction of Production of A i.e. why it is -ve % Because A is consumed in the reaction. delH=-9000; % Heat of Reaction at any temp.( Since del Cp is 0) % dT/dV (Energy Balnce) contdiff(1,1)= ((Ua*(273.15+50-T))+(ra*delH))/(Fao*(184.71+dCp*X)); %dX/dV (Mole Balance) contdiff(2,1)=-ra/Fao; end
%__________ Script File_____________
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
