Discrete Maximum Principle and Energy Stability of the Compact Difference Scheme for Two-Dimensional Allen-Cahn Equation

The Allen-Cahn model is discussed mainly in the phase field simulation. The compact difference method will be used to numerically approximate the two-dimensional nonlinear Allen-Cahn equation with initial and boundary value conditions, and then, a fully discrete compact difference scheme with second-order accuracy in time and fourth-order in space is established. And its numerical solution satisfies the discrete maximum principle under the constraints of reasonable space and time steps. On this basis, the energy stability of the scheme is investigated. Finally, numerical examples are given to illustrate the theoretical results.


Introduction
The phase field problem is a mathematical model described by partial differential equations. The numerical simulation of the phase field has always been an important field of research at home and abroad because of its important theoretical and practical significance. In 1979, the Allen-Cahn equation is considered to describe the antiphase boundary of the crystal movement by Allen and Cahn, which describes fluid dynamics problems and reaction diffusion problems in materials science, and the same model on the study of many diffusion phenomena is proposed such as the competition and repulsion of biological populations and the migration process of river beds. For describing the motion of the antiphase boundary in the crystal, since this type of phase field model does not have an accurate solution, different numerical methods are used to simulate. At present, numerical approximation methods about these phase field models include the finite difference method [1][2][3][4][5], finite element method [6][7][8], and spectral method [9,10], etc.
In the paper, the compact difference method is applied to approximate the two-dimensional nonlinear Allen-Cahn equations with initial boundary conditions numerically.
where u represents the concentration of a metal component in a binary alloy, the positive parameter ε is the interface width, and the nonlinear term f ðuÞ = u 3 − u.
The energy function on the L 2 space is defined as Here, FðuÞ = ð1/4Þðu 2 − 1Þ 2 . One of the intrinsic properties of the Allen-Cahn equation is the energy function that decreases with time: In 2016, Zhang and Hou [3] considered three discrete schemes of the Allen-Cahn equation that included the stable first-order linear explicit-implicit scheme, stable second-order nonlinear Crank-Nicolson scheme, and stable second-order linear Leap-Frog scheme and proved the discrete maximum principle and energy stability under the condition of these three schemes; a compact difference scheme with second-order accuracy in time and fourthorder accuracy in space for one-dimensional Allen-Cahn equation was established by Tian et al. [2] in 2018, and the energy stability of the scheme was investigated; Wu et al. [11] proposed two ADI schemes for the twodimensional Allen-Cahn equation: the second-order ADI scheme and fourth-order compact ADI scheme, and the analysis of stability and maximum principle were given, respectively, in 2019; then, Deng et al. [12] adopted the finite difference method in time and barycentric interpolation collocation method in space for the two-dimensional Allen-Cahn equation in 2020, obtained the spatial high precision error, and verified the law of energy decline; the Crank-Nicolson difference scheme with second-order accuracy in time and space for the two-dimensional Allen-Cahn equation was established by Zhang et al. [1] in 2021, which proved the existence and convergence of the solution, and finally verified the discrete maximum principle with a numerical example. Based on the existing finite difference methods and inspired by reference [2], a compact difference scheme with second-order accuracy in time and fourth-order accuracy in space is established for the two-dimensional Allen-Cahn equation. Then, the discrete maximum principle and discrete energy stability are mainly investigated. Compared with the previous work about two-dimensional Allen-Cahn equations, this paper obtains higher accuracy in space than before, and the compact difference method is applied and realized in two-dimensional equations for the first time, which will add an effective and feasible method to this kind of research.

