3.1. Difference Scheme Construction with Preservation of Symmetries
Difference scheme construction with the preservation of continuous symmetries for an original differential equation has been previously presented in [
3]. This method is used in this study to obtain all possible invariant difference schemes without restrictions to certain forms of finite-difference derivatives or neighboring points for the current point of a mesh.
Let us consider some differential equation
where
is a set of
order derivatives for the function
and
is the order of (7). Let Equation (7) has an
-parameter symmetry group of transformations, which is a Lie group
with
infinitesimal operators
Equation (7) can be written via differential invariants
[
5,
6] of the symmetry group (8), which can be found from Equation (1) and written as
This set of functions
is not unique because any smooth enough function of invariants is an invariant. Let us consider some difference scheme in the following form [
14]:
where
stands for a difference equation;
stands for a mesh;
is the order of the difference scheme (11);
are
n-tuples, which are responsible for positions on a mesh
from an
n-dimensional space. One says that this group of transformations is a symmetry group for Equation (11) if this equation defines an invariant manifold for the group of transformations (8), which is rewritten for all indices
from (11) as follows:
One says that (11) is an invariant difference scheme for differential Equation (7), or in (11), all symmetries of (7) are preserved if the difference scheme (11) in the limit tends to (7). Tending to the limit in this definition means that quantity
where
which means that neighboring points of a mesh tend to be closer. Difference invariants for the continuous group (12) should be determined to find an invariant difference scheme. Difference invariants can be found from the following system of equations:
where
are prolongations of operators
Xj for variables
which are values for independent and dependent variables in points of a mesh with the set of indices
for every point. Let functions
be the difference invariants, which are found from the system of Equations (13). The approximation of differential invariants (10) via difference invariance (13) is the next step for constructing invariant difference schemes, which can be written as
where
,
is the order of approximation. Invariant difference schemes for a differential equation are constructed by the following steps:
Identify continuous symmetries for a differential equation of the form (7);
Express a differential equation in terms of differential invariants as it is shown in Equation (10);
Construct difference invariants for a symmetry group of the form (12);
Approximate differential invariants (10) via difference invariants from (13);
Notate Equation (10) via approximations (14) of differential invariants;
Seek functions for a definition of a mesh, i.e., obtain expressions for independent variables.
The aforementioned definition is not rigorous and is intended to outline the concept. However, in the further usage of this definition, every arbitrary function, such as , , and , are sufficient to define corresponding types of equations or other objects, for example, a continuous group of transformations. Of course, there can be a situation for this definition with just an invariant system of equations of type (11) and without a limit of type (7), but this approach allows all possible invariant schemes, including one with or without a limit.
Invariant difference schemes have essentially the same continuous symmetries, which, as it is shown below for (5), may contain important information about an equation. The main question of this article what are numerical benefits of using this type of difference schemes and it arises from several studies (for example [
3]), which have complete theory of group analysis of difference schemes using theory of Lie groups but almost without analysis of stability, approximation, convergence, and applications in practical problems for invariant difference schemes.
3.2. Numerical Solution Generation Using Continuous Symmetries
It is pointed out above that a particular solution can be transformed into another solution (providing that the first solution is not invariant) if a group of continuous symmetry is known. Therefore, one can obtain a family of solutions depending on a parameter of a group. This approach has been applied widely for differential equations and can be applied for difference schemes as well [
3]. It provides an opportunity for calculating a numerical solution once and obtaining others by using a continuous group of symmetries but for some types of boundary and initial conditions, which must be transformed one into another by using the continuous group of symmetries. This problem is known and discussed in, for example, [
15].
Let us consider a particular numerical solution, which is a set of points
, where
k is an index on a mesh,
is a vector of independent variables, and
is a vector of dependent variables. It is an “ideal” numerical solution that is calculated using an “ideal” computer, which can avoid errors of truncations. Let us consider errors of truncations
and
; thus, a “real” solution can be written as a set of points
. The errors are transformed when a transformation from some symmetry group is used for a correspondent difference scheme (which has the mentioned numerical solution) and new errors can be written as
where
and
are errors for a generated solution using a continuous group of symmetry,
and
are errors for calculations of functions
and
using a “real” computer. Errors
and
tend to zero if
,
,
, and
tend to zero. It is assumed that functions
and
are continuous and some converging algorithm is used to calculate them. Therefore, errors for solutions can be controlled and decreased when solutions are generated by symmetry groups. The nature of a used particular solution is not discussed in this section, so it can be, for example, unstable. However, it is not important in the case of this section.
3.3. Example of Invariant Difference Scheme Construction for Gas Flow Equation
Let us return to example (5) and conduct all the steps from the definition above. First of all, it is suggested to change the dependent variable
using the following substitution:
Thus, Equation (5) can be rewritten as
where the bar above for the new variable
is omitted in this section for the sake of convenience. This change of variables is made only for the following stability analysis. The symmetry group operators are the same (operators (6)) apart from the last for the new equation:
For the symmetry group on the basis of (16), a differential invariant for an invariant notation of the form (10) can be chosen as follows:
the continuous group from (16) has three other differential invariants, but they are omitted because the invariant notation for Equation (15) is
. Difference invariants for (16) can be written as follows
and can be obtained from the system of first-order partial differential equations of the form (13) with prolonged operators for (16). The numbers of invariants depend on the number (four in this case) of independent operators (in a sense of functional independence in the space of all discrete variables) and on the number of all discrete variables. The number of discrete variables can be chosen for this case as 17 for time (two time layers), spatial, and pressure variables in five nods of a mesh: central, top, bottom, left, and right nods. The number of invariants is greater than three, but there are only three different forms (17) of these invariants. The constants
are needed for expressing of all invariants and wider sets of invariant difference schemes, for example, for using different numbers of neighbor points for approximations of differential derivatives. These translations (constants
) are possible because of the specific form of operators (16), which can be shown as
The invariant allows to define the next time step according to the spatial variable steps and the current values of pressure . The invariant defines possible spatial meshes including uniform meshes and comes from the operator , which allows to scale pressure according to time.
Let us consider two invariant difference schemes for deeper understanding of the difference invariant
: explicit
and implicit
difference schemes. These difference schemes can be obtained via difference invariants (17). One can obtain necessary conditions for stability of the difference schemes (18) and (19) using the method of frozen coefficients [
16]:
The invariant
can be rewritten as
It indicates that necessary conditions (20) for (18) and (19) are invariants but for different sets of values for the constant . This fact gives an example of the continuous symmetry preservation importance for difference schemes. Of course, there are examples of difference schemes that can have more fruitful properties for numerical calculations and cannot be invariant. However, the described above approach allows us to have a very wide choice of difference schemes, which can be potentially better.
3.4. Families of Invariant Difference Schemes
The example from the last section shows very close connections between symmetries and properties of equations. It is applicable for both differential and difference cases. Differential equations of the type (3), which represents different problems for gas flow in porous media, are well researched by using theory of Lie groups. As it is mentioned above, this type of equations has group classifications, which can be found in [
11,
12]. These results and results from the last sections are used in the current section to obtain the families of invariant difference schemes for differential equations of the type (3), which stand for the physical problem (2). The aim of this section is to present only differential equations and their invariant difference schemes with coefficients, which can be chosen from real physical problems of gas flow in porous media. Thus, the results in
Table 1 are not intended to cover all equations from the known classifications.
In
Table 1,
and
are arbitral constants, and operators
,
, and
are from (6). The results from
Table 1 match results from [
17] for cases 1–3 and certain constants
. The example (5) and all results for (15) belong to case 2 in
Table 1 (with changing of variables
) with coefficients
and
.
The one-dimensional case is considered for simplicity, and all results of this article can be generalized for the multidimensional case. All cases from
Table 1 can have certain coefficients with certain physical meanings, and difference invariants can be used for constructing a wide set of invariant difference schemes. Another reason of class choices from known group classifications of differential equations of the parabolic type is the possibility of finding explicit forms for difference invariants and transformations from continuous symmetry groups, which can both be found from their corresponding equations.
Equation (2) and its classes from
Table 1 can represent wide spectrums of problems for flow in porous media on different scales: microscale of pores, macroscale of fields, and other intermediate scales. For example, problems of CO
2 geological storage [
18] or, in particular, problems of CO
2 injection on macroscales of porous media [
19] can be studied using the results obtained from this study. There are several results for microscales that can be studied using results of this article for some specific cases of initial and boundary conditions, forms of pore network models and methods for calculating conductivities: suggested models for gas flow in [
20], one-phase flow in [
21], multiphase flow in [
22], and modeling of films in gas–liquid–capillary systems in [
23].