Anda di halaman 1dari 6

Pergamon

0098-1354(95)00251-0
Computers chem. Engng Vol. 21, No. I, pp. 87-92, 1997
Copyright 1996 Elsevier Science Ltd
Printed in Great Britain. All rights reserved
0098-1354/96 $15.00+0.00
OPTIMAL DESIGN OF AN AMMONIA SYNTHESIS REACTOR
USING GENETIC ALGORITHMS
SIMANT R. UPRETI and KALYANMOY DEB
Department of Chemical Engineering Indian Institute of Technology Kanpur UP 208 016 India
Department of Mechanical Engineering Indian Institute of Technology Kanpur UP 208 016 India
(Received 21 September 1994; accepted 12 June 1995)
Abstract--This paper presents an optimal design procedure of an ammonia synthesis reactor using genetic
algorithms (GAs)-search and optimization techniques based on principles of natural genetics. GAs are chosen as
an optimization tool simply because of their successful application to many engineering optimization problems.
The optimal problem requires maximisation of an objective function subject to a number of equality constraints
involving solution of coupled differential equations. Although there exist at least a couple of other studies on the
optimal design of ammonia synthesis reactor, they have ignored some terms in the formulation of the objective
function, for which the reported optimal solution does not match with the solution obtained using an enumerative
search technique. This paper includes those terms and applies GAs to find the optimal reactor length. Simulation
results with GAs find optimal reactor lengths at various feed gas temperatures at the top of the reactor. The results
of this paper are also found to agree with the reactors used in industries. The successful application of GAs in
ammonia reactor design suggests GAs immediate application to other reactor designs or modelling. Copyright
1996 Elsevier Science Ltd
INTRODUCTION
This paper considers the problem of optimally designing
an ammoni a synthesis reactor described by Murase et al .
(1970). The reactor is based on the Haber' s process:
N 2 + 3H, ,--. 2NH3.
Feed gas with nitrogen, hydrogen, ammonia, methane,
and argon enters the bottom of the reactor. Before
reversing its flow-path to undergo reversible exothermic
reaction in the catalyst basket, the feed gas gets
preheated by the counter-current flowing reaction gas.
Ammoni a is then produced in the catalyst basket due to
the reaction bet ween nitrogen and hydrogen in the
presence of the catalyst. Unconverted nitrogen and
hydrogen, ammoni a and the inerts constitute the reaction
gas which leaves the bottom of the reactor after cross-
exchangi ng heat with the i ncomi ng feed gas. The
optimization probl em consists of maxi mi zi ng the eco-
nomi c return subject to three equality constraints based
on energy and mass balance of the governing reactions-
three coupled ordinary differential equations (ODE' s)-
and three inequality constraints. Since there are four
probl em variables and three equality constraints, we
have only one degree of freedom. The reactor length is
chosen as an independent variable. Mass flow rate of
nitrogen, temperature of feed gas and temperature of the
reaction gas mixture at the exit of the reactor are the
three dependent variables related to each other as well as
to the reactor length through the above mentioned
equality constraints.
Murase et al . ( 1970) , computed the optimum tem-
~cE 2,-~-~ 87
perature trajectory along the reactor length applying the
Pontryagin' s maxi mum principle. Although their for-
mulation was correct, the stated obj ect i ve function was
wrong. Edgar and Hi mmel bl au (1988) identified this
error, rectified the same and used Lasdon' s generalized
reduced-gradient method to arrive at an optimal reactor
length corresponding to a particular reactor top tem-
perature of 694 K. However they also ignored a term
mentioned in Murase' s formulation, pertaining to the
cost of ammoni a already present in the feed gas, in the
objective function. Also the expressions of the partial
pressures of nitrogen, hydrogen and ammoni a-used to
simulate the temperature and flow rate profiles across the
length of the reactor-were not correct. Vasantharajan et
al . (1990) obtained the optimal combination of the feed
gas temperature at the top of the reactor and reactor
length using a non-linear programmi ng technique. Only
a few internal points along the length of the reactor were
selected for the simulation of the reactor profiles. This
does not appear to do j ust i ce to the not-so-smooth
reactor profiles and leaves behind an uncertainty of the
globality of the obtained optimal solution.
In this paper, we rectify all the above shortcomings
present either in the formulation of the probl em or in the
part of the optimization process. Specifically, we use the
Murase' s formulation with the correct obj ect i ve function.
The correct stoichometric expressions of the partial
pressures are applied. In order to obtain solutions with
adequate accuracy, sufficient number of internal points
are taken in the solution of the differential equations.
Over last decade, genetic algorithms (GAs) have
enjoyed a large scale application to a wide spectrum of
88
S, R. UPRETI and K. DEa
engi neeri ng design problems (Deb, 1993; Goldberg,
1989). GAs are optimization techniques that artificially
simulate the gradual adaptation of natural chromosomes
in the quest of producing better and more suitable
individuals. In principle, GAs are very different search
algorithms than the traditional search and optimization
techniques (Rao, 1984; Reklaitis et al., 1983). The main
reason of the success of GAs is their simplicity, global
perspective, and parallel processing capabilities.
In the remainder of this paper, we first describe the
formulation of the optimal ammoni a reactor problem.
Thereafter, a brief description of the working principle
of genetic algorithms is presented. Simulation results of
GAs for different top temperatures are presented next.
Results show that the optimal reactor length is constant
for a wide range of the top temperature. These results
seem to be supporting the practice in industry as
documented in Eymery (1964). The success story of
GAs in this paper suggests further use of GAs in similar
design problems.
P R O B L E M F O R MU L A T I O N
The formulation used in this paper is similar to that in
M urase et al. (1970). The modi fications to that model are
ment i oned in this section. Feed gas contains 21.75
mole% nitrogen, 65.25 mole% hydrogen, 5 mole%
ammonia, 4 mole% methane and 4 mole% argon. In a
typical ammoni a reactor, feed gas enters the bottom of
the reactor. The production of ammoni a depends on the
temperature of feed gas at the top of the reactor
(henceforth called as top temperature), the partial
pressures of the reactants (nitrogen and hydrogen), and
the reactor length. The optimal design problem requires
to obtain the optimal reactor length yielding maxi mum
economic returns from the reactor operation correspond-
ing to various top temperatures.
Obj ect i ve f unct i on
The objective function is the economic return based
on the difference between the value of the product gas
(heating value and the ammoni a value) and the value of
feed gas (as a source of heat onl y) less the amortisation
of reactor capital costs. Originally, an expression of this
objective was formulated by Murase et al. Unfortu-
nately, the stated objective function was incorrect. That
error was corrected by Edgar and Hi mmel bl au (1988),
but they ignored the term involving the cost of the
ammoni a present in the feed gas. If this cost term is not
included in the optimization problem, the reverse
reaction may make the overall cost value negative. In the
following, we present the revised objective function:
f ( x , NN, ., T l, Tx)= 1.33563 X 107- 1.70843 I04NN,
+704. 09(T x - T0) (1)
- 699.27(T I - T~,)
- [3.45663 107+ 1.98365 109x] j~.
It is clear from the above expression that the objective
function depends on four variables: the reactor length x,
proportion of nitrogen NN:, the top temperature T x, the
feed gas temperature T I. In order to mai nt ai n the energy
balance of reactions, three coupled differential equations
must be satisfied. It turns out that three of above
variables can be eliminated by satisfying those energy
balance equations. Thus, practically, there is only one
design variable for a given top temperature.
Equal i t y constraints
The model of ammoni a reactor involves three energy
balance equations (Edgar and Himmelblau, 1988). First
of all, the increase in temperature of the feed gas, as it
goes up the reactor, must be according to the heat gained
from the reaction gas. Thereafter, the change in the
reaction gas temperature must be according to the heat
lost to the feed gas as well as the heat generated in the
reaction. The third differential equation is obtained from
the mass balance of nitrogen. The partial pressures
appearing in the differential equations are computed as
follows:
286NN.,
PN_,- 2.598NN: + 2NN,_'
PH_, = 3pN,,
286(2.23NN,0 -- 2u~,;)
Pun' = 2.598Nu:, + 2Nu:
The three differential equations are coupled to each
other. The boundary conditions are:
T](x=O)=To, T~(x=0)=T l, NN:(X=0)=701.2 kmol/(m2h).
In this paper, we study the effect of the top temperature
T o on the optimal reactor length. For each value of T 0, the
optimization algorithm is simulated and an optimal
reactor length is obtained. Before we present the
simulation results, let us mention the three inequality
constraints that limit the values of three of the design
variables.
Inequal i t y constraints
As considered in earlier studies, we set the lower and
upper bounds of the design variables as follows:
0.0-<Nu -<3220,400-<T~-800, 0. 0<- x- 10.
Since the reaction gas temperature (Tx) depends on the
nitrogen mass flow rate (NN:), feed gas temperature (T I)
and reactor length (x), explicit bounds on T~ are not
necessary.
Design of an ammonia synthesis reactor 89
800
700
mas s flow 600
rat e,
kml / m2"h 500
o r
temp., K
4OO
300
200
r e a c t i o n l~as t e mp
I I 1
0 2 4 6 8
r e a c t o r l e n g t h , m
Fig. 1. Reactor profiles at a top temperature of 694 K. (Both mass flow rate and temperature have the same range)
GE NE T I C A L G O R I T H MS NUME RI CAL S I MULATI ON AND RESULTS
Genetic algorithms (GAs) are search and optimization
procedures motivated by natural principles and selection
(Goldberg, 1989; Holland, 1975). GAs has been devel-
oped by John Holland of University of Michigan and
later modified by a number of researchers. Detailed
discussion of the working of GAs can be found in
Goldberg (1989). It will suffice here to mention that GAs
begin with a population of random solutions represented
in some string structures. Thereafter, three main opera-
tors (reproduction, crossover, and mutation) are repeat-
edly applied to create new and hopefully better popula-
tions. This procedure continues until some user-defined
termination criterion is satisfied. One reason of GA' s
popularity is that unlike many traditional optimization
methods, GAs demand less from the underlying prob-
lem:
GAs do not require the objective function to be
continuous and/or differentiable.
GAs do not require extensive problem formulation.
GAs are not sensitive to the starting point.
GAs usually do not get stuck into so-called local
optima.
GAs processing is inherently parallel, thereby making
the search process faster.
These characteristics enhance their application to a
broad spectrum of optimization problems and have been
found useful in many engineering design problems
(Belew and Booker, 1991; Goldberg, 1989; Grefenstette,
1985, 1987; Forrest, 1993). Although, to date, there
exists approximate mathematical analysis to explain why
GAs work, but like many other optimization methods for
solving NLP problems, GAs do not yet have a formal
mathematical convergence proof.
The equality constraints-three coupled ODEs-are
solved using Gear package of NAG library' s subroutine,
D02EBF, for various top temperatures of the reactor.
Mass flow rate of nitrogen, feed gas temperature and
reaction gas temperature at every 0.01 m of 10 m reactor
length are obtained. For a typical top temperature of 694
K, Fig. I shows their profiles along the length of the
reactor. In contrast, we observe that reverse reaction
starts below 666 K top temperature and the inequality
constraint for the feed gas temperature is violated.
Figure 2 shows the variation of the mass flow rate of
nitrogen and variation of T8 and T I along the reactor
length at a top temperature 664 K. It is clear that the
mass flow rate of nitrogen is increasing along the reactor
length and after certain length the solution of three
differential equations produces inexact flow rate. ~ The
feed gas temperature is higher than the reaction gas
temperature in most part of the reactor. These profiles
suggest that the reverse reaction is taking place at a top
temperature lower than 666 K.
We also observe that when the top temperature is
higher than 706 K, all three differential equations
become numerically instable. Therefore, it becomes
difficult to solve those ODEs for the complete reactor
length. Moreover, the solutions obtained from the ODEs
violate the inequality constraints for the feed gas
temperature. In order to find an optimal reactor length at
a wide range of top temperatures (from 666 to 706 K),
With an initial flow rate of 701.2 kmol/(sq.m-h) and with
125.7 kmol/(sq.m-h) of ammonia present in the feed gas, the
flow rate of nitrogen leaving the reactor must not be more than
826.9 kmol/(sq.m-h).
90
s. R. UPRETI and K. DEB
1400
1300
1200
m ~ ~ow
r a t e , 1100
k m l / m2 " h 1000
or
t e mp . , K 900
800
700
600
r e a c t i o n ga s t e r n p
l I I 1
0 2 4 6 8 I 0
r e a c t o r l e n g t h , m
Fig. 2. Reactor profiles at a top temperature of 664 K. (Reverse reaction occurs almost throughout the reactor length)
Table 1. Simulation results obtained using GAs and direct computations.
Top Temp K Optimal length Profit S/year xl0 '~ Top Temp K Optimal length Profit S/year xl0 -6
Enomer. m GAs m Enumer. m GAs m
664 0.63 0.64 1.69 686 5.31 5.32 3.72
666 0.63 0.64 1.71 688 5.31 5.32 3.83
668 5.31 5.32 3.21 690 5.32 5.33 3.96
670 5.31 5.32 3.26 692 5.32 5.33 4.09
672 5.31 5.32 3.30 694 5.32 5.33 4.23
674 5.31 5.32 3.36 696 5.32 5.33 4.37
676 5.31 5.32 3.39 698 5.32 5.33 4.49
678 5.31 5.32 3.43 700 5.32 5.33 4.59
680 5.31 5.32 3.48 702 5.32 5.33 4.67
682 5.31 5.32 3.54 704 5.32 5.33 4.73
684 5.31 5.32 3.62 706 5.30 5.33 4.77
we apply genetic algorithms to the above reactor model
at 22 different top temperatures. To have a least count of
0.01 m in the range 0- 10 m, the reactor length is
encoded in a ten-bit binary string. Roulette wheel
proportionate selection is applied for the reproduction
operation. A single-point crossover operator and a bit-
wise mutation operator are used. The following GA
parameters are used:
Crossover probability =0. 9 Mutation probability =0. 2
Population size = 25 Maxi mum generations = 25
Table 1 shows the optimal reactor length obtained at
different top temperatures using GAs as well as using an
exhaustive search method. In the latter method, the
economi c return is computed at thousand equi-spaced
points along the reactor length satisfying all equality and
inequality constraints. It is noteworthy that the latter
computations are performed onl y to verify the accuracy
of GA search method. It is interesting to observe that the
optimal reactor length remains virtually constant in the
range 668-706 K of top temperature. This reactor length
is lying in the range 5. 30-5. 33 m. Eymery (1964), in his
doctoral dissertation, documented industrial ammoni a
reactor design data. Above results are obtained with the
same feed gas composition and other inputs as men-
tioned in Eymery' s work. He reported that the typical
reactor length of industrial ammoni a reactors operating
under the similar conditions is 5.18 m. Our results agree
with his documented results. Moreover, the fact that the
optimal reactor length found in this paper is invariant
with respect to the top temperature agrees with the
industrial practice. It is also clear from the table that the
optimal profit increases monotonically for reactors
operating at higher top temperatures.
In order to investigate the effect of GA parameters on
the optimal reactor length, we have applied GAs with
three different initial populations. The progress of those
simulation runs is shown in Fig. 3. A top temperature of
694 K is considered. The results show that in all cases
GAs have been able to converge closer to the optimal
reactor length. In other GA simulations with different
parameter values, identical results were obtained.
One of the advantages of using GAs is that they
Design of an ammonia synthesis reactor 91
r e a c t o r
l e n g t h ,
m
5.45
5.35
5.3
5.25
5. 2 t seed = 0. 0001 0
i
seed = 0. 5000 I
5. 15 seed = 0. 8431 0
o p t i ma l l evel . . . .
5 . 1 ~ I i i t i i t J i
0 5 I 0 15 20 25 30 35 40 45
# of g e n e r a t i o n s
I I I I I I I I I
I
50
Fig. 3. Reactor lengths obtained from three different GA simulations.
pr of i t s ,
x l O- 6 $ / y r
5. 0
4.5 I
4.0
3. 5
3. 0
2.5
2. 0
1.5
1.0
0. 5
0. 0
0
_ , . . ' . . . . , . . . . ! . . . |
2 4 6 8 10
r e a c t o r l e n g t h , rn
Fig. 4. Profit from the reactor operation at different top temperatures.
usually do not get trapped into local optimal solutions. In
order to show the multimodality of the search space of
the above problem, we have also plotted the profit versus
reactor length in Fig. 4 at various top temperatures. The
figure shows that each profit function has about three
optimum points, of which one is the global optimum
point. Although the multimodality is not severe, the
results of the previous simulations show that in all cases
GAs did not get trapped into one of those two local
optimum solutions. This distinguishes GAs from many
traditional optimization methods. It is worth mentioning
here that i f a gradient-based optimization technique
(Reklaitis e t a l . , 1983) is used instead and an initial
guess of a reactor length of 1 m or so is used, the
algorithm may have got stuck at a solution with a much
lower profit. Another advantage of using GAs is their
inherent capability to better solve noisy and non-
stationary problems (Goldberg, 1989). GAs can be used
in the modelling of reactors, even in the presence of
inexact information of reactor parameters.
CONCLUSIONS
This paper solved a problem of optimal design of an
ammonia reactor using genetic algorithm (GA)---a new
yet potential search algorithm. In the range from 668 to
706 K operable range of top temperature of the reactor,
the profit corresponding to the optimal reactor length is
found to increase monotonically. Beyond 706 K top
temperature, the simulation of the reactor model is not
92
S. R. UPRETI and K. DEB
feasible. The optimal reactor length found using GAs
shoots suddenly at a top temperature of 668 K from 0.63
m to 5.31 m (probably due to the dominating reverse
reaction in the former case) and then remains more or
less constant. Typical economi c return from the reactor
operation with a top temperature of 694 K and 5.33 m
reactor length comes out to be 4.23 million dollars per
year.
Besides finding the optimal reactor length, this paper
has achi eved a number of other aspects related to
ammoni a reactor design. This paper has included a term
in the formulation of the obj ect i ve function, which was
ignored by Murase et al. (1970) and Edgar and
Hi mmel bl au (1988). The optimal results obtained with
the revised formulation are found to agree with industrial
practice as document ed by Eymery. Moreover, GAs have
been found to be suitable in the design of reactors which
are found to be multimodal in nature. These results are
encouragi ng and suggest the use of GAs in similar
reactor design problems.
REFERENCES
Belew R. and L. B. Booker (Eds.), Proceedings of the Fourth
International Conference on Genetic Algorithms. San Mateo:
Morgan Kaufmann ( 1991 ).
Deb K., Genetic algorithms for engineering design optimiza-
tion. In C. S. Krishnamoorthy (Ed.) Proceedings of the
Advanced Study Institute on Computational Methods for
Engineering Analysis and Design (pp. 12.1-12.25) (1993).
Edgar T. E and D. M. Himmelblau, Optimization of chemical
processes. New York: McGraw-Hill (1988).
Eymery J., Dynamic behavior of an ammonia synthesis reactor.
(D.Sc. thesis). MIT (1964).
Forrest S. (Ed.), Proceedings of the fifth international con-
ference on genetic algorithms. San Mateo, CA: Morgan
Kaufmann (1993).
Goldberg D. E., Genetic algorithms in search, optimization, and
machine learning. Reading, MA: Addison-Wesley (1989).
Grefenstette J. J. (Ed.), Proceedings of an international
conference on genetic algorithms and their applications.
Hillsdale, N.I: Lawrence Erlbaum Associates (1985).
Grefenstette J. J. (Ed.), Proceedings of the second international
conference on genetic algorithms. Hillsdale, N J: Lawrence
Erlbaum Associates (1987).
Holland J. H., Adaptation in natural and artificial systems. Ann
Arbor: University of Michigan Press (1975).
Murase A., H. L. Roberts and A. O. Converse, Optimal thermal
design of an autothermal ammonia synthesis reactor. Ind.
Eng. Chem. Process Des. Develop., 9, 503-513 (1970).
Rao S. S., Optimization theory and applications. New Delhi:
Wiley Eastern Limited (1984).
Reklaitis G. V., A. Ravindran and K. M. Ragsdell, Engineering
optimization-Methods and applications. New York: Wiley
(1983).
Vasantharajan S., J. Viswanathan and L. T. Beigler, Reduced
successive quadratic programming implementation for large
scale optimization problems with smaller degrees of free-
dom. Comp. Chem. Eng. 14(8), 907-915 (1990).

Anda mungkin juga menyukai