Optimal Hydrate Inhibition Policies with the Aid of Neural Networks

development and application of neural networks for the prediction and optimization of natural- ... inhibition effectiveness of methanol was more than ...
38 downloads 0 Views 119KB Size
Energy & Fuels 1999, 13, 105-113

105

Optimal Hydrate Inhibition Policies with the Aid of Neural Networks Ahmed Elgibaly* and Ali Elkamel College of Engineering and Petroleum, University of Kuwait, P.O. Box 5969, Safat 13060, Kuwait Received May 28, 1998. Revised Manuscript Received September 25, 1998

Hydrates are known to occur in a variety of natural-gas handling facilities and processing equipment in oil fields, refineries, and chemical plants when natural gas and water coexist at elevated pressure and reduced temperature. Prevention of hydrate formation costs large amounts of capital and results in large operating expenses. Hydrate inhibition using chemical inhibitors is still the most widely used method. Accurate prediction of hydrate inhibition is required for cost-effective design and operation. Available models have limitations in ranges of application and types and compositions of the fluids and inhibitors used. This paper describes the development and application of neural networks for the prediction and optimization of naturalgas hydrate inhibition. Neural network models have been used to accurately determine the temperature depression of gas hydrates for a variety of types and concentrations of inhibitors. Experimental data covering wide ranges of hydrate formation conditions, gas compositions, and concentrations of various types of inhibitors have been used in model validation. The factors that may affect the inhibition process, such as gas gravity and pressure, were investigated. An optimization study has been carried out on the selection of inhibitor type and concentration using the developed neural network models. Optimization was based on economical and technical performance considerations concerning inhibitor losses in vapor and liquid hydrocarbons. The results indicate that optimal design depends on water content, operating conditions of pressure and temperature, and gas composition. Optimized hydrate inhibition strategies have been recommended for various gas composition systems.

Introduction Hydrate formation in natural-gas and oil production surface facilities is a challenging problem in the oil industry. Gas hydrate is a common occurrence in many locations such as gas/oil separators, gas scrubbers, knockout vessels, condensate recovery units in most of the gathering centers and liquefied petroleum gas plants, and downstream of the wellhead chokes and flow lines. It leads to operational problems and a drop in production performance. A major concern for most of the oil-producing and -manufacturing companies is to develop a sound design and optimum operational strategy for hydrate prevention. Hydrate formation can be controlled by one of the following processes: (a) removal of water from the system; (b) changing the system pressure and/or temperature that can avoid hydrate formation; (c) modifying the hydrate crystal growth by injecting kinetic inhibitors; and (d) shifting the hydrate thermodynamic phaseequilibrium curve to higher pressure and lower temperature, by injecting inhibitors such as alcohols, glycols, or electrolytes, so that hydrate will not form. The first two processes may not be practically possible for economical and/or operational reasons. The water present with natural-gas and oil-well streams is often saline, * Corresponding author. Current address: College of Petroleum and Mining Engineering, Suez, Egypt.

and the salts dissolved in it can inhibit hydrate formation if properly planned. Inhibiting the hydrate formation rate with kinetic chemicals such as polymers and surfactants1,2 and by kinetic thermodynamic hydrate inhibitors,3-6 added to the system in small quantities seems interesting. Yet, such process has not been considered a proven technology in the natural-gas and oil industry.7,8 Chemical Inhibitors A common and effective way to prevent hydrate formation in natural-gas-handling and -production equipment is to inject chemical inhibitors and/or aqueous (1) Englezos, P. Ind. Eng. Chem. Res. 1992, 31, 2232-2237. (2) Kelland, M. A.; Svartaas, T. M.; Dybvik, L. A. Control of Hydrate Formation by Surfactants and Polymers. SPE-28506 paper presented at the SPE 69th Annual Technical Conference and Exhibition, New Orleans, LA, Sept. 25-28, 1994. (3) Yousif, M. H. The Kinetics oh Hydrate Formation, SPE-28479 paper presented at the SPE 69th Annual Technical Conference and Exhibition, New Orleans, LA, Sept. 25-28, 1994. (4) Kalbus, J. S.; Christiansen, R. L.; Sloan, E. D., Jr. Identifying Inhibitors of Hydrate Formation Rate with Viscometric Experiments. SPE-30642 paper presented at the SPE Annual Technical Conference and Exhibition, Dallas, TX, Oct. 25-28, 1995. (5) Notz, P. K.; Bumgardner, S. B.; Schaneman, B. D.; Todd, J. L. SPE Prod. Facil. 1996, 256-260. (6) Fadnes, F. H. Fluid Phase Equilib. 1996, 117, 186-192. (7) Lingelem, M. N.; Majeed, A. I. Trans. Inst. Chem. Eng. 1992, 70, 38-42. (8) Peavy, M. A.; Cayias, J. L. J. Pet. Technol. 1995, 330-331.

10.1021/ef980129i CCC: $18.00 © 1999 American Chemical Society Published on Web 11/20/1998

106 Energy & Fuels, Vol. 13, No. 1, 1999

