02 - Derivation of Diffusivity Equation - Liquid Cartesian
02 - Derivation of Diffusivity Equation - Liquid Cartesian
02 - Derivation of Diffusivity Equation - Liquid Cartesian
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)
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑡
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.
𝑘 𝜕𝑝
𝑢𝑥 = − 𝜇 𝜕𝑥
𝑘 𝜕𝑝
𝑢𝑦 = − 𝜇 𝜕𝑦
𝑘 𝜕𝑝
𝑢𝑧 = − 𝜇 𝜕𝑧
𝜕 𝑘 𝜕𝑝 𝜕 𝑘 𝜕𝑝 𝜕 𝑘 𝜕𝑝 𝜕(∅ 𝜌)
− 𝜕𝑥 (𝜌 𝜇 ) − 𝜕𝑦 (𝜌 𝜇 )− (𝜌 𝜇 )= −
𝜕𝑥 𝜕𝑦 𝜕𝑧 𝜕𝑧 𝜕𝑡
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)
𝜌 𝑇 𝜕𝑝
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 𝑘
𝜕2 𝑝 𝜕2 𝑝 𝜕2 𝑝 ∅ 𝜇 𝑐 𝜕𝑝
+ + = (IV)
𝜕𝑥 2 𝜕𝑦 2 𝜕𝑧 2 𝑘 𝜕𝑡
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