A nonlinear test case for the finite element method in two-phase flow

P. C. Robinson, J. Rae and C. P. Jackson
OX1 I ORA, Theoretical Physics Division, Building 424.4, AERE Harwell, Oxfordshire UK (Received February 1979, revised October 1979)

The ability of the finite element method to compute the motion of sharp interfaces in two-phase flow is examined by applying it to a test problem for which an analytical solution can be found. The problem is one of imbibition, the nonlinear diffusion of a fixed amount of water into an oil filled porous medium and can be solved exactly by similarity and the separation of variables method used by Boyer. The finite element program used was of the Galerkin type and employed a self-adaptive time stepping algorithm with both linear and quadratic isoparametric triangular elements. Results are presented for both elements and show that there is little difficulty in this type of diffusion problem in following the oil-water interface to accuracies of 2 or 3 percent.

progress in computational fluid mechanics has in the past often stemmed from attempts to model better the behaviour of oil and gas in reservoirs. The recent growth in applications of the finite element method to fluids’-3 is no exception although the number of articles devoted to single phase flows by far outstrips that of publications on simultaneous flow of more than one fluid. Although numerical simulation of reservoirs is still dominated by finite difference methods4 finite element methods are increasingly being investigated. ‘-12 The proponents of the latter claim several advantages for the method. It is able to model, in a natural way, the complex geometrical shapes of reservoirs, patterns of rock faults and local modifications of the mesh near wells or at other regions of special importance. In addition it is often claimed that its intrinsic high-order accuracy allows good representation of the motion of waterflood fronts without the usual problems arising from false diffusion. There are, however, differences of opinion on this89g212 and further testing is needed. As the equations describing the oil-water system are nonlinear there are very few analytic solutions known beyond the classic Buckley-Ieverett case.13 There have been, however, a number of studies of a related equation, the nonlinear diffusion equation, and in particular Boyer14 has found exact solutions of physical interest. These are described below and put into the context of oil-water flow where they provide a useful test of numerical methods.

The equations of motion for oil and water in the appropriate circumstances have also been solved by a computer program RESOLVE which is based on the finite element method. The results are presented below and discussed in the light of the analytic solutions.

Flow equations

and an analytic


It is often assumed that oil and water in reservoirs are incompressible liquids which follow the Darcy equations motion. The governing equations of the flow may be written: 4 @

“; = V.TO


@ z=

V.Tw VPw

where ,V is the gradient operator, r$is the reservoir porosity and Se, SW, P,, PW are the oil and water saturations and pressures. The transmissibilities To, Tw depend on the absolute rock permeability k, the relative permeabilities k,,, k,, and the viscosities po, pwin the form: To= ckk,o __


ckk,w ___


where c is a constant

which depends on the system of units
0307-904X/80/030212-05/$02.00 0 IPC Business Press and UKAEA 19 80


Appl. Math. Modelling,