electrolyte solutions. Methanol is less expensive than alumina or molecular sieves catalysts used for removing gas moisture.9 Ng and Robinson10 found that the inhibition effectiveness of methanol was more than that of an equivalent weight fraction of glycol in water. Nelson11 indicated that methanol may be less expensive than glycol. Katz12 concluded that the inhibition effectiveness of alcohols decreases with volatility, i.e., methanol > ethanol > 2-propanol. Because of its high volatility, methanol is lost in the vapor phase. It also dissolves in hydrocarbon liquids. It was indicated that methanol and several alcohols could increase the temperature of hydrate formation at concentrations less than 5 wt %. This observation has been studied by several investigators.13-18 The glycols have stronger hydrogen bonds with water due to the presence of more hydroxyl groups than alcohols. They are also less volatile because of their higher molecular weights. Thus, they can be regenerated and recycled more easily than alcohols. The inhibiting action of electrolytes is different to some extent from that of alcohols and glycols. Englezos and Bishnoi,19 Englezos,1 and Hutz and Englezos20 studied the gas-hydrate formation in aqueous electrolyte solutions. Recently, Tohidi et al.21-24 investigated the inhibiting effect of the electrolytes in gas and oil pipelines and well streams. In all studies, data are reported on the inhibiting effect of methanol, ethylene glycol, ethanol, NaCl, and CaCl2 for given system conditions. Makogon13 argued that the pressure has a large effect on the effectiveness of the inhibition process. For methanol, he found that as the pressure is lowered, the depression of the hydrate formation temperature increased. For electrolytes (e.g., CaCl2), when the pressure increases, the effectiveness of these electrolytes (9) Nielsen, R. B.; Bucklin, R. W. Hydrocarbon Process. 1983, 7178. (10) Ng, H.-J.; Robinson, D. B. Equilibrium Phase Compositions and Hydrating Conditions in Systems Containing Methanol, Light Hydrocarbons, Carbon Dioxide and Hydrogen Sulfide; Research Report RR66; Gas Processor Association: Tulsa, OK, 1983. (11) Nelson, K. Hydrocarbon Process. 1973, 161-163. (12) Katz, D. L.; Cornell, D.; Kobayashi, R.; Poettmann, F. H.; Vary, J. A.; Elenbaas, J. R.; Weinaug, CF. Handbook of Natural Gas Engineering; McGraw-Hill Book Co., Inc.: New York, 1959; p 802. (13) Makogon, Y. F. Hydrates of Natural Gas; PennWell Books: Tulsa, OK, 1981; p 131. (14) Berecz, E.; Balla-Achs, M. Gas Hydrates, Studies in Inorganic Chemistry; Elsevier: New York, 1983; Vol 4, p 343. (15) Nakayama, H.; Hashimoto, M. Bull. Chem. Soc. Jpn. 1980, 53, 2427-2433. (16) Davidson, D. W.; Gough, S. R.; Ripmeester, J. A.; Nakayama, H. Can. J. Chem. 1981, 59, 2587-2590. (17) Svartas, T. M. Overview of Hydrate Research at RogalandsForskining. Presented at the BHRA Conference on Operational Consequences of Hydrate Formation and Inhibition Offshore, Cranfield, U.K., Nov. 3, 1988. (18) Sloan, E. D., Jr. Clathrate Hydrates of Natural Gas; Marcel Dekker Inc.: New York, 1990; pp 285-386. (19) Englezos, P.; Bishnoi, P. R. AIChE J. 1988, 34 (10), 1718-1721. (20) Hutz, U.; Englezos, P. Fluid Phase Equilibr. 1996, 117, 178185. (21) Tohidi, B.; Danesh, A.; Burgass, R. W.; Todd, A. C. Hydrates Formed in Unprocessed Wellstreams. SPE-28478 paper presented at the 69th SPE Annual Technical Conference and Exhibition, New Orleans, LA, Sept. 25-28, 1994. (22) Tohidi, B. Phase Equilibria in the Presence of Saline Water Systems and Its Application to the Hydrate Inhibition Effect of Produced Water. SPE-28884 paper presented at the European Petroleum Conference, London, Oct. 25-27, 1994. (23) Tohidi, B.; Danesh, A.; Todd, A. C. Chem. Eng. Res. and Des. 1995, 73(A), 464-72. (24) Tohidi, B.; Danesh, A.; Todd, A. C.; Burgass, R. W. SPE Prod. Facil. 1996, 69-76.

Elgibaly and Elkamel

decreases, but having reached a minimum, it rises slightly again. From the above review, it can be noted that little experimental data are available in the literature on the combined effect of mixtures of alcohols, glycols, and electrolytes on the hydrate inhibition process. Nonetheless, some attempts were reported such as that on methanol and nonhydrate-forming hydrocarbons25 and salt mixtures.19 Also, it appears that the effect of system pressure, temperature, and composition on inhibition received little attention. Song and Kobayashi26 indicated that both methanol and ethylene glycol inhibitors exhibited minima in hydrate depression curves at high inhibitor concentrations but not at low inhibitor concentrations. The latter behavior at low inhibitor concentrations differs both qualitatively and quantitatively from that presented by Makogon.13 In the present work, only the studies on the effect of commercial inhibitors (MeOH, EtOH, and EG) and electrolytes (NaCl and CaCl2) are investigated. Sloan18 quoted the data about the effect of such materials on hydrate formation of single, binary, and multicomponent systems. One of the major objectives of the present study is to develop a precise predictive method for determining the inhibitor concentration. The method is based on training a neural network on updated experimental data. The effect of pressure and composition on the effectiveness of inhibition by different chemicals has been investigated. The ultimate goal is to focus on the optimal dose and type of individual or cocktail of inhibitors and electrolyte solutions.

Previous Hydrate Inhibition Models The available models for predicting hydrate inhibition can be categorized in two major groups: (a) the empirical models and (b) the statistical mechanical models. (a) Empirical Models. The first empirical model was that developed by Hammerschmidt27 for predicting the depression of the hydrate-forming temperature given by the following equation

∆T )

KW MW(100 - W)

(1)

where ∆T is the reduction in hydrate-forming temperature, °F, W is the weight percent of inhibitor, MW is the molecular weight of the inhibitor, and K is a constant depending on the type of inhibitor solution. K is 2335 for methanol, ethanol, 2-propanol, and ammonia in concentrations from 5 to 20 wt %,18 4000 for ethylene glycol up to 60 wt %,28 and 2320 for NaCl.13 Scauzillo25 verified the validity of the equation (with K ) 2335) to diethylene glycol up to 42.5 wt %. However, Song and Kobayashi26 showed that Hammerschmidt’s correlation was inapplicable for high inhibitor concentrations and high pressures. (25) Scauzillo, F. R. Chem. Eng. Prog. 1956, 52, 324-328. (26) Song, K. Y.; Kobayashi, R. Fluid Phase Equilib. 1989, 47, 295308. (27) Hammerschmidt, E. G. West. Gas 1939, 15, (5), 30-34. (28) Townsend, F. M.; Reid, L. S. Hydrate Control in Natural Gas Systems; Laurance Reid Associates, Inc.: OK, 1978.

