Computers and Chemical Engineering Vol. 4, pp. 2512.58 0 Pewmoo Press Ltd.. 1980. Printed in Great Britain
OPTIMAL WATER ALLOCATION IN A PETROLEUM REFINERY N. TAKAMA,T. KURIYAMA, K. SHIROKO and T. UMEDA ChiyodaChemicalEngineeringand ConstructionCo., Ltd., Yokhama,Japan (Received12 Ocfober 1979)
Abstract-A method for solving the planning problem of optimal water allocation is presented. All the alternative systems are combined into an integrated system by employing structure variables or split ratios at the point where a water stream is split into more than two streams. The values of structure variables are determined for given process conditions so as to minimize the total cost, subject to constraints derived from material balances and interrelationships among water-using units and wastewater-treating units. The optimization problem is solved by using the Complex method. The method is illustrated by its application to the water allocation problem in a petroleum refinery. Scope-In the last decade, a number of studies on wastewater reuse or optimal designs of wastewater-treating systems have been presented. Though those studies have received much attention, they have been carried out exclusively on wastewater-treating systems without paying attention to water-using systems. However, the authors’ extensive survey on the present status of water use in a petroleum refinery has shown that there is enough room to reduce a huge amount of both fresh water and wastewater. The reduction can be accomplished by optimizing water allocation in a total system consisting of water-using units and wastewater-treating units. In this paper, the problem of maximizing water reuse is considered as a problem of optimizing water allocation in a total system. Furthermore, the problem of determining a system structure is defined as a parameteroptimization problem by employing structure variables. Due to the approach, the difficulties associated with combinatorial problems are resolved. A planning problem of water allocation is discussed here under the assumption that process conditions are determined beforehand as the result of optimization in a design problem. Conemsions and SIgnhIcanc+The method is applied here to a simple but practical problem of optimizing water allocation in a petroleum refinery. Since the problem is a large dimensional and nonlinear problem with stringent inequality constraints, it is not practical to solve it by the exclusive use of mathematical programming methods. In this paper, the problem is transformed into a series of problems without inequality constraints by employing penalty function. In the course of optimization, a sequence of non-feasible points is generated. Therefore, difficulties associated with an initial search for feasible points are omitted and a feasible point is yielded by modifying the penalty function successively. The Complex method is, in general, inefficient in searching for an optimal point because of the premature termination on a nearly flat surface. However, the premature termination is avoided by reducing a system structure successively according to the intermediate results of optimization. INTRODUCTION
Water has been used in abundant quantities by chemical, petrochemical, petroleum refining and other process industries. However, in recent years, the increased cost of wastewater treatment to meet environmental requirements and the scarcity of less expensive industrial water have provided process industries with strong incentive to minimize the amount of water consumption and wastewater discharge. The major concern is to emphasize the importance of water reuse and a number of efforts have been made towards achieving the goal of extensive water reuse in various process industries. There have been presented many ideas for wastewater recovery and reuse in the petroleum refining industry [ l51. These papers have exclusively described wastewatertreating systems for the realization of zero discharge. As for the optimal design methods for wastewater-treating systems, several attempts have also been made by using CACE Vol. 4. No. 4-D
system approaches. The detailed review on these studies was made by Mishra et al.[6]. Much information on the optimization studies on process units for wastewater treatment can be acquired from this survey. In addition, there have been significant developments of the methods for processing system synthesis, such as those of heat exchangers and separation systems. A method of utilizing the system structure variables[7] is considered to be useful to eliminate difficulties due to combinatorial problems. The studies presented so far, however, only cover wastewater treating systems. The amount of wastewater was given beforehand and its reduction was not taken into consideration. As far as the authors know, the optimal design problem including water reuse for the total system consisting of water-using system and wastewater-treating system has not yet been solved. The authors have carried out an extensive study on the present status of water use in a typical petroleum
251
N. TAKAMA et al.
252
refinery[8]. As the result, it has been shown that there is enough room to reduce a large amount of wastewater by maximizing water reuse and wastewater recovery. Further increase in the efficiency of water use can be expected by the change of process conditions in the refinery. In solving such large complex problems, it has been found expedient to use a two-level approach. The two-level approach starts with decomposing the original large-scale and complex optimization problem into several smaller subproblems, and allocating functions of decision making for upper and lower levels, respectively. On the lower level, each subproblem is independently optimized for given condition at each step of iterations. Those conditions are determined on the upper level so as to optimize the preset objective function combining the objective functions of subproblems. Those problem and subproblems correspond to the problems on the planning and the design levels, respectively. For the system associated with water use and wastewater treatment, the overall optimization problem can be devided into two problems. One is to determine the optimal allocation of water to water-using and wastewater-treating units. The other is to determine optimal process conditions in those units for a given water allocation. The problem of optimizing water allocation corresponds to the planning problem on the upper level and the problem of optimizing process conditions in those units corresponds to the design problem on the lower level. In this paper, the planning problem is solved under the assumption that the process conditions are given beforehand.
discharge to the environment on the basis of the total system, the water reuse policy has to be determined so as to minimize the sum of the costs of fresh water and wastewater treatment. The amount of water used in a water-using subsystem is closely connected with the performance of the subsystem. Therefore, it is not appropriate to decrease the amount of water used in the water-using subsystem only from the viewpoint of water saving. As described in the preceding section, the amount of water used in the water-using subsystem is determined on the design level. The optimization problem considered here is to select the best system among all alternative systems. Figure 2 shows the general structure of the system under consideration, Among N subsystems, the subsystems 1 and N are an imaginary input and an output subsystems, respectively. The imaginary input subsystem is a source of fresh. water supplied to any subsystem. The imaginary output subsystem is a final holding basin which collects wastewater from all other subsystems and discharges it to the environment. Each subsystem has a mixing point and splitting point. A flow from any splitting point is directed to any other mixing point. The overall problem is defined as to determine both design variables of subsystems and structure variables in such a way that a given objective function is optimized. Mathematically the synthesis problem under consideration is defined as follows: Minimize N Isi, dij 3 fitui, vi, di,&) subject to
STATRMENT OF PROBLEM
In general, a system associated with water use in a petroleum refinery consists of two subsystems as shown in Fig. 1; one where water is used for petroleum refining and the other where wastewater is treated for reuse or
(2) Ui =
c
Sij ’ Vj
=I
TREATED
NON -TREATED
FRESH WATER
-
WATER
WATER
WATER USING
.
WASTEWATER .
SUBSYSTEM
TREATING
DISCHAKE
SUBSYSTEM
Fig. I. System for refinery water use and treatment.
0
WATER
USING
m
WASTEWATER
SUBSYSTEM TREATING
SUeSYSTEM
Fig. 2. General system structure for refinery water use and treatment.
(3)
Optimal water allocation in a petroleum refinery
2
OBJECTIVEFUNCTION &j
=
1
hi(Ui, Vi, di) 2 0
(9
0 s 6, 5 1
(6)
(i= 1, . . . . N,j=l,...,
gi(di*, Ui)
(8)
&j’Vj
sij = l
(11)
0 I &j I 1
(12)
N, j=l,...,
N-l
+x i=M+l
(17)
C,j+ C,.
The first and second terms on the r.h.s. are the annual
return on investment and the operating cost for the wastewater treating system, respectively. The constant A involved in the first term denotes a factor associated with the rate of return on investment. The last term in Eq. (17) is the cost for fresh water. SYSTEM MODEL
The system models expressing the behavior of the water-using and wastewater-treating subsystems are described by the following Eqs. (18) and (19). The water balance for the ith subsystem is represented by
Qi = ,g &jQj (i = 2,. . . , N)
hi(Xi,yi, di*) 2 0
(i=l,...,
x
(18)
(7)
subject to
$
N-l
N)
Minimize N {Sijldi*} z fi(% vit di*, &j)
Ui=$
For the present problem of optimizing water allocation, the objective function expressing the total annual cost is defined by
C=h i=M+I Cui
where ui and vi are the input and output state vectors of the ith subsystem, respectively. di is a design vector of the ith subsystem and Sij is a split ratio from the jth subsystem to the ith subsystem. Equation (2) expresses the behavior of the ith subsystem. Equations (3) and (4) are material balance relationships at mixing and splitting points, respectively. Inequality constraints (5) and (6) are imposed to define an admissible region. The problem defined by Eqs. (l)-(6) is reformulated by decomposing into the planning and design problems along the line described in the preceding section. Planning problem: to optimize the allocation of water for given design variables of subsystems.
Vi =
253
where Qi is the flow rate of effluent stream from the ith subsystem. The amount of water used in each refining process is determined beforehand, as described in the preceding section. The flow rates of efauent stream from the subsystem, Qi’s (i = 2,. . . , M), are given constants in Eq. (18), where A4 denotes the number of water-using subsystems including the imaginary input subsystem. The mass balance relationship of the kth pollutant in the effluent stream from the ith pollutant in the effluent stream from the ith subsystem is given by Qi’~~=(l-r;*),~($.Qj.~;*)tPi
N)
(19)
(i = 2,. . . , N, k = 1,. . . , K)
where di*‘S are given as a solution of the design problem on the lower level. Design problem: to optimize process conditions for the ith subproblem for a given water allocation.
where Pi” and ri“ respectively, are the rate of generation and the removal ratio of the kth pollutant at the ith subsystem. In the planning problem, the values for these parameters are assumed to be constant. In addition, since pollutants are generated in water-using subsystems and (13) are removed in wastewater-treating subsystems, the following conditions are derived.
subject to vi = gi(di, ni)
(14)
Pi“=O,
Pik=O(i=M+l,...,
r,“=O, Ui=f
&j*‘Vj ,=I
hi(xi, yipdi) 2 0
r/‘=O(i=l,...,
N,k=l,...,
K)
(20)
M,-k=l,...,
K).
(21)
(19 (16)
for i = 1, . . . , N, where &*‘S are given as a solution of the planning problem on the upper level. The present paper is confined to the planning problem of optimizing water allocation under the assumption that the process conditions of subsystems are given beforehand. The problem considered here is not so large in scale as to require the linearization for the use of linear programming method such as in the case of overall refinery planning. However, the integration of many alternative systems makes the problem too complex to carry out nonlinear simulation. Therefore, a nonlinear objective function and linearized system models are employed here.
Moreover, the feed stream to each subsystem has to satisfy the quality acceptable for the purposes such as petroleum refining and wastewater treatment. In particular, the feed water to the imaginary output subsystem should satisfy the current national or local discharge regulations. In this connection, the following constraint associated with the kth pollutant is imposed on each influent stream to the ith subsystem:
(22) (i = 2,. . . , N, k = 1,. . . , K) where zik is the limitation for the concentration of the kth pollutant in the stream influent to the ith subsystem.
N. TAKAMA et al.
254 SOLUTION h5’ROD
In order to solve the optimization problem, the simulation of the total system should be carried out by using the system models described above. In the case of lineal&d models, computation can be performed with relative ease. By using matrix notation, Eqs. (20) and (21) are represented below.
sequence of modified problems without the inequality constraints by introducing a penalty and by reducing a system structure successively. The penalty is defined by (25) where pik is zero if the inequality constraint defined by Eq. (22) is satisfied, and unity otherwise. By adding the penalty, the objective function becomes F=Cta.p
. r pIki (24
When the value of 8, is given, Eq. (23) can be easily solved to obtain the values of dependent variables, Qi, by using the Gauss elimination method. In Eq. (24), the value of .r: is obtained for given values of &j, Qivrf and Pi”. Those values have to satisfy the inequality constraints defined by Eq. (22). However, the inequality constraints are stringent in the problem considered here. Therefore, it is practical to transform the problem into a
where C is the total annual cost defined by Eq. (19). a is a weighting parameter successively increased from iteration to iteration. It can be shown theoretically that, as a +m, an unconstrained optimum of F will correspond to a constrained optimum of C[9]. For a given value of the parameter, a, the minimization of the objective function is carried out by using the Complex method. Since a sequence of non-feasible points is generated in the course of optimization, an initial search for a feasible point can be omitted. When a convergence is obtained by using the Complex method, the reduction of a system structure is made on the basis of the result. That is, streams with negligibly small flow rates are automatically eliminated. Then, the value of parameter, a, is increased and the minimization of a modified objective function is carried out for a reduced system structure. By repeating these procedures, a feasible solution is obtained. The computational procedure of the method is shown in Fig. 3. Since the detailed description on the Complex method has already been made elsewhere[lO] by one of the authors, the further description is not made here.
r
Modify the pafometer dll*l)
by -.-.Oplimizatian Complex method
YeI -.-.-
.-.piI
(26)
F Reduwthe@em structure
Fig. 3. Computational procedure for optimization.
Optimalwater allocationin a petroleum refinery lLLUSl’RATtVE EXAMPLE The planning problem of optimizing water allocation in a petroleum refinery is considered here as a simple but practical example. The system consists of three waterusing and three wastewater-treating subsystems. The water-using subsystems include nearly all processes in the refinery. One subsystem consists of various processes in which steam is used. This subsystem requires strict quality of supplied water and discharges oily wastewater with a slight contamination. Another subsystem consists of hydrodesulfurizing processes in which injection water is used. This subsystem requires mild quality of supplied water and discharges oily wastewater with considerable hydrogen sulfide. The third subsystem is a desalter included in a crude distillation unit. This subsystem requires mild quality of supplied water and discharges oily wastewater with a slight contamination. Three major pollutants such as hydrogen sulfide, oil, and suspended solid are dealt with in the wastewater-treating subsystem which consists of the following processes: a
25s
foul water, stripping unit, an oil separating unit, and a coagulating, sedimentating, and filtrating unit. Numerical computations are carried out by using the result of the aforesaid study on water use in a petroleum refinery. The total amount of water required by the water-using subsystems involves 85% of the total refinery water excluding cooling water and heating steam. Since cooling water and heating steam are commonly reused with or without a simple treatment, they are not considered here. In the application of the method, it is practical to rule out meaningless streams such as a fresh water stream directed to a wastewatertreating subsystem and a recycling stream around a single subsystem. For the specified conditions presented in Table 1, optimal values of split ratios are determined so as to minimize the annual cost of the system. However, some of the ratios are dependent variables because the water requirement of each water-using subsystem is given beforehand. The optimal result is shown in Table 2,
Table l(a). Specifiedconditionsfor optimization SUBSYSTEM
DATA
(1)
water flow rate [ton/hr]
@Fresh
water source
Pollutant limitation
Pollutant generation rate [ton/hrl (Oil) (SS) (H2S)
[Ppnl
(H2S)
(Oil)
(SS)
l
0 Steam strippers
45.8
0.0179
0.0005
0.0012
0
0
0
@HDS high pressure sections
32.7
0.536
0.0033
0.0005
500
20
50
@ Deealter
56.5
0.0013
0.0057
0.0020
20
120
50
Note
: Not specified
1)
*
2)
Fresh water contains no pollutant.
Table l(b). Specifiedconditionsfor optimization SUBSYSTEM
Foul water stripper
@ oil @
(2)
water flow rate Lton/hrl
Subsystem name
@
DATA
l
Removal ratio [%I (H2S) (Oil) 6s)
99.9
0
0
separator
*
0
95
20
Coagulating, sedimentatin, .5 Filtrating units
t
90
90
97
_
_
@ Final basin of
l
wastewater
Note
: Not specified
1)
l
2)
Fresh water contains no pollutant
Pollutant limitation LPpnl (Oil) (SS) (H2S)
2
2
5
N. TAKAMAet al.
256
Table l(c). Specified conditions for optimization ECONOMIC DATA
rate
return
[al
13.15
operating hour
[hr/yearl
8,000
Subsystem cost
InvestnlentCOst IS1
operatinb cat
16,800 x Q".7
1.0
Annual
Of
0 0
4,800 x Qoe7
0
12,600 x Q"'7
IS/hrl
XQ
0 0.0067 x Q
Utility cost 0.30
IS/ton1
Table 2. Comparison of optimal and conventional cases optima1 case
Conventional case
Objective function
[103S/year1
707
1,550
Investment COst
l103$1
676
1,060
Operating cost
[103S/year1
371
1,087
Fresh water cost
I103S/yearl
246
323
Pollutant in supplied [ppm] water to subsystem
(H2S) (Oil)
0
0
0
0
390.0 10.0
GS)
(H2S) (Oil)
ISS)
0
0
0
25.0
0
0
0
0
0
0.0
0.0
0.0
0
0
0
v
2.0
1.9
0.9
0.4
0.4
0.6
@ P-l
(TON/HRI
32.7
Fig. 4. Optimal flow scheme.
together with the result of the conventional case. The flow schemes for the optimal and the conventional cases are shown in Figs. 4 and 5, respectively. The computing time to obtain an optimal solution is about 4Oseconds by the IBM S370/158-U35 machine. The application of the method has given great improvements as shown below:
l The fresh water requirement is decreased by about 24% that for the conventional case. 0 Water reuse is practiced without any treatment so as to reduce the amount of fresh water and wastewater. 0 Water is treated by less expensive treatments rather than expensive treatment so as to reduce the cost for wastewater treatment.
l The annual cost is decreased by about 55% of that for the conventional case.
The result of example shows that it is possible to minimize the sum of costs for fresh water and for wastewater treatment by using the method.
Optimal water allocation in a petroleum refinery
251
Fig. 5. Conventional flow scheme.
Table 3. Process of convergence cost
Iteration
Weight for Penalty
IS/year1
549 x 103
Note
657
3.26
5
NO. of streams
a
29
*(I
24
740
0.308
52
.a
23
822
0.224
53
*a
20
797
0.0442
54
*cx
17
906
0.0118
55
*LY
16
886
0.00003
56 .a
14
854
0.0247
57 *a
14
710
0.0
58
.a
12
707
0.0
59
*a
10
707
0.0
51O.a
10
707
0.0
511.a
10
1)
Penalty
is defined
2)
(I = 1.0 x 1016
by Equation(25).
DISCUS!SlON
Since the constraints associated with the problem considered here are quite stringent, the problem is transformed into a sequence of unconstrained problems by introducing a penalty function. As shown in Table 3, the method generates a non-feasible sequence of search points in the course of optimization. Due to the nonfeasible approach, difficulties associated with an initial search for feasible points are avoided. The penalty prevents the search points from getting too far from the feasible region. Furthermore, the method yields a feasible solution by increasing successively the weighting parameter of the penalty denoted by a in Eq. (26). While the value of parameter, a, is relatively small, the solution is sought in favor of minimizing the cost rather than minimizing the penalty. On the contrary while a is relatively large, the solution is sought so as to minimize the penalty and finally to obtain a feasible solution. Moreover, the successive use of the penalty is combined with the successive reduction of a system structure. This reduction is accomplished by the automatic elimination of negligible streams so as to reflects the
results obtained for the previous values of a. Initial points for the next iteration are generated arbitrarily on the basis of the reduced structure. The search for an optimal point is carried out by using the Complex method. The Complex method is, in general, inefficient because the simplex formed with search points is contracted for the search on a nearly flat surface. However, the successive reduction of system structure prevents the search by using the Complex method from premature termination. Complex and huge-dimensioned problems such as the problem described here have generally a multi-modal characteristic. For such cases, direct search methods including the Complex method cannot always obtain a globally optimal solution. The global optimal point can be sought by repeating a number of computations starting from different initial points. Acknowledgement-The authors would like to acknowledge Chiyoda Chemical Engineering and Construction Co., Ltd. for the support of the present study and the permission to publish this paper.
N.
258
TAKAMA et al.
NOMENCLATURE
c Coi C,, C,. di F i
M N P Pi”
Qi r,’ u, vi x;
Zik
annual cost
investment cost for the ith subsystem annual operating cost for the ith subsystem fresh water cost design vector in the ith subsystem modified objective function including the penalty objective function for the ith subsystem number of pollutants number of water-using subsystems including the imaginary input subsystem number of subsystems in the total system penalty associated with constraints defining the acceptable quality of influent streams generation rate of the kth pollutant in the ith subsystem flow rate of effluent stream from the ith subsystem removal ratio of the kth pollutant in the ith subsystem input state vector in the ith subsystem output state vector in the ith subsystem concentration of the kth pollutant in the effluent stream from the ith subsystem concentration limitation for the kth pollutant in the influent stream to the ith subsystem
Greek symbols
a weighting parameter associated with the penalty Sir split ratio of the stream from the jth subsystem to the ith subsystem A factor associated with an annual fixed cost
REFERENCES
I. B. A. Carnes, D. L. Ford & S. 0. Brady, Treatment of refinery wastewaters for reuse. Nut. Con!. Complete Water Reuse, Washington DC. (1973).
2. V. Skylov & R. A. Stenzel, Reuse of wastewaters-possibihties and problems. Proceedings of the Workshop (AZChE), Vol. 7 (1974). 3. R. W. Hospondarec & S. J. Thomson, Oil steam system for wastewater reuse. Proceedings of the Workshop (AZChE), Vol. 7 (1974). 4. M. Sane, U. S. Atkins & Partners, Industrial water management. ht. Chern. Engng Symp. Series No. 52 (1977). 5. D. Anderson, Practical aspect of industrial water reuse. Znt. Chem. Engng Symp. Series No. 52 (1977).
6. P. N. Mishra, L. T. Fan & L. E. Erickson, Application of mathematical optimization techniques in computer aided design of wastewater treatment systems. Water-1974 (II), AZChE Symp. Series 71, 145(1975). 7. T. Umeda, A. Hirai & A. Ichikawa, Synthesis of optimal processing system by an integrated approach. Chem. Engng Sci. 27, (1972). 8. T. Kuriyama, N. Takama, K. Shiroko & T. Umeda, Optimizing water reuse in a petroleum refinery. PAChEC, Denver (1977). 9. D. Davies & W. H. Swarm, Review of constrained optimization. Optimization (Ed. R. Fletcher), Academic Press, London (1978). IO. T. Umeda, Optimal design of an absorber-stripper system. Ind., Engng Chem. Proc. Des. L&w. 8 (1%9).