2.1. Mathematical Model
The mathematical formulation of unsteady gas filtration in porous media is governed by nonlinear parabolic partial differential equations that capture the complex coupling between pressure dynamics, fluid flow, and reservoir rock properties. In this study, we consider the realistic scenario where both porosity and permeability coefficients exhibit pressure-dependent variations during the production process. This pressure-dependency significantly influences the long-term reservoir behavior and must be explicitly incorporated into the mathematical framework for accurate prediction of field performance. The governing equation for two-dimensional gas filtration in a heterogeneous porous medium, accounting for pressure-dependent porosity variations, is formulated as follows:
here,
denotes the reservoir pressure field [atm];
is the initial reservoir pressure [atm];
is the dynamic viscosity of gas [cP];
represents the spatially varying permeability coefficient [Darcy];
h is the layer power [m];
denotes the pressure-dependent porosity coefficient [dimensionless];
is the initial porosity value [dimensionless];
represents the rock compressibility coefficient [atm
−1];
a is the gas saturation coefficient [dimensionless].
The source term
Q in Equation (
1) accounts for the distributed production from multiple wells and is expressed using the Dirac delta function as:
where
represents the Dirac delta function,
denotes the production rate of the
-th well [m
3/day];
are the spatial coordinates of the
-th production well and
represents the total number of production wells.
The initial condition for the boundary value problem is specified as:
where
G denotes the two-dimensional spatial domain representing the reservoir.
The boundary conditions are formulated as Robin-type (third-kind) conditions that allow for flexible representation of both open and closed reservoir boundaries:
where
is a characteristic parameter [dimensionless],
represents the boundary pressure [atm];
L is the characteristic length of the reservoir domain [m] and
is a boundary type indicator defined as:
2.3. Discrete Model Construction and Numerical Solution Strategy
The strongly nonlinear nature of the boundary value problem formulated in Equations (
8)–(
12) precludes analytical treatment, necessitating the development of robust numerical solution methodologies. In this section, we present a comprehensive finite difference discretization framework combined with quasi-linearization techniques and the Alternating Direction Implicit (ADI) method [
15] to efficiently solve this challenging problem.
We construct a uniform rectangular grid domain that discretizes the two-dimensional spatial reservoir and the temporal evolution:
where
and
represent the spatial mesh sizes in the
x and
y directions, respectively;
denotes the temporal step size;
and
are the number of grid points in each spatial direction;
is the total number of time steps; and
T is the final simulation time.
The ADI method provides an efficient approach for solving multi-dimensional parabolic problems by decomposing each time step into a sequence of one-dimensional problems. This dimensional splitting strategy significantly reduces computational complexity while maintaining second-order accuracy in both space and time. The transition from time level l to is accomplished through two fractional steps with intermediate time level , where each fractional step advances the solution by .
In the first fractional step (time level
), the spatial operator in the
x-direction is treated implicitly while the
y-direction operator remains explicit:
where
denotes the pressure at time level
l, and
represents the intermediate pressure.
In the second fractional step (time level
), the roles are reversed:
where
denotes the pressure at the new time level. For notational convenience, we introduce the transmissibility coefficients at cell interfaces:
where the subscripts
and
denote values evaluated at the cell interfaces, typically computed using harmonic averaging.
The finite difference equations contain nonlinear terms due to the quadratic pressure dependence in the diffusion operator. To linearize these terms, we employ the quasi-linearization method [
16], which approximates nonlinear functions through first-order Taylor expansion around an iterative solution estimate. For a general nonlinear function
, the quasi-linearization approximation is:
where
represents an approximate solution from the previous iteration. Applying this to the quadratic pressure term yields:
Substituting the linearization into the first fractional step equation, we obtain:
with
. A similar linearized equation is obtained for the second fractional step.
To complete the discrete system, we approximate the boundary conditions using second-order accurate finite difference formulas. For the intermediate time level
, the boundary conditions in the
x-direction are:
for
. Similar discretizations apply for the
y-direction boundaries.
Combining the linearized interior equations with the boundary conditions yields a tridiagonal system for the first fractional step:
where the coefficients are:
The tridiagonal systems arising from each fractional step are efficiently solved using the Thomas algorithm, which operates in
time complexity. For the first fractional step, the sweep method proceeds as follows. The forward sweep computes coefficients
and
for
:
The backward sweep determines the final pressure value at the right boundary and computes interior values:
The second fractional step in the y-direction is solved analogously.
Due to the nonlinearity introduced by quasi-linearization, an iterative process is required at each time level. The iteration continues until the convergence criterion is satisfied:
where
is a prescribed tolerance (typically
or smaller), and
s denotes the iteration counter. This ensures the iterative solution has converged to within the specified accuracy before proceeding to the next time level. The complete numerical solution algorithm integrates the ADI fractional steps, quasi-linearization, tridiagonal solvers, and iterative convergence checking to efficiently and accurately solve the nonlinear gas filtration problem over the entire spatiotemporal domain.
2.4. Computational Algorithm and Implementation Strategy
The numerical methodology developed in the previous section is implemented through a systematic computational algorithm that efficiently solves the two-dimensional gas filtration boundary value problem. The algorithm employs the Alternating Direction Implicit (ADI) scheme with quasi-linearization, decomposing the multi-dimensional problem into a sequence of one-dimensional tridiagonal systems that are solved using the Thomas algorithm (sweep method). This section presents a detailed description of the computational procedure, including the algorithmic structure and implementation workflow.
The temporal advancement from time level l to is accomplished through two sequential fractional steps, each treating one spatial direction implicitly while using explicit values from the previous fractional step for the other direction. This operator splitting approach maintains stability while reducing computational complexity significantly compared to fully implicit schemes. In the first fractional step (), the pressure field is advanced to the intermediate time level by solving one-dimensional problems in the x-direction using the sweep method, with the y-direction terms treated explicitly. In the second fractional step (), the pressure field is advanced to the new time level by solving one-dimensional problems in the y-direction using the sweep method, with the x-direction terms now evaluated at the intermediate time level. Within each fractional step, an iterative procedure based on quasi-linearization is employed to handle the nonlinear pressure-squared terms and pressure-dependent porosity. The iteration continues until convergence is achieved according to the specified criterion.
The first fractional step computes the intermediate pressure distribution
by solving tridiagonal systems along lines of constant
y-coordinate. For each grid line
, we begin by updating the porosity coefficient based on the current iterate of the pressure field:
where
s denotes the current iteration index, and
represents the pressure iterate at the intermediate time level.
Next, we compute the tridiagonal system coefficients
,
,
, and
at each interior node
along the grid line
j:
where the residual terms are defined as:
Here, denotes the pressure values from the previous iteration, and represents values at the previous time level.
We then initialize the sweep coefficients
and
from the left boundary condition (at
):
The forward sweep computes the coefficients
and
for
:
These recursion relations are applied sequentially from to , storing the computed coefficients for use in the backward sweep.
We then determine the pressure at the right boundary (at
) using the right boundary condition and the final sweep coefficients:
The backward sweep computes the pressure values
for
using the recurrence relation:
This completes one iteration of the first fractional step for grid line j. The procedure is repeated for all .
After completing the sweep for all grid lines, we verify the convergence criterion:
If the criterion is not satisfied, we update the iterate and return to the porosity update step. If convergence is achieved, we proceed to the second fractional step.
The second fractional step advances the solution from the intermediate time level
to the new time level
by solving tridiagonal systems along lines of constant
x-coordinate. For each grid line
, we first update the porosity coefficient at the new time level:
where
represents the pressure iterate at the new time level
.
We then compute the tridiagonal system coefficients in the
y-direction at each interior node
along the grid line
i:
where:
Note that denotes the intermediate solution computed in the first fractional step.
We execute the analogous sweep procedure in the y-direction by initializing sweep coefficients using the bottom boundary condition (at ), performing the forward sweep for , computing the boundary value at , and performing the backward sweep for . We then check the convergence criterion . If convergence is not achieved, we update and repeat from the porosity update step. Once converged, the solution at time level is obtained.
The complete simulation proceeds by iterating through successive time levels. We initialize the pressure field as for all . For each time level to , we set the initial iterate for all , execute the first fractional step to obtain , set the initial iterate for all , execute the second fractional step to obtain , and update the time . At each time level, the solution from the previous time step serves as the initial condition, ensuring continuity of the pressure field throughout the simulation period.
The computational efficiency of the proposed algorithm stems from several key features. The dimensional splitting of the ADI method reduces a two-dimensional problem to a sequence of one-dimensional problems, each requiring operations via the Thomas algorithm. The tridiagonal structure allows the sweep method to solve systems in time, avoiding the complexity of general matrix solvers. The quasi-linearization iterative approach typically converges in 3–5 iterations per fractional step, maintaining computational tractability. For a grid with spatial nodes and time steps, the overall computational complexity is approximately , making the algorithm highly scalable for large-scale reservoir simulations.
Figure 1 and
Figure 2 present comprehensive flow diagrams illustrating the complete computational procedure for both fractional steps, including initialization, iterative loops, convergence checks, and time advancement. The systematic implementation of this algorithm ensures robust and efficient solution of the nonlinear gas filtration problem, providing accurate predictions of pressure evolution and porosity changes throughout the reservoir domain over extended production periods.