Optimal Hydrate Inhibition Policies

Energy & Fuels, Vol. 13, No. 1, 1999 107

In another correlation, Nielsen and Bucklin9 provided the following equation that can be used for methanol of concentrations as much as 0.8 mol fraction and for temperatures as low as 165 K

∆T ) -129.6 ln(100 - X)

(2)

where ∆T is the temperature depression, °F, and X is the mole percent of methanol. Nielsen and Bucklin9 indicated that the relationship between the hydrate temperature depression, ∆T in °F, and the ice temperature depression, ∆T′ in °F, is given by the following equation regardless of the inhibitor type

∆T ) 0.65∆T′

(3)

This equation is based on the assumption that the phase-equilibrium curve will be parallel to that before the shift caused by inhibitor addition, i.e., it neglects the effect of pressure on hydrate temperature depression. Sloan18 indicated that the equation fit alcohols and glycols of concentrations up to 20 wt % well. The salinity of the water reduces the temperatures at which natural gases form hydrates. The following equation gives the values of temperature depression that account for the effect of dissolved solids in water.29

∆T ) AS + BS2 + CS3

(4)

where A ) 2.20919 - 10.5746γg + 12.1601γg2, B ) -0.106056 + 0.722692γg - 0.85093γg2, and C ) 0.00347221 - 0.0165564γg + 0.019764γg2. S is the salinity in wt %. The equation was used to estimate the depression in the hydrate-forming temperature, ∆T in °F, for natural gases of specific gravities lower than 0.68 and brines of salinities to 20 wt %. It is noted that the commercial simulation packages available (such as HYSIM, PROCESS, EQUIPHASE, and PIPEPHASE) are based on empirical relationships for predicting the effect of inhibitors on hydrate formation.30 At the time which these empirical formulas were presented, they were developed using relatively little data on simple systems. Their application to more complex gas systems, such as natural gas, may lead to serious errors.26 (b) Statistical Mechanical Models. The models in this group are generally based on combining the following thermodynamic models: the thermostatistical model proposed by van der Waals and Platteeuw31 for the hydrate phase, the equation of state for the vapor phase, and a freezing-point depression expression for the aqueous phase with inhibitor. The coefficients in the models were adjusted experimentally. Derivation and modifications made for this type of models are discussed elsewhere.18 Recent attempts have been performed by several investigators to validate the capability of such models for predicting hydrate inhibition of aqueous (29) Katz, D. L. Trans. AIME 1945, 160, 140-144. (30) Notz, P. K.; Burke, N. E.; Hawker, P. C. Measurement and Prediction of Hydrate Formation Conditions for Dry Gas, Gas Condensate, and Black Oil Reservoirs; OTC 30642 paper presented at the 23rd Annual OTC, Houston, TX, May 6-9, 1991. (31) van der Waals, J. H.; Platteeuw, J. C. Adv. Chem. Phys. 1959, 11, 1-57.

electrolyte solutions.1,19,21-24,32 Simulation packages such as Aqua*Sim,33 CSMHYD,34 Equi-Phase,35 etc., were implemented to predict hydrate inhibition when inhibitors are present. Wilson et al.36 compared the Hammerschmidt and Aqua*Sim models for predicting the minimum methanol concentration. They found that the Hammerschmidt correlation was considerably more conservative than Aqua*Sim for both minimum concentration and required injection rate. Both Wilson et al.36 and Robinson et al.35 emphasized the need for more reliable data to improve the validity of the computer predictions. The serious discrepancies in the results obtained by the available models point to the need for the development of a more accurate model for the prediction of hydrate inhibition. Furthermore, the current techniques used in the design and optimization over the wide operating conditions require accurate prediction models. Artificial Neural Network Models In developing an empirical model by nonlinear regression for a large amount of data, the problem becomes difficult when the functional form is not known a priori and the number of parameters involved is large. It would be a tedious and time-consuming task to determine the appropriate correlation and solve for the associated parameters. The use of artificial neural networks (ANNs) can considerably reduce this effort. ANNs represent a recently developed tool that can be employed for recognition of functional forms. ANNs have been successfully utilized in many applications in the petroleum industry. They are more suitable than empirical models for processing noisy, incomplete, or inconsistent data. They are also capable of storing, accessing, and indexing the inherent behavior to a large amount of data. ANNs employ the error back-propagation technique to supervise the learning or training process, which links the input and output variables. The procedure is accomplished by iteratively adjusting the strength or weights of the connections between the nodes to optimum values. In our earlier work,37 we have developed neural network models for predicting the hydrate formation pressure as a function of temperature and gas composition. These models were compared to existing correlations and also to experimental data and were found to give good estimates. In the present work, we extend on our earlier work and will develop neural network (32) Avlonitis, D.; Todd, A. C.; Danesh, A. A Rigorous Method for the Prediction of Gas Hydrate Inhibition by Methanol in Multicomponent Systems. Proceedings of the 1st International Offshore and Polar Engineering Conference, Edinburgh, U.K., August 11-16, 1991. (33) Wagner, J.; Erbar, R. C.; Majeed, A. I. AQUA*SIM Phase Equilibria and Hydrate Inhibition Using the PFGC Equation of State. Proceedings of the 64th Annual GPA Convention, Houston, TX, March 18-20, 1985, 129-136. (34) Sloan, E. D., Jr. The Colorado School of Mines Hydrate Program; Proceedings of the 64th Annual GPA Convention, Houston, TX, March 18-20, 1985, p 125. (35) Robinson, D. B.; Ng, H. J.; Chen, C.-J. The Measurement and Prediction of the Formation and Inhibition of Hydrates in Hydrocarbon Systems. Proceedings of the 66th Annual Convention, Denver, CO, March 16-18, 1987; pp 154-164. (36) Wilson, A.; Strange, E.; Geothe, A.; Elliot, D. G. Hydrate Predictions: Importance of GPA Research. Proceedings of the 64th Annual GPA Convention Houston, TX, March 18-20, 1985, pp 155160. (37) Elgibaly, A.; Elkamel, A. Fluid Phase Equilib. 1998, in press.

