02 - Derivation of Diffusivity Equation - Liquid Cartesian

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Derivation of Diffusivity Equation for Slightly Compressible Liquids

Instructional Objectives:
- Derive the diffusivity equation for slightly compressible liquids in 3D Cartesian
coordinate systems.
- List the assumptions used in the above derivation.

Introduction

The diffusivity equation relates the fluid pressure in a porous media to space and time. It is a
second order partial differential equation in space and first order in time. In mathematics, the
diffusivity equation is referred to as “the heat equation”.

Three principles are combined to derive the diffusivity equation for slightly compressible liquids
in Cartesian coordinates. The three principles are: (1) conservation of mass principle (continuity
equation), (2) equation of motion (Darcy’s law), and (3) equation of state (PVT relations).
Similar derivations are possible for gas (dry gas) and for any coordinate system. The derivation
can be also extended to multiphase flow situations. The importance of the diffusivity equation
stems from the fact that solutions to the equation allow engineers to predict the pressure
distribution in the reservoir with respect to space (location) and time. Estimating the pressure
at any point in the reservoir and at any point in time (time zero is always considered to be the
time of the start of production) has many application in optimizing the reservoir performance.
The applications of these solutions include their use in well test analysis, advanced production
data analysis, calculation of water influx into the reservoir, and in reservoir performance
prediction.

To solve the diffusivity equation, we need to specify initial and boundary conditions. Since the
diffusivity equation contains first derivative of pressure with respect to time, it requires one
initial condition to solve. The usual assumption here is that pressure is equal to initial pressure
at time zero everywhere in the reservoir. Similarly, the diffusivity equation requires the
assumption of two boundary conditions. For applications of the diffusivity equation in pressure
transient and rate transient analysis, the inner boundary assumptions could be that the well is
producing at either constant rate or constant pressure. The mathematical formulation of the
inner boundary condition could have different shapes with different assumed inner boundaries
(radial well, partial penetration, hydraulically fractured well, and horizontal well). Outer
boundary conditions can include: infinite reservoir, closed reservoir (no-flow outer boundary),
and constant pressure. The shape of the outer boundary will also affect the solution of the
diffusivity equation. Most well test analysis software programs support a large variety of outer
boundaries such as: well near a fault, well between two parallel faults, well between two
intersecting faults, well in a circle, and well in a rectangle.

1 A. El-Banbi
Derivation of the Diffusivity Equation in Cartesian Coordinates

Assume the reservoir element given in the figure below with the dimensions shown in the
figure and with flow in the three principal directions (X, Y, and Z).

Conservation of Mass:

The conservation of mass principle (also called continuity equation) states that:

𝑚𝑎𝑠𝑠 𝑓𝑙𝑜𝑤 𝑚𝑎𝑠𝑠 𝑓𝑙𝑜𝑤 𝑟𝑎𝑡𝑒 𝑠𝑜𝑢𝑟𝑐𝑒 𝑜𝑟 𝑟𝑎𝑡𝑒 𝑜𝑓 𝑚𝑎𝑠𝑠


{ }− { }+ { }= { }
𝑟𝑎𝑡𝑒 𝑖𝑛 𝑑𝑢𝑟𝑖𝑛𝑔 ∆𝑡 𝑜𝑢𝑡 𝑑𝑢𝑟𝑖𝑛𝑔 ∆𝑡 𝑠𝑖𝑛𝑘 𝑡𝑒𝑟𝑚 𝑎𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛

(𝜌 𝑢𝑥+∆𝑥 ) ∆𝑦 ∆𝑧 − (𝜌 𝑢𝑥 ) ∆𝑦 ∆𝑧 +
𝜌|𝑡+∆𝑡 − 𝜌|𝑡
(𝜌 𝑢𝑦+∆𝑦 ) ∆𝑥 ∆𝑧 − (𝜌 𝑢𝑦 ) ∆𝑥 ∆𝑧 + 0 = −∆𝑥 ∆𝑦 ∆𝑧 ∅ ( )
∆𝑡
+ (𝜌 𝑢𝑧+∆𝑧 ) ∆𝑥 ∆𝑦 − (𝜌 𝑢𝑧 ) ∆𝑥 ∆𝑦

Divide through by ∆𝑥 ∆𝑦 ∆𝑧

(𝜌𝑢)𝑥+∆𝑥 −(𝜌𝑢)𝑥 (𝜌𝑢)𝑦+∆𝑦 −(𝜌𝑢)𝑦 (𝜌𝑢)𝑧+∆𝑧 −(𝜌𝑢)𝑧 (𝜌)𝑡+∆𝑡 −(𝜌)𝑡


+ + = −∅
∆𝑥 ∆𝑦 ∆𝑧 ∆𝑡

Take the limit when all x, y, z, and t go to zero

2 A. El-Banbi
𝜕(𝜌 𝑢𝑥 ) 𝜕(𝜌 𝑢𝑦 ) 𝜕(𝜌 𝑢𝑧 ) 𝜕(∅ 𝜌)
+ + = − (I)
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡

The above equation is the continuity equation in 3D Cartesian coordinates.

Equation of Motion:

The equation of motion that applies for liquid flow in porous media is Darcy’s law. Although
Darcy’s law was empirically derived, it stood the test of time and it is widely applied to describe
the fluid flow in porous media for variety of conditions.

𝑘 𝜕𝑝
𝑢𝑥 = − 𝜇 𝜕𝑥
𝑘 𝜕𝑝
𝑢𝑦 = − 𝜇 𝜕𝑦
𝑘 𝜕𝑝
𝑢𝑧 = − 𝜇 𝜕𝑧

