532 Reservoir Formation Damage • Effluent species concentrations versus pore volume injected 9. Output that can be requested: • Best estimates of the unknown parameters • Predicted versus measured data • Simulation of pressure; various species concentrations in the flowing fluid and the pore surface; porosity and permeability as functions of pore volume injected or time Numerical Solution of Formation Damage Models Depending on the level of sophistication of the considerations, theoretical approaches, mathematical formulations, and due applications, formation damage models may be formed from algebraic and ordinary and partial differential equations, or a combination of such equations. Numerical solutions are sought under certain conditions, defined by specific appli- cations. The conditions of solution can be grouped into two classes: (1) initial conditions, defining the state of the system prior to any or further formation damage, and (2) boundary conditions, expressing the interactions of the system with its surrounding during formation damage. Typically, boundary conditions are required at the surfaces of the system, through which fluids enter or leave, such as the injection and production wells or ports, or that undergo surface processes, such as exchange or reaction processes. Algebraic formation damage models are either empirical correlations and/or obtained by analytical solution of differential equation models for certain simplified cases. Numerical solution methods for linear and nonlinear algebraic equations are well developed. Ordinary differential equation models describe processes in a single variable, such as either time or one space variable. However, as demonstrated in the following sections, in some special cases, special mathematical techniques can be used to transform multi-variable partial differential equations into single-variable ordinary differential equations. Amongst these special techniques are the methods of combination of variables and separation of variables, and the method of characteristics. The numerical solution methods for ordinary differential equations are well developed. Partial differential equation models contain two or more independent variables. There are many numerical methods available for solution of partial differential equations, such as the finite difference method (Thomas, 1982), finite element method (Burnett, 1987), finite analytic method (Civan, 1995), and the method of weighted sums (the quadrature and cubature methods) (Civan, 1994, 1994, 1995, 1996, 1998; Malik and Civan, 1995; Escobar et al., 1997). In general, implementation of Simulator Development 533 numerical methods for solution of partial differential equations is a challenging task. In the following sections, several representative examples are presented for instructional purposes. They are intended to provide some insight into the numerical solution process. Interested readers can resort to many excellent references available in the literature for details and sophisticated methods. For most applications, however, the information presented in this chapter is sufficient and a good start for those interested in specializ- ing in the development of formation damage simulators. Although numerical simulators can be developed from scratch as demonstrated by the examples given in the following sections, we can save a lot of time and effort by taking advantage of ready-made softwares available from various sources. For this purpose, the spreadsheet programs are particularly convenient and popular. Various softwares for solving algebraic, ordinary, and partial differential equations are available. Com- mercially available reservoir simulators can be manipulated to simulate formation damage, such as by paraffin deposition as demonstrated by Ring et al. (1994). Ordinary Differential Equations In this section, several examples are given to illustrate the numerical solution of ordinary differential equation models. Specifically, the simpli- fied formation damage and filtration models, developed in previous chapters, are solved. Example 1: Wojtanowicz et al. Fines Migration Model a. Derive a numerical solution for the following modified Wojtanowicz etal. (1987, 1988) fines migration model d_ dt (16-1) — = k r c-k f a, t>0 dt (16-2) (16-3) subject to 534 Reservoir Formation Damage (16-4) b. Plot c and o versus t using the following data until (|> = 0 : A = 1cm 2 , L = \cm, $ 0 =0.20, g = 0.5cm 3 /min, c in =Q.85gr/cm 3 , p = 1.00 grl cm 3 , &,. = O-Tmhr 1 , k e = 0.2mm- 1 Expanding Eq. 16-1 and then substituting Eqs. 16-2 and 3 and rear- ranging yields dt (16-5) A simultaneous solution of Eqs. 16-2 and 5 as a function of time, subject to the initial conditions given by Eq. 16-4, can be readily obtained using an appropriate method, such as by the Runge-Kutta-Fehlberg four (five) method available in many ordinary differential equation solving software (IMSL, 1987, for example). Then, the porosity variation is calculated by Eq. 16-3. A typical numerical solution is presented in Figure 16-1. 0 0.25 0.5 0.75 Time, min. Figure 16-1. Particle concentration and porosity vs. time. Simulator Development 535 Example 2: Ceriiansky and Siroky Fines Migration Model The numerical solution is carried out for T^. =0. Here, the numerical solution approach presented by Cernansky and Siroky (1985) is described. Define the dimensionless time and distance, respectively, by: = t/(L/u) = x/L (16-6) (16-7) Thus, invoking Eqs. 16-6 and 7, Eqs. 10-84 and 91 of Chapter 10, respectively, become: ar ax (16-8) (16-9) Eqs. 16-8 and 9 are a system of hyperbolic partial differential equations, which can be transformed into a system of ordinary differential equations by means of the method of characteristics as: d<5 — dX (16-10) dT v ' in which /(a, e) = k p La (ty 0 - e) - k' e Leuyi/K The characteristics are given by: dT dX = 0, or T = constant (16-11) (16-12) (16-13) 536 Reservoir Formation Damage J\7 — = 0, or X = constant dT The conditions of solution for Eqs. 16-8 and 9 are: 8 = 0, 0<X<1, 7 = 0 (16-14) (16-15) a = a in , X = 0, T>0 (16-16) Applying the condition given by Eq. 16-15, Eq. 16-10 becomes: da — dX for which the analytic solution is given by: (16-17) (16-18) The system of ordinary differential equations given by Eqs. 16-10 and 11 are solved by means of the fourth-order Runge-Kutta method, subject to the conditions given by Eqs. 16-15 and 16 along the characteristic represented by Eq. 16-14. Figure 16-2 shows the dimensionless effluent particles concentration as a function of the cumulative volume injected per unit area. Figures 16-3 and 16-4 show typical suspended particle concentration and the particles retained in porous media as a function of distance along the porous media at different times. Example 3: Civan's Incompressive Cake Filtration without Fines Invasion Model The equations of Civan's (1998, 1999) incompressive cake filtration model are given in Chapter 12. As described in Chapter 12, the ordinary differential equations of this model have been solved by the Runge-Kutta- Fehlberg four (five) numerical scheme (Fehlberg, 1969), subject to the initial condition given by Eq. 12-14. Example 4: Civan's Compressive Cake Filtration Including Fines Invasion Model The equations of Civan's (1998, 1999) compressive cake filtration including fines invasion model are given in Chapter 12. As described in Simulator Development 537 Figure 16-2. Experimental and simulated dimensionless concentrations vs. filtrate volume for the POP 1 material, usmg c 0 = 0.1 kg/m^ H = 5, 10, 15, 20, 50, and 100 mm, and u = 0.5 cm/s (Cerfiansky, A., & Siroky, R., 1985; reprinted by permissioji of the AlChE, ©1985 AlChE, all rights reserved; and after Cernansky and Siroky, 1982, reprinted by permission). Figure 16-3. Simulated dimensionless concentration vs. dimensionless distance at different times for the FINET-PES 1 material, using c 0 = 0.1 kg/ m 3 , H = 100 mm, and u = 0.5 cm/s (Cerhansky, A., & Siroky, R., 1985; reprinted by permissioji of the AlChE, ©1985 AlChE, all rights reserved; and after Cernansky and Siroky, 1982, reprinted by permission). 538 Reservoir Formation Damage 200 120 80 0,8 1.0 Figure 16-4. Simulated mass of particles retained per unit volume of porous material vs. dimensionless distance at different times for the FINET-PES 1 material, using c 0 = 0.1 kg/m 3 , H = 100 mm, and u = 0.5 cm/s (Cernansk^, A., & Siroky, R., 1985; reprinted w by permission of the AlChE, ©1985 AlChE, all rights reserved; and after Cerhansky and Siroky, 1982, reprinted by permission). Chapter 12, the ordinary differential equations of this model have been solved by the Runge-Kutta-Fehlberg four (five) numerical scheme (Fehlberg, 1969), subject to the initial condition given by Eq. 12-14. Partial Differential Equations In this section, the application of the finite difference method for solution of partial differential type models is illustrated by several examples. The Method of Finite Differences The method of finite differences is one of many methods available for numerical solution of partial differential equations. Because of its simplicity and convenience, the method of finite differences is the most frequently used numerical method for solution of differential equations. This method provides algebraic approximations to derivatives so that differential equations can be transformed into a set of algebraic equations, which can be solved by appropriate numerical procedures. Although the finite difference approximations can be derived by various methods, a Simulator Development 539 simple method based on the power series approach is presented here to avoid complicated mathematical derivation. Interested readers may resort to many excellent textbooks and literature available on the finite dif- ference method. The information provided in this chapter is sufficient for many applications and for the purpose of this book. Most transport phenomenological models involve first and second order derivatives. Therefore, the following derivation is limited to the development of the first and second order derivative formulae. However, the higher order derivative formulae can be readily derived by the same approach pre- sented in this chapter. First Order Derivatives In general, a function can be approximated by a power series as: =a (16-19) in which a Q ,a l ,a 2 , are some fitting coefficients. To determine the fitting coefficients, consider any set of three discrete function values yj_j, ff, and f i+l located at the sample points *,-_,, x f , and x i+l , respectively, as shown in Figure 16-5. Figure 16-5. Sample points considered for the finite difference method. 540 Reservoir Formation Damage More points could be considered for better accuracy. Higher order finite difference formulae can be derived easily using the quadrature method as described by Civan (1994). With three points, we can write the following three quadratic approximations at / -1, /, / +1: fi=a Q + a^ + a 2 xf + ax 2+l (16-20) (16-21) (16-22) If the middle point is considered as a reference point, then the locations of the three points are given by: ,._! = -A*, Xj = 0, * /+1 = A* (16-23) Thus, substituting Eq. 16-23 into Eqs. 16-20 through 22, and then solving the resultant three algebraic equations simultaneously yields the following expressions for the fitting coefficients of the quadratic expression: fln=/, (16-24) a, = _ fi+\ ~ fi-i 2Ax (16-25) a, =• (16-26) On the other hand, the derivative of Eq. 16-19 for quadratic approxi- mation is given by: dx (16-27) Thus, the following forward difference formula is obtained by substituting Eqs. 16-25 and 26 into Eq. 16-27 for a } ,a 2 at x = x i _ l =-A*: dx (16-28) Simulator Development 541 The central difference formula is obtained as, by substituting Eqs. 16- 25 and 26 for a } ,a 2 into Eq. 16-27 at x = x l ; =0: dx (16-29) The backward difference formula is obtained as, by substituting Eqs. 16-25 and 26 for a\,a 2 into Eq. 16-27 at x = x i+l = AJC: dx Second Order Derivatives (16-30) A similar procedure can be applied to derive the second (and higher) order derivative approximations. Thus, consider a power series expan- sion as: dx (16-31) Expressions similar to Eqs. 16-24 through 26 are obtained for the fitting coefficients, given by: f - f _ Ji+l Ji-\ 2A;c (16-32) (16-33) " 2 " 2(A*) 2 " < 16 - 34 > The derivative of the quadratic equation is obtained from Eq. 16-31 as: f" = b l +2b 2 x (16-35) Thus, the forward difference formula is obtained as, by substituting Eqs. 16-33 and 34 for b { ,b 2 at x = x i _ l =-A;c into Eq. 16-35: [...]...542 Reservoir Formation Damage (16 -36 ) 2Ax The central difference formula is obtained as, by substituting Eqs 16 -33 and 34 for b{,b2 at x = xf=0 into Eq 16 -35 : dx (16 -37 ) 2Ax The backward difference formula is obtained as, by substituting Eqs 16 -33 and 34 for b^b2 into Eq 16 -35 for x = xi+l =Ax: (16 -38 ) 2Ajc dx However, only the central second order derivative... Chemicky Prumysl, Vol 32 (57), No 8, 1982, pp 39 7-405 Cernansky, A., & Siroky, R., "Deep-bed Filtration on Filament Layers on Particle Polydispersed in Liquids," Int Chem Eng., Vol 25, No 2, 1985, pp 36 4 -37 5 Chang, F F., & Civan, F., Predictability of Formation Damage by Modeling Chemical and Mechanical Processes, SPE 237 93 paper, Proceedings of the SPE International Symposium on Formation Damage Control,... pp 2 93- 312 Civan, F., A Generalized Model for Formation Damage by Rock-Fluid Interactions and Particulate Processes, SPE 211 83, Proceedings of SPE 1990 Latin American Petroleum Engineering Conference, Rio de Janeiro, Brazil, October 14-19, 1990, 11 p Civan, F "Evaluation and Comparison of the Formation Damage Models," SPE 237 87 paper, Proceedings of the SPE International Symposium on Formation Damage. .. Predictability of Formation Damage: An Assessment Study and Generalized Models, Final Report, U.S DOE Contract No DE-AC2290-BC14658, April 1994 550 Reservoir Formation Damage Civan, F /'Practical Implementation of the Finite Analytic Method," Applied Mathematical Modeling, Vol 19, No 5, 1995, pp 298 -30 6 Civan, F., "A Multi-Purpose Formation Damage Model," SPE 31 101 paper, Proceedings of the SPE Formation Damage. .. 50, No 3, 1995, pp 531 -547 Ohen, H A., & Civan, R, Simulation of Formation Damage in Petroleum Reservoirs, SPE 19420 paper, Proceedings of the SPE 1990 Symposium on Formation Damage Control, February 22- 23, 1990, Lafayette, Louisiana Ring, J N., Wattenbarger, R A., Keating, J F., & Peddibhotla, S., "Simulation of Paraffin Deposition in Reservoirs," SPE Production & Facilities, February 1994, pp 36 -42... Lafayette, Louisiana, pp 219- 236 Civan, F, "Numerical Simulation by the Quadrature and Cubature Methods," SPE 287 03 paper, Proceedings of the SPE International Petroleum Conference and Exhibition of Mexico, October 10- 13, 1994, Veracruz, Mexico, pp 35 3 -36 3 Civan, F.,"Solving Multivariable Mathematical Models by the Quadrature and Cubature Methods," Journal of Numerical Methods for Partial Differential Equations,... Lafayette, Louisiana, pp 31 1 -32 6 Civan, F "A Time-Space Solution Approach for Simulation of Flow in Subsurface Reservoirs," Turkish Oil and Gas Journal, Vol 2, No 2, June 1996, pp 13- 19 Civan, F., "Incompressive Cake Filtration: Mechanism, Parameters, and Modeling," AIChE J., Vol 44, No 11, November 1998, pp 237 9 238 7 Civan, F., "Practical Model for Compressive Cake Filtration Including Fine Particle Invasion,"... given by Eq 16-42 can be discretized as: C u i=\/2Ci=\/2 Pe i=l C Ar /=0 _ (16- 53) in which (16-54) i=l/2 Thus, substituting Eq 16-54 into 53, the fictitious point value is determined as: (16-55) where i I = 1 / 2 1 = 1/2 2 Pe&r 2 PeAr (16-56) (16-57) 546 Reservoir Formation Damage The outlet boundary condition given by Eq 16- 43 is discretized as: C N+l CN _ Q Ar (16-58) from which the fictitious point... defined as following: 548 Reservoir Formation Damage 3. 05 4.05 5.05 6.05 7.05 Radial Distance From Wellbore, r, meters Figure 16-7 Mud filtrate concentration vs radial distance from wellbore at different times (reprinted from Journal of Petroleum Science and Engineering, Vol 11, Civan, F., & Engler, T., "Drilling Mud Filtrate Invasion—Improved Model and Solution," pp 1 83- 1 93, ©1994; reprinted with permission... Mid-Continent Operations Symposium, March 28 -31 , 1999, Oklahoma City, Oklahoma, pp 2 03- 210 Civan, F., & Engler, T., "Drilling Mud Filtrate Invasion—Improved Model and Solution," J of Petroleum Science and Engineering, Vol 11, 1994, pp 1 83- 1 93 Civan, F., Knapp, R M., & Ohen, H A., Alteration of Permeability Due to Fine Particle Processes, J Petroleum Science and Engineering, Vol 3, Nos 1/2, Oct 1989, pp 65-79 Escobar, . Eqs. 16 -33 and 34 for b { ,b 2 at x = x f =0 into Eq. 16 -35 : dx 2Ax (16 -37 ) The backward difference formula is obtained as, by substituting Eqs. 16 -33 and 34 for b^b 2 into Eq. 16 -35 . obtained as, by substituting Eqs. 16 -33 and 34 for b { ,b 2 at x = x i _ l =-A;c into Eq. 16 -35 : 542 Reservoir Formation Damage 2Ax (16 -36 ) The central difference formula is . Symposium on Formation Damage Control, February 26-27, 1992, Lafayette, Louisiana, pp. 2 93- 312. Civan, F., A Generalized Model for Formation Damage by Rock-Fluid Interactions and Particulate