108 Energy & Fuels, Vol. 13, No. 1, 1999

Elgibaly and Elkamel

neural network model that is developed here is valid for a more extended range of conditions and also gives superior predictions, as discussed later in this paper. The previous neural network model can be used to furnish hydrate formation temperatures for a given gas (pure or mixture) with and without the presence of inhibitors. These two temperatures can then be compared in order to estimate the inhibition depression temperature. Another set of neural network models was also developed that will predict the amount of inhibitor that is required for a given gas composition (or gas gravity), a given system pressure, and a desired temperature depression. The models based on gas composition can be represented as

.. .

.. .

Figure 1. Schematic of a typical feed-forward neural network for hydrate inhibition prediction.

models that will be utilized to predict the temperature depression for a given amount of inhibitors. In addition, neural network models that determine the amount of inhibitor as a function of gas composition, system pressure, and the desired temperature depression are developed. These latter models are integrated within an optimization strategy in order to determine the best inhibition policy for a given situation. To determine the temperature depression for a given inhibitor, a comprehensive neural network model that determines the hydrate formation temperature must be developed. The temperature with and without the use of inhibitors for a given pure gas or gas mixture are then compared, and the depression temperature is calculated. To develop a neural network model for temperature prediction, various architectures have been attempted to achieve the highest accuracy. It was found that a one-hidden layer network gave good predictions (Figure 1). The number of nodes or neurons in the hidden layer was varied until a reasonable accuracy has been established, whereas the nodes in the first and last layers were fixed to receive input and deliver output, respectively. The weights were organized accordingly among the layers. The prediction of the network can be written in symbolic form as

T ) fo(P,yi,Wj) for i ) 1, 2, ..., n and j )1, 2, ..., 5

(5)

where P is the pressure, yi denotes the gas composition in which the hydrocarbon (C1-C4) and non-hydrocarbon (CO2, H2S, and N) hydrate formers as well as the hydrocarbon nonhydrate formers such as isopentane, n-pentane (lumped as pentane), and hexane plus were collectively included, and Wj is the weight percent of the inhibitors: methanol, sodium chloride, ethylene glycol, calcium chloride, and ethanol. The only available model in the literature about temperature prediction is that of Kobayashi et al.38 This model is an empirical equation and is listed in detail in the Appendix. It is not recommended for temperatures above 62 °F, pressures above 1500 psia, and gas gravities above 0.9. The (38) Kobayashi, R.; Kyoo, Y. S.; Sloan, D. E. Phase Behavior of Water/Hydrocarbon Systems; In Petroleum Engineering Handbook; Bradley, H. B., Ed.; SPE: Dallas, TX, 1987; p 25-13.

Wj ) fj(P,yi,∆T) for i ) 1, 2, ...., n and j )1, 2, ..., 5

(6)

where ∆T is the hydrate temperature depression exerted by the weight percent of the jth inhibitor (Wj). Five models of the above type were developed, one for each inhibitor. ANN gravity models having the following form

Wj ) fj(P,γ,∆T) for j )1, 2, ..., 5

(7)

were also developed. In the above equation, γ represents the gas gravity. The node in a given neural network architecture calculates the total activation according to the following equation n

F(wka - bm) ) F(

∑ (wkmam) - bm)

(8)

k)1

where a is an input vector with components a1, a2, ..., an, bm is the internal threshold or bias of the mth node, and wk is the vector of the weight factor with components wkm for the kth input ak corresponding to the mth node. F() is the function utilized to calculate the input to one node from the output obtained from another. Several forms have been suggested to describe this function. One of the most commonly used forms is the sigmoid function expressed as

F(x) )

1 1 + e-x

(9)

To achieve appropriate computation stability during the learning phase of ANN, the domain of change of the input and output variables should be within the range of the data used. This can be performed by using the following scaling rule for the input pressure39

Pnew ) ln(P) (39) Stein, R. Artif. Intell. Expert 1991, 33-37.

(10)

Optimal Hydrate Inhibition Policies

Energy & Fuels, Vol. 13, No. 1, 1999 109

The computation stability of the output variables can be established also by transforming their domain using the following scaling rule.40

Znew )

Zold - Zold,min Zold,max - Zold,min

The above model is a nonlinear-constrained optimization problem that can be recast as N

Minimize (11)

CjWj ∑ j)1

subject to

where Zold,max and Zold,min are the maximum and minimum values of the previous (or initial) output temperature or inhibitor concentration whereas Zold and Znew are their old and new values, respectively. Optimal Injection Model To determine the optimal hydrate inhibition policy, the neural network models can be integrated within an optimization strategy. The objective of the optimization is to minimize the cost of inhibitors. The restrictions include the equilibrium relationships as given by the neural network models, the temperature and the temperature depression needed. The model can be stated as

gj(W) ) 0

j ) 1, ..., N + 1

(15)

gj(W) e 0

j ) N + 2, ..., M

(16)

The gj’s represent the equality and inequality constraints of the model. An efficient method for solving nonlinear constrained optimization problem was developed by Schittowski.41 This method belongs to the family of successive quadratic programming (SQP) methods where a quadratic programming subproblem is solved at each iteration. The testing of the Schittowski method showed that the method outperforms other methods for a wide variety of test problems. Given the optimization model described by eqs 12, 15, and 16, a QP subproblem is first formulated based on a quadratic approximation of the Lagrangian function

N

Minimize

CjWj ∑ j)1

(12)

M

(12)

L(W,λ) ) f(W) +

λjgj(W) ∑ j)1

(17)

N

∆T )

∆Tj ∑ j)1

(13)

Linearizing the nonlinear constraints leads to the following QP subproblem:

subject to

Minimize

Wjfj(P,yi,∆T)

for i ) 1, 2, ..., n and j ) 1, 2, ..., 5 Lj e Wj e Uj

