You are on page 1of 10

International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 6

Optimal reactor length of an auto-thermal ammonia synthesis reactor

M.S.M.Ksasy , F Areed , S Saraya , Mostafa A. khalik*


Abstract: This paper presents the simulation of auto-thermal ammonia synthesis
reactor. Our target here is to estimate the optimal reactor length which will give the
maximum profit from the ammonia reactor. There are many literatures which are
interested in ammonia simulation in the past but all need some corrections due to
either uncorrected model used or uncorrected algorithm. We used here the ODE45
solver of MatLab from Mathworks, along with real-coded genetic algorithm GA and
solve for every 0.0001 m from the reactor length. It is found that no spikes, no reverse
reaction can take place even at higher top temperature of 800 K. the maximum value
of ammonia objective is 5.6635e+006 at optimal reactor length of 6.4253

Keywords: Ammonia synthesis reactor, Dynamic Mutation, Elitism, Optimization,


Real-coded GA.

1. Introduction
The synthesis reactor is treated as a separate unit with the object of understanding its
behavior and obtaining the key variables that lead to its stable, sustained optimum
operation. We are interested mainly in predicting the reactor behavior when changes
are made in the controllable variables of the reactor and specifically in studying the
variation of ammonia yield as a result of the changes. Thus a mathematical model
which approximates the reactor to the point that it predicts the trends of the reactor
output and reactor stability with reasonable accuracy will be adequate for our
simulation.

Ammonia is one of the most chemicals used in industry. It is used in the manufacture
of fertilizers, chemicals, explosives, fibers, plastics, refrigeration, pharmaceuticals,
pulp, paper, mining, metallurgy, and cleaning. It is produced from the reaction of
hydrogen and nitrogen at high temperature and high pressures in the existence of
catalyst
N 2 + 3H 2 ⇔ 2 NH 3 + ΔH (Eq. 1)
ΔH = − 92 kj / mole
This exothermic reversible reaction has been carried out in the most important unit of
ammonia plant; ammonia synthesis reactor. Due to high pressure used, more electric
power is needed to drive compressor, and makes more stringent the requirements to
be met by the plant. The wall of the reactor has special design and it needs certain
alloys to withstand these higher pressures. Feed gas temperature T f , reacting gas
temperature Tg , nitrogen flow rate N n 2 , all are function of reactor length and they are
related to the optimization of the objective function of ammonia.
Many literatures discuss the modeling and simulation of an auto-thermal ammonia
synthesis reactor [1], [2], [3], [4], [5], [12], [14], [15], [17], [18], [20].
Annable in [4] compared the performance of an auto-thermal ammonia synthesis
reactor with the maximum yield that could be obtained if one had direct control of the
temperature profile; he found that conversion could be increased by 14 %. Dyson in
[5] considered the general problem of determining the heat transfer coefficient vs.

*
Mansoura University, Faculty of Engineering
Computers & Systems Dept., P. O. 35516
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 7

length function that would maximize the yield of auto-thermal reactor. Murase [1]
used the maximum principle to design a variable heat transfer coefficient ammonia
synthesis reactor.

Edgar and Himmelblau [20] used the lasdon's generalized reduced-gradient (LGRG)
method to arrive at an optimal reactor length corresponding to a particular reactor top
temperature of 694 K. however they ignored a term mentioned in the Murase's
formulation [1], pertaining to the cost of ammonia already present in the feed gas, in
the objective function. Also the expressions of the partial pressures of nitrogen,
hydrogen, and ammonia, used to simulate the temperature and flow rate profiles
across the length of the reactor were not correct.

