chap3_603

Embed Size (px)

DESCRIPTION

Reservoir simulation courselecture#3

Citation preview

CHAPTER 3

8

Chapter 3 - F.D.E. Discrete ApproachCHAPTER 3

Finite Difference Equations, Discrete Approach

lThe "Oil Material Balance Equation"

lHeterogeneous Reservoirs

l1-D Liquid Coefficients (Volumetric Form)lF.D.E. for 1-D Ideal Gas Flow (Mass Derivation)l1-D Ideal Gas Coefficients (Mass Form)l1-D Real Gas Coefficients (Mass Form)lCompressibility Approximations (Liquid) lRadial CoordinateslData Tricks

Finite Difference Equations, Discrete Approach

In Chapter 2, we showed the use of Taylor series to derive finite difference equations. We began with the partial differential equation and applied the Taylor series approximations to derive our system of linear equations. These linear equations took the form of a tri-diagonal matrix for these 1-D problems.

Although the Taylor series approach of Chapter 2 is valid in the limit, it is not used in practice. We have learned that it is better to derive the equations with a block, or discrete, approach. This is commonly used in the industry, rather than 'discretization' of partial differential equations.

The block, or discrete, approach amounts to discretising the continuity equation rather than the partial differential equation. It is necessary to think of the solution points as gridblocks. Each gridblock has a definite boundary and the pressure represents the average pressure in the gridblock for material balance purposes. For many problems we also think of the pressure as representing the solution in the center of the gridblock, but not always.

We will now derive the finite difference equations for 1-D liquid flow with the discrete method.

The "Oil Material Balance Equation"

We will start by developing a finite difference equation (F.D.E.) for the flow of oil in a grid system. We sometimes call this a material balance equation (for gridblock). The principles involved in developing this "oil material balance equation" are the same as for water equation and the gas equation. This F.D.E. is conservative. That is, it conserves mass exactly.

Begin with a statement of the continuity, or material balance, equation:

Net rate of Flow in (scf/D) = Rate of Accumulation (scf/D)We are ignoring the production terms for the moment.

Rather than working with mass, it is more common in petroleum engineering to work in terms of standard (stock tank) cubic feet, scf. This is equivalent if we define our system as having constant density at standard conditions. Then, a scf of oil is equal to a fixed mass of oil.

Consider a gridblock i in a homogeneous 1D model with uniform gridblock size:

x

y

i + 1

i - 1

i

h

We can calculate the pore volume of the gridblock i as:

(1)0We can calculate oilinplace as:

(2)

0where:OIP standard (stock tank) oil in place,scfVp pore volume of the gridblock, rcfSo average oil saturation of the gridblock, fractionBo formationvolumefactor at the average gridblock pressure, rcf/scff average porosity of the gridblock, fraction

The rate of accumulation of oil during the timestep is

(3)

0The superscripts n and n+1 correspond to the beginning and end of the time interval, t. The quantities Vp, So, and Bo are evaluated at the time indicated by the superscripts, before and after the time step. The quantity in [ ] is the accumulation of oil in the gridblock during the timestep. Dividing by t puts the right-hand side on the rate basis.

The left side of the continuity equation deals with flow rates. It can be stated as:

Net rate of flow in = qleft + qright(4)

where positive q is flow into the gridblock, negative flow is out of the gridblock. Usually fluid is flowing through the gridblock, so one term is positive and the other is negative. our material balance equation can now be given as

(5)0

Now, we need an expression for flow rate. We use Darcy's law for flow between the center of the gridblocks. For simplicity, we will only consider horizontal flow for now. The flow distance, x, is the distance between the centers of the gridblocks. The gridblock pressures are taken to be at the center of the gridblocks.

Flow from the right, from gridblock i+1 to gridblock i, is

(6)0

(7)

(8)0

The first factor is constant with time. It also applies to all three phases. We will call this "transmissibility" and save this separately in our computations. This term "transmissibility" should not be taken to be the physical transmissibility of the reservoir. It is simply part of the flow coefficient.

Now we define

(9)0

The subscript i+1/2 indicates that the coefficient applies between gridblocks i and i+1. This i+1/2 notation is somewhat clumsy, so we will replace i+1/2 with E, meaning the "east" direction. Our notation for transmissibility can be represented as follows:

(10)0

We will use this "directional" notation for 1D, 2D, and 3D flow.

Let:i + 1/2 = E i - 1/2 = Wetc.Also:T = top B = bottom

The next factor in the flow term involves the oil phase. Its value changes with time. This factor is:

(11)0

