{'fraction_non_alphanumeric': 0.045073525889735115, 'fraction_numerical': 0.014034583512956842, 'mean_word_length': 4.393438388013434, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On Consistency of Finite Difference Approximations to the Navier-Stokes Equations

In the given paper, we confront three finite difference approximations to the Navier--Stokes equations for the two-dimensional viscous incomressible fluid flows. Two of these approximations were generated by the computer algebra assisted method proposed based on the finite volume method, numerical integration, and difference elimination. The third approximation was derived by the standard replacement of the temporal derivatives with the forward differences and the spatial derivatives with the central differences. We prove that only one of these approximations is strongly consistent with the Navier--Stokes equations and present our numerical tests which show that this approximation has a better behavior than the other two.

Here (u, v) is the velocity field, f 1 is the continuity equation, f 2 and f 3 are the proper Navier-Stokes equations [2], and f 4 is the pressure Poisson equation [3].
The constant Re denotes the Reynolds number. For discretization we use the finite difference method [4,5] and consider orthogonal and uniform computational grid. In this method, the finite difference approximation (FDA) to the differential equations combined with appropriate initial or/and boundary conditions in their discrete form constitutes the finite difference scheme (FDS) for construction of a numerical solution. The main requirement to the scheme is convergence of its numerical solution to the solution of differential equation(s) when the grid spacings go to zero.
The fundamental problem in numerical solving of partial differential equation (PDE) or a system of PDEs is to construct such FDA that for any initial-or/and boundary-value problem, providing existence and uniqueness of the solution to PDE(s) with a smooth dependence on the initial or/and boundary data, the corresponding FDS is convergent. For polynomially-nonlinear PDEs, e.g., the Navier-Stokes equations, to satisfy this requirement FDA must inherit all algebraic properties of the differential equation(s). The necessary condition for the inheritance is the property of s(strong)-consistency of FDA to PDEs introduced first in [6] for linear equations and extended in [13] to nonlinear ones.
The conventional consistency [5], called in [6,13] by weak-consistency implies reduction of FDA to the original PDE(s) when the grid spacings go to zero. This consistency can be verified by a Taylor expansion of the difference equations in the FDA about a grid point. The strong consistency implies reduction of any element in the perfect difference ideal generated by the FDA to an element in the radical differential ideal generated by the PDE(s). In [13], it was shown that s-consistency can be checked in terms of a difference Gröbner basis of the ideal generated by the FDA. Since difference polynomial ring [7] is non Noetherian, in the nonlinear case, generally, one cannot verify s-consistency of a given FDA through computation of associated difference Gröbner basis. However, if the FDA under consideration is w-consistent, then it is not s-consistent if and only if at some step of the Buchberger-like algorithm (cf. [9,10] and [13]) applied to construction of the Gröbner basis, a difference S-polynomial arises which in not w-consistent with any of the consequences of the original PDE(s). In practice, this may help to detect s-inconsistency.
In [11], the algorithmic approach to generation of FDA suggested in [12] was applied to the Navier-Stokes equations (1). The approach is based on the finite volume method combined with numerical integration and difference elimination. As a result, three different w-consistent FDAs were obtained in [11]. Two of them were analyzed in [13] from the viewpoint of s-consistency. One of these FDAs was qualified as a "good" one, i.e., s-consistent, by the claim that it itself is a Gröbner basis. Another FDA was qualified as s-inconsistent by inspection (observed already in [11]) that one of its differential consequences is not reduced to a differential consequence of the system (1) when the grid spacings go to zero. However, as explicit computation with the Maple-based implementation [9] of the Buchberger-like algorithm [9,10] showed, the "good" FDA is not a Gröbner basis what generates a need for the further investigation of its s-consistency.
In this paper, we prove that the "good" FDA generated in [11] is indeed s-consistent. In doing so we avoid the Gröbner basis computation what is rather cumbersome. In addition, we consider universally adopted standard method to discretization, which consists in the replacement of the temporal derivatives in (1) with the forward differences and the spatial derivatives with the central differences, and show that it yields FDA which is not s-consistent. To see numerical impact of the property of s-consistency we confronted the three FDAs and compared their behavior for the mixed initial-boundary value problem whose data originate from the exact solution [14] of (1). This comparison clearly shows superiority of the s-consistent FDA over the other two which are not s-consistent.
This paper is organized as follows. Section 2 introduces the main objects of difference algebra related to discretization of (1). Section 3 is concerned with definition of FDA to (1) and its s-consistency. In Section 4, we consider three particular FDAs to the Navier-Stokes system (1) and establish their s-consistency properties. Section 5 presents the results of our numerical computer experiments. Some concluding remarks are given in Section 6.

Preliminaries
The left-hand sides of the PDEs in the Navier-Stokes system (1) can be considered as elements in the differential polynomial ring [8] where {u, v, p} is the set of differential indeterminates and K := Q(Re) is the differential field of constants.
Remark 1. It is easy to check that the differential ideal [F ] ⊂ R generated by F is radical [8].
To approximate the differential system (2) by a difference one, we use an orthogonal and uniform computational grid (mesh) as the set of points (jh, kh, nτ ) ∈ R 3 . Here τ > 0 and h > 0 are the grid spacings (mesh steps), and the triple of integers (j, k, n) ∈ Z 3 numerates the grid points. In doing so, in a grid node (jh, kh, nτ ) a solution to (1) is approximated by the triple of grid functions {u n j,k , v n j,k , p n j,k } := {u, v, p} | x=jh,y=kh,t=τ n .
Now we introduce the set of mutually commuting differences {σ x , σ y , σ t } acting on a grid function φ(x, y, t), which is to approximate a solution of (1) on the grid points, as the forward shift operators The monoid generated by the differences will be denoted by Σ, i.e., and the ring of difference polynomials over K will be denoted by R. The elements in R are polynomials in the difference indeterminates u, v, p (dependent variables) defined on the grid points and in their shifted values The set M of monomials in the ring R reads Definition 2.
[13] A total order on M is admissible if it extends a ranking and Given an admissible monomial order , every difference polynomial p has the leading monomial lm(p) ∈ M and the leading term lt(p) := lm(p) lc(p) with the leading coefficient lc(p). Throughout this session, every difference polynomial is to be normalized (i.e., monic) by division of the polynomial by its leading coefficient. This provides ( ∀p ∈ R ) [ lc(p) = 1 ]. Now we consider the notions of difference ideal [7] and its standard basis. The last notion was introduced in [13] in the full analogy to that in differential algebra [16].
If F ⊂ R, then the smallest σ-ideal containing F is said to be generated by F and denoted by [F ].

Definition 4. [13]
If for α, β ∈ M the equality β = µ · σ • α holds with σ ∈ Σ and µ ∈ M we shall say that α divides β and write α | β. It is easy to see that this divisibility relation yields a partial order.

Definition 5. [13]
Given a σ-ideal I and an admissible monomial ordering , If the standard basis is finite we shall call it Gröbner basis.
Remark 2. Based on Definition 4, one can introduce (see [13]) in difference algebra the concepts of polynomial reduction and normal form of a difference polynomial p modulo a set of difference polynomials P (notation: NF(p, P )). A reduced standard basis G is such that The algorithmic characterization of standard bases and their construction in difference polynomial rings is done in terms of difference S-polynomials. Definition 6. [13] Given an admissible order, and monic difference polynomials p and q (they not need to be distinct), the polynomial S(p, q) Remark 3. This characterization immediately implies [13,10] a difference version of the Buchberger algorithm (cf. [15,16]). The algorithm always terminates when the input polynomials are linear. If this is not the case, the algorithm may not terminate. Additionally, one can take into account Buchberger's criteria to avoid some useless zero reductions. The difference criteria are similar to the differential ones [16].

Definition 7. [7]
A perfect difference ideal generated by a set F ⊂ R and denoted by F is the smallest difference ideal containing F and such that for any f ∈ R, σ 1 , . . . , σ r ∈ Σ and k 1 , . . . , k r ∈ N ≥0 Remark 4. In difference algebra, perfect ideals play the same role (cf. [17]) as radical ideals in commutative and differential algebra. Obviously, [F ] ⊆ F .

Consistency of Difference Approximations
Let a finite set of difference polynomials be a FDA to (1). It should be noted that generally the number p in (6) needs not to be equal to the number of equations in (1).
Definition 9. We shall say that a difference equationf = 0 implies (in the continuous limit) the differential equation f = 0 and writef f if f does not contain the grid spacings h, τ and the Taylor expansion about a grid point The requirement of weak consistency which has been universally accepted in the literature, is not satisfactory by the following two reasons: 1. The cardinality of FDA in (13) may be different from that of the original set of differential equations. For example, the systems { u xz +yu = 0, u yw +zu = 0 } and { yu y − zu z = 0, u x − u w = 0, u xw + yu y = 0 } in one dependent and four dependent variables are fully equivalent (see [6], Example 3). Thus, to construct a FDA, one can use them interchangeably. Whereas Definition 10 fastensF to F . 2. A w-consistent FDA may not be good in view of inheritance of properties of differential systems at the discrete level. We shall demonstrate this in the next section.
Another concept of consistency was introduced in [6] for linear FDA and then extended in [13] to the nonlinear case. For the Navier-Stokes system, it is specialized as follows.
The algorithmic approach of paper [13] to verification of s-consistency is based on the following theorem.
Irrespective of possible infiniteness of the (nonlinear) difference standard basis G, it may be useful to apply an algorithm for its construction (see, for example, the algorithms in [13,10]) and to verify s-consistency of the intermediate polynomials.
In doing so, one should check first the w-consistency of the polynomials in the input FDA. Then, if the normal formp of an S-polynomial modulo the current basis is nonzero, then before insertion ofp into the intermediate basis one has to construct p such thatp p and check the condition p ∈ F . Remark 5. Given a differential polynomial f ∈ R, one can algorithmically check its membership in F by performing the involutive Janet reduction [13].

Three Difference Approximations to the Navier-Stokes Equations
To analyze strong consistency of difference approximations to (1) we shall need the following statements.
Proposition 1. Letf ∈ R be a difference polynomial. Supposef f where f is a differential-algebraic consequence of the Navier-Stokes system (1) Then a finite sum of the form also implies a differential-algebraic consequence of (1).
Proof. The shift operators in (4) are expanded in the Taylor series as follows By the Taylor expansion over a grid point, in the limit when h and τ go to zero, the right-hand side of (10) becomes differential polynomial of the form Corollary 1. LetF be a FDA (6) to (1) and be an admissible order on the monomial set (5). Suppose ( ∀f ∈F ) f f ∈ [F ] . Then, every elementp in the difference ideal [F ] that admits the representatioñ where the leading terms of the polynomials in ig i,k · σ i •f k do not cancel out, satisfiesq q ∈ [F ].
Proof. Denote by p k the continuous limit of ig i,k · σ i •f k . Since p k ∈ [F ], the no-cancellation assumption impliesp Now we consider three difference approximations to system (1). The first two of them were constructed in [11] by applying the algorithmic approach to discretization proposed in [12] and based on the finite volume method combined with numerical integration and difference elimination. The third approximation is obtained by the conventional discretization what consists of replacing in (1) the temporal derivatives with the forward differences and the spatial derivatives with the central differences.
Every difference equation in an approximation must be satisfied in every node of the grid. As this takes place, one can apply to every equation a finite number of the forward shift operators (4) as well as of their inverses (the backward shift operators) to transform the approximation into an equivalent form. Because of this, we consider the difference approximations generated in [11] in the form which is commonly used for numerical solving of PDEs.
Proof. ¿From the leading monomial set (14)  The summands in the right-hand side of (16) have distinct leading terms, and thus cannot be cancelled out. Furthermore, every summand implies a differential consequence of the corresponding equation in the system (1). Hence, by Corollary 1, the S-polynomial (15) implies, in the continuous limit, an algebraicdifferential consequence of (1). Consider now an element of the form (11) in the ideal [F ] ⊂ R generated by the difference polynomials appearing in FDA 1. If cancellation occurs inp among the leading terms, then the sum in (11) can be rewritten by means of the right-hand side of (16) so that cancellation of the leading terms cannot occur (cf. [15],Ch.2, § 6,Th.6). Consequently,p implies an element in [F ]. This proves s-consistency of FDA 1.
In the case of FDAs 2 and 3, the corresponding S-polynomial in addition to the expression shown in right-hand side of (16) has extra and rather cumbersome polynomial additive which we denote by ∆ 2 and ∆ 3 , respectively. In the continuous limit, ∆ 2 = 0 implies 2vv yyyy + 8v y v yyy + 6v 2 yy + 2uu xxxx + 8u x u xxx + 6u 2 xx + p yyyy + p xxxx = 0 . Clearly, the explicitly written terms of ∆ 3 in the continuous limit imply an element in the differential ideal [F ]. Further, ∆ 3 = 0 implies PDE 2vv yyyy + 8v y v yyy + 6v 2 yy + 2uu xxxx + 8u x u xxx + 6u 2 xx + p yyyy + p xxxx = 0 .
The both of obtained differential equations do not follow from the Navier-Stokes equations that can easily be verified 4 by using the Janet reduction of their lefthand sides modulo the system of polynomials in (1). Therefore, FDAs 2 and 3 are not strongly consistent.
¿From Theorem 1, we immediately conclude: Corollary 2. A difference standard basis G of the ideal [F ] generated by the set (13) for FDA 1 satisfies the condition (9).

Numerical Comparison
In this section, we perform some numerical tests for experimental comparison of the three FDAs of the previous section. To this aim, we suppose that the Navier-Stokes system (1) is defined for t ≥ 0 in the square domain Ω = [0, π] × [0, π] and provide initial conditions for t = 0 and boundary conditions for t > 0 and (x, y) ∈ ∂Ω. Initial and boundary conditions are defined according to (17). Moreover, since we are essentially interested in the behavior of the different space discretizations used by the FDAs, any required additional values near the boundary ones are supposed to be known exactly. Let [0, π] × [0, π] be discretized in the (x, y)-directions by means of the (m + 2) 2 equispaced points x j = jh and y k = kh, for j, k = 0, . . . m + 1, and h = π/(m + 1). Considering difference equations (13) we observe that, starting from the initial conditions, the second and the third equations give explicit formulae to compute u n+1 jk and v n+1 jk for j, k = 1, . . . , m, respectively. Vice versa, the fourth equation may be used to derive a m 2 × m 2 linear system that computes the unknowns p n+1 jk for j, k = 1, . . . , m. In doing so, the first equation is unnecessary to evaluate the unknowns but may be used to validate the obtained solution. This procedure may be iterated for n = 0, 1, . . . , N being t f = N τ the end point of the time interval. Since in our experiments we are essentially interested in comparing different discretizations of u, v, and p on the space domain, the value of the time step τ was always chosen in order to provide stability.
In the following figures, we compare the error behavior in t f = 1 given by the three methods for different values of the Reynolds number Re. Error is computed by means of the formula where g ∈ {u, v, p} and g(x, y, t) belongs to the exact solution [14] to ( (13) for the three FDAs and for growing m obtained by the numerical solution. It is clear that the discretizations FDA 2 and 3 can not get along without the continuity equation f 1 in the Navier-Stokes system (1). Figure 3 shows the results obtained for problem (17) with the Reynolds number set to Re = 10 2 . Again each subplot represents the error of a difference scheme and the three lines inside each subplot represent the error in u, v, and p, respectively, for several values of m and N = 40. Similar considerations to the previous example may be done: the scheme based on FDA 1 works much better than the others and the scheme with FDA 2 is the worst.

Conclusion
As it has been already demonstrated in [6] for overdetermined systems of linear PDEs, it may be highly nontrivial to construct strongly consistent difference approximations. In the given paper, we have demonstrated that the demands of s-consistency impose strong limitations on the finite difference approximations to the nonlinear system of Navier-Stokes equations. These limitations proceed from the fact that s-consistent approximations inherit at the discrete level all basic algebraic properties of the initial differential equations.
It turned out that among two distinctive approximations generated in [12] (by applying the same algorithmic technique with different choice of numerical integration method), the one with a 5 × 5 stencil (FDA 1) is strongly consistent whereas the other one with a 3×3 stencil (FDA 2) is not. This result is at variance with universally accepted opinion that discretization with a more compact stencil is numerically favoured. One more discretization with a 3 × 3 stencil (FDA 3), obtained from the differential Navier-Stokes equations by the replacement of spatial derivatives with the central differences and of temporal derivatives with the forward differences, also failed to be s-consistent. As this takes place, our computer experimentation revealed much better numerical behavior of the sconsistent approximation in comparison with the considered s-inconsistent ones. The question of existence of s-consistent FDA to (1) with a 3 × 3 stencil is open.
Unlike the linear case [6], given a difference approximation on a grid with equisized grid spacings, one cannot fully algorithmically check its s-consistency. This is owing to non-noetherianity of difference polynomial rings that may lead to non-existence of a finite difference Gröbner basis for the ideal generated by the approximation. And even with the existence of a Gröbner basis, its con-struction and algorithmic verification of s-consistency may be very hard. For example, by using experimental implementation in Maple [9] of the algorithm of papers [9,10] 5 , many finite Gröbner bases have been constructed for the sconsistent approximation FDA-1 and for many different monomial orders. In doing so, the smallest obtained basis consists of 5 different polynomials, and one of the polynomials has 404 terms. In distinction to those rather tedious computations, the verification of s-consistency for FDA 1 and s-inconsistency for the other two was done by analysing the only S-polynomial and required much less symbolic computation.
It should be noted that in our paper, we use the collocated arrangement of the dependent variables u, v, and p in the system (1) that often gives rise to oscillations of the variables (cf. [19]) and makes impossible convergence of numerical solutions. Our experiments presented in Section 5 demonstrate no spurious oscillations of the numerical solution. This can be considered as a significant positive property of the obtained FDAs.