Substitute the above relations into the continuity equation, we have:

𝜕 𝑘 𝜕𝑝 𝜕 𝑘 𝜕𝑝 𝜕 𝑘 𝜕𝑝 𝜕(∅ 𝜌)
− 𝜕𝑥 (𝜌 𝜇 ) − 𝜕𝑦 (𝜌 𝜇 )− (𝜌 𝜇 )= −
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑧 𝜕𝑡

Assume that porosity, permeability and viscosity are constants, and simplify:

𝜕 𝜕𝑝 𝜕 𝜕𝑝 𝜕 𝜕𝑝 ∅ 𝜇 𝜕𝜌
(𝜌 ) + 𝜕𝑦 (𝜌 )+ (𝜌 )= (II)
𝜕𝑥 𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑧 𝑘 𝜕𝑡

Equation of State:

For slightly compressible liquid, the equation of state can be written as:

1 𝜕𝜌 𝜕𝜌
𝑐= (𝜕𝑝) Or =𝑐𝑝 (III)
𝜌 𝑇 𝜕𝑝

Expand Eq. II using the product rule:


𝜕𝜌 𝜕𝑝 𝜕2 𝑝 𝜕𝜌 𝜕𝑝 𝜕2 𝑝 𝜕𝜌 𝜕𝑝 𝜕2 𝑝 ∅ 𝜇 𝜕𝜌
+ 𝜌 + + 𝜌 + + 𝜌 =
𝜕𝑥 𝜕𝑥 𝜕𝑥 2 𝜕𝑦 𝜕𝑦 𝜕𝑦 2 𝜕𝑧 𝜕𝑧 𝜕𝑧 2 𝑘 𝜕𝑡

Recognizing that the density is function of pressure only (at isothermal conditions), and using
the chain rule:
𝜕𝜌 𝜕𝜌 𝜕𝑝
= 𝜕𝑝 𝜕𝑥
𝜕𝑥

3 A. El-Banbi
Similar expressions are possible for density derivatives in other directions, we therefore have:
𝜕𝜌 𝜕𝑝 𝜕𝑝 𝜕2 𝑝 𝜕𝜌 𝜕𝑝 𝜕𝑝 𝜕2 𝑝 𝜕𝜌 𝜕𝑝 𝜕𝑝 𝜕2 𝑝 ∅ 𝜇 𝜕𝜌
+ 𝜌 + + 𝜌 + + 𝜌 =
𝜕𝑝 𝜕𝑥 𝜕𝑥 𝜕𝑥 2 𝜕𝑝 𝜕𝑦 𝜕𝑦 𝜕𝑦 2 𝜕𝑝 𝜕𝑧 𝜕𝑧 𝜕𝑧 2 𝑘 𝜕𝑡

Or,
𝜕𝜌 𝜕𝑝 2 𝜕2 𝑝 𝜕𝜌 𝜕𝑝 2 𝜕2 𝑝 𝜕𝜌 𝜕𝑝 2 𝜕2 𝑝 ∅ 𝜇 𝜕𝜌
(𝜕𝑥 ) + 𝜌 + (𝜕𝑦) + 𝜌 + ( 𝜕𝑧 ) + 𝜌 =
𝜕𝑝 𝜕𝑥 2 𝜕𝑝 𝜕𝑦 2 𝜕𝑝 𝜕𝑧 2 𝑘 𝜕𝑡

The squared gradient terms can be ignored because the pressure gradient terms are small for
fluid flow in porous media. Therefore, we can further simply the above equation to:
𝜕2 𝑝 𝜕2 𝑝 𝜕2 𝑝 ∅ 𝜇 𝜕𝜌
𝜌 + 𝜌 + 𝜌 =
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝑘 𝜕𝑡

𝜕𝜌 𝜕𝜌 𝜕𝑝
Recognizing that = from the chain rule and using the compressibility relation, we can
𝜕𝑡 𝜕𝑝 𝜕𝑡
convert the right hand side to pressure derivative:

𝜕2 𝑝 𝜕2 𝑝 𝜕2 𝑝 ∅𝜇 𝜕𝑝
𝜌 + 𝜌 + 𝜌 = 𝑐𝜌 𝜕𝑡
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝑘

Divide through by the density,

𝜕2 𝑝 𝜕2 𝑝 𝜕2 𝑝 ∅ 𝜇 𝑐 𝜕𝑝
+ + = (IV)
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝑘 𝜕𝑡

The above equation is the diffusivity equation in Cartesian coordinates.

Assumptions for the diffusivity equation:


1) Darcy’s law applies (laminar flow)
2) Constant and isotropic permeability
3) Constant porosity
4) Constant viscosity
5) Small and constant compressibility
6) Pressure gradients are small
7) Gravity effects are neglected (horizontal flow)
8) Isothermal conditions

Exercise 1:
Following similar procedure, derive the diffusivity equation for slightly compressible liquid in
radial coordinates.

Exercise 2:
Consult the text book for the derivation of the diffusivity equation for gases in radial
coordinates. What is the main difference between gas and oil in deriving the diffusivity
equation?

4 A. El-Banbi
Nomenclature:

𝑐 = Fluid compressibility
𝑘 = Permeability
𝑝 = Pressure
𝑡 = Time
𝑇 = Temperature
𝑢 = Darcy velocity
∅ = Porosity
𝜌 = Density
𝜇 = Viscosity

References:
Lee, J., Rollins, J., and Spivey, J.: Pressure Transient Testing, SPE Text Book Series, Richardson,
Tx. 2003.

5 A. El-Banbi

You might also like