Upreti and Deb [18] present an optimal procedure of an ammonia synthesis reactor
using genetic algorithm. They used correct objective function and correct
stoichiometric expression of the partial pressures of N 2 , H 2 , NH 3 . They used simple
GA in combination with Gear package of NAG library's subroutine, D02EBF, for the
optimization of ammonia synthesis reactor. They obtained mass flow rate of nitrogen,
feed gas temperature and reaction gas temperature at every 0.01 m of 10 m reactor
length. Moreover there is a contradiction in the temperatures and gas flow rate
profiles obtained. They reported the profiles that were not smooth as in earlier
literature. Also, they reported reverse reaction condition at the top temperature of
664K which was not found in the literature earlier. Babu and Angira [2] [3] used a
correct objective function and correct stoichometeric expression of pressures of N 2 ,
H 2 , NH 3 but there is a contradiction in the temperatures and gas flow rate profiles
obtained. Hence, our research is carried out in order to take care of bad models or bad
computations.

The ammonia synthesis reactor model has been solved using the ODE45 Matlab 7.1
from Mathworks at every 0.0001 m of 10 m reactor length, and the optimization is
carried out by real-coded GA. The performance of the GA [7] [8] [9] [10] [19] [22]
depends on many parameters like , population size, probability of crossover,
probability of mutation, the way you encode your variable, …etc. Encoding may be
carried out using binary strings. Binary encoding for function optimization problems
is known to have severe drawbacks due to the existence of Hamming cliffs [13]. With
some modifications of genetic operators, real-coded GAs have resulted in better
performance than binary-coded GA for certain problems [10] [11] [21]. Our algorithm
is real-coded GA enhanced with biased initialization, Elitism, dynamic parameter
settings.
It is found that the maximum objective function of ammonia has the value of
5.6635e+006 at an optimal reactor length of 6.4253.

In the first section we made introduction of this paper. In the second section we will
present for the Ammonia synthesis reactor model, followed by the real-coded genetic
algorithm. Results and simulation are presented in section 4, and we will make
conclusion in the last section.
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 8

2. Ammonia synthesis reactor Model

Optimization in the design and operation of a reactor focuses on formulating a


suitable objective function plus a mathematical description of the reactor; the latter
forms a set of constraints. Any mathematical description of a chemical reactor heavily
relies on balance equations which express the general laws of conservation of mass
and Energy.

The objective function for the reactor optimization is based on the difference between
the value of the product gas (heating value and the ammonia value) and the value of
feed gas (as a source of heat only) less the amortization of reactor capital costs. All
symbols and variables used are listed in Appendix A at the end of this paper

f ( x, N N 2 , T f , T g ) = 1.33563 × 10 7 − 1.70843 × 10 4 N N 2 + 704.09(T g − T0 ) −


699.27(T f − T0 ) − [3.45663 × 10 7 + 1.98365 × 109 x]1/ 2 (Eq. 2)

It is clear from the above expression that the objective function depends on four
variables: the reactor length x , proportion of nitrogen N N 2 , the reacting gas
temperature Tg , and the feed gas temperature T f , for a given top temperature T0 .
The model below can be derived using the material and energy balance

dT f US1
= (T g − T f ) (Eq. 3)
dx WC pf
dT g US1 (−ΔH ) S 2 − dN N 2
=− (T g − T f ) + ( ) (Eq. 4)
dx WC pg WC pg dx
dN N 2 ⎡ p N p 1H.5 p NH ⎤
= − f ⎢k1 2 2 − k 2 1.53 ⎥ (Eq. 5)
dx ⎢⎣ p NH 3 p H 2 ⎥⎦
286 N N 2
p N2 = (Eq. 6)
2.598 N N 2 + 2 N N 2
pH2 = 3 p N2 (Eq. 7)

286(2.23N N 20 − 2 N N 2 )
p NH 3 = (Eq. 8)
2.598 N N 20 + 2 N N 2

0.0 ≤ N N 2 ≤ 3220 (Eq. 9)

400 ≤ T f ≤ 800 (Eq. 10)

0.0 ≤ x ≤ 10.0 (Eq. 11)

The boundary conditions are: T f = T0 at x = 0 ; Tg = T f at x = 0 ;


