# Chapter 5 : Ideal Reactors for a Single Reaction¶

## Example 5.1 page no : 96¶

In [4]:
# Variables
#Concentrations in mol/litre
CAo = 0.1                 # liquid
CBo = 0.01                # liquid
Cco = 0.                  # liquid
CAf = 0.02                # outlet stream
CBf = 0.03                # outlet stream
Ccf = 0.04;               # outlet stream
#Volume in litre
V = 1.;
#Volumetric flow rate(l/min)
v = 1.;
CA = CAf;CB = CBf;Cc = Ccf;

# Calculations
#Rate of reaction(mol/litre.min)
rA = (CAo-CA)/(V/v);
rB = (CBo-CB)/(V/v);
rc = (Cco-Cc)/(V/v);

# Results
print "rate of reaction of A is %.2f mol/litre.min"%(rA)
print "rate of reaction of B is %.2f mol/litre.min"%(rB)
print "rate of reaction of C is %.2f mol/litre.min"%(rc)

rate of reaction of A is 0.08 mol/litre.min
rate of reaction of B is -0.02 mol/litre.min
rate of reaction of C is -0.04 mol/litre.min


## Example 5.2 page no : 97¶

In [5]:
%matplotlib inline

import math
from numpy import *
from matplotlib.pyplot import *
from scipy import stats

# Variables
vo = array([10,3,1.2,0.5])         #Volumetric flow rates(litre/hr)
CA = array([85.7,66.7,50,33.4])    #Concentrations (millimol/litre)
CAo = 100.;
V = 0.1;                           #Volume(litre)
e = (1.-2.)/2;                     #Expansion factor is
#Initialization
XA = zeros(4);
rA = zeros(4);
m = zeros(4);
n = zeros(4);

# Calculations
#Relation between concentration and conversion
for i in range(4):
XA[i] = (1-CA[i]/CAo)/(1+e*CA[i]/CAo);
rA[i] = vo[i]*CAo*XA[i]/V;
m[i] = math.log10(CA[i]);
n[i] = math.log10(rA[i]);

# Results
#For nth order plot between n & m should give a straight line
plot(m,n)
xlabel("log CA")
ylabel("log (-rA)")
show()
coefs = stats.linregress(m,n);
print coefs
print "Intercept of the graph is %.2f"%(coefs[1])
print "Slope of the graph is %.2f"%(coefs[0])
k = 10**coefs[1]
n = coefs[0]
print " Taking n = 2, rate of equation is %.2f millimol/litre.hr"%(k),
print "CA**2 "
print ('The sol slightly differ from that given in book because regress fn is used to calculate the slope')

Populating the interactive namespace from numpy and matplotlib

WARNING: pylab import has clobbered these variables: ['rc', 'draw_if_interactive', 'e']
%pylab --no-import-all prevents importing * from pylab and numpy

(1.9569709616766851, -0.39508420521305565, 0.99852626739620765, 0.001473732603792355, 0.075209753597987913)
Intercept of the graph is -0.40
Slope of the graph is 1.96
Taking n = 2, rate of equation is 0.40 millimol/litre.hr CA**2
The sol slightly differ from that given in book because regress fn is used to calculate the slope


## Example 5.3 page no : 99¶

In [6]:
'''
Note : The sol varies from book as the value of CB taken in book at end is wrong
'''

import math

# Variables
CAo = 1.4
CBo = 0.8
CRo = 0.
#Volume(litre)
V = 6.

# Calculations
#For 75% conversion of B
#From stoichiometry of equation A+2B-->R
CA = 1.4-(0.75*0.8)/2.;
CB = 0.8-(0.75*0.8);
CR = (0.75*0.8)/2.;
#From the Given rate equation(mol/litre.min)
rB = 2*(12.5*CA*CB*CB-1.5*CR);
#Volumetric flow rate is given by
v = V*rB/(CBo-CB);

# Results
print " volumetric flow rate into and out of the reactor is %.1f litre/min"%(v)

 volumetric flow rate into and out of the reactor is 2.0 litre/min


## Example 5.4 page no : 104¶

In [1]:
import math

# Variables
eA = (4-2.)/2;
CAo = 0.0625;         # mol/liter
xAo = 0.
xAf = 0.8              # conversion
k = 0.01;

# Calculations
def f1(xA):
return math.sqrt((1+xA)/(1-xA))

t = math.sqrt(CAo)*X/k;

# Results
print " Space timesec needed is %.2f sec"%(t)

 Space timesec needed is 33.18 sec


## Example 5.5 page no : 106¶

In [9]:
import math

# Variables
T = 922.         #Temperature(kelvin)
P = 460000.;     # kPA
FAo = 40.        # pure phosphine
k = 10.
R = 8.314;

# Calculations
CAo = P/(R*T);          # mol/m3
e = (7-4)/4.;
XA = 0.8;

#The volume of plug flow reactor is given by
V = FAo*((1+e)*math.log(1./(1-XA))-e*XA)/(k*CAo);

# Results
print " volume of reactor is %.3f m**3"%(V)

 volume of reactor is 0.148 m**3

In [ ]: