C:\Users\raoh\Desktop\Paper 7.xps The Journal of Engineering Research (TJER) Vol. 12, No. 1 (2015) 81-91 Experimental and Modeling Investigations of the Viscosity of Crude Oil Binary Blends: New Models Based on the Genetic Algorithm Method R.S. Al-Maamaria*, G. Vakili-Nezhaada* and M. Vatanib a* Department of Petroleum and Chemical Engineering, College of Engineering, Sultan Qaboos University, P.O. Box 33, PC 123, Muscat, Oman. b Department of Chemical Engineering, Amirkabir University of Technology (Tehran Polytechnic), Tehran, Iran. Received 24 February 2014; accepted 22 January 2015 Abstract: Achieving an estimation of viscosity in crude oil binary mixtures is often difficult because the relationship of viscosity, to the fraction of each crude oil, and many other parameters and constants is comply. This relationship can be expressed by mathematical models with different variables. Besides the known models for predicting the viscosity of crude oil mixtures, the petroleum industry demands other models which give accurate predictions. In this work, two new empirical models have been developed for the calculation of the viscosity of binary crude oil blends. Two techniques—least square (LS) and genetic algorithm (GA)—were used to determine the parameters of the proposed models. Dynamic viscosity of 12 sets of crude oil blends at 298.15 K and 25 different shear rates were measured, resulting in 300 sets of binary data. Moreover, 700 sets of kinematic viscosity binary data were collected from literature sources and used along with 200 of the 300 sets of experimental binary data with a wide range of American Petroleum Institute (API) gravity (9.89–41.2) and viscosity (1.054–165,860 cSt) to examine existing available models as well as the newly developed models in this study. The remaining 100 experimental data points which were not used in the regression process were used for validating the models. The results in terms of the absolute average relative deviation (AARD%) were 33.546 and 14.195 for the LS method and 13.113 and 13.672 for the GA method for proposed models one and two, respectively. The results of statistical parameters based on the GA and LS methods showed that the GA is a superior method for new model parameter estimation as compared with the traditional LS technique. The GA-based models developed in this study provided the highest accuracy for viscosity calculation of the crude oil blends over all existing models in the literature. Keywords: Viscosity, Crude oil, Binary mixture, Genetic algorithm, Least square, Optimization. *Corresponding author’s email: rsh@squ.edu.om; vakili@squ.edu.om R.S. Al-Maamari, G. Vakili-Nezhaad and M. Vatani 82 12298.1525 300700 200300 API9.8941.21.054165.860cSt 100 AARD% 33.54614.19513.11313.67212 1. Introduction Heavy crude oil is highly viscous under normal reservoir conditions, but its viscosity is reduced to avoid problems in transportation and reduce pumping costs. Heavy crude oil or bitumen is mixed with a solvent or diluent oil to achieve a crude oil blend with a certain viscosity. Thus, the viscosity of a crude oil blend depends on the viscosity and fraction of each crude oil. Predicting the viscosity of a crude oil blend is one of the greatest challenges in the petroleum industry, although the prediction can be expressed by mathematical models. Several correlations have been proposed for calculating the viscosity of mixtures. Centeno et al. (2011) used 17 mixing rules reported in the literature to predict the viscosity of sample oil. They classified mixing rules as pure, with a viscosity blending index and with additional parameters. Pure mixing rules are easy to apply as they require experimental viscosity of the components and composition of mixtures in terms of volume, mole, or weight fractions. Models include those of Arrhenius (1887), Bingham (1914), and Koval (1963). The models based on mixing rules with a viscosity blending index are (Prakash 2003; Refutas Baird 1989; Maxwell 1950; Wallace and Henry 1987; Chevron Riazi 2005 and Cragoe 1933). Mixing rules with additional parameters include the calculation of extra parameters that are Experimental and Modeling Investigations of the Viscosity of Crude Oil Binary Blends: New Models Based on the …… usually obtained by mathematical methods. Miadonye et al. (2000) and Han et al. (2007) developed models for predicting the viscosity of a crude oil mixture based on additional parameters. Al-Besharah (1989) correlated a model based on viscosity, mass fraction, and the API gravity of each component. The calculation of model parameters is a critical task in developing mathematical models of such applications. Concerning parameter calculations, many different methods have been suggested in the literature. Most of the existing methods for solving problems are local or traditional search methods such as the least square (LS) objective function or maximization likelihood criterion (Stragevitch and Davila 1997). In such problems, the objective function is in the form of a nonlinear expression containing several extremum points which are both local and global minima and within the specified bounds of variables (Sahoo et el. 2006). Traditional local search methods often give local optima, and a global optimization routine often works for such problems. Some popular stochastic optimization techniques based on global optimization methods include the genetic algorithm (GA) (Holland 1992); simulated annealing (SA) (Kirkpatrick et al. 1983), and differential evolution (DE) (Price et al. 2005). These methods belong to the evolutionary algorithms category, which mimics the principle of survival of the fittest. In recent years, stochastic global optimization methods have been used extensively in fluid phase equilibrium problems and parameter estimation of models. Among these methods, GA is the most widely used (Alvarez et al. 2008; Bonilla-Petriciolet et al. 2013; Chamkalani et al. 2013; Maddinelli and Pavoni 2013; Rangaiah 2001; Singh et al. 2005; Sahoo et al. 2006; Sahoo et al. 2007; Tan et al. 2014; Vakili-Nezhaad et al. 2013; Vakili-Nezhaad et al. 2014; Vatani et al. 2012a; Vatani et al. 2012b; Xue et al. 2014). In this work, two new empirical models have been developed for calculation of the viscosity of binary crude oil blends. LS and GA techniques were used to determine the parameters of the proposed models. An accurate approach to determine the adjustable parameters of the models was found, and the results of the proposed models are compared with the results obtained using models available in the literature. 2. Genetic Algorithm (GA) GA is considered a reliable algorithm for complex engineering calculations. GA is based on natural selection—the process that drives biological evolution—and is recommended for use with optimization problems that are not well suited to traditional optimization algorithms, especially problems in which the objective function is discontinuous, non-differentiable, or highly nonlinear. GA differs from traditional optimization algorithms as follows: Traditional algorithms use only a single point in each iteration, while GA explores the search space using randomly generated multiple points. Derivative-based algorithms generate a new point by a deterministic computation while GA creates a new population by a probabilistic computation. The outcome of traditional algorithms depends both on initial guess work and on the step size used in the algorithm. For the optimization of problems, the fitness function must be defined; for a standard optimization algorithm, this is the objective function. The algorithm begins by creating random initial populations and modifies a population of individual solutions between the values of the lower and upper bounds of the successive variables. The current population size determines the subsequent size of the population at each resultant generation. Increasing the population size enables the GA to search more points, thereby obtaining better results. As the population size increases, the computation time also increases. At each step, the GA selects individuals from the current population stochastically to be the parents of the children for the next generation based on genetic operators including selection, crossover, and mutation by exploring all regions of the search space. In the first step, an initial population is generated. Each individual is evaluated for its fitness in order to proceed, and the best individuals are chosen from the selection step. Individuals with a high probability have a greater likelihood of producing offspring, which are then generated by a combination of selected individuals using a crossover step. In the mutation step, random changes are applied to some individuals. The purpose of the mutation operator is to prevent the GA from converging to a local 84 83 R.S. Al-Maamari, G. Vakili-Nezhaad and M. Vatani 84 minimum and to introduce new possible solutions into the population (Chamkalani et al. 2013; Preechakul and Kheawhom, 2009). The algorithm continues to find the minimum of the fitness function. A more complete discussion of the GA, including extensions and related topics, can be found in MATLAB’s “Genetic Algorithm and Direct Search Toolbox” (The MathWorks, Inc., 2004). 3. Experimental and Literature Database Three oil samples (light, medium, and heavy crude oils) were obtained from different Omani oil fields. Twelve binary mixture samples were prepared using different weight fractions (20, 40, 60, and 80%). The viscosity of each binary mixture and three pure crude oils were measured at 25 different shear rates (10–100 s-1) with a Rotational Rheometer: RheolabQC (Anton Paar GmbH, Graz, Germany), while the density for each sample was measured by a DMA-5400M density meter (Anton Paar, GmbH). All of the measurements were carried out at 298.15 K. The viscosity and density of all samples are listed in Tables 1 and 2, respectively. The crude oil mixtures used in this work cover a wide range of API gravities (9.89–41.2) and viscosities (1.054–165,860 cSt) at various temperatures. As noted, the viscosity of 12 types of crude oil binary mixtures at 25 different shear rates were measured, and 300 binary data points were obtained. Prepared samples weighed 5–7 grams. In addition to the experimental data, 700 pieces of data were obtained from the literature (Al-Besharah, 1989; Centeno et al. 2011; Diaz et al. 1996; Rahmes and Nelson 1948; Yuan et al. 2005). From these 1,000 data points, 900 binary data were used in regression of the proposed models, and 100 experimental data were used to validate them. 4. Viscosity Models Among all existing models for predicting the viscosity of mixtures, the most well-known, including 13 models, are presented here and are a function of API gravity, mass, or volume fraction and the viscosity of each component (Table 3). In these models, v is the kinematic viscosity, and V and W are the volume and mass fraction, respectively. Subscript i denotes the binary mixture components, so subscripts A, B, and mix are the more viscous component, the less viscous component, and the binary mixture viscosity, respectively. 5. Proposed Models After trying multiple models and regression analysis, two empirical models were developed (Eqns. (1)–(8)). These models are able to predict the viscosity of crude oil binary mixtures with high accuracy. The regression analysis of these models was performed based on the LS and GA methods. The model coefficients of the two methods are presented in Table 4. In the first model, the viscosity of the binary mixture is a function of mass fraction, API gravity, and the viscosity of each component and presented as: )ln(ln )ln(ln )ln(ln )ln(ln )ln(ln lnln 53 53 53 53 43 43 CCC CCW CCC CCW CCC CC BB BB AA AA mixmix mix (1) 1 2 ( )A A B B AC C API W C API API (2) 1 2 ( )B B A A BC C API W C API API (3) mix A A B BC W C W C (4) In the second model, the viscosity of the binary mixture is a function of the volume fraction and 3 1 2exp exp ( ) /mix VI C C C (5) where IV can be obtained from Eqns. (6) to (8) and C1 to C3 are model constant parameters. A BV A V B V I V I V I (6) 1 2 3ln lnAV AI C C C (7) 1 2 3ln ln( )BV BI C C C (8) In these models, W, V, v and API are mass fraction, volume fraction, kinematic viscosity and API degree gravity, and subscripts A or B and mix denote to the each crude oil and binary mixture respectively. Experimental and Modeling Investigations of the Viscosity of Crude Oil Binary Blends: New Models Based on the …… 85 Table 1. Experimental viscosity of different crude oils and their mixtures. Note: A:80, B denotes a blend of 80% A and 20% B, etc. Table 2. Experimental density of different crude oils and their mixtures. Components Density (g/cm3) A:100 0.940 B:100 0.830 C:100 0.854 A:80, B 0.930 A:60, B 0.901 A:40, B 0.882 A:20, B 0.854 A:80, C 0.938 A:60, C 0.918 A:40, C 0.910 A:20, C 0.881 B:80, C 0.836 B:60, C 0.841 B:40, C 0.846 B:20, C 0.852 Note: A:80, B denotes a blend of 80% A and 20% B, etc. R.S. Al-Maamari, G. Vakili-Nezhaad and M. Vatani 86 Table 3. Models for the viscosity prediction of binary crude oil mixture. No. Model Name Model Ref. 1 Arrenius log log logmix A A B BV V Arrhenius (1887) 2 Bingham 1 1 1 mix A A B BV V Bingham (1914) 3 Koval 0.25 0.25 0.25 mix A A B BV V Koval (1963) 4 Parkash 157.43 exp exp 0.93425 376.38 : 157.43 376.38 ln ln( 0.93425) A B i P mix P A P B P P i I where I V I V I I Parkash ( 2003) 5 Refutas 10.975 exp exp 0.8 14.534 : 10.975 14.534 ln ln( 0.8) A B i R mix R A R B R R i I where I W I W I I Baird (1989) 6 Maxwell 59.58959 exp exp 0.8 21.8373 : 59.58959 21.8373 ln ln( 0.8) A B i M mix M A M B M M i I where I V I V I I Maxwell (1950) 7 Wallace and Henry 1 0.01exp : 1 ln 0.01 A B i mix WH WH A WH B WH WH i I where I W I W I I Wallace and Henry (1987) 8 Chevron 3 1 10 : log 3 log IC IC A B i mix C A C B C i C i where I V I V I I Riazi (2005) 9 Cragoe 1000 ln(20) 0.0005 exp : 1000 ln(20) ln 0.0005 A B i mix Cr Cr A Cr B Cr Cr i I where I W I W I I Cragoe (1933) Experimental and Modeling Investigations of the Viscosity of Crude Oil Binary Blends: New Models Based on the …… 85 10 Latour exp exp (1 ) ln 1 : ln ln ln 1 0.09029 0.1351 n mix B B A B B B a W where a n Miadonye et al. (2000) 11 Shan-Peng #1 log log log : 0.0613 log log 0.134 mix A A B B AB A B AB A B V V C V V where C Shan-peng et al. (2007) 12 Shan-Peng #2 log log log log log log : 0.0644 log log log log 0.1706 mix A A B B AB A B AB A B V V C V V where C Shan-peng et al. (2007) 13 Al-Besharah 3 2ln ln ln 4.976 10 ( )mix A A B B A B A BV V V V API API Al-Besharah (1989) Table 4. Tuned coefficients of new proposed models based on Least Square (LS) and Genetic Algorithm (GA) methods. Coef. Model # 1 Model # 2 LS GA LS GA C1 0.0892 0.0776 0.6727 1.7637 C2 0.1092 0.1000 2.0105 1.2641 C3 -0.3441 11.7985 -0.4117 -0.8944 C4 3.1558 4.5531 - - C5 -0.0436 4.5531 - - 6. Results and Discussion The accuracy of all models, including the new proposed models, has been examined using available experimental data. For this task, 900 kinematic viscosity binary data were taken from the database and the calculated values were compared with experimental data points. These comparisons were in terms of average absolute relative deviation percent (AARD %) which is expressed as follows: exp exp 1 1 % 100 N cal i i ii AARD N (9) The published models given in Table 3, were used for calculating the viscosity of crude oil mixture. The statistical parameters of these models are presented in Table 5 which show that Koval and Parkash models with AARD<14% are the best models for the blend viscosity calculation. The new proposed models in the present work were developed based on the LS and GA methods using the same set of data. The objective function as the fitness function was defined. Parameter estimation is considered as a minimization of an objective function which minimizes the deviation between the experimental and predicted binary viscosities with the best model parameters. The objective function used in this work read as: exp exp 1 . N cal i i ii v v O F v (10) where v is the kinematic viscosity of crude oil blends and superscripts exp. and cal. refer to the experimental and calculated viscosity of blends, respectively. A flowchart for the calculation procedure for one run based on GA method is shown in Fig. 1. 87 R.S. Al-Maamari, G. Vakili-Nezhaad and M. Vatani 86 To find the minimum objective function value, more than 10 runs were applied with the random initial values of population at different values of the lower and upper bounds and various input parameters (which include crossover constant, mutation probability, and population size) in GA toolbox. Each new generation in GA decreases the objective function values. Due to different performance of each operator, the obtained results by each operator showed different values of the objective function. The algorithm continues to find the minimum of the evaluated fitness function until termination criteria were reached. The most frequently used termination criterion is the specified maximum number of generations. A more complete discussion and flowchart of GA toolbox can be found in a previous work (Vakili- Nezhaad et al. 2014). Finally after more than 10 runs, the lowest values of the objective function along with the corresponding parameters were selected as the final results. The final results in terms of equations (9) are presented in Table 5. These findings showed that GA could produce more accurate and global results compared to the LS method, so parameters obtained using GA fitted the experimental data with higher accuracy. To validate the new models, the remaining 100 experimental data for the binary mixtures of B and C which were not used in the regression analysis were tested. Table 5 represents the AARD% values of the new models as well as available models for this data set. As shown in Table 5, the GA based models proposed in this work provided the minimum AARD% compared to all available models in the literature. A comparison between AARD% for each model is shown in Fig. 2. 7. Conclusions Based on the existing literature and our experimental data, two new models were developed for predicting the viscosity of crude oil binary mixtures. In the first model, the Table 5. AARD% of this study compared with other models. Model AARD% 900 data 100 data Arrenius 41.275 7.362 Bingham 33.976 7.342 Koval 13.807 7.204 Parkash 13.868 7.208 Refutas 15.187 7.385 Maxwell 14.289 7.242 Wallace 14.899 7.398 Chevron 16.209 7.256 Cragoe 19.595 7.432 Latour 14.094 7.671 Shan-Peng #1 36.721 7.637 Shan-Peng #2 29.423 23.408 Al-Besharah 18.949 6.111 Model #1 (LS) 33.546 17.123 Model #1 (GA) 13.113 7.125 Model #2 (LS) 14.195 7.146 Model #2 (GA) 13.672 7.080 viscosity of mixture is a function of mass function, API gravity and viscosity of each component, while the second model is a function of volume fraction and viscosity of each component. Adjustable parameters of the proposed models were calculated based on two approaches; genetic algorithm and least square methods. According to the calculated AARD%, the genetic algorithm based new proposed models have higher accuracy compared to the available published models, which shows the superiority of GA method over the traditional LS method for parameter estimation of the empirical models. The present study while LS method uses only the single joint in each iteration, generates new point for next step by a de3terministic computation and outcome of it depends on initial guess, GA explores the search space using 88 Experimental and Modeling Investigations of the Viscosity of Crude Oil Binary Blends: New Models Based on the …… 86 No Yes Figure 1. Flow chart for the calculation procedure based on GA method. Figure 2. Average absolute relative deviation percent (AARD %) for each model. Print adjustable parameters Input fraction and viscosity of each component Estimate adjustable parameters by GA Calculate viscosity of mixture by model ( ) Compare and by objective functions Are termination criteria reached? 9089 R.S. Al-Maamari, G. Vakili-Nezhaad and M. Vatani 85 randomly generated multiple points, creates new population by a probabilistic computation and the outcome of it, is not related to initial guess, so the accuracy of GA is higher than LS in optimization problems and the results of the present work approved it. The proposed models can be used for better prediction of crude oil blends physical properties that are needed in the calculations of power required for crude oil transportation in pipelines. References Al-Besharah JM (1989), The effect of blending on selected physical properties of crude oils and their products. PhD dissertation: University of Aston, Birmingham, Alabama. Alvarez VH, Larico R, Ianos Y, Aznar M (2008), Parameter estimation for VLE calculation by global minimization: The genetic algorithm. Brazilian Journal of Chemical Engineering 25:409–418. Arrhenius SA (1887), Uber die Dissociation der in Wasser gelosten Stoffe. Zeitschrift Fur Physikalische Chemie-Leipzig 1:631–648. Baird CT (1989), IV Guide to petroleum product blending. Austin (TX): HPI Consultants, Inc. Bingham EC (1914), The viscosity of binary mixtures. The Journal of Physical Chemistry 18:157–165. Bonilla-Petriciolet A, Fateen SEK, Rangaiah GP (2013), Assessment of capabilities and limitations of stochastic global optimization methods for modeling mean activity coefficients of ionic liquids. Fluid Phase Equilibria 340:15-26. Centeno G, Sánchez-Reyna G, Ancheyta J, Muñoz JAD, Cardona N (2011), Testing various mixing rules for calculation of viscosity of petroleum blends. Fuel 90:3561-3570. Chamkalani A, Maesoumi A, Sameni A (2013), An intelligent approach for optimal prediction of gas deviation factor using particle swarm optimization and genetic algorithm. Journal of Natural Gas Science and Engineering 14:132-143. Cragoe CS (1933), Changes in the viscosity of liquids with temperature, pressure and Composition. Process World Petroleum congress London 2:529–541. Diaz RM, Bernardo MI, Fernbndez AM, Folgueras MB (1996), Prediction of the viscosity of lubricating oil blends at any temperature. Fuel 75:574-578. Holland JH (1992), Algoritmos geneticos. Investigacion Y Ciencia 192:38–45. Kirkpatrick S, Gelatt CD, Vecchi MP (1983), Optimization by simulated annealing. Science 220:671–680. Koval EJ (1963), A method for predicting the performance of unstable miscible displacement in heterogeneous media. SPE Journal 3:145-154. Maddinelli G, Pavoni S (2013), Method for predicting the properties of crude oils by the application of neural networks. US 20130103627 A1. MathWorks (2004–2006), Genetic algorithm and direct search toolbox: Users Guide. Copyright by the Math Works, Natick, Mass. Maxwell JB (1950), Data Book on Hydrocarbons: Application to Process Engineering. Princeton, New Jersey: D. Van Nostrand Company, Inc. Miadonye A, Latour N, Puttagunta VR (2000), A correlation for viscosity and solvent mass fraction of bitumen-diluent mixtures. Petroleum Science and Technology 18:1–14. Parkash S (2003), Refining Processes Handbook. Oxford, UK: Elsevier (Gulf Professional Publishing). Preechakul C, Kheawhom S (2009), Modified genetic algorithm with sampling techniques for chemical engineering optimization. Journal of Industrial and Engineering Chemistry 15:110- 118. Price KV, Storn RM, Lampinen JA (2005), Differential Evolution: A Practical Approach to Global Optimization. Springer, Berlin Heidelberg. Rahmes VH, Nelson WL (1948), Viscosity blending relationships of heavy petroleum oils. Analytical Chemistry 20:912-915. Rangaiah GP (2001), Evaluation of genetic algorithms and simulated annealing for phase equilibrium and stability problems. Fluid Phase Equilibria 187–188:83–109. Riazi MR (2005), Characterization and properties of petroleum fractions, first ed. American Society and Testing Materials, ASTM Manual Series: MNL50, USA. Sahoo RK, Banerjee T, Ahmad SA, Khanna A (2006), Improved binary parameters using GA for multi-component aromatic extraction: NRTL model without and with closure equations. Fluid Phase Equilibria 239:107–119. 90 Experimental and Modeling Investigations of the Viscosity of Crude Oil Binary Blends: New Models Based on the …… 91 Sahoo RK, Banerjee T, Khanna A (2007), UNIQUAC interaction parameters with closure for imidazolium based ionic liquid systems using genetic algorithm. The Canadian Journal of Chemical Engineering 85:833–853. Shan-peng H, Wen-xue J, Jin-jun Z (2007), Approaches to predict viscosities of crude oil blends. Journal of Central South University of Technology 14:466-470. Singh MK, Banerjee T, Khanna A (2005), Genetic algorithm to estimate interaction parameters of multicomponent systems for liquid–liquid equilibria. Computers and Chemical Engineering 29:1712–1719. Stragevitch L, Davila SG (1997), Application of a generalized maximum likelihood method in the reduction of multicomponent liquid-liquid equilibrium data. Brazilian Journal of Chemical Engineering 14:41–52. Tan M, Zou Y, Wang X, Guo Y (2014), A novel wireline logs based approach for assessment of mineral concentrations in organic shale. Oil Shale 31(2):132–146. Vakili-Nezhaad G, Vatani M, Asghari M (2013), Calculation of the binary interaction and non- randomness parameters of NRTL, NRTL1, and NRTL2 models using genetic algorithm for ternary ionic liquid systems. Chemical Engineering Communications 200:1102–1120. Vakili-Nezhaad G, Vatani M, Gujarathi AM (2014), Application of genetic algorithm to calculation of three-suffix margules parameters in ternary extraction ionic liquid systems. International Journal of Thermodynamics 17:1-6. Vatani M, Asghari M, Vakili-Nezhaad G (2012a), Application of genetic algorithm to the calculation of parameters for NRTL and two- suffix margules models in ternary extraction ionic liquid systems. Journal of Industrial and Engineering Chemistry 18:1715–1720. Vatani M, Asghari M, Vakili-Nezhaad G (2012b), Application of genetic algorithm to parameter estimation in liquid-liquid phase equilibrium modeling. The Journal of Mathematics and Computer Science 5(1):60-66. Wallace D, Henry D (1987), A correlation for correcting the viscosity of solvent-extracted bitumen to a solvent-free basis. AOSTRA Journal of Research 3:239-249. Xue Y, Cheng L, Mou J, Zhao W (2014), A new fracture prediction method by combining genetic algorithm with neural network in low- permeability reservoirs. Journal of Petroleum Science and Engineering 121:159–166. Yuan W, Hansen AC, Zhang Q, Tan Z (2005), Temperature-dependent kinematic viscosity of selected biodiesel fuels and blends with diesel fuel. Journal of the American Oil Chemists Society 82:195-199.