Optimal Design of an Ammonia Reactor
Authors' Data: 
Housam BINOUS & Thomas F. Edgar
Department of Chemical Engineering
National Institute of Applied Sciences and Technology
Tunis, TUNISIA
University of Texas at Austin
Texas, USA
Emails: binoushousam@yahoo.com 
edgar@che.utexas.edu

Acknowledgement :
This problem was presented in Optimization of chemical processes, Edgar et al., second edition, McGrawHill, 2001.

Governing Equations

Eq1=D[Nn2[x],{x,1}]==-K1 Pn2 Ph2^1.5/Pnh3+K2 Pnh3/( Ph2^1.5)

K1=1.78954 10^4 Exp[-20800/(R Tg[x])];
K2=2.5714 10^16 Exp[-47400/(R Tg[x])];

Pn2=286 Nn2[x]/3223.91/(1-2(701.2-Nn2[x])/3223.91);
Ph2=286 3 Nn2[x]/3223.91/(1-2(701.2-Nn2[x])/3223.91);
Pnh3=286 (2 (701.2-Nn2[x])/3223.91)/(1-2(701.2-Nn2[x])/3223.91);

Eq2=D[Tf[x],{x,1}]== -500 10/(26400 0.707) (Tg[x]-Tf[x])

Eq3=D[Tg[x],{x,1}]==  -500 10/(26400 0.719) (Tg[x]-Tf[x])+26000 0.78/(26400 0.719) (K1 Pn2 Ph2^1.5/Pnh3-K2 Pnh3/(Ph2^1.5))

Gas constant

R=1.987;

Using NDSolve to solve the system of ODEs

sol[a_]:=NDSolve[{Eq1,Eq2,Eq3,Tf[0]==694,Tg[0]==694,Nn2[0]==701.19},{Nn2[x],Tf[x],Tg[x]},{x,0,a}]

Nitrogen at 5 m in Kg mol/(m\(TraditionalForm\`\^2\) h); feed gas and reacting gas temperatures at 5 m

Nn2[x]/.sol[5]/.x->5

(Tf[x] /. sol[5] /. x -> 5)

(Tg[x] /. sol[5] /. x -> 5)

ammonia fraction at 5 m

(2 (701.2 - Nn2[x])/3223.91)/(1 - 
              2 (701.2 - Nn2[x])/3223.91) /. sol[5] /. 
      x -> 5

conversion at 5 m

Nn2[x]/3223.91 /. sol[5] /. x -> 5

Concentration and temperature profiles for a 10 m reactor

sol2=sol[10]

Plot[{Nn2[x]/.sol2,Tf[x]/.sol2,Tg[x]/.sol2},{x,0,8},PlotStyle->{RGBColor[1,0,0],RGBColor[0,1,0],RGBColor[0,0,1]}]

Optimal reactor length is 6.445 m

f[x_] := (11.9877 10^6 - 1.710 10^4 Nn2[x] + 
            704.04 Tg[x]
 - 
            699.3 Tf[x] - (3.4566 10^7 + 2.101 10^9 x)^0.5) /. 
        sol[10]

FindMaximum[First[f[x] /. x -> a], {a, 5}]

Plot[f[x] /. x -> a, {a, 5.0, 10}]