26
ISSN 0361-7688, Programming and Computer Software, 2023, Vol. 49, No. 1, pp. 26–31. © Pleiades Publishing, Ltd., 2023.
Russian Text © The Author(s), 2023, published in Programmirovanie, 2023, Vol. 49, No. 1.
Investigation of Difference Schemes for Two-Dimensional
Navier–Stokes Equations by Using Computer Algebra Algorithms
Yu. A. Blinkov
a,b,c,
* (ORCID: 0000-0001-7340-0919) and A. Yu. Rebrina
d,
**
a
Chernyshevsky Saratov National Research State University,
ul. Astrakhanskaya 83, Saratov, 410012 Russia
b
Peoples’ Friendship University of Russia,
ul. Miklukho-Maklaya 6, Moscow, 117198 Russia
c
Joint Institute for Nuclear Research,
ul. Zholio-Kyuri 6, Dubna, Moscow oblast, 141980 Russia
d
Gagarin State Technical University of Saratov,
ul. Politekhnicheskaya 77, Saratov, 410054 Russia
*e-mail: blinkovua@info.sgu.ru
**e-mail: anrebrina@yandex.ru
Received July 1, 2022; revised August 23, 2022; accepted September 7, 2022
Abstract—A class of consistent difference schemes for incompressible Navier–Stokes equations in physical
variables and their differential approximations are considered using an algorithm for Gröbner basis construc-
tion. Results of investigating the first differential approximations of these schemes, which are obtained by
using the authors' programs implemented in the SymPy computer algebra system, are presented. For the dif-
ference schemes under consideration, the quadratic dependence of the error for large Reynolds numbers and
the inversely proportional dependence for creeping currents are analyzed.
DOI: 10.1134/S0361768823010024
1. INTRODUCTION
Exact solutions to systems of partial differential
equations can presently be found only in very rare
cases, which is why, in mechanics and physics, these
systems have to be solved numerically, i.e., by replac-
ing them with their discrete counterparts. The most
popular discretization and numerical methods are
finite element, finite volume, and finite difference
methods. The last method was historically the first [1];
it is based on the replacement of differential equations
with difference equations defined on a selected grid.
To construct a numerical solution, a finite-difference
approximation of partial differential equations is sup-
plemented with an appropriate discretization of initial
and/or boundary conditions. In this case, the similar-
ity of numerical and exact solutions of a system of par-
tial differential equations depends heavily on the qual-
ity of a difference scheme.
In [2, 3], an algorithm for constructing conserva-
tive difference schemes was developed and imple-
mented in Maple. The desired system is represented as
relational conditions for difference functions, their
difference derivatives are represented as integral rela-
tions, and the corresponding ranking is selected by
computing the difference Gröbner basis, which adapts
the well-known algorithm for investigation of polyno-
mial systems to the difference case [4]. As a result of
applying the algorithm for constructing the Gröbner
basis of a difference ideal for differential equations
with the derivatives of order higher than one, a differ-
ence scheme is constructed in the form of a relation
only on the functions themselves. In this case, the dif-
ference scheme obtained is checked for consistency
and its dimension (solution space) is determined.
One of the algorithmic approaches for investigation
of difference schemes is the construction of the first
differential approximation [5]. Using this approach
and Gröbner bases, differential approximations were
constructed for equations of evolutionary type [6] and
for systems of equations [7]. In [8], some problems of
computing the first differential approximation in com-
puter algebra systems were considered. If a difference
scheme is not consistent or has a smaller solution
space as compared to the original system of differential
equations, then, when constructing the first differen-
tial approximation, extra equations occur and compu-
tations can be terminated. This check is much more
efficient (in terms of both time and memory) than the
consistency check in the difference case, and it can
easily be implemented using standard tools of com-
puter algebra systems.