N 0
N2 = 701.2 kmol / hm at x = 0 ;
2
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 9

3. Main Algorithm

Since genetic algorithms are inspired from the idea of evolution, it is natural to
expect that the adaptation is used not only for finding solutions to a given problem,
but also for tuning genetic algorithms to the particular problem [13]. The issue of
controlling values of various parameters of a genetic algorithm is one of the most
important and promising area of research in evolutionary computation [6]: it has the
potential of adjusting the algorithm to the problem while solving the problem. The
performance of GA depends on the initial population from which the solution starts to
evolve; being near or far from the global point. You may start from any generation but
you may converge slower than you start from certain acceptable generation.

Elitism [16] can very rapidly increase performance of GA, because it prevents
losing the best found solution to date. A variation is to eliminate an equal number of
the worst solutions, i.e. for each "best chromosome" carried over a "worst
chromosome" is deleted.

Our algorithm is a modified and enhanced version of simple GA. It is real-coded with
added features like biased initialization, dynamic mutation parameter, and elitism.
The issue of controlling values of various parameters of a genetic algorithm is one of
the most important and promising area of research in evolutionary computation [6]: it
has the potential of adjusting the algorithm to the problem while solving the problem.
A non-uniform mutation [6] was been used here. Listed below is our main core
algorithm

Step 1: Randomly Generate Initial population, average fitness of initial population


must exceed certain limit (30 %)
Step 2: Evaluate the fitness function for all chromosomes,
Step 3: Certain amount of chromosomes are passed to the next generation without
modification, “Elitism”,
Step 4: Select the most fittest individuals to survive in the next generation ( our code
contains Roulette-wheel, Rank, tournament, …)
Step 5: Perturbation can be done through crossover and mutation
Step 6: Check evaluation criteria, if satisfied, end
Step 7: If not, go step 2

4. Computer simulation and results

The three differential equations (model equations) were solved using non stiff ode45
function built in MatLab 7.1 from Mathworks. The ammonia objective function is
optimized using the Real-coded Genetic algorithm discussed above.

the feed gas temperature T f , reacting gas temperature Tg , and the nitrogen flow rate
N n2 are shown below in Fig. 1 against every 0.0001 m of 10 m of the reactor length at
top temperature T0 = 694 K. the maximum ammonia profit is $ 5.66353e+006 at
optimal reactor length equal to 6.42535 m. the ammonia profit is plotted against
reactor length in Fig. 2 with a marker at the optimal reactor length
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 10

Fig. 1: Ammonia profile at T0 = 694 K , step size = 0.0001 m

Fig. 2: Ammonia profit against reactor length (x) at T0 = 694 K

Table 1 below shows the values of T f , Tg , N n2 in addition to the ammonia maximum


profit and the optimal reactor length at T0 = 694 K.

Top Temperature Reactor 694 K


Reactor Step Size 0.0001
Optimum Reactor Length 6.4253
Objective Function (million $ / Year) 5.6635
Feed Gas Temperature T f 308.36 K
Reacting Gas Temperature Tg 583.9876 K
Nitrogen Flow Rate N n2 454.9166
Table 1: Model parameters values at T0 = 694 K
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 11

Our method is better in maximizing the ammonia profit and is shown below in Table
2 a comparison between our method and all previous work in this field. The step size
used to solve the system model was set to 0.0001 to make sure that the profiles are
smooth and there are no spikes, and also to make sure that no spikes were missed.

Optimum Reactor Length (m) Ammonia profit


(Million $ /Year)
[1] 5.18 Not Reported
[20] 2.58 1.29
[18] 5.33 4.23
[2] 6.586 5
Our work 6.4253 5.6635

Table 2: Comparison between our work and previous work


Also there is no reverse reaction noticed here even at lower Top temperature T0 equal
to 580 K. the profiles are shown below in Fig. 3 and Table 3 for which the profiles
are smooth and no spikes exist.

