TPG460 Reservor Smulaon 06 page of INTRODUCTION TO RESERVOIR SIMULATION Analycal and numercal soluons of smple one-dmensonal, one-phase flow equaons As an nroducon o reservor smulaon, we wll revew he smples one-dmensonal flow equaons for horzonal flow of one flud, and look a analycal and numercal soluons of pressure as funcon of poson and me. These equaons are derved usng he connuy equaon, Darcy's equaon, and compressbly defnons for rock and flud, assumng consan permeably and vscosy. They are he smples equaons we can have, whch nvolve ransen flud flow nsde he reservor. Lnear flow Consder a smple horzonal slab of porous maeral, where nally he pressure everywhere s P 0, and hen a me zero, he lef sde pressure (a x = 0 ) s rased o P L whle he rgh sde pressure (a x = L ) s kep a P R = P 0. The sysem s shown on he nex fgure: x q Paral dfferenal equaon (PDE) The lnear, one dmensonal, horzonal, one phase, paral dfferenal flow equaon for a lqud, assumng consan permeably, vscosy and compressbly s: P x = ( φµc k ) P Transen vs. seady sae flow The equaon above ncludes me dependency hrough he rgh hand sde erm. Thus, can descrbe ransen, or me dependen flow. If he flow reaches a sae where s no longer me dependen, we denoe he flow as seady sae. The equaon hen smplfes o: d P dx = 0 Transen and seady sae pressure dsrbuons are llusraed graphcally n he fgure below for a sysem where nal and rgh hand pressures are equal. As can be observed, for some perod of me, dependng on he properes of he sysem, he pressure wll ncrease n all pars of he sysem (ransen soluon), for hen o approach a fnal dsrbuon (seady sae), descrbed by a sragh lne beween he wo end pressures. Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page of P Lef sde pressure Seady sae soluon Transen soluon Inal and rgh sde pressure x Analycal soluon o he lnear PDE The analycal soluon of he ransen pressure developmen n he slab s hen gven by: P(x, ) = P L + (P R P L ) x L + π n = n exp( n π L k φµc )sn(nπx L ) I may be seen from he soluon ha as me becomes large, he exponenal erm approaches zero, and he soluon becomes: P(x, ) = P L + (P R P L ) x L. Ths s, of course, he soluon o he seady sae equaon above. Radal flow (Well es equaon) An alernave form of he smple one dmensonal, horzonal flow equaon for a lqud, s he radal equaon ha frequenly s used for well es nerpreaon. In hs case he flow area s proporonal o r, as shown n he followng fgure: r The one-dmensonal (radal) flow equaon n hs coordnae sysem becomes r P (r r r ) = φµc P k For an nfne reservor wh P(r ) = P and well rae q from a well n he cener (a r=r w ) he analycal soluon s P = P + qµ φµcr E, 4πkh 4k Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 3 of where E x) = e u x u du s he exponenal negral. A seady sae soluon does no exs for an nfne sysem, snce he pressure wll connue o decrease as long as we produce from he cener. However, f we use a dfferen se of boundary condons, so ha P(r = r w ) = P w and P(r = r e ) = P e, we can solve he seady sae form of he equaon r d dr (r dp dr ) = 0 by negraon wce, so ha he seady sae soluon becomes P = P w + P e P w ln r e / r w ( ) ( ) ln ( r / r w ). Numercal soluon Generally speakng, analycal soluons o reservor flow equaons are only obanable afer makng smplfyng assumpons n regard o geomery, properes and boundary condons ha severely resrc he applcably of he soluon. For mos real reservor flud flow problems, such smplfcaons are no vald. Hence, we need o solve he equaons numercally. Dscrezaon In he followng we wll, as a smple example, solve he lnear flow equaon above numercally by usng sandard fne dfference approxmaons for he wo dervave erms P P and. Frs, he x-coordnae mus x be subdvded no a number of dscree grd blocks, and he me coordnae mus be dvded no dscree me seps. Then, he pressure n each block can be solved for numercally for each me sep. For our smple one dmensonal, horzonal porous slab, we hus defne he followng grd block sysem wh N grd blocks, each of lengh Δ x : Ths s called a block-cenered grd, and he grd blocks are assgned ndces,, referrng o he md-pon of - + N each block, represenng he average propery of he block. Taylor seres approxmaons A so-called Taylor seres approxmaon of a funcon f( x + h) expressed n erms of f( x)and s dervaves f ( x) may be wren: f( x + h) = f(x) + h f (x) + h! f (x) + h3 f (x) +... Applyng Taylor seres o our pressure funcon, we may wre expansons n a varey of ways n order o oban approxmaons o he dervaves n he lnear flow equaon. Approxmaon of he second order space dervave A consan me,, he pressure funcon may be expanded forward and backwards: P(x +, ) = P(x, ) + P ( x, ) + ()! P (x, ) + () 3 (x, ) +... Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 4 of P(x, ) = P(x, ) + ) P (x, ) + )! P (x, ) + )3 (x, ) +... By addng hese wo expressons, and solvng for he second dervave, we ge he followng approxmaon: P (x, ) = P(x +, ) P(x, ) + P(x +,) () + () (x, ) +... or, by employng he grd ndex sysem, and usng superscrp o ndcae me level: ( P x ) = P + P + P () + O( ). Ths s called a cenral approxmaon of he second dervave. Here, he res of he erms from he Taylor seres expanson are collecvely denoed O( ), hus denong ha hey are n order of, or proporonal n sze o Δ x. Ths error erm, somemes called dscrezaon error, whch n hs case s of second order, s negleced n he numercal soluon. The smaller he grd blocks used, he smaller wll be he error nvolved. Any me level could be used n he expansons above. Thus, we may for nsance wre he followng approxmaons a me levels + and + : ( P x ) + = P + + + P + + P () + O( ) ( P x ) + Δ = P + + + + P + P + O( ) () Approxmaon of he me dervave A consan poson, x, he pressure funcon may be expanded n forward drecon n regard o me: P(x, + ) = P(x, ) + P (x, ) + ()! P (x, ) + ()3 By solvng for he frs dervave, we ge he followng approxmaon: P (x, ) = P(x, + ) P(x, ) or, employng he ndex sysem: ( P ) = P + P + O(). + () P (x, ) +... (x, ) +... Here, he error erm s proporonal o, or of he frs order. The error herefore approaches zero slower n hs case han for he second order erm above. Ths approxmaon s called a forward approxmaon. By expandng backwards n me, we may wre: P(x, ) = P(x, + ) + Solvng for he me dervave, we ge: ( P ) + = P + P + O(). P (x, + ) + )! P (x, + ) + ) 3 (x, + ) +... Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 5 of Ths expresson s dencal o he expresson above. However, hs s now a backward approxmaon. Anoher alernave for a me dervave approxmaon may be obaned from forward and backward expansons over an nerval of : P(x, + ) = P(x, + ) + P (x, + ) + (! ) )3 P (x, + ) + ( (x, + ) +... P(x, ) = P(x, + ) + P (x, + ) + )! P (x, + ) + )3 (x, + ) +... By combnaon, we oban he followng cenral approxmaon of he me dervave, wh a second order error erm: ( P ) + = P +Δ P + O() Explc dfference equaon Frs, we wll use he approxmaons above a me level and subsue hem no he lnear flow equaon. The followng dfference equaon s obaned: P + P + P ( φµc k ) P + P, =,...,N For convenence, he error erms are dropped n he equaon above, and he equaly sgn s replaced by an approxmaon sgn. I s mporan o keep n mnd, however, ha he errors nvolved n hs numercal form of he flow equaon, are proporonal o and, respecvely. Boundary condons (BC's) The drvng force for flow arses from he BC's. Bascally, we have wo ypes of BC's, he pressure condon (Drchle condon), and he flow rae condon (Neumann condon). Pressure BC When pressure boundares are o be specfed, we normally, specfy he pressure a he end faces of he sysem n queson. Appled o he smple lnear sysem descrbed above, we may have he followng wo BC's: P(x = 0, > 0) = P L P(x = L, > 0) = P R or, usng he ndex sysem: > 0 P =/ = P L > 0 P N+ / = P R The reason we here use ndces = and N + s ha he BC's are appled o he ends of he frs and he las blocks, respecvely. Thus, he BC's canno drecly be subsued no he dfference equaon. However, Taylor seres may agan be used o derve specal formulas for he end blocks. For block we may wre: P(x, ) = P( x, ) + P (x, ) + ()! P ( x, ) + () 3 (x, ) +... Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 6 of P(x = 0,) = P(x, ) + ) P (x, ) + )! P ( x, ) + )3 (x, ) +... By combnaon of he wo expressons, we oban he followng approxmaon of he second dervave n block : ( P x ) = P 3P + P L 3 4 () + O() A dsadvanage of hs formulaon s ha he error erm s only frs order,.e. proporonal o. A smlar expresson may be obaned for he rgh hand sde: ( P x ) N = P R 3P N + P N 3 + O(). 4 () In a real reservor case, pressure boundary condons would normally represen boom hole, or well head, pressures n producon or njecon wells. Flow rae BC Alernavely, we would specfy he flow rae, Q, no or ou of an end face of he sysem n queson, for nsance no he lef end of he sysem above. Makng use of he fac ha he flow rae may be expressed by Darcy's law, as follows: Q L = ka µ P x. x = 0 We wll agan apply Taylor seres expanson o block, bu hs me we wll le he dervave of he pressure be he funcon: ) P (x +, ) = P (x, ) + ( P (x = 0,) = P (x, ) + ) ) P (x, ) + (! P (x, ) + )! (x, ) +... ( x, ) +... Subracng he second expresson from he frs and solvng for he second dervave, we oban he followng approxmaon for grd block : P (x, ) = P (x +, ) P (x = 0,) + O( ) Now we replace he dervave a he end face by he expresson gven by he boundary condon: P (x +, ) + Q L P (x, ) = µ ka+ O( ) The oher n he expresson dervave may be replaced by a cenral formula: P (x +, ) = P(x, ) P(x, ) + O( ), so ha he fnal formula for he second dervave n block for hs boundary condon becomes: ( P x ) = P P µ () + Q L Ak + O() Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 7 of Smlarly, a consan rae a he rgh hand sde, ( P x ) N = P N P N µ () Q R Ak + O() Q R, would resul n he followng expresson: In a real reservor case, flow rae condons would normally represen producon or njecon raes for wells. A specal case s he no-flow boundary, where Q = 0. Ths condon s specfed a all ouer lms of he reservor, beween non-communcang layers, and across sealng fauls n he reservor. Inal condon (IC) The nal condon (nal pressures) for our horzonal sysem may be specfed as: P = 0 = P 0, =,...,N. For non-horzonal sysems, hydrosac pressures are normally compued based on a reference pressure and flud denses. Soluon of he dfference equaon Havng derved he dfference equaon above, and specfed he grd sysem, he BC's and he IC, we can solve for pressures. However, one ssue of mporance needs o be dscussed frs. In dervng he dfference approxmaons, we assgned a me level of o he erms n he Taylor seres. Obvously, we could as well assgned a me level of + wh equvalen generaly. Or we could assgn a me level of +. We wll dscuss hese cases below, sarng wh he explc formulaon. For convenence, error erms are no ncluded below. Explc formulaon Ths s exacly he case we derved above. By approxmaon of all he erms a me, we oban a se of dfference equaon ha can be solved explcly for average pressures n he grd blocks (=,...,N) for each me sep, as follows (below we gve he expressons for he case of consan pressure BC's; f rae condons are used, he expressons should be modfed accordngly): + P + P + P N = P = P = P N + 4 3 ( )( k φµc )( P 3P + P L ) + ( )( k φµc )( P + P + 4 3 ( )( k φµc )( P R 3P N + P N ) + P ), =,...,N Implc formulaon In hs case, all me levels n he approxmaons are changed o +, excep for n he me dervave approxmaon, whch now wll be of he backward ype. + +Δ P 3P + P L 3 4 = ( φµc k ) P +Δ P ( = ) + + + P + P + P = ( φµc k ) P + P, =,...,N Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 8 of + + P R 3P + N + P N 3 = ( φµc 4 k ) P + P ( = N) Now we have a se of N equaons wh N unknowns, whch mus be solved smulaneously. For smplcy, he se of equaons may be wren on he form: +Δ a P + + b P +Δ + c P + = d, =,...N where and α = ( φµc )( k ) a = 0 a =, =,...,N b = b N = 3 3 4 α b = α, =,...,N c N = 0 c =, =,...,N d = 3 4 αp P L d = αp, =,...,N d N = 3 4 αp N P R Ths lnear se of equaons may be solved for average block pressures usng for nsance he Gaussan elmnaon mehod. Crank-Ncholson formulaon As menoned above, we also have he possbly of wrng he equaon a a me level beween and + (Crank-Ncholson's mehod). For +, we may wre he dfference equaon for block as: + P + + P + P + = ( φµc k ) P + P, Snce he pressures are defned a me levels and +, and no a +, we canno solve hs equaon as s. Therefore, we rewre he lef sde as he average of explc and mplc formulaons: P + P + P + P +Δ + + P + P + = ( φµc k ) P + P The resulng se of lnear equaons may be solved smulaneously jus as n he mplc case. All he coeffcens may be deduced from he explc and mplc cases above. Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 9 of Dscusson of he formulaons Obvously, he explc formulaon s smpler o use han he mplc formulaon, as explc expressons for pressures are obaned drecly. Dscrezaon errors are he same for he wo formulaons. The amoun of work nvolved s less for he explc case. In one-dmensonal soluons, hs may no have any mporance, however, n wo and hree dmensonal cases wh large numbers of grd blocks, he dfference n compuaonal me per me sep wll become large. However, he explc formulaon s seldom used. As urns ou, becomes unsable for large me seps. I wll be shown below, usng von Neumann sably analyss, ha he explc formulaon has he followng sably requremen: ( φµc k ), Ths requremen has he consequence ha me sep sze s lmed by boh grd block sze and properes of he rock and flud. Ths lmaon may be severe, as s he grd block wh he smalles value of ( φµc k ) ha deermnes he lmng me sep sze. Applcaon of von Neumann sably analyss o he mplc formulaon, shows ha s uncondonally sable for all me sep szes. Pracce shows ha he addonal compuaonal work per me sep nvolved n he mplc mehod, generally s compensaed for by permng much larger me sep. Larger me seps lead o larger numercal errors, so s mporan n any numercal soluon applcaon o check ha he errors are whn accepable lms. The Crank-Ncholson formulaon has less dscrezaon error han he wo ohers, snce he cenral approxmaon of he me dervave has a second order error erm. The soluon of he se of equaons s smlar o he mplc case. However, he Crank-Ncholson mehod ofen resuls n oscllaons n he solved pressures, and s herefore seldom used. Sably analyss for explc formulaon The explc dfference equaon may be wren where P(x +, ) P(x, ) + P(x,) P(x, + ) P( x, ) () = α, α = φµc k. In von Neumann sably analyss, we assume ha f P(x, ) s a soluon o he equaon above, and ha s perurbaon P(x, ) + ε(x, ) also s a soluon. Thus, we may oban he followng equaon: ε(x +,) ε(x, ) + ε(x,) ε(x, + ) ε( x, ) () = α. We now assume ha he error nroduced s of he form: where ε(x, ) = ψ()e βx, =. Thus, β (x +Δ x) ε(x +,) = ψ()e β( x Δ x) ε(x,) = ψ()e Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page 0 of ε(x, + ) = ψ( + )e βx By subsuon and smplfcaon, and makng use of he fac ha e β + e β = 4sn ( β ), we ge he followng expresson: ψ ( + ) ψ() = 4 α sn ( β ). ψ ( + ) The rao may be nerpreed as he rao of ncrease n error durng he me nerval. Obvously, f ψ() hs rao s larger han one, he soluon becomes unsable. Thus, we may formulae he followng creron for sably: ψ( + ) ψ (), or 4 α sn ( β ). Snce sn ( β ) 0, he condon for sably becomes: or 4 α, ( φµc k ). Sably analyss for mplc formulaon The mplc form of he dfference equaon s P(x +, + ) P(x, + ) + P(x, + ) P(x, + ) P(x, ) () = α. Followng a smlar procedure as above, we oban he followng equaon for he error erm: ε(x +, + ) ε(x, + ) + ε(x, + ) ε(x, + ) ε(x, ) () = α. Agan assumng ha ε(x, ) = ψ()e βx, we ge he followng expresson for he error rao: Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06
TPG460 Reservor Smulaon 06 page of ψ ( + ) ψ() = + 4 α sn ( β ) The condon for sably now becomes:. + 4 α sn ( β, ) whch s always rue, snce he denomnaor s greaer han. Thus, he sably creron smply becomes:. Sably analyss for Crank-Ncholson formulaon Applcaon of he von Neumann sably analyss o he Crank-Ncholson formulaon, shows ha also s uncondonally sable, jus as he mplc case. Norwegan Unversy of Scence and Technology Deparmen of Peroleum Engneerng and Appled Geophyscs..06