(6) (14)

Equation 12 in the above model represents the objective function, which is the sum of costs of inhibitors used. Cj is the cost of inhibitors per unit weight, and Wj represents the weight of inhibitor j that must be used. N is the number of inhibitors that can be used, which is five in our case. Equation 13 assumes that the depression caused by inhibitors is additive and that the total depression must be equal to the required temperature depression ∆T. Equation 6 is the equilibrium restrictions on the model. These are given by the five developed neural network models giving the amount of inhibitor j as a function of temperature depression ∆Tj, the system pressure, and the natural gas composition. Equation 14 represents the lower and upper bounds on the weight percent inhibitor j that can be used. Sometimes the weight percent of a certain inhibitor is restricted and an upper bound must be imposed. For instance, for methanol, a weight percent greater than 90% would form solid methanol. The bounds can also be imposed according to the ranges of the training data for the NN models. (40) Hertz, J.; Krogh, A.; Palmer, R. G. Introduction to the Theory of Neural Computation; Addison-Wesley Publishing Co.: New York, 1991.

1 Tr d Hkd + ∇f(Wk)Trd 2

subject to

∇gj(W)Trd + gj(W) ) 0

j ) 1, ..., N + 1

∇gj(W)Trd + gj(W) e 0

j ) N +2, ..., M

(18)

The above subproblem is solved using any QP algorithm,42 and the solution is used to form a new iteration within the iteration scheme

Wk + 1 ) Wh + Rkdk

(19)

The step length, Rk in eq 19 is chosen in order to sufficiently decrease a merit function. Powell43 suggests the following merit function N+1

Ψ(W) ) f(W) +

M

rjgj(W) + ∑ rjmax{0,gj(W)} ∑ j)1 j)N+2

(20)

with a penalty parameter, rkj given by

{

1 rkj ) max λj, (r(k-1)j + λj) 2

}

j ) 1, 2, ..., M

(21)

The role of the above penalty parameter is to ensure (41) Schittowski, K. Oper. Res. 1985, 5, 485-500. (42) Reklaitis, G. V. Engineering Optimization: Methods and Applications; John Wiley and Sons: New York, 1983. (43) Powell, M. J. D. A Method for Nonlinear Constraints in Minimization Problems. In Optimization; Fletcher, R., Ed.; Academic Press: London, 1969; pp 283-298.

110 Energy & Fuels, Vol. 13, No. 1, 1999

Elgibaly and Elkamel Table 1. Ranges of Data Used ranges

inhibitor

concn, wt%

pressure, kP

temp depression, K

gas gravity (air ) 1)

methanol sodium chloride ethylene glycol ethanol calcium chloride

5.00-85.0 1.08-26.4 10.0-50.0 15.0-16.5 10.0-36.0

68.0-20770 94.9-13660 2420-20000 386.12-13670 172.37-1896.11

0.795-88.3 0.167-18.9 1.230-22.6 2.100-7.26 5.010-29.8

0.554-1.960 0.554-2.006 0.554-1.960 0.554-1.176 0.554-1.176

Table 2. Properties and Statistical Analysis of the Developed NN Models model

no. of points

no. of neurons

min error %

max error %

average error %

SSE

correlation coefficients

T ) fo(P,yi,Wj) WMeOH ) f1(P,yi,∆T) WNaCl ) f2(P,yi,∆T) WEG ) f3(P,yi,∆T) WEtOH ) f4(P,yi,∆T) WCaCl2 ) f5(P,yi,∆T)

2387 410 150 20 8 9

40 10 10 10 10 10

0.00003 0.00180 0.01318 0.13451 0.0751 0.03698

14.49686 27.83780 12.90497 7.16594 0.24142 0.22375

0.61419 3.95190 1.86854 1.45687 0.13658 0.11564

0.65492 0.09860 0.01740 0.00080 0.000001 0.000001

0.97025 0.98600 0.99832 0.99932 0.9990 0.99998

the contribution of constraints that become inactive in the QP solution and were recently active. The matrix Hk in eq 18 is a positive-definite quasiNewton approximation of the Hessian of the Lagrangian function (eq 17). This matrix is updated using the Broyden-Fletcher-Shanno (BFS) method.42 Input Data Used in the Development and Testing of the NN Models. All models require the same input data, i.e., system composition and hydrate formation pressure and temperature. Sloan18 has quoted most of the experimental data on hydrate formation and inhibition, which are sparsely reported in the open literature. The data used in the present study have been obtained from Sloan,18 Munck et al.,45 Englezos and Bishnoi,19 Stange et al.,46 Song and Kobayashi,26 Notz et al.,30 Rossi and Gasparetto,47 Englezos,7,48 Lingelem and Majeed,7 Hight,49 Corrigan et al.,50 Tohidi et al.,21-24 Hutz and Englezos.20 The data cover a wide range of system compositions and hydrate formation and inhibition conditions, as shown in Table 1. They also represent different hydrate structures (I and II) and phase mixtures (hydrate, vapor, liquid hydrate-forming component, ice, and liquid aqueous solution). As the data were collected from various sources, their consistence was checked before use. The data were then classified into two sets: one set was used in model development and the other set was used in the validation test of the model. The validation test data were chosen to fall within the range of the data used in model development and is 10% of the total set of data. Results and Discussion A general NN model, which predicts the hydrate formation temperature as a function of pressure, com(44) Englezos, P.; Huang, Z.; Bishnoi, P. R. J. Can. Pet. Technol. 1991, 30, (2), 148-155. (45) Munck, J.; Skjold-Jorgensen, S. Chem. Eng. Sci. 1988, 43, 2661-2672. (46) Stange, E.; Majeed, A.; Overa, S. Experiments and Modeling of the Multiphase Equilibrium of Inhibition of Hydrates. Proceedings of the 68th Annual Gas Process Association Conference, San Antonio, TX, March 13-14, 1989. (47) Rossi, L. F. S.; Gasparetto, C. A. Prediction of Hydrate Formation in Natural Gas Systems. SPE-22715 paper presented at the SPE 66th Annual Technical Conference and Exhibition, Dallas, TX, Oct. 6-9, 1991. (48) Englezos, P. Trans. Inst. Chem. Eng. 1993, 71A, 457-459. (49) Hight, M. A. State-of-the-Art Survey on Hydrate Formation; paper SPE-28507 paper presented at the SPE 69th Annual Technical Conference and Exhibition, New Orleans, LA, Sept. 25-28 1994. (50) Corrigan, A.; Duncum, S. N.; Edwards, A. R.; Osborne, C. G. Trials of Threshold Hydrate Inhibitors in the Ravenspurn to Cleeton Line. SPE-30696 paper presented at the Annual Technology Conference, Dallas, TX, Oct. 22-25 1995.