Fig. 3: Ammonia profile and ammonia profit at T0 = 580 a


Top Temperature Reactor 580 K
Reactor Step Size 0.0001
Optimum Reactor Length 7.86009
Objective Function (million $ / Year) 2.53
Feed Gas Temperature T f 446.80 K
Reacting Gas Temperature Tg 527.26 K
Nitrogen Flow Rate N n2 629.61
Table 3: Profile at top temperature T0 = 580 K

In contrast to Upreti and Deb [18], the three differential equations are stable at top
temperature 706 K and this profile is sown below in Fig. 4 and Table 4, and still
stable even at a top temperature as high as 820 K as shown in Fig. 5 and Table 5.
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 12

Fig. 4: Ammonia profile and ammonia profit at T0 = 706 K

Top Temperature Reactor 706 K


Reactor Step Size 0.0001
Optimum Reactor Length 6.63861
Objective Function (million $ / Year) 5.66
Feed Gas Temperature T f 307.698 K
Reacting Gas Temperature Tg 583.52 K
Nitrogen Flow Rate N n2 454.93

Table 4: Profile at top temperature T0 = 706 K

Fig. 5: Ammonia profile and ammonia profit at T0 = 820 K


International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 13

Top Temperature Reactor 820 K


Reactor Step Size 0.0001
Optimum Reactor Length 9.73830
Objective Function (million $ / Year) 5.63
Feed Gas Temperature T f 299.073 K
Reacting Gas Temperature Tg 576.662 K
Nitrogen Flow Rate N n2 455.18

Table 5: Profile at top temperature T0 = 820 K

Conclusion
In this paper we get the optimal reactor length which gives the maximum ammonia
profit in the auto-thermal ammonia reactor. By solving at minimum step sizes
(0.0001m), we make sure that the profiles are smooth and there are no spikes by
solving the model at lower top temperature 580 K. also there is no reverse reaction
occurring at this lower temperature. We are sure that the model equations are stable
even at top temperature 820K. The algorithm used is a new real-coded one, with
biased initialization, dynamic mutation, and elitism. The results and simulation show
that our algorithm gives better and maximum profit of ammonia.

Appendix A
List of Symbols
Parameters Meaning Units
U overall heat transfer coefficient kcal / m 2 hK
S1 Surface area of cooling tubes per (m)
unit length of reactor
W Total mass flow rate (kg / h)
C pf Heat Capacity of feed gas (kcal / kgK )
ΔH heat of reaction (kcal / kg mole of N2 )
S2 Cross-sectional Area of catalyst (m 2 )
zone
− dN N 2 / dx reaction rate (kg moles of N 2 / hm 3 )
C pg heat capacity of reacting gas (kcal / kgK )
f catalyst activity
p N 2 , p H 2 , p NH 3 Partial pressures of N 2 , H 2 , NH 3
k1 , k 2 Rate constants
R Ideal Gas Constant kcal /( kg mol )( K )
f (.) Objective function $/year
T0 Reference Temperature K
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 14

Acknowledgement

All thanks go to Dr. Housam Binous, Assistant Professor at The Department of


Chemical Engineering, The National Institute of Applied Science and Technology in
Tunis for his support and his appreciated efforts. Also thanks go to Prof. Dr. / said
Elnashaie, Professor of chemical engineering at Penn State University, USA for his
help and support. I can not forget the patience and help of my colleagues and staff of
Mubarak City for Scientific Research and technology Applications.

References

1. A.Murase, H. L. Roberts, and A. O. Converse, "Optimal thermal design of an auto-


