<< Statistics`LinearRegression`

This is Problem #5.28 in Levenspiel. Note the analogy with Problem #3.16.

x[1] = 0;
y[1] =  1;
x[2] = 20;
y[2] =  0.80;
x[3] = 40;
y[3] =  0.68;
x[4] = 60;
y[4] = 0.56;
x[5] = 80;
y[5] =  0.45;
x[6] = 100;
y[6] =  0.37;
x[7] = 140;
y[7] =  0.25;
x[8] = 200;
y[8] =  0.14;
x[9] = 260;
y[9] =  0.08;
x[10] = 330;
y[10] =  0.04;
x[11] = 420;
y[11] =  0.02;

time = Table[x[i], {i, 1, 11}]
pA = Table[y[i], {i, 1, 11}]
cA = 
      Table[y[i]/0.08206/373,  {i, 1, 11}]
data1 = 
      Table[{x[i], y[i]/0.08206/373}, {i, 1, 
          11}]
dataPlot1 = 
        ListPlot[data1, PlotStyle -> PointSize[0.02],  
          AxesOrigin -> {0, 0}];
concVsTime = 
      Regress[data1, Table[t^i, {i, 0, 4}], t, 
        RegressionReport -> RSquared]
fittedConcVsTime = 
      Fit[data1, Table[t^i, {i, 0, 4}], t]
Plot[%, {t, 0, 420}];
Show[%, dataPlot1];

rate = Dt[fittedConcVsTime, t]

yPoints2 = Table[-rate, {t, 0, 400, 20}]
xPoints2 = 
      Table[fittedConcVsTime, {t, 0, 400, 20}]
Plot[-rate, {t, 0, 400}];

data2 = 
      Table[{xPoints2[[i]], 1/yPoints2[[i]]}, {i, 2, 18}]

dataPlot2 = 
        ListPlot[data2, PlotStyle -> PointSize[0.02],  
          AxesOrigin -> {0, 0}];
recipRateVsConc = 
      Regress[data2, Table[conc^i, {i, 0, 5}], conc, 
        RegressionReport -> RSquared]
fittedRecipRate = 
      Fit[data2, Table[conc^i, {i, 0, 5}], conc]
Plot[%, {conc, 0, 0.030}];
Show[%, dataPlot2];

yA0 = 0.80;
pressure = 1;
temp = 373;
cA0 = yA0*pressure/0.08206/temp
xA = 0.95;
fA0 = 100;
cAf = cA0*(1 - xA)
Integrate[fittedRecipRate, {conc, cAf, cA0}]

reactorSize = %*fA0/3600/
          cA0

OK, makes sense! But now we need to see how sensitive the above result is to the choice of polynomial fit for the -1/rA vs. cA curve... Below we show the use of an exponential curve fit (instead of the polynomial fit).

logOfSecondElement[{x_, y_}] := {x, Log[y]}
logRecipRatevsConc = Map[logOfSecondElement, data2]

Fit[logRecipRatevsConc, {1, x}, x]

fitFunction2 = Exp[10.7694]*Exp[-114.606 x]

fitPlot2 = 
        Plot[fitFunction2, {x, 0, 0.03}, 
          PlotStyle -> Dashing[{0.02}]];

Show[{dataPlot2, fitPlot2}];

Integrate[fitFunction2, {x, cAf, cA0}]

reactorSize2 = %*fA0/3600/cA0

Let's try a nonlinear curve-fitting procedure.

<< Statistics`NonlinearFit`

fitFunction3 = 
      NonlinearFit[data2, a + b*Exp[-c*x], x, {a, b, c}]

fitPlot3 = 
        Plot[fitFunction3, {x, 0, 0.03}, 
          PlotStyle -> Dashing[{0.02}]];

Show[{dataPlot2, fitPlot3}];

Integrate[fitFunction3, {x, cAf, cA0}]

reactorSize3 = %*fA0/3600/cA0

A simpler solution has been offered by Mike Diffendal (mjd262@psu.edu). He first successfully determined the order of this decomposition reaction and then used the analytical expression for the reaction rate in the PFR performance equation:

Integrate[1/(0.0095*x), {x, cAf, cA0}]

fitFunction3 /. x -> cAf

tauMFR = cA0*xA*%
volMFR = tauMFR*fA0/3600/cA0

tauMFR2 = cA0*xA/(0.0095*cAf)
volMFR2 = tauMFR2*fA0/3600/cA0