Figure 2. Methanol inhibition of methane hydrate by different models (pressure ) 10 MPa).

position, and inhibitor type and concentration, was developed. The model is based on the experimental data. The purpose of this model is to check the hydrate formation conditions, and to estimate the temperature T′ for the system when no inhibitors are used. Finding T′, the temperature depression ∆T can be found from ∆T ) T′ - T, where T is the equilibrium temperature when an inhibitor is used with the same gas system. Another NN model has to be obtained for the output concentrations of each of the five inhibitors used. The model determines inhibitor concentration in terms of the input pressure, temperature depression, and composition. Table 2 summarizes the properties and statistical parameters of the different models. In addition to the general NN compositional model, five NN models have been developed for the inhibitors: methanol, sodium chloride, ethylene glycol, ethanol, and calcium chloride. These latter five models have been utilized in the optimization process to find the most economically suitable inhibitor that can be used to prohibit hydrate formation for a given system composition at a certain pressure and temperature. Prediction of Hydrate Inhibition by NN and Available Models. Figure 2 demonstrates the predictions of methanol inhibition of methane hydrate obtained by NN, Hammerschmidt,27 Nielsen and Bucklin,9 and statistical mechanical (CSMHYD) models. The models were examined using a test data sample for simple methane hydrate with methanol inhibition at a pressure of 10 MPa, quoted from Sloan.18 As can be seen, the NN model produced results which agree quite well with the experimental data. While the statistical mechanical model provided a good fit with the experi-

Optimal Hydrate Inhibition Policies

Figure 3. NaCl inhibition of methane hydrate by different models (pressure ) 6 MPa).

Figure 4. Effect of gas gravity on MeOH temperature depression (pressure ) 10 MPa).

mental data for a limited range of methanol concentrations, the empirical models led to inaccurate results. A similar prediction test performed on NaCl inhibition of methane hydrate at a pressure of 6 MPa is shown in Figure 3. The test data sample was also collected from Sloan.18 Again, the NN model delivered the nearest results to the experimental data as compared with the Hammerschmidt27 and Katz29 salinity models. Since the available empirical equations for the prediction of hydrate inhibition show no pressure dependence, they are inapplicable at high pressures and high inhibitor concentrations. Effect of Gas Gravity on Hydrate Inhibition. Figure 4 shows the hydrate temperature depression for gas gravities in the range from 0.554 to 1.2 with MeOH at a pressure of 10 MPa. With a methanol concentration lower than 20 wt %, the inhibition effect on hydrate formation shows a nonmonotonic dependence on the inhibitor concentration. This behavior is consistent with the findings of Katz et al.,12 Makogan,13 and Godbole et al.51 The reason for this behavior is that the effect of the inhibitor depends on the solubility of the gas in water and that there is a variation of the solution structure forming due to the interaction of the gaswater system. At high methanol concentrations, the inhibition effect increases with an increase in gas gravity. In this range, the effectiveness in inhibiting hydrate formation rises with increasing gravity of the hydrate-forming gas. Effect of Pressure on Hydrate Inhibition. The graph in Figure 5 illustrates the effect of pressure on temperature depression of methane hydrate with methanol. Results were obtained by using the NN model (51) Godbole, S. P.; Kamath, V. A.; Ehlig-Economides, C. Natural Gas Hydrates in Alaskan Arctic. SPE Formation Evaluation, March 1988, pp 263-266.

Energy & Fuels, Vol. 13, No. 1, 1999 111

Figure 5. Methane hydrate temperature depression with MeOH.

Figure 6. Methane hydrate temperature depression with NaCl.

developed. The results show that below a methanol concentration of 20 wt %, there is a considerable decrease in the inhibiting ability of methanol with an increase in pressure. (A similar behavior can be noted in Figure 6 for temperature depression of methane hydrate with NaCl below about 17 wt %.) Above a methanol concentration of about 20 wt %, this behavior is reversed, i.e., as the pressure increases, the effectiveness of methanol decreases, but having reached a maximum pressure, it flattens out. With NaCl in Figure 6, this latter behavior was not as significant as that with methanol. These results are consistent with those of Makogon13 and can be interpreted in the same fashion as those of Figure 4. Use of Mixed Inhibitors to Control Hydrate Formation. Scauzillo25 noted that the presence of liquid hydrocarbons with natural gas lowers its hydrateformation temperature. Scauzillo25 concluded that the combined effect of liquid hydrocarbons and aqueous glycol solutions are not additive but approach additive properties as the gas/oil ratio decreases. The decrease in temperature depression relative to what is expected if both the glycol and liquid hydrocarbon exhibited their full depression effects has been attributed mainly to the solubility of the oil in glycols. Notz et al.30 examined the validity of four commercially available models. The models were based on empirical formulas used for predicting the inhibition of methanol or NaCl. None of these models had the capability of predicting the inhibition effect of formation brines or formation brines and methanol.30 Englezos and Bishnoi19 and Tohidi et al.21,22 presented a rigorous model that can predict the hydrate inhibition effect of mixed electrolyte solutions. Optimal Injection Policy. To illustrate the use of the optimization model discussed earlier, various case studies were considered. In Table 3 (rows 1-9) a

0/0 0/0 0/0