thermal ammonia synthesis reactor", Industrial and Engineering Chemistry Process
Design Development, Vol. 9, No. 4, 1970
2. B. V. Babu, R. Angira , "Optimal design of an auto-thermal ammonia synthesis reactor",
science direct, Computers and chemical engineering journal, 2005
3. B.V. Babu, R. Angira, and A. Nilekar, "Optimal Design of an Auto-Thermal Ammonia
Synthesis Reactor Using Differential Evolution", Proceedings of The Eighth World
Multi-Conference on Systemics, Cybernetics and Informatics (SCI-2004), Orlando,
Florida, USA, July 18-21, 2004
4. D.Annable, "Application of the Temkin kinetic equation to ammonia synthesis in the
large-scale reactors", Chemical Engineering Science, July 1952
5. D.C. Dyson, "Optimal Design of Reactors for single Exothermic Reversible Reactions",
Ph.D. thesis, London University, 1965
6. E.Eiben, R Hinterding, Z Michalewicz, “Parameter Control in Evolutionary Algorithms”,
IEEE Trans. on Evolutionary Computation, July 1999, Vol. 3, Issue 2, pp. 124-141
7. E.K. Nyarko, R. Scitovski, “Solving the parameter identification problem of
mathematical models using genetic algorithm”, Applied mathematics and Computation,
June 2004, Vol. 153, Issue 3, pp. 651-658
8. H.B. Kamepalli, “The optimal basics for GAs”, IEEE Potentials, Apr-May 2001, Vol. 20,
Issue 20, pp. 25-27
9. J.R. Jang, C. Sun, E. Mizutani, “Neuro-Fuzzy and Soft Computing: a Computational
Approach to Learning and Machine Intelligence”, PRENTICE HALL, 1997
10. J.Yen and R. Langrai, “Fuzzy Logic: Intelligence, Control, and Information”, PRENTICE
HALL 1999
11. L.Chambers, “Practical Handbook of Genetic Algorithms: New Frontiers Volume II”,
CRC Press, 1995
12. M.E. E. Abashar, "application of heat interchange systems to enhance the performance of
ammonia reactors", science direct, Chemical Engineering Journal, 2000
13. M.Gen and R. Cheng, “Genetic Algorithms and Engineering Optimization”, A Wiley-
Interscience Publication, 2000
14. M.J. Shah, "Control Simulation in ammonia production", Industrial and Engineering
chemistry, Vol. 59, No. 1, Jan 1967
15. M.Pedernera, D. O. Borio, J.A. Porras, "A new cocurrent reactor for ammonia synthesis",
chemical engineering science, vol. 51, No. 11, pp. 2927-2932, 1996
16. R.E. King, “Computational Intelligence in Control Engineering”, Marcel Decker NY
2005
17. R.F. Baddour, P. L. T. Brian, B. A. Logeais, J. P. Eymery, "Steady-state simulation of an
ammonia synthesis converter", Chemical Engineering Science, Vol. 20, pp. 281-292,
1965
18. S.R. Upreti and K. Deb, "Optimal design of an ammonia synthesis reactor using genetic
algorithms", Computers and Chemical Engineering, Vol. 21, No. 1, pp. 87-92, 1997
International Journal of Electrical & Computer Sciences IJECS-IJENS Vol: 10 No: 03 15

19. S.Smith, “An evolutionary program for a class of continuous optimal control problems”,
IEEE Int. Conf. on Evolutionary Computation, 29 Nov. 1995, Vol. 1, pp. 418}
20. T.F. Edgar, D. M. Himmelblau, “Optimization of Chemical Processes”, McGraw-Hill
Science, Jan 2001
21. T.T. H. Luong and Q. T. Pham, “A comparison of the performance of classical methods
and genetic algorithms for optimization problems involving numerical models”, IEEE
Congress on Evolutionary Computation CEC, 8-12 Dec., 2003, Vol. 3, pp. 2019 – 2025
22. W.Banzhaf, P. Nordin, R. E. Keller, F. D. Francone, “Genetic Programming: An
Introduction: On the Automatic Evolution of Computer Programs and Its Applications”,
Morgan Kaufmann Publishers; Nov. 1997

You might also like