Establishment of a Compact Difference
Scheme for the Two-Dimensional Allen-Chan Equation Firstly, several commonly used numerical differential formulas are given: Leth > 0 and c be two constants.
Let us divide the interval [0, 1] into M equal parts and [0, T] into N equal parts, the space step is h = 1/M, and time y j , t n+1/2 ÞÞ and ðx i , y j , t n+1/2 Þ be called the node. Journal of Function Spaces Suppose u = fu ij j0 ≤ i, j ≤ Mg is a grid function on Ω h , the operator is defined by Then, we get the following equation: Define the grid functions as Considering differential Equation (13) at the point ðx i , Using Taylor expansion, Substituting the above three equations into (15), Denoted by Then, Acting the operator AB on both sides of the equation 3 Journal of Function Spaces above, Considering differential Equation (11) at the point ðx i , Based on Lemma 3, Acting the two equations superscripted as n and n + 1 and dividing by 2, Acting the operator B on both sides of the equation above, Similarly, considering differential Equation (12) at the point ðx i , y j , t n Þ, then Substituting (24) and (25) into (20), Here, Then, Omitting the small term R n+1/2 i,j and substituting the following equation into (28), Then, the two-dimensional Allen-Cahn Equation (7) 4 Journal of Function Spaces corresponding compact difference scheme is obtained.
Finally, the spatial derivative is discretized by the central finite difference scheme for the two-dimensional Allen-Cahn equation, the D 2 is expressed as the corresponding discrete matrix, and Here, Meanwhile, let M − 1 be the number of nodes inside the interval after spatial dispersion and h be the space step.
Then, the discrete matrix D 2 satisfies the following properties: Let Matrix C satisfies the following properties: (a) C is symmetric.
(b) C is positive definite, such as Substituting the matrix D 2 and C into (30), we get the compact difference scheme: Here, Multiplying C −1 to both sides of the above equation, Matrix C −1 D 2 satisfies the following properties:

Discrete Maximum Principle of Compact
Difference Scheme for Two-Dimensional Allen-Cahn Equation Theorem 4. Assuming that the initial value of the Allen-Cahn problem satisfies max ðx,yÞϵ Ω ju 0 ðx, yÞj ≤ 1, when the step ratio satisfies 5/24 < λ < 5/12 and the time step satisfies 0 Assuming that kU n k ∞ ≤ 1, then kU n+1 k ∞ ≤ 1 needs to be proved. Expanding the established compact difference scheme, Multiplying τ to both sides of the above equation and letting λ = ε 2 ðτ/h 2 Þ, Journal of Function Spaces Shifting terms on both sides of the equation, For the right side of Equation (45), the n-layer terms are processed firstly.
Substituting (62) Suppose kU n+1 k ∞ = jU n+1 i 0 ,j 0 j = m. On the one hand, for the right eight terms of Equation (69), taking the absolute value of both sides of the equation by definition (63), according to the triangle inequality,

Journal of Function Spaces
Similarly, Taking the absolute value of both sides of the equation by definition (66), according to the triangle inequality, Taking i = i 0 , j = j 0 for the left side of (69), substituting (70) and (72) into the right side of (69), namely,

Two-Dimensional Discrete Energy Stability
Lemma 5 (see [2]). ∀a, b ∈ ½−1, 1, According to the energy function that is defined by (2), discrete energy function of compact difference scheme (41) is defined by Theorem 6. Assuming that the initial value of the Allen-Cahn problem satisfies max ðx,yÞϵ Ω ju 0 ðx, yÞj ≤ 1, then the numeri-cal solution obtained by scheme (41) satisfies discrete energy decaying under the condition of 4: Proof.
It can be observed from Figure 1 that the discrete scheme (30) satisfies the maximum principle when the time step τ is 0.025 or 0.04, and from Figure 2, the discrete scheme (30) does not satisfy the maximum principle when the time step τ is 0.3 or 0.5. In addition, it satisfies the stability of discrete energy decaying according to Figures 3 and 4.
It can be observed from Figure 5 that the discrete scheme (30) satisfies the maximum principle when the time step τ is 0.02 or 0.025, and from Figure 6, the discrete scheme (30) does not satisfy the maximum principle when the time step τ is 0.3 or 0.5. In addition, it satisfies the stability of discrete energy decaying according to Figures 7 and 8.

Conclusions
In this paper, the two-dimensional nonlinear Allen-Cahn equation is discretized by using the central finite difference method in space and using two operators A and B in time, and then, the fully discrete compact difference scheme with second-order accuracy in time and fourth-order in space is established as below: 14 Journal of Function Spaces Constructing the discrete matrix, Then, using the matrix instead of the operator, the following compact difference equation (39) can be obtained: It proved that when 5/24 < λ < 5/12, 0 < τ ≤ min fð4/5Þ λ − 1/6, 1 − ð12/5Þλg, the discrete scheme satisfies the maximum principle kU n k ∞ ≤ 1, for ∀n ≥ 1.
Secondly, the discrete energy function of the compact difference scheme (88) of the two-dimensional Allen-Cahn equation is The numerical solution obtained by scheme (39) satisfies the stability of discretization energy decaying under the conditions and conclusions of discretization maximization.

Data Availability
The data used to support the findings of this study are included within the article.

Conflicts of Interest
The authors declare that they have no conflicts of interest.