Where no data is given, inhibitor cannot be used for particular gas composition. An asterisk is used to indicate that the conditions for this case are out of the range of the training data set of the ANN.

a

16.5/1.6012 0/0 0/0 0/0 0/0 5.2/0.1307

0/0 0/0 0/0 0/0

0/0 0/0 0/0 0/0

0/0

0/0

0/0 0/0 0/0

0/0 0/0 0/0 0/0 0/0 0/0 5.2/0.1307

3.68/0.106 6.59/0.1129 0.558/0.6009* 11.7/0.230 16.5/0.4131 0/0* 5/0.1387 5/0.1299 10/0.47 3.68/0.212 6.59/0.2258 0.558/1.018 11.7/0.46 0/0 0/0 5/0.2774 5/0.2598 0 0 0 0.103 0 0 0 1 0 0 0 0 0.103 0 0 0 1 0 0 0.0016 0 0 0 0.01 0 0 0 0 0/0016 0 0 0 0.01 0 0 0 0.021 0 0 0 0.02 0 0 0 0 0.021 0 0 0 0.02 0 0 0 0.337 0 0 0 0.32 0 0 0 0 0.337 0 0 0 0.32 0 0 0 0.162 0 0 0 0.1 0 0 0 0 0.162 0 0 0 0.1 0 0 0 0.0408 0 0 0.9 0.03 0 0 0 0 0.0408 0 0 0.9 0.03 0 0 0 0.0183 0 0 0 0.02 0 0 0 0 0.0183 0 0 0 0.02 0 0 0 0.0827 0 0 0 0.2 0 0 0 0 0.0827 0 0 0 0.2 0 3.68 6.59 0.558 11.7 16.5 5.2 5.0 5.0 10.0 3.68 6.59 0.558 11.7 16.5 5.2 5.0 5.0

14.9 10.0

14.6 14.5 15.2 14.6 13.4 12.5 17.0 14.0 14.9 14.6 14.5 15.2 14.6 13.4 12.5 17.0 14.0

1.0 0 0.262 0.897 0 0 0.2 0 1.0 1.0 0 0.262 0.897 0 0 0.2 0

0 1.0 0.075 0 0 0.1 0.1 0 0 0 1.0 0.075 0 0 0.1 0.1 0

0 0 0 0 1.0

0

Elgibaly and Elkamel

0.3383 0.9986 5.315 2.0344 3.654 0.8352 1.227 1.149 4.158 1.876 2.000 10.63 4.0344 5.976 0.8352 2.454 2.298 0/0

2.079 0/0

0/0 0 0/0 0/0 0/0 0/0 0 0/0 0/0 10/0.235 0 0 0 0

H 2S N2 CO2 C6 + C5 nC4 C4 C3 C2 C1 P ∆T

inhibitors

∆T3/EG, wt % ∆T2/NaCl, wt % ∆T1/MeOH, wt % gas composition

Table 3. Optimal Inhibitor Policy for Various Gas Compositions and Systemsa

∆T4/EtOH, wt %

∆T5/CaCl2, wt %

min cost, $/kg water

112 Energy & Fuels, Vol. 13, No. 1, 1999

desired temperature depression ∆T was set for a given gas composition and system pressure, no inhibition losses were assumed. The optimal use of inhibitors along with corresponding portions of ∆T were solved for by the optimization process. The objective function of the optimization was the minimization of inhibition cost. The cost of inhibitors 1-5, MeOH, NaCl, EG, EtOH, and CaCl2, was obtained from the Aldrich Catalog of Fine Chemicals.52 It was, respectively, 8.845, 6.39, 14.926, 13.303, and 9.54 $/kg. These costs were reported in terms of $/L for the liquid inhibitors and were converted to $/kg by dividing by the appropriate density. As can be seen from the table, methanol (inhibitor 1) was the dominating inhibitor of choice for the various cases. The reason is clear; both the cost of methanol and the required wt % for inhibition for a certain ∆T are low compared to other inhibitors. The entries indicated with an asterisk in the table refer to predictions by the ANN models that were done for conditions (∆T, P, and gas composition) outside of the training data set. The entries with no data indicate that the corresponding neural network model cannot furnish predictions for the given conditions. The reason is that during development of the NN, no similar data set was used for training. For instance, for inhibitor 4 (EtOH), the data reported in the literature were only for H2S, therefore, the NN model cannot furnish predictions for a gas that contains other compounds than H2S. In Table 3, rows 10-18 assume that there is 50% loss of methanol. This is adjusted for in the optimization model by requiring twice as much wt % of methanol as earlier required. Methanol is still the inhibitor of choice. The only exception is for H2S gas where inhibitor 5 (CaCl2) is now the minimal cost inhibitor (row 15). Although the optimization model does not consider factors such as operating conditions, solubility of inhibitor in the existing fluid phases, inhibitor content already present in the process, and water content in the gas, it represents the first steps at integrating the developed neural network models within a design system for hydrate control. Table 4 (rows 1-5) assumes that methanol is already in use with a weight percent of 0.175 and that a supplemental inhibition policy for a more restricted (lower) ∆T is desired. This is adjusted for in the optimization model by fixing the methanol concentration and solving for the unknown concentrations and the corresponding ∆T’s for the other inhibitors. This case might seem to be of a more hypothetical nature, but it is included for illustration purposes. As can be seen from the table, inhibitor 2 (NaCl) is the inhibitor of choice to supplement methanol. The reported cost is the total cost of inhibition, consisting of both the cost of methanol (already fixed) and that of NaCl. In rows 6-10, the amount of NaCl was fixed to 0.5 wt % (shaded column) and the optimization was asked to determine the inhibitor of choice to prevent hydrate formation for a lower ∆T than initially considered. Methanol is now the inhibitor of choice. Conclusions This study demonstrates the possibility of using neural networks for accurate prediction and optimiza(52) Catalog of Fine Chemicals; Aldrich Chemical Co. Inc.: Wisconsin, 1998. (53) Tohidi, B.; Danesh, A.; Tabatabaei, A. R.; Todd, A. C. Ind. Eng. Chem. Res. 1997, 36, 2871-2874.

