fem14

download fem14

of 5

Transcript of fem14

  • 7/27/2019 fem14

    1/5

    A nonlinear test case for thefinite element method intwo-phase flowP. C. Robinson, J. Rae and C. P. Jackson

    Theoretical Physics Division, Building 424.4, AERE Harwell, Oxfordshire OX1 I ORA,

    UK(Received February 1979, revised October 1979)

    The ability of the finite element method to compute the motion of sharpinterfaces in two-phase flow is examined by applying it to a test problemfor which an analytical solution can be found. The problem is one ofimbibition, the nonlinear diffusion of a fixed amount of water into an oilfilled porous medium and can be solved exactly by similarity and theseparation of variables method used by Boyer. The finite elementprogram used was of the Galerkin type and employed a self-adaptive timestepping algorithm with both linear and quadratic isoparametric triangularelements. Results are presented for both elements and show that there is

    little difficulty in this type of diffusion problem in following the oil-waterinterface to accuracies of 2 or 3 percent.

    Introduction

    progress in computational fluid mechanics has in the pastoften stemmed from attempts to model better the behaviourof oil and gas in reservoirs. The recent growth in applica-tions of the finite element method to fluids-3 is noexception although the number of articles devoted to singlephase flows by far outstrips that of publications on simul-taneous flow of more than one fluid. Although numericalsimulation of reservoirs is still dominated by finite differencemethods4 finite element methods are increasingly beinginvestigated. -12 The proponents of the latter claim severaladvantages for the method. It is able to model, in a naturalway, the complex geometrical shapes of reservoirs, patternsof rock faults and local modifications of the mesh near wellsor at other regions of special importance. In addition it isoften claimed that its intrinsic high-order accuracy allowsgood representation of the motion of waterflood frontswithout the usual problems arising from false diffusion.There are, however, differences of opinion on this89g212 andfurther testing is needed.

    As the equations describing the oil-water system are non-linear there are very few analytic solutions known beyondthe classic Buckley-Ieverett case.13 There have been, how-

    ever, a number of studies of a related equation, the non-linear diffusion equation, and in particular Boyer14 hasfound exact solutions of physical interest. These are des-cribed below and put into the context of oil-water flowwhere they provide a useful test of numerical methods.

    The equations of motion for oil and water in the appro-priate circumstances have also been solved by a computerprogram RESOLVE which is based on the finite elementmethod. The results are presented below and discussed inthe light of the analytic solutions.

    Flow equations and an analytic solution

    It is often assumed that oil and water in reservoirs areincompressible liquids which follow the Darcy equations ofmotion. The governing equations of the flow may bewritten: 4

    @ ; = V.TO VP,

    @ z= V.Tw VPw

    where ,V is the gradient operator, r$ s the reservoirporosity and Se, SW, P,, PW are the oil and water saturationsand pressures. The transmissibilities To, Tw depend on theabsolute rock permeability k, the relative permeabilitiesk,,, k,, and the viscosities po, pwin the form:

    ckk,oTo= __

    ckk,wTw= ___

    PO PW

    (3)

    where c is a constant which depends on the system of units

    212 Appl. Math. Modelling, 1980, Vol 4, June0307-904X/80/030212-05/$02.000 IPC Business Press and UK AE A 19 80

  • 7/27/2019 fem14

    2/5

    Fini t e el ement method in t w o-phase fl ow : P. C. Robinson et al.

    where :sed. We take the viscosities to be constant and kYo, krwto be known functions of So, Sw respectively so the twoequations (1) and (2) link four unknown variables Se, SW,PO, P . The equations are supplemented in the usualway 41ys by the further two equations:

    SeSr$!=l (4)

    PO ~ pw = P&S,) (5)

    where P,, the capillary pressure, is again a known functionOfSw.

    The equations are now manipulated into a form showingthe connection with nonlinear diffusion in a cylindricallysymmetric reservoir. By adding (1) and (2) and using (4)we have in cyclindrical coordinates.

    R(7) = (627)6 (12)and c is a constant which fixes the initial condition. Thesolution corresponds to a delta function spike at the originat the time zero, which subsequently spreads throughout thereservoir by diffusion, but with a sharply defined front atr = R(T). The amount of water in the reservoir stays constant.

    For comparison with the computed solution we follow themotion from time r = 1.85 when the peak water saturationhas been chosen to be 0.3 (corresponding to c = 0.3). Thesaturation of course always stays below the peak startingvalue so that the relative permeabilities of (1) make sense.

    T s+TrW-_=-aPW A

    r & - & r(6) Finite element equations and solution method

    If there are no sources present so the total amounts offluids do not change we need to choose the integration con-stant A as zero. Equations (5) and (6) then give:

    apw Tr0 dP, asw__ __% = - T,, + Tyw dS, & (7)

    which when substituted back into (2) leads to a closedequation for S w :

    rT,o T,w dp, aswT,., + Trw dSw 7

    (8)This has the form of the nonlinear diffusion equation:

    as i a_=aT r s WS) z (9)

    The capillary pressure and relative permeabilities areempirically determined functions of saturation which maytake a number of forms. Often the capillary pressure curveis a straight line over much of the saturation range andrelative permeabilities are frequently taken to have aquadratic behaviour kr, = S: , k, w = s$,. With these formsthe effective diffusion coefficient in (8) behaves like S$for low water saturation and falls into the class of power-law diffusion equations for which some solutions can befound. We can arrange exact quadratic behaviour by setting:

    s*s*k,, =S; krW = w

    l-2Sw(10)

    Although the expression for krW here is quite artificial andin fact makes no physical sense for SW > 0.5, provided welook at problems where the water saturation never exceedsabout 0.4 the relative permeabilities behave in a plausiblemanner. With suitably scaled units of time equation (8) nowreduces to equation (9) with D(S) = S*.

    A number of special solutions are known for the nonlineardiffusion equation16i7Bayer l4

    but here we use only the results ofwho employed the technique of separation of

    variables to find similarity solutions for power law diffusion.For D (S) = S* it is easy to check that a solution of thistype is:

    S(r, 7) = A-R*(7) (1 - $-) * r R(T)

    The oil and water flow problem with its analytic solutiondiscussed above, was used as a test case for the finiteelement reservoir simulation program RESOLVE developedat Harwell. The details of the comparison are given in the

    following section. In this section we present an outlinederivation of the finite-element equations. Although theprogram is capable of handling more general compressibleflows, for simplicity the argument is presented only interms of the case discussed above.

    The details of the finite element method can be foundin many sources, of which a few are listed1,*18 amongthe references. In essence the method spatially discretizesthe problem by dividing the domain !Z of interest into anumber of elements of simple geometric shapes (or simplemappings of such shapes) on each of which the fields areapproximated by low-order polynomials determined by thevalues at a small number of nodes. This can be regarded

    equivalently as expanding the fields in terms of piecewisepolynomial basis functions $~i each associated with a node,which are only non-zero on elements containing theassociated node. The elements available in RESOLVEinclude the isoparametric 3 node linear triangle and theisoparametric 6 node quadratic traiangle, as well as severalquadrilateral elements. Note that the popular Hermitecubic quadrilateral would not be expected to perform wellin the present case since it has a continuous derivative acrosselement boundaries whereas the waterflood front isdiscontinuous.

    Equations for the nodal values of the fields are obtainedfrom the weak form of the governing partial differentialequations, derived by multiplying the equations with asuitably smooth test function W and integrating over a.The second derivative terms in (1) and (2) are integrated byparts to reduce smoothness requirements. Thus the weakform of the water equation (2) with boundary conditionsof a specified flux f ut of part Ci of the boundary C ofa, and a specified value on the remainder C,, is:

    I ( VW . (Tw VP,)R(13)

    %l

    In the Gale&in formation of the finite element method thetest functions for each equation are taken to be the basisfunctions 3/i for all the nodes i except those on C2. (It iseasy to see that this leads to the same number of equations

    Appt. Math. Modelling, 1980, Vol 4, June 213

  • 7/27/2019 fem14

    3/5

    Fini te e lement method in two-phase f low: P. C . Robinson et a l .

    as unknowns). The water equations, for example are:

    ( v Gil VW v Pw) - J lL i f = OCl41element,cl

    The integrations over elements are evaluated numericallyin the program by a Gaussian quadrature scheme.

    The equations are coupled nonlinear ordinary differentialequations in time for the nodal values. They are sparse,because tii is only non-zero on elements containing node iso that only a small number of nodal saturation and pressurevalues appear in each equation. They are also stiff, that ischaracterized by a wide range of time scales, arising, forexample, as the waterflood spreads. RESOLVE uses a stifflystable first-order method, based on the backward differentia-tion formula. The method advances in time automaticallyadjusting the size of the time step to be as large as possiblesubject to a constraint upon the acceptable error in eachstep. g,20 At each stage a set of nonlinear algebraic equations

    has to be solved, which is done by an iterative Newton-Raphson linearization about the latest approximation to thesolution. The sparseness of the equations allows an efficientdirect solution technique (the frontal method) to be usedfor the linear equations arising at each iteration.

    Results

    Since the program RESOLVE automatically adjusts the

    For the finite element analysis triangular elements wereused on a sector, taking advantage of the radial symmetry

    time step size the times at which the solution was calculated

    of the problem. The problem was solved using quadraticshape functions and again using linear shape functions. For

    in the two runs do not correspond. In both cases the time

    the quadratic case a 10 sector was used with a grid of 39

    elements giving 120 nodes. In the linear case a 5 sector was

    step increased like time to the power 0.85.

    used with a grid of 79 elements giving 81 nodes. In bothcases there were 41 nodes along each side of the sector,

    Ta ble 1 gi ves he saturations at r = 0 as calculated by the

    including the origin, at equal intervals of one-sixth unitsand in the quadratic case there were also 39 nodes inside

    finite element program and as given by equation (I 1) at

    the sector. The grid for the quadratic case is shown inFi gure 1.

    Table 1 Finite element and exact solut ions at r = 0

    Figure 7 Finite element grid for quadratic run. Midside nodes are

    not shown

    intervals throughout the runs. The error in these values isaround 3% for the quadratic run and 4.5% for the linearrun. An error of this order would be expected because ofthe approximate nature of the initial conditions. The factthat the error does not increase with time supports thisexplanation.

    No water is being added to the system so mass shouldbe conserved. This is the case for both runs. The masspresent is not quite that of the exact solution since theinitial conditions are not exact. In the quadratic case 100%

    Fi gur es 2 and 3 show the solution for the quadratic runand Figures 4 and 5 for the linear run. In Fi gur es 2 and 4

    of the exact solution mass is present and in the linear case

    the initial conditions and the solution after 10 and 20time steps are plotted. In Fi gur es 3 and 5 the solutions

    94.9%.

    after 30,40 and 60 time steps are plotted. In each casesaturation is plotted against radius and the exact solution

    is given for comparison. It can be seen that the largest dis-crepancy between Ihe finite element and exact solutionsoccurs in the region of the flood front. This is a consequenceof the discontinuity in the derivative of the exact solution.The numerical solution generally overshoots into negativesaturations in a region of size about one element ahead ofthe front.

    Number oftime steps

    05

    IO152025303540

    45505560

    Time

    0.00.05930.18850.47910.95581.6512.8574.6237.382

    11.5417.3026.0637.72

    Quadratic run

    Finite elementsolution

    0.3000.2670.2270.1850.1530.1300.1090.09360.0803

    0.06930.06060.05290.0468

    Exact solution Time

    0.300 0.00.270 0.07170.231 0.23260.188 0.53210.156 1.0360.133 1.8050.112 3.0960.0963 4.9970.0827 7.879

    0.0714 12.060.0625 17.970.0546 26.350.0483 38.21

    Linear run

    Finite elementsolution

    0.3000.2640.2180.1790.1480.1250.1050.08990.0774

    0.06720.05890.05180.0458

    Exact solution

    0.3000.2650.2220.1840.1530.1300.1090.09390.0810

    0.07040.06170.05440.0481

    21 4 Appl. Math. Modelling, 1980, Vol 4, June

  • 7/27/2019 fem14

    4/5

  • 7/27/2019 fem14

    5/5

    Finite element method in two-phase flow: P. C. Robinson et al .

    accuracy with no special adaptations: (2), linear elementsperform quite well in fitting the waterflood front and areworth considering for this type of problem: (3), at a floodfront the saturations sometimes overshoot into nonphysicalnegative saturation values, as indeed one would expect fromthe shape functions. It is unreasonable, for example, toexpect the quadratic fit to overshoot less than about l/8 ofthe value at the node behind the front. This behaviour,

    however. causes little problem in finding the front positionto good accuracy: (4), in stiff problems such as this thereare great savings in computer time to be had from a self-adaptive time stepping scheme: (S), this is one of very fewnonlinear problems which can be solved exactly in a tract-able form and yet relates to a physical problem. It shouldprove useful as a test for other programs handling two-phase flow in reservoirs.

    Acknowledgements

    The authors wish to thank the United Kingdom Departmentof Energy, the British Gas Corporation and the BritishNational Oil Corporation for permission to publish the

    results of this work.

    References

    1 Gallagher, R. H. et al., Finite elements in fluids, V. 1 and IIWiley, London, 1975

    2

    3

    4

    56I

    89

    1011

    12

    13

    1415

    16

    17

    18

    19

    20

    Connor, J. J. and Brebbia, C. A., Finite element techniquesfor fluid, Newnes-Butterworth, London, 1976Proceedings of the 4th Symposium on Numerical Simulationof Reservoir Performance, Sot. Pet. Eng. of AIME, LosAngeles 1976Crichlow, H. B., Modern reservoir engineering, a simulationapproach, Prentice-Hall, Englewood Cliffs 1977Shun, Y. M. Sot. Pet. Eng. J. 1971, 11, 139Lewis, R. W. et al., Int . J. Num . M eth. Eng. 1975, 9,433Lewis, R. W., et al . ch 9, vol I of reference 1

    Langsrud, O., Paper SPE 5725 of reference 3Spivak, A. et al ., SOC. Pet. Eng. J. 1977, 17,27Settari, A. et al., Sot . Pet. Eng. J. 1977,17,2?8tioldwater, M. H. et al . Paper EUR87 European OffshorePetrol. ConJ, London, 1978Wilson, D. C. and Casinder, P. C. Paper EUR86, EuropeanOffshore Petrol. Conf., London, 1978Buckley, S. E. and Leverett, M. C. Tram AIM E 1942, 146,96Boyer, R. H.,J. M a t h . Phys. 1961,40,41Collins, R. E. Flow of fluids through porous materials,Reinhold, New York 1961Ames. W. F.. Nonlinear Dartial differential eauations inengineering: Academic Piess, New York, 196iCrank, J. The mathematics of diffusion, Clarendon Press,Oxford 1975

    Zienkiewicz, 0. C., The finite element method, McGraw-Hill,London 1977Gear, G. W., in Formulations and computational algorithmsin finite element analysis, (ed. Bathe, K. J. et al.) U.S.Germany Symposium, M.I.T. Press, 1976Byrne, G. D. and Hindmarsh, A.C. A.C.M. Trans. M ath. Soft -wa re 1 1975 (71)

    216 Appl. Math. Modelling, 1980, Vol 4, June