where:(Bo)E= (Bo i + Bo i+1)/2(o)E = (oi + oi+1)/2(kro)E = upstream kro

This type of "averaging" is the most common. A simple arithmetic average is used for Bo and o. However, for relative permeability, the upstream value is used. That is, the relative permeability of the upstream gridblock is used. For example, if flow is from right to left, the i+1 gridblock is upstream and (kro)i+1 is used for (kro)E . If flow is from left to right, the i-1 gridblock is upstream and (kro)i-1 is used for (kro)W. This upstream relative permeability method has been found to be more accurate than arithmetic averaging.Our material balance equation now has the form

(12)0

We now consolidate our notation by defining the "oil symmetrical flow coefficient" as follows:

(13)0

Our "Oil Material Balance Equation" now has a simpler form.

The 1D F.D.E. is 0

aoE(pi+1 - pi) + aoW(pi-1 - pi) (14) The 2D F.D.E. is

0aoE(pi + 1 - pij) + aoW(pi - 1 - pij) + aoS(pj + 1 - pij) + aoN(pj - 1 - pij) (15)

The 3D F.D.E. is

aoE(pi + 1 - pijk)0 + aoW(pi - 1 - pijk) + aoS(pj + 1 - pijk) + aoN(pj - 1 - pijk) + aoB(pk + 1 - pijk) + aoT(pk - 1 - pijk)(16)

We can simplify further by defining a general "difference operator" as follows.

For 1D,D(aoDp) =aoE(pi + 1 - pi) (17)0 + aoW(pi - 1 - pi)

For 2D, DaoDp =aoE(pi + 1 - pij)0 + aoW(pi - 1 - pij) + aoS(pj + 1 - pij) + aoN(pj - 1 - pij) (18)

For 3D,DaoDp =aoE(pi + 1 - pijk)0 + aoW(pi - 1 - pijk) + aoS(pj + 1 - pijk) + aoN(pj - 1 - pijk) + aoB(pk + 1 - pijk) + aoT(pk - 1 - pijk) (19)

Then we can write the general "Oil Material Balance Equation" as:

(20)

0

Implicit and Explicit Flow Terms:

The righthand side of the equation is fixed by the conservation of mass. The lefthand side, however, has some choices. As long as the flow terms are symmetrical, the equation is conservative. The pressure gradients are always "implicit", meaning that they are taken at the n+1 time level. This is done for stability of the solution so that reasonable size timesteps can be taken.

The flow coefficient, however, can be evaluated in different ways, as long as it is symmetrical. The values of kro, Bo, and o change during time step. We have a choice of what time to use in evaluating these terms. As a practical matter Bon and on are usually used because they change so slowly. These would be called explicit Bo, and o.

The relative permeability, however, is critical. Relative permeabilities can change rapidly, particularly in the area of a displacement front. Simulators are often typified as either being "implicit" or "explicit" depending on whether kro is taken at the n+1 or n time level. The implicit relative permeability kron+1, is used on implicit simulators for stability. This allows reasonable size timesteps for certain difficult problems. However, the solution technique becomes much more difficult than IMPES.

For the IMPES Method, relative permeability is explicit, kron. This is done for speed and simplicity and also results in better accuracy for certain types of simulation problems.

For the IMPES Method the flow coefficients are treated constant during the time step since they are all evaluated at the n time level. For the IMPES Method, our oil material balance equation should be written as follows:

(21)0

Heterogenous Reservoirs

For the previous derivation, it was assumed that the reservoir was homogeneous and the grid spacing was uniform. We developed coefficients for the flow of fluids from one gridblock to another which used "transmissibility" factor for the flow coefficient as follows:

(22)0

For the general case, the values of k, h, and Dx may vary from one gridblock to the adjacent gridblock. For the Cartesian system that we are considering, Dy will be the same for both the gridblocks since the gridlines are parallel.

We need to develop a flow coefficient that applies to the heterogeneous, nonuniform case. We find that only the T factors of the flow coefficients need to be changed to accomplish this. Consider the following pair of gridblocks. Notice that the values of k, h, and Dx are different for the two gridblocks.

h

i

x

i

x

i+1

y

y

i+1

i

k

i

k

i+1

h

i+1

.

.

We wish to derive an expression for TE for the heterogeneous case.

Assume,1) each individual gridblock is itself homogeneous.2) qin = qout through gridblock interface, even though thickness (h) may vary.

For flow between gridblock i and the interface (i+1/2), define

(23)0

Likewise, between the interface and gridblock i+1, define

(24)0