Optimal Hydrate Inhibition Policies

Energy & Fuels, Vol. 13, No. 1, 1999 113

Table 4. Optimal Inhibitor Policy for an Existing Conditiona gas composition ∆T 12 20 13 16 13 16 18 17 16 5

P 15 16 15 17 15 15 16 10 13 14

C1 1 1 0 0.2 0 1 1 0 0 1

C2 0 0 0 0.2 0 0 0 0 0 0

C3 0 0 1.0 0.1 0 0 0 1 0 0

C4 0 0 0 0.02 0 0 0 0 0 0

nC4 0 0 0 0.03 0 0 0 0 0 0

C5 0 0 0 0.1 0 0 0 0 0 0

C6 + 0 0 0 0.32 0 0 0 0 0 0

inhibitors CO2 0 0 0 0.02 0 0 0 0 0 0

N2 0 0 0 0.01 0 0 0 0 0 0

H 2S 0 0 0 0 1 0 0 0 1 0

MeOH/∆T1 0.175/7b 0.175/6.5b 0.1751/9.84b 0.175/11.5b 0.175/8.7b 0.2392/10.39 0.2561/11.63 0/0 0.1275/4.276 0.1036/3.5

NaCl/∆T2

EG/∆T3

0.4563/5 0.8188/13.5 0.5549/3.16

0/0 0/0 0/0 1.5381/4.85

0.3469/4.3 0.5/5.61b 0.5/6.37b 0.5/4.6 0.5/11.726b 0.5/1.5b

EtOH/∆T4

min cost

0/0 0/0

4.464 6.780 5.094 24.5 3.765 5.311 5.460 6.307 4.323 4.111

0/0

0/0 0/0 0/0

0/0

0/0 0/0

0/0 0/0 0.2085*/12.4 0/0

CaCl2/∆T5

a Where no data is given, inhibitor cannot be used for particular gas composition. An asterisk is used to indicate that the conditions for this case are out of the range of the training data set of the ANN. b Methanol is already in use with a weight percent of 0.175.

tion of hydrate inhibition. The back-propagation technique was employed in the neural network training. After learning from a selected set of experimental data, the developed neural network models were examined on different data, which have not been included in the learning process. The developed neural network models produced results that agree quite well with the experimental data. The derived and empirical models evaluated in this study delivered significantly different inhibition predictions. The developed NN inhibition models can predict the concentration of hydrate inhibitor in terms of pressure, required temperature depression, and gas composition. They do not require any estimates of input hydrate formation conditions, knowledge of type of hydrate structure, or information about coexisting equilibrium phases. The models consider the dependence of the effectiveness of certain inhibitors such as MeOH and NaCl on gas composition and pressure. This behavior must be taken into account in the design of a hydrateinhibition system. An optimization model has been presented to solve for the optimal injection amounts of different inhibitors corresponding to portions of the temperature depression. The purpose of the optimization was to minimize the inhibition cost. Case studies which represented a variety of gas compositions and system pressures were assumed to determine the most suitable inhibitors that can be used to prevent hydrate formation. In most of these cases, it has been found that methanol was the inhibitor of choice. Acknowledgment. The authors acknowledge the financial support by Kuwait University under Grant No. EP-20.

Lw ) liquid water phase M ) number of constraints in the optimization model MW ) molecular weight of the inhibitor N ) number of inhibitors that can be used P ) pressure, Pa r ) penalty parameter used with Powell’s merit function S ) salinity, wt % SSE ) sum of squared-error T ) temperature, K Tr ) transpose operator ∆T ) depression in the hydrate-forming temperature, K ∆T ′ ) depression in the ice temperature, K Uj ) upper point for inhibitor weight percent V ) vapor phase Wj ) weight percent of the inhibitor j wk ) weight vector of the input received by the processing element k wkm ) connection weight between neurons k and m X ) mole percent of the inhibitor yi ) mole fraction of component i in the vapor phase Greek Letters R ) step length in the quadratic programming algorithm γ ) gas gravity (air ) 1) λ ) Lagrangian multiplier Ψ ) power merit function

AppendixsPrediction of Hydrate Formation Temperature by Empirical Equation On the basis of the fit to Katz29 gas-gravity plot, Kobayashi et al.38 developed the following empirical equation for hydrate-forming conditions for natural gases.

T ) 1/[A1+ A2(ln γg) + A3(ln P) + A4(ln γg)2 +

List of Symbols

A5(ln γg)(ln P) + A6(ln P)2 + A7(ln γg)3 +

A1, A1, ..., A15 ) empirical coefficients in eq A-1 A, B, C ) coefficients in eq 4 bm ) bias of the node m d ) search direction gj ) equality and inequality constraints of the optimization model ∇g ) gradient of g H ) hydrate Hk ) approximation of the Hessian of the Lagrangian function I ) ice K ) a constant in eq 1 depending on the type of inhibitor k ) iteration number L ) Lagrangian function Lhc ) liquid hydrocarbon phase Lj ) lower point for inhibitor weight percent

A8 (ln γg)2(ln P) + A9(ln γg)(ln P)2 + A10(ln P)3 + A11(ln γg)4+ A12(ln γg)3(ln P) + A13(ln γg)2(ln P)2 + A14(ln γg)(ln P)3+ A15(ln P)4]

(A-1)

where A1 ) 2.7707715 × 10-3, A2 ) -2.782238 × 10-3, A3 ) -5.649288 × 10-4, A4 ) -1.298593 × 10-3, A5 ) 1.407119 × 10-3, A6 ) 1.785744 × 10-4, A7 ) 1.130284 × 10-3, A8 ) 5.9728235 × 10-4, A9 ) -2.3279181 × 10-4, A10 ) -2.6840758 × 10-5, A11 ) 4.6610555 × 10-3, A12 ) 5.5542412 × 10-4, A13 ) -1.4727765 × 10-5, A14 ) 1.3938082 × 10-5, A15 ) 1.4885010 × 10-6. EF980129I