Vol 4, June

) (4) (5) where : R(7) = (627)“6 (12) where P. the capillary pressure. (It is easy to see that this leads to the same number of equations Appt. Thus the weak form of the water equation (2) with boundary conditions of a specified flux fout of part Ci of the boundary C of a. The saturation of course always stays below the peak starting value so that the relative permeabilities of (1) make sense. w = s$.85 when the peak water saturation has been chosen to be 0. + Tyw dS.4 the relative permeabilities behave in a plausible manner. but with a sharply defined front at r = R(T). used. dSw asw ’ 7 (8) This has the form of the nonlinear diffusion equation: (9) as _=_ aT i r s a WS) z The capillary pressure and relative permeabilities are empirically determined functions of saturation which may take a number of forms. In this section we present an outline derivation of the finite-element equations. (Tw VP. With these forms the effective diffusion coefficient in (8) behaves like S$ for low water saturation and falls into the class of powerlaw diffusion equations for which some solutions can be found. was used as a test case for the finite element reservoir simulation program RESOLVE developed at Harwell..$-) “* r<R(T) (11) 0 r > R(T) The oil and water flow problem with its analytic solution discussed above.5. T s+TrW-_=&aPW & A r and c is a constant which fixes the initial condition..3). =S. This can be regarded equivalently as expanding the fields in terms of piecewise polynomial basis functions $~i each associated with a node. SW. Sw respectively so the two equations (1) and (2) link four unknown variables Se. For D(S) = S* it is easy to check that a solution of this type is: S(r.. for simplicity the argument is presented only in terms of the case discussed above. P . and a specified value on the remainder C.3 (corresponding to c = 0. which subsequently spreads throughout the reservoir by diffusion. is: I %l R ( VW . + Trw dp. A number of special solutions are known for the nonlinear diffusion equation16’i7 but here we use only the results of Bayer l4 who employed the technique of separation of variables to find similarity solutions for power law diffusion. With suitably scaled units of time equation (8) now reduces to equation (9) with D(S) = S*. The elements available in RESOLVE include the isoparametric 3 node linear triangle and the isoparametric 6 node quadratic traiangle. krW = s*s* l-2Sw ’ w (10) Although the expression for krW here is quite artificial and in fact makes no physical sense for SW > 0.) (13) In the Gale&in formation of the finite element method the test functions for each equation are taken to be the basis functions 3/i for all the nodes i except those on C2. = S: . (7) which when substituted equation for S w : back into (2) leads to a closed rT. provided we look at problems where the water saturation never exceeds about 0.. Often the capillary pressure curve is a straight line over much of the saturation range and relative permeabilities are frequently taken to have a quadratic behaviour kr. In essence the method spatially discretizes the problem by dividing the domain !Z of interest into a number of ‘elements’ of simple geometric shapes (or simple mappings of such shapes) on each of which the fields are approximated by low-order polynomials determined by the values at a small number of nodes. The equations are now manipulated into a form showing the connection with nonlinear diffusion in a cylindrically symmetric reservoir. 7) = R*(7) A(1 . r” (6) Finite element equations and solution method If there are no sources present so the total amounts of fluids do not change we need to choose the integration constant A as zero. The solution corresponds to a delta function spike at the origin at the time zero.o T. derived by multiplying the equations with a suitably smooth test function W and integrating over a. Equations for the nodal values of the fields are obtained from the weak form of the governing partial differential equations.. The details of the comparison are given in the following section. k. The details of the finite element method can be found in many sources. June 213 . C.Finite element method in two-phase flow: P. The second derivative terms in (1) and (2) are integrated by parts to reduce smoothness requirements. We take the viscosities to be constant and kYo. krw to be known functions of So. By adding (1) and (2) and using (4) we have in cyclindrical coordinates.w T. Math. Although the program is capable of handling more general compressible flows. The equations are supplemented in the usual way 41ys by the further two equations: Se’Sr$!=l PO ~ pw = P&S.. is again a known function OfSw. The amount of water in the reservoir stays constant. We can arrange exact quadratic behaviour by setting: k. Note that the popular Hermite cubic quadrilateral would not be expected to perform well in the present case since it has a continuous derivative across element boundaries whereas the waterflood front is discontinuous.*‘18 among the references. PO. asw __ & T. 1980. which are only non-zero on elements containing the associated node. Equations (5) and (6) then give: apw Tr0 %- = - __ dP. For comparison with the computed solution we follow the motion from time r = 1. Robinson et al. Vol 4. Modelling. as well as several quadrilateral elements. of which a few are listed1..

227 0.109 0. In each case saturation is plotted against radius and the exact solution is given for comparison.0672 0. June .0544 0.300 0.cl The integrations over elements are evaluated numerically in the program by a Gaussian quadrature scheme.231 0. In Figures 2 and 4 the initial conditions and the solution after 10 and 20 time steps are plotted.0483 0. The water equations. at equal intervals of one-sixth units and in the quadratic case there were also 39 nodes inside the sector.0714 0.105 0. Robinson et al.651 2. Table 1 gives the saturations at r = 0 as calculated by the finite element program and as given by equation (I 1) at Table 1 Finite element and exact solutions at r = 0 Quadratic Number of time steps 0 5 IO 15 20 25 30 35 40 45 50 55 60 run intervals throughout the runs. because tii is only non-zero on elements containing node i so that only a small number of nodal saturation and pressure values appear in each equation. as unknowns). The numerical solution generally overshoots into negative saturations in a region of size about one element ahead of the front.0589 0.0617 0. RESOLVE uses a stiffly stable first-order method.06 17.9%. In the linear case a 5” sector was used with a grid of 79 elements giving 81 nodes.0593 0. No water is being added to the system so mass should be conserved.0717 0. The equations are coupled nonlinear ordinary differential equations in time for the nodal values.30 26.0899 0. that is characterized by a wide range of time scales.0529 0. The sparseness of the equations allows an efficient direct solution technique (the frontal method) to be used for the linear equations arising at each iteration.218 0. The mass present is not quite that of the exact solution since the initial conditions are not exact.125 0. The error in these values is around 3% for the quadratic run and 4.1885 0.0803 0.0810 0.096 4.133 0.0518 0. It can be seen that the largest discrepancy between Ihe finite element and exact solutions occurs in the region of the flood front.4791 0. The problem was solved using quadratic shape functions and again using linear shape functions.0693 0. Linear run Time 0. The method advances in time automatically adjusting the size of the time step to be as large as possible subject to a constraint upon the acceptable error in each step.156 0.188 0.109 0. for example are: ( v Gil VW v Pw) - J lLif = OCl41 element.382 11.2326 0. The grid for the quadratic case is shown in Figure 1.148 0.97 26.300 0. Midside nodes are not shown Results For the finite element analysis triangular elements were used on a sector.857 4.264 0.21 Finite element solution 0.300 0. ‘g.300 0.35 38.20 At each stage a set of nonlinear algebraic equations has to be solved.623 7. They are also stiff. which is done by an iterative NewtonRaphson linearization about the latest approximation to the solution.Finite element method in two-phase flow: P.0 0.130 0. Since the program RESOLVE automatically adjusts the time step size the times at which the solution was calculated in the two runs do not correspond.179 0. Figures 2 and 3 show the solution for the quadratic run and Figures 4 and 5 for the linear run.0939 0.40 and 60 time steps are plotted. taking advantage of the radial symmetry of the problem.879 12. Modelling. In both cases the time step increased like time to the power 0. An error of this order would be expected because of the approximate nature of the initial conditions.0468 Exact solution Time 0.5321 1.805 3.5% for the linear run. In Figures 3 and 5 the solutions after 30.185 0. Figure 7 Finite element grid for quadratic run.0 0.0481 214 Appl. for example.9558 1.06 37. This is the case for both runs. In the quadratic case 100% of the exact solution mass is present and in the linear case 94.270 0.997 7.112 0.0963 0. based on the backward differentiation formula. The fact that the error does not increase with time supports this explanation. In both cases there were 41 nodes along each side of the sector. 1980. arising. Math.0458 Exact solution 0.0546 0. C.153 0.0774 0.036 1.267 0. They are sparse.0704 0.265 0.0606 0. including the origin.0625 0.0936 0.184 0.153 0. For the quadratic case a 10” sector was used with a grid of 39 elements giving 120 nodes.54 17.130 0.85.72 Finite element solution 0. This is a consequence of the discontinuity in the derivative of the exact solution. Vol 4.222 0.0827 0. as the waterflood spreads.

program results for the pressure are in good agreement with this. 40 (0) and 60 (01 time steps for linear run.I Figure 2 Finite element and exact initial conditions tions after 10 (0) and 20 (0) time steps for quadratic (a and SOILIrun -0osL 00 ’ 04 12 08 Radius. (0) The program calculates the oil pressure as well as the water saturations. Vol 4. Conclusions In this paper we investigated the use of the finite element method in calculating the diffusive motion of immiscible fluids in a porous medium.40 and 60 (0) time steps for quadratic run. C.0 Figure 3 Finite element and exact solutions after 30 (~I.6 2 Figure 4 Finite element and exact initial conditions (4) and solutions after 10 (0) and 20 (0) time steps for linear run. June 215 . Robinson et al. The Figure 5 Finite element and exact solutions after 30 (A). (scaled units) 25 3.0 05 1-O I. (scaled units) 16 ?. -0021 00 o-5 10 15 Radius.2 Radius. (scaled unltsl I. 1980. low-order elements in a conventional Galerkin formulation are able to model the flow to good o’30d I 04 0. The conclusions drawn from this test case are: (l).0 Radius. 20 (scaled umts) 25 30 P. Appl.5 2. Math. Modelling. -0-02’ 0. is the oil pressure at infinity where the water saturation is zero and is taken to be zero by the program.8 1.=1-S~----1 1 -SW . From equations (6) and (7) an explicit expression for PO in terms of SW can be found: P.Finite element method in two-phase flow: P.2 log(1 -SW) tP.

P.. Math. 1980. 1975 in fluids’. References 1 Gallagher. C. Num. at a flood front the saturations sometimes overshoot into nonphysical negative saturation values. et al. 1977. A. 1971. J. G. F. H. and Brebbia. W.. Paper SPE 5725 of reference 3 Spivak. 11. R. 96 Boyer. London. Trans.C. Prentice-Hall. Paper EUR86. 17.41 Collins. in ‘Formulations and computational algorithms in finite element analysis’. K. W. McGraw-Hill. V. Sot. European Offshore Petrol. 1977. London.I. Sot. J. J. J. Reinhold.433 Lewis. 1 and II 20 17 18 19 216 Appl. Math. Software 1 1975 (71) accuracy with no special adaptations: (2). Eng. E. J. Eng. Oxford 1975 Zienkiewicz.. O. ‘Modern reservoir engineering. This behaviour. 1978 Buckley.C. A. June . 4 5 6 I 8 9 10 11 12 13 14 15 16 Acknowledgements The authors wish to thank the United Kingdom Department of Energy.. Pet. London. ‘Finite element techniques for fluid’. C. 1978 Wilson. It should prove useful as a test for other programs handling twophase flow in reservoirs. A.17. SOC. ch 9. Y. London. C. It is unreasonable.. ‘Flow of fluids through porous materials’. D. Sot. 1961. et al. Eng.M. et al. H.J. J. as indeed one would expect from the shape functions. Vol 4. A. Eng. Pet. 0.27 Settari. 139 Lewis. H. vol I of reference 1 Langsrud. causes little problem in finding the front position to good accuracy: (4). linear elements perform quite well in fitting the waterflood front and are worth considering for this type of problem: (3). R. and Leverett. 2 3 Connor. J.40.. H. C.T. 9. et al. the British Gas Corporation and the British National Oil Corporation for permission to publish the results of this work. a simulation approach’. Modelling. Englewood Cliffs 1977 Shun. 1976 Proceedings of the 4th Symposium on Numerical Simulation of Reservoir Performance. R. ConJ. Tram AIME 1942. M. Eng. C. ‘The finite element method’. D. B. however.S. M. 1975. et al. J. W.. W. C. A. ‘The mathematics of diffusion’. and Casinder. London 1977 Gear. Meth. in stiff problems such as this there are great savings in computer time to be had from a selfadaptive time stepping scheme: (S).) U.Finite element method in two-phase flow: P. of AIME. ‘Nonlinear Dartial differential eauations in engineering’: Academic Piess. et al. Math.. Germany Symposium. Newnes-Butterworth. Clarendon Press.. 196i Crank. E. New York 1961 Ames. ‘Finite elements Wiley. R.2?8 tioldwater.. 1976 Byrne. New York. Phys. Bathe. Int. R. to expect the quadratic fit to overshoot less than about l/8 of the value at the node behind the front.. Press. Los Angeles 1976 Crichlow. Paper EUR87 European Offshore Petrol. M. for example. and Hindmarsh. G. S. Conf.. M. (ed. 146. Robinson et al. this is one of very few nonlinear problems which can be solved exactly in a tractable form and yet relates to a physical problem. et al. Pet.. Pet.

Sign up to vote on this title
UsefulNot useful