Since the flow rate, q, must equal, we then have

(25)0

Since0

We can rearrange

(26)

0So, since(27)0

Then (harmonic average)(28)0

Thus, for a heterogeneous system, we obtain,

(29)0

This method of averaging is called harmonic average and is similar to serial flow. Although we may devise other averaging methods, this is the most commonly used. The effect of permeability variations is worth noting. The tendency is to put more weight on the smaller permeability, or kh, since the serial flow tends to put more emphasis on the restriction of flow. This can be seen from the following example.

ExampleHarmonic AveragingFor the first example the gridblocks will be homogeneous as follows:hi= hi+1= 50 ft.Dxi= Dxi+1= 200 ft.Dy = 200 ft.ki= ki+1= 1 md.

SolutionHarmonic Averaging

For this homogeneous problem we can calculate TE as follows:From Eq. 3, we have

(30)0

For a homogeneous reservoirhi= hi+1 = h ki= ki+1 = kDxi = Dxi+1 = DxTherefore,(31)0

(32)0

TE = 0.3165. (33)Now, if we change ki+1 to 100 md(34)0

(35)0

TE = 0.6267.(36)

The average permeability for this problem is (37)0

(38)0

We see that increasing permeability 100fold in a gridblock by no means increases the average transmissibility by the same magnitude. Instead, the flow is restricted by the gridblock with the low permeability.

1-D Liquid Coefficients (Volumetric Form)

(39)

(40) Where:

(41) (42) (43)

But, for the no-flow boundary:

(44) (45)Let(46)

Tri-diagonal coefficients: (47)

(48)

(49)

(50)

Units of Equation:rcf/DSolution variable:p

F.D.E. for 1-D Ideal Gas Flow (+Mass Derivation)

The "Material Balance Equation"

(1)Net flow in (scf/D)= Rate of accumulation (scf/D) + Production rate (scf/D)(51)

(2)Vp = (x y h) (52)

(3) Gas in Place: ; where (53) But for ideal gas: (54)z = 1 (55)R = 10.73(56)

= Constant ( f(T) only ).(57)

So,

(58) (59)

(4)Flow rate into block i, neglecting pc and gravity:

(60)

(61) ( flow in from i+1 )

But since: (62)

Then:

(63)

(64)

(65)

Where:

(66)

and:(67)

So that:

(68)

(5) The 'Material Balance Equation' with Vp constant and Sg=1

(69)

Let(70)

(71)

(72) where,

(73)

(74)

1

(75)

Tri-diagonal system (in p2) where:

(76)(77)(78)(79)

Units of Equation:scf/DSolution variable:p2

1-D Ideal Gas Coefficients (Mass form)

(80)2

(81)3

(82)4

But, for the no-flow boundaries:

agW,1 = 0agE,imax = 0

Let(83)5

where(84)6

Then the Tri-diagonal coefficients are:

ai = - agWbi = agW + agE + aVci = - agEdi = aV(pn)2 - q

Units of Equation:scf/DSolution variable:p2

1-D Real Gas Coefficients (Mass form)

(85)7

(86)8

(87)9

But, for the no-flow boundaries:

agW,i = 0agE,imax = 0

Let(88)10where(89)11

Then the Tri-diagonal coefficients are:

ai = - agWbi = agW + agE + aVci = - agEdi = aV m(pin) - qg

Units of Equation:scf/DSolution variable:m(p)12where m(p) =

Compressibility By Approximations (Liquid)

The compressibility is defined as:

(90)

For a constant compressibility liquid this leads to the following expression;

(91)

where Bref is taken at some arbitrary pressure, pref;

The graphs of B and c have the following shapes:

Another way to estimate B and c is achieved by noting that(92)13and for x < 1, ex is approximately equal to: (93)14Therefore:(94)15(95)16

The graphs of B and c are as follows but the ghaph of c shows that it exhibits a wrong behavior as a function of pressure.

On the other hand, we can also write:

(96)

(97)

(98)

17

The graphs of B and c in this case show that their behaviors as functions of pressure are reasonable, therefore these equations for B and c are right and should be used.

Radial Coordinates

Cell Approach (Discretization):

1.semilog S.L. with t so Dtn+1 = Dtn

2.semilog S.L. with r and ri+1 = b ri

geometric progressionor, evenly spaced on log scaleProcedure:

1.Calculate

2.Calculate

ri+1 = bri

3.Calculate all

Flow Equation:

18

19

where r1 = rw

rimax = re

20Simulator:

Data modification:

21Results:

Simulator:

Data Modification:

22

Results:

w

r

W

= p

1

p

Simulator:

Data Modification:

Results:

ONE - QUARTER

5 - SPOT

Simulator:

Data Modification:

4

2

8

2

2

X

K

2

Y

k

Results:

NOMENCLATURE

A=flow area, Ft2 ai=element in lower diagonal of a tri-diagonal matrixao=symmetrical flow coefficient for oil, scf/D-psiBg=gas formation volume factor, rcf/scfBo=oil formation volume factor, rcf/scfBref=reference oil formation volume factor, rcf/scfBw=water formation volume factor, rcf/scfbi=element in main diagonal of a tri-diagonal matrixci=element in upper diagonal of a tri-diagonal matrixco=compressibility of oil, psi-1cref=reference compressibility, psi-1di=right-hand side of tri-diagonal matrix problemh=thicknessk=absolute (or base) permeability, mdkrg=gas relative permeability, fractionkro=oil relative permeability, fractionkrw=water relative permeability, fractionm(p)=real gas pseudo-pressureOIP=Oil in Place, scfp=pressure, psiapsc=pressure at standard conditions, psiqo=oil production rate, scf/DR=universal gas constant (per mole) lbm-ft2/sec2oRre=outer radius, ftri=radius at cell center, ftrri=right-hand radius of cell, ftrw=wellbore radius, ftSg=average gas saturation, fractionSo=average oil saturation, fractionSw=average water saturation, fractionTE="transmisibility" factor of flow coeficients in the "east" directionTsc=temperature at standard conditions, oRz=Gas Deviation factoru=Darcy velocity, ft3/ft2-DVp=pore volume of gridblock, rcfb=constant for radial grid spacinga=constant for timestep selectionm=viscosity, cpmg=viscosity of gas, cpmo=viscosity of oil, cpmw=viscosity of water, cpf=average porosity of the gridblock, fractionr=density of fluid, lbm/ft3rref=reference density of fluid, lbm/ft3rst=density of fluid at standard conditions, lbm/ft3

EXERCISE

PROBLEM No. 1 (F.D.E. for Single Phase Flow)

Calculate the tri-diagonal coefficients and the R. H. S. (a, b, c, d) for an interior point of a 1-D liquid system, using the block approach. Calculate the following:

(a)TE(b)aE , aW(c) aV (main diagonal addition)(d)a, b, c, and d

DATA:

pi = 1500.0 psi, Dt =10.0 day, ct= 5*10-6 psi - 1k = 15.0 md, Dx = 100. ft, qo= 100.0 scf/df = 0.15, Dy = 50. ft, Bo = 1.1S = 1.0, m = 2.5 cp, kr = 0.8h = 30. ft

PROBLEM NO. 2 (radial coefficients)

We have an expression for the transmissibility on the east side of a homogeneous gridblock, TE.

Now consider a radial 2-D system, r-z.

(a) Derive a harmonic average TE for the radial direction. Use a logarithmic relation for p (i.e., p vs. ln (r) is a straight line).

Ans.

(b) Derive a harmonic average Ts for the vertical direction.

Ans.

PROBLEM NO. 3 (Compressibility)An undersaturated oil can have the following Bo equation:

Bo = Boref (1.0 - cref (p - pref))

(a)What is wrong with this relationship?(b)Write an improved equation.

PROBLEM No. 4 (F. D. E. for 1-D Single Phase Flow)

A fluid has a compressibility of 5.0 x 10-6 and a formation volume factor of 1.2 at a reference pressure of 5,000 psi. There are two methods of extrapolating formation volume factors with simple first-order-correct equations.(a)Write this two equations for B.(b)Calculate c and B at 10,000 psi with each method.(c)Explain which is better and why?(d) Clearly identify which answers belong to which method.

PROBLEM No. 5

A fan goes to a football game and decides to sit on a metal stadium seat. Although he forgot to bring his cushion, he is prepared in the study of heat conduction problems and decides to assess his level of discomfort before he sits down. He needs help.

(a)Write the complete boundary value problem in continuousnotation.(b)Show the tri-diagonal matrix for this problem for the usualimplicit F. D. solution, using the continuous FDE approach.(c)Solve this problem with the block FDE approach, using data tricks, and compare.

DATA:thermal diffusivity= 5body temp.= 98.6 deg. Fambient temp.= 50 deg. Fthe bottom of the seat is insulated.number of grid points= 5 (including points at the topand bottom, using the continuous F. D. method).

Use the top of the seat as x = 0. Thickness of seat = L = 0.3 ft. t = 0.01 day.