1 Introduction

The phase-field approach for multi-component material systems, in particular multi-phase fluids, has emerged as an important modeling and computational tool in recent years [2, 6, 7, 11, 16, 20, 30, 33, 34]. The set of governing equations in phase field models for the material mixture is often derived variationally from its energy functional guided by the generalized Onsager principle or equivalently the second law of thermodynamics [27]. This type of models is called thermodynamically consistent. Thermodynamically consistent models for material systems represent a class of partial differential equations that yield energy dissipation laws and possess variational structures. For thermodynamical models alone, which do not subject to the hydrodynamic constraints (mass, momentum, angular momentum, energy conservation), these models are also known as gradient flow models, in which the time evolution of the thermodynamical variable is “proportional to” the variation of the system free energy. When the thermodynamic variable is a phase variable and the proportionality coefficient (mobility) is an algebraic operator, it’s known as the Allen–Cahn equation, whereas it is called a Cahn–Hilliard equation if the proportionality coefficient is a second order elliptic operator.

This class of models describes relaxation dynamics of the thermodynamical system to the equilibrium. In the case of a phase field description, both the Allen–Cahn and Cahn–Hilliard models have been used to describe interfacial dynamics of multi-component immiscible fluids, where phase variables represent volume fractions of material components. In these applications, the Cahn–Hilliard model conserves the phase volume for each material component while the Allen–Cahn does not warrant the conservation of the volume of the components. In the diffuse interface description of an otherwise fairly sharp interface, the use of the phase field model is primarily for maintaining a dynamical interface that allows topological evolution. In these cases, both the Cahn–Halliard and Allen–Cahn models are applicable. However, the lack of volume conservation in the Allen–Cahn model makes it less useful than the Cahn–Hilliard in the cases where volume is conserved. In order to conserve the volume in the Allen–Cahn model, the free energy functional has to be augmented by penalty terms that impose the volume conservation constraint or by a Lagrange multiplier to enforce the volume constraint explicitly [14, 17]. The Allen–Cahn models thus modified with a nonlocal penalizing constraint or a nonlocal Lagrange multiplier constraint then become nonlocal equations.

Given their prominent role in describing diffuse interface dynamics and ease of use in many computations, the Allen–Cahn and Cahn–Hilliard equation have been widely studied recently. Xu and Guo [10] developed an LDG method for the Allen–Cahn equation and proved its energy stability. Chen, Wang and Wise in [5] developed a linear iteration algorithm to implement a second-order energy stable numerical scheme for a model of epitaxial thin film growth without slope selection. Xu and Tang [25] used a different stabilizing mechanism to build stable large time-stepping, semi-implicit methods for an epitaxial growth model. Lin presented a \(C^0\) finite element method for a 2D hydrodynamic liquid crystal model which is simpler than existing \(C^1\) element methods and mixed element formulation to preserve energy dissipation [15]. A convex splitting strategy has been developed for phase field models in recent years by several research groups [3, 18, 21, 22, 24]. In the meantime, there is the linear stabilization approach [4, 19, 32, 37] aimed for developing energy stable numerical schemes by adding a high order stabilizing mechanism to the discrete scheme. More recently, the energy quadratization (EQ) method and its variant scalar auxiliary variable (SAV) method have simplified the development of energy stable schemes significantly and make their development systematically [29, 31, 35].

In the wake of the rapid development of various innovative strategies for energy stable approximations to dissipative partial differential equation systems, there remains a serious task to obtain rigorous error analysis on the energy stable numerical schemes and their solvability. In a recent work [9], Guan et al. adopted the convex splitting approach to develop an energy stable scheme and obtained its error estimates, in which the convex part of the nonlinear system is treated implicitly and the concave part explicitly in time marching schemes. Yu and Wang in [23] introduced the convergence analysis of an unconditionally energy stable linear Crank–Nicolson scheme for the Cahn–Hilliard Equation. Yang in [28] considered the Allen–Cahn and Cahn–Hilliard equation using the Invariant Energy Quadratization (IEQ) method. Wang and Wise provide a detailed convergence analysis for an unconditionally energy stable, second order accurate convex splitting scheme for the modified phase field crystal equation [1].

In this paper, using the newly developed energy quadratization (EQ) technique and the scalar auxiliary variable (SAV) approach [26, 30, 31, 36], we propose and analyze two pairs of new second order schemes for the Allen–Cahn equation with nonlocal constraints, which consist of the Allen–Cahn model with a penalizing potential or a Lagrange multiplier that enforces the volume conservation for each material phase involved. In particular, we design the schemes so that they are uniquely solvable and unconditionally energy stable. We present an extended class of schemes, numerical strategies, numerical implementation issues as well as performance tests of the models in another paper [12]. In this one, we focus exclusively on error estimates for the four schemes. To the best of our knowledge, error estimates of the schemes for the Allen–Cahn equation with nonlocal volume conserving constraints are not yet available. We present the error analyses on both the semi-discrete schemes as well as the fully discrete schemes. Since the proof for the fully discrete schemes are similar, we only detail the error estimate for a selected fully discrete scheme in this paper. Numerical tests for the accuracy of the schemes as well as one numerical example on merging drops are presented to illustrate the volume and energy conservation property as well as the usefulness of the schemes.

The rest of the paper consists of the following sections. In Sect. 2, we present the derivation of the Allen–Cahn equation with a penalizing potential and a Lagrange multiplier, respectively. In Sect. 3, we reformulate the models to equivalent forms via the EQ and SAV approach, respectively. We present the numerical schemes and state the energy dissipation property and the uniqueness of solution of the linear systems resulting from the schemes. In Sect. 4, we present rigorous error estimates for the schemes. In Sect. 5, we present numerical convergence tests to demonstrate the accuracy of the schemes and test the volume-conservation and energy dissipation properties using a drop merging experiment. Finally, some concluding remarks are given in Sect. 6.

2 Phase Field Models for Binary Material Systems

We consider a phase field model for time-dependent dynamics of binary material systems, in which phase A is represented by a phase variable at \({\upphi }=0\) and phase B at \({\upphi }=1\). We normally choose the phase variable \({\upphi }\in [0,1]\) with \({\upphi }\) identified as the volume fraction of material A and \(1-{\upphi }\) the volume fraction of material B in the binary material system. The transition layer between the two phases is given by \(0<{\upphi }<1\) and “the interface” is defined heuristically at \({\upphi }=\frac{1}{2}\) [8]. The free energy of the system is denoted as \(F({\upphi })\), given by

$$\begin{aligned} F[{\upphi }]=\int _\Omega \left[ \frac{{{\upgamma }}_{1}}{2}|\nabla {\upphi }|^2+f({\upphi })\right] {\mathrm {d}\mathbf {x}}, \end{aligned}$$
(2.1)

where \({{\upgamma }}_{1}\) is a parameter measuring the strength of the conformational entropy and the bulk free energy density is denoted by \(f({\upphi })\), which is assumed bounded below, e.g., there exists a constant C such that \(f({\upphi })\ge -C\). In this paper, we will focus our study on a double well potential \(f({\upphi })={{\upgamma }}_{2}{{\upphi }}^{2}(1-{\upphi })^2\), where \({{\upgamma }}_{2}\) measures the strength of the double-well potential.

The simplest transport equation for time-dependent dynamics of \({\upphi }\) is given by the Allen–Cahn equation

$$\begin{aligned} \begin{array}{l} \frac{\partial {\upphi }}{\partial t}({{\varvec{x}}}, t)= -M \mu , \quad {{\varvec{x}}}\in \Omega , t>0, \\ \frac{\partial {\upphi }}{\partial n}({{\varvec{x}}} ,t)=0, \quad {{\varvec{x}}}\in \partial \Omega , t>0,\\ {\upphi }({{\varvec{x}}} ,t)|_{t=0}={\upphi }({{\varvec{x}}}, 0),\quad {{\varvec{x}}}\in \Omega , \end{array} \end{aligned}$$
(2.2)

where M is the mobility coefficient, the chemical potential \(\mu \) is given by

$$\begin{aligned} \mu =\frac{{\updelta }F}{{\updelta }{\upphi }}=\frac{\partial f}{\partial {\upphi }}-\frac{{{\upgamma }}_{1}}{2}\nabla \cdot \frac{\partial (|\nabla {\upphi }|^2)}{\partial \nabla {\upphi }}=-{{\upgamma }}_{1}\Delta {\upphi }+f'({\upphi }), \end{aligned}$$
(2.3)

and \(\Omega \) is the domain in which the binary material system occupies. This model describes relaxation dynamics of the binary material system.

The energy dissipation rate of the Allen–Cahn equation is given by

$$\begin{aligned} \frac{d F}{dt}=\int _{\Omega } \frac{{\updelta }F}{{\updelta }{\upphi }}{{\upphi }}_{t} {\mathrm {d}\mathbf {x}} =-\int _{\Omega } \mu (M \mu ) {\mathrm {d}\mathbf {x}} \le 0, \end{aligned}$$
(2.4)

provided \(M\ge 0\).

We denote the volume of material A by \(V=\int _{\Omega } {\upphi }{\mathrm {d}\mathbf {x}}.\) Then,

$$\begin{aligned} \frac{dV}{dt}=-\int _{\Omega } M \mu {\mathrm {d}\mathbf {x}}. \end{aligned}$$
(2.5)

It is normally not equal to zero, indicating that V(t) is not conserved in the Allen–Cahn dynamics.

To apply this model to situations where volumes of the material components are supposedly conserved, one has to modify it. One simple modification is to enforce the volume constraint \(V(t)=V(0)\) by coupling it to the Allen–Cahn equation via a Lagrange multiplier or a penalizing potential. The model so derived is called the Allen–Cahn equation with nonlocal constraints.

2.1 Allen–Cahn Equation with Nonlocal Constraints

There exist a couple of ways one can impose the volume constraints to the Allen–Cahn dynamics. The first method is to penalize the difference between the volume and its initial value. We call the model the Allen–Cahn equation with a penalizing potential.

2.1.1 Allen–Cahn Model with a Penalizing Potential

The volume conservation means \(V(t)=V(0)\) for any \(t>0\). In this modified model, we penalize \((V(t)-V(0))^2\) in the energy functional [14]. Specifically, we modify the free energy as follows:

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}{|\nabla {\upphi }|}^2+f({\upphi })\right] {\mathrm {d}\mathbf {x}}+\frac{{\upeta }}{2}\left( \int _\Omega {\upphi }(t){\mathrm {d}\mathbf {x}}-V(0)\right) ^2, \end{aligned}$$
(2.6)

where \({\upeta }>0\) is a penalizing parameter, which is a model parameter and \(V(0)=\int _\Omega {\upphi }(\mathbf {x}, 0) {\mathrm {d}\mathbf {x}}.\)

The transport equation for \({\upphi }\) is given by (2.2) with a modified chemical potential given by

$$\begin{aligned} {\tilde{\mu }}=\frac{{\updelta } \tilde{F}}{{\updelta }{\upphi }} =\mu +\sqrt{{\upeta }}{\upzeta }, \end{aligned}$$
(2.7)

where

$$\begin{aligned} {\upzeta }=\sqrt{{\upeta }}\left( \int _\Omega {\upphi }(t) {\mathrm {d}\mathbf {x}}-V(0)\right) . \end{aligned}$$
(2.8)

The energy dissipation rate is given by

$$\begin{aligned} \frac{d \tilde{F}}{dt}=\int _{\Omega } \frac{{\updelta }\tilde{F}}{{\updelta }{\upphi }}{{\upphi }}_{t} {\mathrm {d}\mathbf {x}} =-\int _{\Omega } {\tilde{\mu }} (M {\tilde{\mu }}) {\mathrm {d}\mathbf {x}} \le 0, \end{aligned}$$
(2.9)

provided \(M\ge 0\). The modified Allen–Cahn equation is approximately volume-preserving depending on the size of penalizing parameter \({\upeta }>0\). In principle, the larger \({\upeta }\) is, the more close V(t) is to V(0). However, in practice, this may not be the case. So, the choice of \({\upeta }\) becomes an empirical trial. We next discuss another approach to obtain a modified model that respects the volume conservation.

2.1.2 Allen–Cahn Model with a Lagrange Multiplier

To enforce the volume conservation of each phase in the Allen–Cahn model, the model is modified by strictly enforcing the volume constraint via a Lagrangian multiplier L in the free energy [17]. Specifically, we modify the free energy by augmenting a penalty term with a Lagrange multiplier L as follows

$$\begin{aligned} {\tilde{F}}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}{|\nabla {\upphi }|}^2+f({\upphi })\right] {\mathrm {d}\mathbf {x}}-L (V(t)-V(0)). \end{aligned}$$
(2.10)

The transport equation in the modified Allen–Cahn equation for \({\upphi }\) is given by (2.2) with the chemical potential given by

$$\begin{aligned} {\tilde{\mu }}=\frac{{\updelta } {\tilde{F}}}{{\updelta }{\upphi }} =\mu -L, \end{aligned}$$
(2.11)

where

$$\begin{aligned} L=\frac{1}{\int _{\Omega } M {\mathrm {d}\mathbf {x}}}\int _{\Omega }[ M \mu ]{\mathrm {d}\mathbf {x}}. \end{aligned}$$
(2.12)

This modified Allen–Cahn model now conserves the volume for each phase. The energy dissipation rate is given by

$$\begin{aligned} \frac{d \tilde{F}}{dt}=\int _{\Omega } \frac{{\updelta }{\tilde{F}}}{{\updelta }{\upphi }}{{\upphi }}_{t}{\mathrm {d}\mathbf {x}} =-\int _{\Omega } {\tilde{\mu }} (M {\tilde{\mu }}){\mathrm {d}\mathbf {x}} \le 0, \end{aligned}$$
(2.13)

provided \(M\ge 0\).

The Allen–Cahn equations with nonlocal constraints not only conserve phase volume at least approximately in the case of a penalizing potential, but also dissipates energy. We next discuss how we approximate these equations numerically so that the properties are retained in the discrete solutions and the numerical solutions can be obtained efficiently.

3 Energy Stable Numerical Approximations

For the Allen–Cahn equations with nonlocal constraints, we employ the energy quadratization strategy and its variant scalar auxiliary variable approach developed recently to design numerical schemes to solve them, respectively. The energy quadratization (EQ) and its variant, the scalar auxiliary variable (SAV) method, provide effective ways to derive linear, energy stable numerical schemes [26, 30, 31, 36]. We discretize the equations in time using the linear Crank–Nicolson method firstly [23]. For the nonlocal constraints, we use the Shermann–Morrison formula together with the composite Trapezoidal rule to ensure the second order accuracy and efficient implementation of the resulting linear system of equations.

Throughout the paper, we denote

$$\begin{aligned} {f}^{n+1/2}=\frac{1}{2}(f^{n+1}+f^{n}),\quad \overline{f}^{n+1/2}=\frac{3}{2}f^n-\frac{1}{2}f^{n-1}, \end{aligned}$$
(3.1)

\(\Vert \cdot \Vert \) as the \(L^2(\Omega )\) norm and (, ) the associated inner product of functions involved, respectively. All constants C appearing in the paper represent generic constants independent of \(\Delta t\).

3.1 Numerical method for the Allen–Cahn Model with a Penalizing Potential Using EQ

In the Allen–Cahn equation with a penalizing potential, we reformulate the free energy density by introducing two intermediate variables as follows

$$\begin{aligned} q=\sqrt{f({\upphi })-{{\upgamma }}_{2} {{\upphi }}^{2}+C_0},\quad {\upzeta }=\sqrt{{\upeta }}\left( \int _\Omega {\upphi }(t) \mathrm {d}\mathbf {x}-V(0)\right) . \end{aligned}$$
(3.2)

Then, the free energy (2.6) recast to

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}|\nabla {\upphi }|^2+{{\upgamma }}_{2}{{\upphi }}^2+q^2-C_0\right] \mathrm {d}\mathbf {x}+\frac{{\upzeta }^2}{2}. \end{aligned}$$
(3.3)

The extended chemical potential is given by

$$\begin{aligned} \mu= & {} -{{\upgamma }}_{1} \Delta {\upphi }+2 {{\upgamma }}_{2} {\upphi }+2q g, \quad g=\frac{\partial q}{\partial {\upphi }},\nonumber \\ {\tilde{u}}= & {} \mu +\sqrt{{\upeta }}{\upzeta }. \end{aligned}$$
(3.4)

We reformulate the modified Allen–Cahn model as follows

$$\begin{aligned} \frac{\partial {\upphi }}{\partial t}= & {} -M {\tilde{\mu }},\nonumber \\ \frac{\partial {\upzeta }}{\partial t}= & {} \sqrt{{\upeta }}\int _\Omega \frac{\partial {\upphi }}{\partial t} \mathrm {d}\mathbf {x},\nonumber \\ \frac{\partial q}{\partial t}= & {} g {{\upphi }}_{t}. \end{aligned}$$
(3.5)

Now we discretize it using the linear Crank–Nicolson method in time to arrive at a semi-discrete, second order numerical scheme.

Scheme 3.1

Given initial conditions \({{\upphi }}^{0}\), we calculate \(q^0\) from \({{\upphi }}^{0}\) and \({{\upphi }}^{1}, q^1\) are calculated by a first order scheme. Having computed \({\upphi }^{n-1}, q^{n-1}\) and \({{\upphi }}^{n}, q^n\), we compute \({{\upphi }}^{{n+1}},q^{n+1}\) as follows.

(3.6)

We define the discrete energy as follows

$$\begin{aligned} F^n=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}(\nabla {\upphi }^{n})^2+{{\upgamma }}_{2}({\upphi }^{n})^2+({q}^{n})^2-C_0\right] \mathrm {d}\mathbf {x}+\frac{({\upzeta }^n)^2}{2}. \end{aligned}$$
(3.7)

This scheme is linear, second order in time, and the linear system resulting from it is uniquely solvable. The scheme obeys a discrete dissipation law, i.e., Scheme 3.1 is unconditionally energy stable [12], which implies \(F^n\le F^0\), namely, \(\Vert {\upphi }^{n}\Vert _{L^2}, \Vert q^{n}\Vert _{L^2}, \Vert {\upzeta }^{n}\Vert _{L^2} (n=1, 2, \ldots , N)\) are bounded.

3.2 Numerical method for the Allen–Cahn Model with a Lagrange Multiplier Using EQ

We reformulate the free energy density by introducing an intermediate variable

$$\begin{aligned} q=\sqrt{f({\upphi })-{{\upgamma }}_{2}{{\upphi }}^2+C_0}. \end{aligned}$$
(3.8)

Then, the free energy (2.10) recast to

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}|\nabla {\upphi }|^2+{{\upgamma }}_{2}{{\upphi }}^2+q^2-C_0\right] \mathrm {d}\mathbf {x}-L(V(t)-V(0)). \end{aligned}$$
(3.9)

The extended chemical potentia is given by

$$\begin{aligned} \mu= & {} -{{\upgamma }}_{1}\Delta {\upphi }+2 {{\upgamma }}_{2} {\upphi }+2q g, \quad g=\frac{\partial q}{\partial {\upphi }}, \nonumber \\ {\tilde{u}}= & {} u-L,\quad L=\frac{1}{\int _{\Omega } M \mathrm {d}\mathbf {x}}\int _{\Omega }[ M \mu ]\mathrm {d}\mathbf {x}. \end{aligned}$$
(3.10)

We rewrite the modified Allen–Cahn equation with the nonlocal constraint as follows

$$\begin{aligned} \frac{\partial {\upphi }}{\partial t}= & {} -M {\tilde{\mu }},\nonumber \\ \frac{\partial q}{\partial t}= & {} g {{\upphi }}_{t}. \end{aligned}$$
(3.11)

Using the linear Crank–Nicolson method in time, we obtain the following scheme.

Scheme 3.2

Given initial conditions \({{\upphi }}^{0}\), we calculate \(q^0\) from \({{\upphi }}^{0}\) and \({{\upphi }}^{1}, q^1\) are computed using a first order scheme. Having computed \({\upphi }^{n-1},q^{n-1}\), and \({{\upphi }}^{n},q^n\), we compute \({{\upphi }}^{{n+1}},q^{n+1}\) as follows.

$$\begin{aligned} {{\upphi }}^{{n+1}}-{{\upphi }}^{n}= & {} -\Delta t \overline{M}^{n+1/2} [{\mu }^{n+1/2}-{L}^{n+1/2}],\nonumber \\ {\mu }^{n+1/2}= & {} ({-{{\upgamma }}_{1} \Delta {\upphi }+2{{\upgamma }}_{2}{\upphi })}^{n+1/2} +2{q}^{n+1/2} \overline{g}^{n+1/2},\nonumber \\ q^{n+1}-q^n= & {} \overline{g}^{n+1/2}({{\upphi }}^{{n+1}}-{{\upphi }}^{n}), \end{aligned}$$
(3.12)

where

$$\begin{aligned} {L}^{n+1/2}=\frac{1}{\int _{\Omega } \overline{M}^{n+1/2} \mathrm {d}\mathbf {x}}\int _{\Omega }[ \overline{M}^{n+1/2} {\mu }^{n+1/2}]\mathrm {d}\mathbf {x}. \end{aligned}$$
(3.13)

We define the discrete energy as follows

$$\begin{aligned} F^n=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}(\nabla {\upphi }^{n})^2+{{\upgamma }}_{2}{({\upphi }^{n})}^2+({q}^{n})^2-C_0\right] \mathrm {d}\mathbf {x}. \end{aligned}$$
(3.14)

Scheme 3.2 is linear, second order in time and unconditionally energy stable [12]. The linear system resulting from the scheme is uniquely solvable. It implies \(F^n\le F^0\), and \(\Vert {\upphi }^{n}\Vert _{L^2}, \Vert q^{n}\Vert _{L^2} (n=1, 2, \ldots , N)\) are bounded.

The scalar auxiliary variable (SAV) method provides yet another strategy to arrive at linear, energy stable numerical schemes.

3.3 Numerical Method for the Allen–Cahn Model with a Penalizing Potential Using SAV

We now use the scalar auxiliary variable approach to design a new numerical scheme and rewrite the energy function as follows

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}(\nabla {\upphi })^2+{{\upgamma }}_{2}{{\upphi }}^{2}\right] \mathrm {d}\mathbf {x}+\int _{\Omega } [f({\upphi })-{{\upgamma }}_{2}{{\upphi }}^{2}]\mathrm {\mathrm {d}\mathbf {x}}+\frac{{\upeta }}{2}\left( \int _\Omega {\upphi }(t) \mathrm {\mathrm {d}\mathbf {x}}-\int _{\Omega }{\upphi }(0)\mathrm {\mathrm {d}\mathbf {x}}\right) ^2. \end{aligned}$$
(3.15)

We introduce an intermediate variable \(E_1({\upphi })=\int _{\Omega } [f({\upphi })-{{\upgamma }}_{2}{{\upphi }}^{2}]\mathrm {\mathrm {d}\mathbf {x}}\), choose a constant \(C_0\) such that \(E_1({\upphi })\ge -C_0\), denote \(U=\frac{{\updelta }E_1}{{\updelta }{\upphi }}\), \(r=\sqrt{E_1+C_0}\) (a scalar auxiliary variable) \(s({\upphi })=\frac{\partial r}{\partial {\upphi }}=\frac{U( {\upphi })}{2\sqrt{E_1( {\upphi })+C_0}}\), and define \({\upzeta }=\sqrt{{\upeta }}(\int _\Omega {\upphi }(t) \mathrm {d}\mathbf {x}-\int _{\Omega }{\upphi }(0)\mathrm {\mathrm {d}\mathbf {x}})\) as another scalar auxiliary variable. The free energy recast into

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}|\nabla {\upphi }|^2+{{\upgamma }}_{2}{{\upphi }}^2\right] \mathrm {d}\mathbf {x}+r^2-C_0+\frac{{\upzeta }^2}{2} \end{aligned}$$
(3.16)

and chemical potential is modified as follows

$$\begin{aligned} {\tilde{u}}=u+\sqrt{{\upeta }}{\upzeta }, \end{aligned}$$
(3.17)

where

$$\begin{aligned} \mu =-{{\upgamma }}_{1} \Delta {\upphi }+2 {{\upgamma }}_{2} {\upphi }+2r s. \end{aligned}$$

We reformulate the modified Allen–Cahn equation with a penalizing potential as follows

$$\begin{aligned} \frac{\partial {\upphi }}{\partial t}= & {} -M {\tilde{\mu }},\nonumber \\ \frac{\partial {\upzeta }}{\partial t}= & {} \sqrt{{\upeta }}\int _\Omega \frac{\partial {\upphi }}{\partial t} \mathrm {d}\mathbf {x},\nonumber \\ \frac{\partial r}{\partial t}= & {} \int _\Omega s\frac{\partial {\upphi }}{\partial t} \mathrm {d}\mathbf {x}. \end{aligned}$$
(3.18)

Now we discretize it using the linear Crank–Nicolson method in time to arrive at a new semi-discrete scheme.

Scheme 3.3

Given initial conditions \({{\upphi }}^{0}\), we calculate \(r^0\) and \({\upzeta }^0\) from \({{\upphi }}^{0}\) and then \({{\upphi }}^{1}\), \(r^1\) and \({\upzeta }^1\) are computed using a first order scheme. Having computed \({\upphi }^{n-1}\), \(r^{n-1}, {\upzeta }^{n-1}\), \({{\upphi }}^{n}\), \(r^n\) and \({\upzeta }^n\), we compute \({{\upphi }}^{{n+1}}, r^{n+1}, {\upzeta }^{n+1}\) as follows.

$$\begin{aligned} {{\upphi }}^{{n+1}}-{{\upphi }}^{n}= & {} -\Delta t \overline{M}^{n+1/2} {{\tilde{\mu }}}^{n+1/2},\nonumber \\ {{\tilde{\mu }}}^{n+1/2}= & {} {(-{{\upgamma }}_{1} \Delta {\upphi }+2{{\upgamma }}_{2}{\upphi })}^{n+1/2}+2{r}^{n+1/2} \overline{s}^{n+1/2}+\sqrt{{\upeta }}{{\upzeta }}^{n+1/2},\nonumber \\ {\upzeta }^{n+1}-{\upzeta }^{n}= & {} \sqrt{{\upeta }}\int _\Omega ({{\upphi }}^{{n+1}}-{{\upphi }}^{n}) {\mathrm {d}\mathbf {x}},\nonumber \\ r^{n+1}-r^n= & {} \int _{\Omega } \overline{s}^{n+1/2}({{\upphi }}^{{n+1}}-{{\upphi }}^{n}){\mathrm {d}\mathbf {x}}, \end{aligned}$$
(3.19)

where

$$\begin{aligned} \overline{s}^{n+1/2}=\overline{\frac{U( {\upphi })}{2\sqrt{E_1( {\upphi })+C_0}}}^{n+1/2}. \end{aligned}$$
(3.20)

We define the discrete energy as follows

$$\begin{aligned} F^n=\int _{\Omega }\left[ \frac{{{\upgamma }}_{1}}{2}(\nabla {\upphi }^{n})^2+{{\upgamma }}_{2}({\upphi }^{n})^2\right] \mathrm {\mathrm {d}\mathbf {x}}+\frac{({\upzeta }^n)^2}{2}+({r}^{n})^2-C_0. \end{aligned}$$
(3.21)

Scheme 3.3 is a linear, second order in time, unconditionally energy stable and the linear system resulting from the scheme is uniquely solvable [12]. It then follows that the norms of solutions of the linear system resulting from Scheme 3.3: \(\Vert {\upphi }^{n}\Vert _{L^2}\), \(\Vert r^{n}\Vert _{L^2}\), \(\Vert {\upzeta }^{n}\Vert _{L^2} (n=1, 2, \ldots , N)\) are bounded.

3.4 Numerical method for the Allen–Cahn Model with a Lagrange Multiplier Using SAV

We rewrite the energy functional as follows

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}(\nabla {\upphi })^2+{{\upgamma }}_{2}{{\upphi }}^{2}\right] \mathrm {d}\mathbf {x}+\int _{\Omega } [f({\upphi })-{{\upgamma }}_{2}{{\upphi }}^{2}]\mathrm {\mathrm {d}\mathbf {x}}-L\left( \int _{\Omega }{\upphi }(t)\mathrm {\mathrm {d}\mathbf {x}}-\int _{\Omega }{\upphi }(0)\mathrm {\mathrm {d}\mathbf {x}}\right) . \end{aligned}$$
(3.22)

Introducing an intermediate variable \(E_1({\upphi })=\int _{\Omega } [f({\upphi })-{{\upgamma }}_{2}{{\upphi }}^{2}]\mathrm {\mathrm {d}\mathbf {x}}\) and choosing a constant \(C_0\) such that \(E_1({\upphi })\ge -C_0\), we denote \(U=\frac{{\updelta }E_1}{{\updelta }{\upphi }}\) and \(s({\upphi })=\frac{\partial r}{\partial {\upphi }}=\frac{U( {\upphi })}{2\sqrt{E_1( {\upphi })+C_0}}\). We then define \(r=\sqrt{E_1+C_0}\) as the scalar auxiliary variable and recast the free energy into

$$\begin{aligned} \tilde{F}=\int _{\Omega } \left[ \frac{{{\upgamma }}_{1}}{2}|\nabla {\upphi }|^2+{{\upgamma }}_{2}{{\upphi }}^2\right] \mathrm {d}\mathbf {x}+r^2-C_0-L(V(t)-V(0)) \end{aligned}$$
(3.23)

and the extended chemical potential is given by

$$\begin{aligned} {\tilde{\mu }}= & {} -{{\upgamma }}_{1}\Delta {\upphi }+2 {{\upgamma }}_{2} {\upphi }+2r s-L,\nonumber \\ L= & {} \frac{1}{\int _{\Omega } M \mathrm {d}\mathbf {x}}\int _{\Omega }[ M \mu ]\mathrm {d}\mathbf {x}. \end{aligned}$$
(3.24)

We reformulate the modified Allen–Cahn model as follows

$$\begin{aligned} \frac{\partial {\upphi }}{\partial t}= & {} -M {\tilde{\mu }},\nonumber \\ \frac{\partial r}{\partial t}= & {} \int _\Omega s{{\upphi }}_{t} \mathrm {d}\mathbf {x}. \end{aligned}$$
(3.25)

A new second order in time semi-discrete numerical scheme is obtained after applying the linear Crank–Nicolson method.

Scheme 3.4

Given initial conditions \({{\upphi }}^{0}\), we calculate \(r^0\) from \({{\upphi }}^{0}\) and then \({{\upphi }}^{1}\) and \(r^1\) are computed by a first order scheme. Having computed \({\upphi }^{n-1}\), \(r^{n-1}\), \({{\upphi }}^{n}\) and \(r^n\), we compute \({{\upphi }}^{{n+1}}\) and \(r^{n+1}\) as follows.

$$\begin{aligned} {{\upphi }}^{{n+1}}-{{\upphi }}^{n}= & {} -\Delta t \overline{M}^{n+1/2} {{\tilde{\mu }}}^{n+1/2},\nonumber \\ {{\tilde{\mu }}}^{n+1/2}= & {} {\mu }^{n+1/2}-{L}^{n+1/2},\nonumber \\ {\mu }^{n+1/2}= & {} ({-{{\upgamma }}_{1} \Delta {\upphi }+2{{\upgamma }}_{2}{\upphi })}^{n+1/2} +2{r}^{n+1/2} \overline{s}^{n+1/2},\nonumber \\ r^{n+1}-r^n= & {} \int _{\Omega } \overline{s}^{n+1/2}({{\upphi }}^{{n+1}}-{{\upphi }}^{n}){\mathrm {d}\mathbf {x}}, \end{aligned}$$
(3.26)

where

$$\begin{aligned} \overline{s}^{n+1/2}= & {} \overline{\frac{U( {\upphi })}{2\sqrt{E_1( {\upphi })+C_0}}}^{n+1/2},\nonumber \\ {L}^{n+1/2}= & {} \frac{1}{\int _{\Omega } \overline{M}^{n+1/2} \mathrm {d}\mathbf {x}}\int _{\Omega }[ \overline{M}^{n+1/2} {\mu }^{n+1/2}]\mathrm {d}\mathbf {x}. \end{aligned}$$
(3.27)

We define the discrete energy as follows

$$\begin{aligned} F^n=\int _{\Omega }\left[ \frac{{{\upgamma }}_{1}}{2}(\nabla {\upphi }^{n})^2+{{\upgamma }}_{2}({\upphi }^{n})^2\right] \mathrm {\mathrm {d}\mathbf {x}}+({r}^{n})^2-C_0, \end{aligned}$$
(3.28)

Scheme 3.4 is a linear, second order in time, and unconditionally energy stable [12]. The linear system resulting from the scheme is uniquely solvable. It follows that the norms of solutions of the linear system resulting from Scheme 3.4: \(\Vert {\upphi }^{n}\Vert _{L^2}\), \(\Vert r^{n}\Vert _{L^2}\)\((n=1, 2, \ldots , N)\) are bounded.

3.5 The Fully Discrete Numerical Approximations

The semi-discrete numerical schemes have been proposed in the above subsections and the schemes are proven to be linear, second order in time, and unconditionally energy stable. In addition, the linear systems resulting from the schemes are all uniquely solvable. Here, we consider the spatial discretization of the schemes to arrive at fully discrete numerical schemes. We use the finite difference method to discretize the Allen–Cahn equations with nonlocal constraints in space.

Firstly, we begin with definitions of grid functions for the full discretization in two-dimensional space. We denote \(\Omega =[0,1]\times [0,1]\) as the computational domain and divide the domain into rectangular meshes with mesh size \(h_x=1/N_x, h_y=1/N_y\), where \(N_x\) and \(N_y\) are two positive integers. We define the following 2D sets for grid points:

$$\begin{aligned} E_x= & {} \{x_{i+\frac{1}{2}}|i=0,1,\ldots ,N_x\},\\ C_x= & {} \{x_{i}|i=1,2,\ldots ,N_x\}, C_{\bar{x}}=\{x_{i}|i=0,1,\ldots ,N_x+1\}, \\ E_y= & {} \{y_{j+\frac{1}{2}}|j=0,1,\ldots ,N_y\},\\ C_y= & {} \{y_{j}|j=1,2,\ldots ,N_y\}, C_{\bar{y}}=\{y_{j}|j=0,1,\ldots ,N_y+1\}, \end{aligned}$$

where \(x_l=(l-\frac{1}{2})h_x, y_l=(l-\frac{1}{2})h_y\), l can take on integer or half-integer values. In this paper, we chose \(h_x=h_y=h\) for simplicity.

We define the following discrete function spaces

$$\begin{aligned} \mathcal {C}_{x\times y}= & {} \{{\upphi }: C_x \times C_y\rightarrow \mathbb {R}\}, \mathcal {C}_{\bar{x}\times y}=\{{\upphi }: C_{\bar{x}} \times C_y\rightarrow \mathbb {R}\}, \\ \mathcal {C}_{x\times \bar{y}}= & {} \{{\upphi }: C_x \times C_{\bar{y}}\rightarrow \mathbb {R}\}, \mathcal {C}_{{\bar{x}}\times \bar{y}}=\{{\upphi }: C_{\bar{x}} \times C_{\bar{y}}\rightarrow \mathbb {R}\}. \end{aligned}$$

The functions of \(\mathcal {C}_{{\bar{x}}\times \bar{y}}\) are called cell centered functions. In component form, cell centered functions are identified via \({\upphi }_{i,j}\). A discrete function \({\upphi }\in \mathcal {C}_{{\bar{x}}\times \bar{y}}\) is said to satisfy homogeneous Neumann boundary conditions if and only if

$$\begin{aligned} {\upphi }_{0,j}= & {} {\upphi }_{1,j}, {\upphi }_{N_x,j}={\upphi }_{N_x+1,j}, j=1,2,\ldots ,N_y.\nonumber \\ {\upphi }_{i,0}= & {} {\upphi }_{i,1}, {\upphi }_{i,N_y}={\upphi }_{i,N_y+1}, i=0,1,\ldots ,N_x+1. \end{aligned}$$
(3.29)

We define

$$\begin{aligned} D_x{\upphi }_{i+\frac{1}{2},j}:=\frac{1}{h}({\upphi }_{i+1,j}-{\upphi }_{i,j}), D_y{\upphi }_{i,j+\frac{1}{2}}:=\frac{1}{h}({\upphi }_{i,j+1}-{\upphi }_{i,j}), \end{aligned}$$

and \(\nabla _h, \Delta _h\) are denoted the discrete gradient operator, the discrete Laplace operator as follows

$$\begin{aligned} \nabla _h {\upphi }:=(D_x{\upphi }, D_y{\upphi })^T, \Delta _h{\upphi }:=\nabla _h \cdot \nabla _h {\upphi }. \end{aligned}$$

In addition, we define the following discrete inner products

$$\begin{aligned} (f,g):= & {} h^2\sum _{i=1}^{M}\sum _{j=1}^N f_{i,j}g_{i,j}, \\ {[}f,g]_x:= & {} \frac{1}{2}h^2\sum _{i=1}^{M}\sum _{j=1}^N(f_{i+\frac{1}{2},j}g_{i+\frac{1}{2},j}+f_{i-\frac{1}{2},j}g_{i-\frac{1}{2},j}), \\ {[}f,g]_y:= & {} \frac{1}{2}h^2\sum _{i=1}^{M}\sum _{j=1}^N(f_{i,j+\frac{1}{2}}g_{i,j+\frac{1}{2}}+f_{i,j-\frac{1}{2}}g_{i,j-\frac{1}{2}}). \end{aligned}$$

For \({\upphi },{\uppsi }\), a natural discrete inner product of their gradients is given by

$$\begin{aligned} (\nabla _h {\upphi }, \nabla _h {\uppsi }):=[D_x{\upphi }, D_x{\uppsi }]_x+[D_y{\upphi }, D_y{\uppsi }]_y, \end{aligned}$$

and we also introduce discrete \(\Vert \cdot \Vert _\infty \) norm, \(\Vert \cdot \Vert _p\) norm (\(1\le p<\infty \)) and discrete \(\Vert \cdot \Vert _{H^1_h}\), \(\Vert \cdot \Vert _{H^2_h}\), \(\Vert \cdot \Vert _{H^4_h}\) norm, respectively, as follows:

$$\begin{aligned} \Vert {\upphi }\Vert _\infty:= & {} max_{i,j}|{\upphi }_{i,j}|,~~~ \Vert {\upphi }\Vert _p:=(|{\upphi }|^p,1)^{\frac{1}{p}},\nonumber \\ \Vert {\upphi }\Vert ^2_{H^1_h}:= & {} \Vert {\upphi }\Vert ^2_2+\Vert \nabla _h{\upphi }\Vert ^2_2,\nonumber \\ \Vert {\upphi }\Vert ^2_{H^2_h}:= & {} \Vert {\upphi }\Vert ^2_{H^1_h}+\Vert \Delta _h{\upphi }\Vert ^2_2,\nonumber \\ \Vert {\upphi }\Vert ^2_{H^4_h}:= & {} \Vert {\upphi }\Vert ^2_{H^2_h}+\Vert \nabla _h\Delta _h{\upphi }\Vert ^2_2+\Vert \Delta _h^2{\upphi }\Vert ^2_2. \end{aligned}$$
(3.30)

Lemma 3.1

For \({\upphi }, {\uppsi }\in \mathcal {C}_{{\bar{x}}\times \bar{y}}\) satisfying the homogeneous Neumann boundary condition, the following summation by parts formulas can be derived:

$$\begin{aligned} -(\Delta _h {\upphi },{\uppsi })=(\nabla _h {\upphi }, \nabla _h {\uppsi }). \end{aligned}$$
(3.31)

Secondly, we use the standard five-point method to discretize the Laplacian operator and apply the composite-trapezoid-formula to discretize integral terms to arrive at a second order scheme in space. On staggered grids in space, the composite-trapezoid-formula is given as follows

$$\begin{aligned} \int _\Omega f(\mathrm {\mathbf{x}}){\mathrm {d}}{\mathbf{x}}=h^2\sum \limits _{i=1}^m\sum \limits _{j=1}^nf({x_i, y_j})+O(h^2), \end{aligned}$$
(3.32)

where \(({x_i, y_j})\in C_x\times C_y.\) We denote the symbol

$$\begin{aligned}{}[1\star f]:=h^2\sum \limits _{i=1}^m\sum \limits _{j=1}^nf({x_i, y_j}). \end{aligned}$$
(3.33)

Applying this spatial discretization strategy to the semi-discrete schemes developed earlier, we arrive at second order, fully discrete numerical schemes. Next, we only present the fully discrete scheme based on Scheme 3.2 as a representative as the others are discretized analogously and thus are omitted.

Scheme 3.5

Given initial conditions \({\upphi }_{i,j}^0\), we calculate \(q_{i,j}^0\) from \({\upphi }_{i,j}^0\) and \({\upphi }_{i,j}^1, q_{i,j}^1\) are computed using a first order scheme. Having computed \({\upphi }_{i,j}^{n-1},q_{i,j}^{n-1}\), and \({\upphi }_{i,j}^n,q_{i,j}^n\), we compute \({\upphi }_{i,j}^{n+1},q_{i,j}^{n+1}\) as follows.

$$\begin{aligned} {{\upphi }}^{{n+1}}_{i,j}-{{\upphi }}^{n}_{i,j}= & {} -\Delta t \overline{M}^{n+1/2} [{\mu }^{n+1/2}_{i,j}-{L}^{n+1/2}],\nonumber \\ {\mu }^{n+1/2}_{i,j}= & {} (-{{\upgamma }}_{1} \Delta _h{{\upphi }}^{n+1/2}_{i,j}+2{{\upgamma }}_{2}{{\upphi }}^{n+1/2}_{i,j}) +2{q}^{n+1/2}_{i,j} \overline{g}^{n+1/2}_{i,j},\nonumber \\ q^{n+1}_{i,j}-q^n_{i,j}= & {} \overline{g}^{n+1/2}_{i,j}({{\upphi }}^{{n+1}}_{i,j}-{{\upphi }}^{n}_{i,j}), \end{aligned}$$
(3.34)

where

$$\begin{aligned} {L}^{n+1/2}=\frac{1}{\int _{\Omega } \overline{M}^{n+1/2} \mathrm {d}\mathbf {x}}[1\star (\overline{M}^{n+1/2} {\mu }^{n+1/2})]. \end{aligned}$$
(3.35)

The discrete energy is defined as follows

$$\begin{aligned} F^n=\frac{{{\upgamma }}_{1}}{2}\Vert \nabla _h{\upphi }^{n}\Vert ^2_2+{{\upgamma }}_{2}\Vert {\upphi }^{n}\Vert _2^2+\Vert {q}^{n}\Vert ^2_2-C_0|\Omega |. \end{aligned}$$
(3.36)

Scheme 3.5 respects the dissipation law, and thus is unconditionally energy stable. It then implies \(F^n\le F^0\), and \(\Vert {\upphi }^{n}\Vert _{2}, \Vert q^{n}\Vert _{2} (n=1, 2, \ldots , N)\) are bounded. We next present error estimates for the four semi-discrete schemes and the one fully discrete scheme presented above.

4 Error Estimates

We consider a finite time interval [0,T] and a domain \(\Omega \subset R^2\), which is open, connected and bounded with sufficiently smooth boundary \(\partial \Omega \) such that the following Sobolev inequalities hold

$$\begin{aligned} \Vert f\Vert ^2_{L^4(\Omega )}\le & {} C(2,\Omega )\Vert f\Vert _{L^2(\Omega )}\Vert f\Vert _{H^1(\Omega )},\nonumber \\ \Vert f\Vert ^2_{L^\infty (\Omega )}\le & {} C(2,\Omega )\Vert f\Vert _{H^1(\Omega )}\Vert f\Vert _{H^2(\Omega )}. \end{aligned}$$
(4.1)

We denote \(\Delta t=\frac{T}{N}.\) Let \({{\upphi }}^{n}, q^n, g^n, {\upzeta }^n, r^n, s^n\) be the numerical solutions obtained from the above schemes, and \({\upphi }(t_n)\), \(q(t_n)\), \(g(t_n)\), \({\upzeta }(t_n)\), \(r(t_n)\), \(s(t_n)\) be the exact solutions of the Allen–Cahn equations with nonlocal constraints evaluated at the discrete time, we define the error functions for \(n=0,1,2,\ldots ,N\) as follows

$$\begin{aligned} e^n_{\upphi }= & {} {\upphi }(t_n)-{{\upphi }}^{n}, e^n_q=q(t_n)-q^n, e^n_g=g(t_n)-g^n,\nonumber \\ e^n_{\upzeta }= & {} {\upzeta }(t_n)-{\upzeta }^n, e^n_r=r(t_n)-r^n, e^n_s=s(t_n)-s^n. \end{aligned}$$
(4.2)

For each scheme, we first establish the corresponding error equation and conduct a series of analyses to obtain the error estimate for the scheme. Without loss of generality, we set the mobility coefficient \(M\equiv 1\) in the following analysis.

Lemma 4.1

Suppose there exists a positive constant C such that

$$\begin{aligned} max_{n\le N}(\Vert {\upphi }(t_n)\Vert _{L^\infty }, \Vert \nabla {\upphi }(t_n)\Vert _{L^\infty }, \Vert {{\upphi }}^{n}\Vert _{L^\infty })\le C, \end{aligned}$$

then the following inequalities hold

$$\begin{aligned} \Vert e^n_{g}\Vert _{L^2}\le & {} C\Vert e^n_{\upphi }\Vert _{L^2},\nonumber \\ \Vert \nabla e^n_{g}\Vert _{L^2}\le & {} C(\Vert e^n_{\upphi }\Vert _{L^2}+\Vert \nabla e^n_{\upphi }\Vert _{L^2}),\nonumber \\ \Vert e^n_{s}\Vert _{L^2}\le & {} C\Vert e^n_{\upphi }\Vert _{L^2},\nonumber \\ \Vert \nabla e^n_{s}\Vert _{L^2}\le & {} C(\Vert e^n_{\upphi }\Vert _{L^2}+\Vert \nabla e^n_{\upphi }\Vert _{L^2}). \end{aligned}$$
(4.3)

Proof

We know that the function q(x) is \(C^3\), s(x) is \(C^2\) for any \(x\in \Omega \), then

$$\begin{aligned} |e^n_{g}|=|g({\upphi }(t_n))-g({{\upphi }}^{n})|=|q^{''}({\upxi })({\upphi }(t_n)-{{\upphi }}^{n})|\le C |e^n_{\upphi }|, \end{aligned}$$
(4.4)

which implies \(\Vert e^n_{g}\Vert _{L^2}\le C\Vert e^n_{\upphi }\Vert _{L^2}\). Next, since \(q^{'''}\) is continuous and \(\nabla {\upphi }(t_n)\) is bounded, we have

$$\begin{aligned} \begin{aligned} |\nabla e^n_{g}|&=|q^{''}({\upphi }(t_n))\nabla {\upphi }(t_n)-q^{''}({{\upphi }}^{n})\nabla {{\upphi }}^{n}|\\&=|(q^{''}({\upphi }(t_n))-q^{''}({{\upphi }}^{n}))\nabla {\upphi }(t_n)+q^{''}({{\upphi }}^{n})\nabla {\upphi }(t_n)-q^{''}({{\upphi }}^{n})\nabla {{\upphi }}^{n}|\\&=|q^{'''}({\upxi })({\upphi }(t_n)-{{\upphi }}^{n})\nabla {\upphi }(t_n)+q^{''}({{\upphi }}^{n})\nabla e_{{\upphi }}^{n}|\\&\le C(|e^n_{\upphi }|+|\nabla e^n_{\upphi }|). \end{aligned} \end{aligned}$$

where \({\upxi }={\uptheta }{\upphi }(t_n)+(1+{\uptheta }){{\upphi }}^{n}\). The proof of other two inequalities are similar to the above and thus omitted. \(\square \)

Assumption

We assume that the exact solution \({\upphi }\) of the Allen–Cahn equations with nonlocal constraints possesses the following regularity conditions

$$\begin{aligned}&{\upphi }\in L^\infty (0,T;H^2(\Omega ))\bigcap L^\infty (0,T;W^{1,\infty }(\Omega )), \nonumber \\&\quad {{\upphi }}_{t}\in L^\infty (0,T;L^\infty (\Omega ))\bigcap L^2(0,T;H^1(\Omega )). \end{aligned}$$
(4.5)

For the classical Allen–Cahn equation this is proved in [13].

4.1 Error Estimates for the Allen–Cahn Model of a Penalizing Potential Using EQ

In Scheme 3.1, the semi-discrete scheme is given as follows

$$\begin{aligned}&\frac{{{\upphi }}^{{n+1}}-{{\upphi }}^{n}}{\Delta {t}}-{{{\upgamma }}_{1} \Delta {\upphi }}^{n+1/2}+2 {{\upgamma }}_{2} {{\upphi }}^{n+1/2} +2{q}^{n+1/2} \overline{g}^{n+1/2}+\sqrt{{\upeta }}{\upzeta }^{n+1/2}=0, \end{aligned}$$
(4.6a)
$$\begin{aligned}&\frac{q^{n+1}-q^n}{\Delta t}= \overline{g}^{n+1/2}\frac{({{\upphi }}^{{n+1}}-{{\upphi }}^{n})}{\Delta t},\end{aligned}$$
(4.6b)
$$\begin{aligned}&\frac{{\upzeta }^{n+1}-{\upzeta }^n}{\Delta t}=\sqrt{{\upeta }}\int _\Omega \frac{{{\upphi }}^{{n+1}}-{{\upphi }}^{n}}{\Delta t}\mathrm {d}\mathbf {x}. \end{aligned}$$
(4.6c)

We substitute the exact solution of the modified Allen–Cahn equation and use the Taylor expansion to obtain

$$\begin{aligned}&\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta {t}}\nonumber \\&\quad -{{\upgamma }}_{1}\Delta {\upphi }(t_{n+\frac{1}{2}})+2{{\upgamma }}_{2}{\upphi }(t_{n+\frac{1}{2}}) +2q(t_{n+\frac{1}{2}})\overline{g}(t_{n+\frac{1}{2}})+\sqrt{{\upeta }}{\upzeta }(t_{n+\frac{1}{2}})=R^{n+1/2}_{\upphi }, \end{aligned}$$
(4.7a)
$$\begin{aligned}&\frac{q(t_{n+1})-q(t_{n})}{\Delta {t}}=\overline{g}(t_{n+\frac{1}{2}})\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta {t}}+R^{n+1/2}_q,\end{aligned}$$
(4.7b)
$$\begin{aligned}&\frac{{\upzeta }(t_{n+1})-{\upzeta }(t_{n})}{\Delta t}=\sqrt{{\upeta }}\int _\Omega \frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta {t}}\mathrm {d}\mathbf {x}+R^{n+1/2}_{\upzeta }, \end{aligned}$$
(4.7c)

where \(R^{n+1/2}_{\upphi }\), \(R^{n+1/2}_q\) ,\(R^{n+1/2}_{\upzeta }\) are corresponding truncation error and in the order of (\(O(\Delta {t}^2)\)).

Subtracting (4.7a), (4.7b), (4.7c) from (4.6a), (4.6b), (4.6c), respectively, we arrive at the error equations as follows

$$\begin{aligned}&\frac{e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}}{\Delta {t}}-{{\upgamma }}_{1}\Delta {e}_{\upphi }^{n+1/2}+2{{\upgamma }}_{2}e_{\upphi }^{n+1/2} +2q^{n+1/2}{\overline{e}_{g}^{n+1/2}}\nonumber \\&\quad +2e_q^{n+1/2}\overline{g}^{n+1/2}+\sqrt{{\upeta }}e^{n+1/2}_{\upzeta }=R^{n+1/2}_{\upphi }, \end{aligned}$$
(4.8a)
$$\begin{aligned}&\frac{e_q^{n+1}-e_q^{n}}{\Delta {t}}={\overline{g}}^{n+1/2}\frac{e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}}{\Delta {t}} +\overline{e}_{g}^{n+1/2}\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta {t}}+R_q^{n+1/2},\end{aligned}$$
(4.8b)
$$\begin{aligned}&\frac{e_{\upzeta }^{n+1}-e_{\upzeta }^{n}}{\Delta {t}}=\sqrt{{\upeta }}\int _\Omega \frac{e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}}{\Delta {t}}\mathrm {d}\mathbf {x}+R_{\upzeta }^{n+1/2}. \end{aligned}$$
(4.8c)

Lemma 4.2

There exists a constant \(C>0\) such that solution \({{\upphi }}^{n}\) of Scheme 3.1 is bounded:

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _{L^\infty }\le C, \quad n=0,1,\ldots ,N. \end{aligned}$$

Proof

Firstly, we note that \(\Vert {{\upphi }}^{0}\Vert _{L^\infty }\le C\) is true by definition. We assume \(\Vert {{\upphi }}^{n}\Vert _{L^\infty } (n=1, 2, \ldots , k)(k< N)\) are bounded. Next, we use mathematical induction to prove \(\Vert {\upphi }^{k+1}\Vert _{L^\infty }\) is bounded.

We note that \(q({\upphi })\) and \(g({\upphi })\) are continuous as functions of \({\upphi }\) and \({{\upphi }}^{n}(n=1, 2, \ldots , k)\) and are thus bounded. Taking inner product of (4.8a) with \(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\) and \(2\Delta {t}e^{n+1/2}_{\upphi }\), respectively, we obtain

$$\begin{aligned}&\frac{1}{\Delta {t}}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}(\Vert \nabla {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert \nabla {e}_{\upphi }^{n}\Vert ^2_{L^2})\nonumber \\&\quad +\,{{\upgamma }}_{2}(\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2})+(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad +\,(2e_q^{n+1/2}\overline{g({\upphi })}^{n+1/2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})+(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}) =(R^{n+1/2}_{\upphi },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}) \end{aligned}$$
(4.9)

and

$$\begin{aligned}&\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2}+2\Delta {t}{{\upgamma }}_{1}\Vert \nabla {e}^{n+1/2}_{\upphi }\Vert ^2_{L^2}+4\Delta {t}{{\upgamma }}_{2}\Vert {e}^{n+1/2}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad +\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad +\,(2e_q^{n+1/2}\overline{g({\upphi })}^{n+1/2},2\Delta {t}e^{n+1/2}_{\upphi })+(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad =(R^{n+1/2}_{\upphi },2\Delta {t}e^{n+1/2}_{\upphi }). \end{aligned}$$
(4.10)

Taking inner product of (4.8b) with \(2e_q^{n+1}\), we have

$$\begin{aligned}&\Vert e^{n+1}_q\Vert ^2_{L^2}-\Vert e^{n}_q\Vert ^2_{L^2}+\Vert e^{n+1}_q-e^{n}_q\Vert ^2_{L^2}\nonumber \\&\quad =({\overline{g}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),2e^{n+1}_q)+(\overline{e}_{g}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n})),2e^{n+1}_q)\nonumber \\&\quad +\Delta {t}(R^{n+1/2}_q,2e^{n+1}_q). \end{aligned}$$
(4.11)

Taking inner product of (4.8c) with \(2e_{\upzeta }^{n+1}\), we obtain

$$\begin{aligned}&\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}-\Vert e^{n}_{\upzeta }\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }-e^{n}_{\upzeta }\Vert ^2_{L^2} =\left( \sqrt{{\upeta }}\int _\Omega (e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n})\mathrm {d}\mathbf {x},2e^{n+1}_{\upzeta }\right) \nonumber \\&\quad +\,\Delta {t}(R^{n+1/2}_{\upzeta },2e^{n+1}_{\upzeta }). \end{aligned}$$
(4.12)

Combining (4.9)–(4.12),we have

$$\begin{aligned}&\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2}+{{\upgamma }}_{2}(\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2}) +\frac{{{\upgamma }}_{1}}{2}(\Vert \nabla {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert \nabla {e}_{\upphi }^{n}\Vert ^2_{L^2})\nonumber \\&\quad +\,\Vert e^{n+1}_q\Vert ^2_{L^2}-\Vert e^{n}_q\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad -\,\Vert e^{n}_{\upzeta }\Vert ^2_{L^2} +\frac{1}{\Delta {t}}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{L^2}+\Vert e^{n+1}_q-e^{n}_q\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }-e^{n}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad +\,2\Delta {t}{{\upgamma }}_{1}\Vert \nabla {e}^{n+1/2}_{\upphi }\Vert ^2_{L^2}+4\Delta {t}{{\upgamma }}_{2}\Vert {e}^{n+1/2}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad =({\overline{g({\upphi })}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),2e^{n+1}_q)+(\overline{e}_{g}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n})),2e^{n+1}_q)\nonumber \\&\quad +(\sqrt{{\upeta }}\int _\Omega (e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n})\mathrm {d}\mathbf {x},2e^{n+1}_{\upzeta })\nonumber \\&\quad -\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})-(2e_q^{n+1/2}\overline{g({\upphi })}^{n+1/2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad -\,(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad -\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},2\Delta {t}e^{n+1/2}_{\upphi })-(2e_q^{n+1/2}\overline{{g}({\upphi })}^{n+1/2},2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad -(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad +\,(R^{n+1/2}_{\upphi },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})+\Delta {t}(R^{n+1/2}_q,2e^{n+1}_q)+(R^{n+1/2}_{\upphi },2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad +\,\Delta {t}(R^{n+1/2}_{\upzeta },2e^{n+1}_{\upzeta }). \end{aligned}$$
(4.13)

Using the Cauchy inequality with \({\upvarepsilon }\), we obtain

$$\begin{aligned}&|({\overline{g({\upphi })}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),2e^{n+1}_q)|\nonumber \\&\quad =|((3{g}^n-{g}^{n-1})(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),e^{n+1}_q)|\nonumber \\&\quad \le (\Vert 3{g}^n\Vert _{L^\infty }+\Vert {g}^{n-1}\Vert _{L^\infty })|((e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),e^{n+1}_q)|\nonumber \\&\quad \le \frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{L^2}+C\Delta {t}{\upvarepsilon }\Vert e^{n+1}_q\Vert ^2_{L^2}. \end{aligned}$$
(4.14)

From the General Hölder inequality, Sobolev inequalities (4.1) and inequality (4.3), and the regularity assumption (4.5), we obtain

$$\begin{aligned}&|(\overline{e}_{g}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n})),2e^{n+1}_q)|\nonumber \\&\quad =|((3e_{g}^n-e_{g}^{n-1})({\upphi }(t_{n+1})-{\upphi }(t_{n})),e^{n+1}_q)|\nonumber \\&\quad \le \Vert 3e_{g}^n-e_{g}^{n-1}\Vert _{L^4}\Vert {\upphi }(t_{n+1})-{\upphi }(t_{n})\Vert _{L^4}\Vert e^{n+1}_q\Vert _{L^2}\nonumber \\&\quad \le \Vert 3e_{g}^n-e_{g}^{n-1}\Vert _{L^4}\Vert {\upphi }'(t_{n}+{\uptheta }\Delta {t})\Delta {t}\Vert _{L^4}\Vert e^{n+1}_q\Vert _{L^2}\nonumber \\&\quad \le C\Delta {t}\Vert 3e_{g}^n-e_{g}^{n-1}\Vert ^2_{L^4}+C\Delta {t}\Vert e^{n+1}_q\Vert ^2_{L^2} \le C\Delta {t}(\Vert 3e_{g}^n\Vert ^2_{L^4}\nonumber \\&\quad +\,\Vert e_{g}^{n-1}\Vert ^2_{L^4})+C\Delta {t}\Vert e^{n+1}_q\Vert ^2_{L^2}\nonumber \\&\quad \le C\Delta {t}(\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2})+C\Delta {t}\Vert e^{n+1}_q\Vert ^2_{L^2}. \end{aligned}$$
(4.15)

By the General Hölder inequality, the Cauchy inequality with \({\upvarepsilon }\), (4.3) and the boundedness of \(\Vert q^{n}\Vert _{L^2}\) and \(\Vert q^{n+1}\Vert _{L^2}\), we have

$$\begin{aligned}&|(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})|\nonumber \\&\quad =|((q^{n+1}+q^{n})\frac{1}{2}(3e^n_{g}-e^{n-1}_{g}),(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}))|\nonumber \\&\quad \le \Vert 3e_{g}^n-e_{g}^{n-1}\Vert _{L^4}\Vert q^{n+1}+q^{n}\Vert _{L^4}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert _{L^2}\nonumber \\&\quad \le \Vert 3e_{g}^n-e_{g}^{n-1}\Vert _{L^4}(\Vert q^{n+1}\Vert _{L^2}+\Vert q^{n}\Vert _{L^2})\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert _{L^2}\nonumber \\&\quad \le C\Delta {t}{\upvarepsilon }(\Vert 3e_{g}^n\Vert ^2_{L^4}+\Vert e_{g}^{n-1}\Vert ^2_{L^4})+\frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_{L^2}\nonumber \\&\quad \le C\Delta {t}{\upvarepsilon }(\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2} +\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2})+\frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_{L^2}. \end{aligned}$$
(4.16)

Similarly, using the Hölder inequality, the Cauchy inequality with \({\upvarepsilon }\), we arrive at the following estimates

$$\begin{aligned}&|(2e_q^{n+1/2}\overline{{g}({\upphi })}^{n+1/2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})|\nonumber \\&\quad =|((e_q^{n+1}+e_q^{n})\frac{1}{2}(3{g}({{\upphi }}^{n})-{g}({\upphi }^{n-1}),(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}))|\nonumber \\&\quad \le (\Vert 3{g}({{\upphi }}^{n})\Vert _{L^\infty }+\Vert {g}({\upphi }^{n-1})\Vert _{L^\infty })|(e_q^{n+1}+e_q^{n},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})|\nonumber \\&\quad \le C\Delta {t}{\upvarepsilon }(\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert {e}^n_q\Vert ^2_{L^2})+\frac{1}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_{L^2}, \end{aligned}$$
(4.17)
$$\begin{aligned}&|(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},2\Delta {t}e^{n+1/2}_{\upphi })|\nonumber \\&\quad \le \Delta {t}\Vert 3e_{g}^n-e_{g}^{n-1}\Vert _{L^4}\Vert q^{n+1}+q^{n}\Vert _{L^4}\Vert e^{n+1/2}_{\upphi }\Vert _{L^2}\nonumber \\&\quad \le C\Delta {t}(\Vert 3e_{g}^n\Vert ^2_{L^4}+\Vert e_{g}^{n-1}\Vert ^2_{L^4})+C\Delta {t}\Vert e^{n+1/2}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad \le C\Delta {t}(\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+ \Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2})+\Delta {t}(\Vert e_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}+\Vert e_{\upphi }^{n}\Vert ^2_{L^2}), \end{aligned}$$
(4.18)

and

$$\begin{aligned}&|(2e_q^{n+1/2}\overline{{g}({\upphi })}^{n+1/2},2\Delta {t}e^{n+1/2}_{\upphi })| =\Delta {t}|((e_q^{n+1}+e_q^n)(3{g}({{\upphi }}^{n})-{g}({\upphi }^{n-1})),(e^n_{\upphi }+e^{n+1}_{\upphi }))|\nonumber \\&\quad \le \Delta {t}(\Vert 3{g}({{\upphi }}^{n})\Vert _{L^\infty }+\Vert {g}({\upphi }^{n-1})\Vert _{L^\infty })|(e_q^{n+1}+e_q^{n},e^n_{\upphi }+e^{n+1}_{\upphi })|\nonumber \\&\quad \le C\Delta {t}(\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert {e}^n_q\Vert ^2_{L^2})+C\Delta {t}(\Vert e_{\upphi }^{n}\Vert ^2_{L^2}+\Vert e_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}). \end{aligned}$$
(4.19)

By applying the same method, we obtain the following results

$$\begin{aligned} \begin{aligned}&|(R^{n+1/2}_{\upphi },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})|\le \frac{1}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_{L^2}+{\upvarepsilon }\Delta {t}\Vert R^{n+1/2}_{\upphi }\Vert ^2_{L^2},\\&|\Delta {t}(R^{n+1/2}_q,2e^{n+1}_q)|\le \Delta {t}\Vert R^{n+1/2}_q\Vert ^2_{L^2}+\Delta {t}\Vert e^{n+1}_q\Vert ^2_{L^2},\\&|(R^{n+1/2}_{\upphi },2\Delta {t}e^{n+1/2}_{\upphi })|\le \Delta {t}\Vert R^{n+1/2}_{\upphi }\Vert ^2_{L^2}+\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n}_{\upphi }\Vert ^2_{L^2}),\\&|(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})| \le \frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{L^2}+\Delta {t}{\upvarepsilon }(\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}+\Vert e^{n}_{\upzeta }\Vert ^2_{L^2}),\\&|\left( \sqrt{{\upeta }}\int _\Omega {(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n})}\mathrm {d}\mathbf {x},2e^{n+1}_{\upzeta }\right) |\le \frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_{L^2}+C\Delta {t}{\upvarepsilon }\Vert e_{\upzeta }^{n+1}\Vert ^2_{L^2},\\&|(\sqrt{{\upeta }}e^{n+\frac{1}{2}}_{\upzeta },2\Delta {t}e^{n+1/2}_{\upphi })|\le \Delta {t}(\Vert e_{\upzeta }^{n+1}\Vert ^2_{L^2}+\Vert e_{\upzeta }^{n}\Vert ^2_{L^2}) +\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n}_{\upphi }\Vert ^2_{L^2}),\\&|\Delta {t}(R^{n+1/2}_{\upzeta },2e^{n+1}_{\upzeta })|\le \Delta {t}\Vert R^{n+1/2}_{\upzeta }\Vert ^2_{L^2}+\Delta {t}\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}. \end{aligned} \end{aligned}$$
(4.20)

Choosing appropriate \({\upvarepsilon }\) and combining the above inequalities (4.14)–(4.20) with (4.13), we have

$$\begin{aligned}&\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad -\,(\Vert e^{n}_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert e^{n}_{\upphi }\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n}_q\Vert ^2_{L^2}+\Vert e^{n}_{\upzeta }\Vert ^2_{L^2})\nonumber \\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad +\,\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2} +\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert e^n_q\Vert ^2_{L^2}\nonumber \\&\quad +\,\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}+\Vert e^n_{\upzeta }\Vert ^2_{L^2}) +\Delta {t}(\Vert R^{n+1/2}_{\upphi }\Vert ^2_{L^2}+\Vert R^{n+1/2}_q\Vert ^2_{L^2}+\Vert R^{n+1/2}_{\upzeta }\Vert ^2_{L^2})\nonumber \\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad +\,\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2} +\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert e^n_q\Vert ^2_{L^2}\nonumber \\&\quad +\,\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}+\Vert e^n_{\upzeta }\Vert ^2_{L^2}) +\Delta {t}(\Vert R^{n+1/2}_{\upphi }\Vert ^2_{L^2}+\Vert R^{n+1/2}_q\Vert ^2_{L^2}+\Vert R^{n+1/2}_{\upzeta }\Vert ^2_{L^2}). \end{aligned}$$
(4.21)

Summing (4.21) over for time steps 1 to m ,we deduce that for \(1\le m\le k\),

$$\begin{aligned}&\Vert e^{m+1}_{\upphi }\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{m+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{m+1}_q\Vert ^2_{L^2}+\Vert e^{m+1}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad \le \Vert e^{m+1}_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{m+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{m+1}_q\Vert ^2_{L^2}+\Vert e^{m+1}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad \le C\Delta {t}\sum \nolimits ^m_{n=0}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2})+N\Delta t\Delta {t}^4, \end{aligned}$$
(4.22)

and

$$\begin{aligned}&min\left( 1,\frac{{{\upgamma }}_{1}}{2}\right) (\Vert e^{m}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{m}_{\upphi }\Vert ^2_{L^2}+\Vert e^{m}_q\Vert ^2_{L^2}+\Vert e^{m}_{\upzeta }\Vert ^2_{L^2})\nonumber \\&\quad \le \Vert e^{m}_{\upphi }\Vert ^2_{L^2} +\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{m}_{\upphi }\Vert ^2_{L^2}+\Vert e^{m}_q\Vert ^2_{L^2}+\Vert e^{m}_{\upzeta }\Vert ^2_{L^2}. \end{aligned}$$
(4.23)

Then

$$\begin{aligned}&\Vert e^{m+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{m+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{m+1}_q\Vert ^2_{L^2}+\Vert e^{m+1}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad \le C\Delta {t}\sum \nolimits ^m_{n=0}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2})+N\Delta t\Delta {t}^4. \end{aligned}$$
(4.24)

Combining (4.24) with the Gronwall’s inequality, we have

$$\begin{aligned} \Vert e^{m+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{m+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{m+1}_q\Vert ^2_{L^2}+\Vert e^{m+1}_{\upzeta }\Vert ^2_{L^2}\le C\Delta {t}^4, \end{aligned}$$
(4.25)

which implies

$$\begin{aligned} \Vert e^{k+1}_{\upphi }\Vert ^2_{H^1}+\Vert e^{k+1}_q\Vert ^2_{L^2}+\Vert e^{k+1}_{\upzeta }\Vert ^2_{L^2}\le C\Delta {t}^4. \end{aligned}$$
(4.26)

Using the \(H^2\) regularity to Eq. (4.6a) and the boundedness of \(\Vert {\upphi }^{n}\Vert _{L^2}, \Vert q^{n}\Vert _{L^2}, \Vert {\upzeta }^{n}\Vert _{L^2}\), we have

$$\begin{aligned} \begin{aligned} \Vert {\upphi }^{k+\frac{1}{2}}\Vert _{H^2}&\le \Vert {\upphi }^{k+\frac{1}{2}}\Vert _{L^2}+\Vert \frac{{\upphi }^{k+1}-{\upphi }^k}{\Delta {t}}\Vert _{L^2}+\Vert q^{k+\frac{1}{2}} \bar{g}^{k+\frac{1}{2}}\Vert _{L^2}+\Vert {\upzeta }^{k+1/2}\Vert _{L^2}\\&\le \Vert \frac{e^{k+1}_{\upphi }-e^k_{\upphi }}{\Delta t}\Vert _{L^2}+\Vert \frac{{\upphi }(t_{k+1})-{\upphi }(t_{k})}{\Delta {t}}\Vert _{L^2}+\Vert {\upphi }^{k+1}\Vert _{L^2}+\Vert {\upphi }^{k}\Vert _{L^2}\\&\quad +\,\Vert q^{k+1}\Vert _{L^2}+\Vert q^{k}\Vert _{L^2}+\Vert {\upzeta }^{k+1}\Vert _{L^2}+\Vert {\upzeta }^{k}\Vert _{L^2}\le C. \end{aligned} \end{aligned}$$
(4.27)

So

$$\begin{aligned} \Vert e^{k+\frac{1}{2}}_{\upphi }\Vert _{H^2}\le \Vert {\upphi }(t_{k+1/2})\Vert _{H^2}+\Vert {\upphi }^{k+1/2}\Vert _{H^2}\le C. \end{aligned}$$
(4.28)

Finally, we have

$$\begin{aligned} \begin{aligned}&\Vert {\upphi }^{k+\frac{1}{2}}\Vert _{L^\infty }\le \Vert e^{k+\frac{1}{2}}_{\upphi }\Vert _{L^\infty }+\Vert {\upphi }(t_{k+1/2})\Vert _{L^\infty }\\&\quad \le \Vert e^{k+\frac{1}{2}}_{\upphi }\Vert ^{\frac{1}{2}}_{H^1}\Vert e^{k+\frac{1}{2}}_{\upphi }\Vert ^{\frac{1}{2}}_{H^2}+\Vert {\upphi }(t_{k+1/2})\Vert _{L^\infty } \le C, \end{aligned} \end{aligned}$$
(4.29)

which implies

$$\begin{aligned} \Vert {\upphi }^{k+1}\Vert _{L^\infty }= \Vert 2{\upphi }^{k+\frac{1}{2}}-{\upphi }^{k}\Vert _{L^\infty } \le \Vert {\upphi }^{k+\frac{1}{2}}\Vert _{L^\infty }+\Vert {\upphi }^{k}\Vert _{L^\infty } \le C. \end{aligned}$$
(4.30)

By mathematical induction,

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _{L^\infty }\le C,n=0,1,\ldots ,N. \end{aligned}$$

\(\square \)

Theorem 4.1

For Scheme 3.1, we have the following error estimates for \(0\le n\le N\):

$$\begin{aligned} \Vert e^{n}_{\upphi }\Vert ^2_{H^1}+\Vert e^{n}_q\Vert ^2_{L^2}+\Vert e^{n}_{\upzeta }\Vert ^2_{L^2}\le C\Delta {t}^4. \end{aligned}$$

Proof

Because \(\Vert {{\upphi }}^{n}\Vert _{L^\infty }(n=0,1,\ldots ,N\)) are bounded, the proof process is similar to (4.9)–(4.26) in Lemma 4.2 and is thus omitted. \(\square \)

4.2 Error Estimates for the Allen–Cahn Model of a Lagrange Multiplier Using EQ

Firstly, we note that

$$\begin{aligned} L=\frac{\int _{\Omega }[M\mu ]d\mathbf {x}}{\int _{\Omega }Md\mathbf {x}}=\frac{1}{|\Omega |}\int _{\Omega }(-{\upgamma }_{1}\Delta {\upphi }+2{\upgamma }_{2}{\upphi }+2qg)\mathrm {d}\mathbf {x}=\frac{1}{|\Omega |}\int _{\Omega }(2{\upgamma }_{2}{\upphi }+2qg)\mathrm {d}\mathbf {x}. \end{aligned}$$

Then, Scheme 3.2 can be written as follows

$$\begin{aligned} \frac{{{\upphi }}^{{n+1}}-{\upphi }^{n}}{\Delta t}=&{\upgamma }_{1}\Delta {\upphi }^{n+1/2}-2{\upgamma }_{2}{\upphi }^{n+1/2}-2q^{n+1/2}\overline{g}^{n+1/2}\nonumber \\&+\frac{1}{\int _{\Omega }\mathrm {d}\mathbf {x}}\int _{\Omega }(2{\upgamma }_{2}{\upphi }^{n+1/2}+2q^{n+1/2}\overline{g}^{n+1/2})\mathrm {d}\mathbf {x}, \end{aligned}$$
(4.31a)
$$\begin{aligned} \frac{q^{n+1}-q^{n}}{\Delta t}=&\overline{g}^{n+1/2}\frac{{{\upphi }}^{{n+1}}-{\upphi }^{n}}{\Delta t}. \end{aligned}$$
(4.31b)

The error functions for \(n\ge 0\) satisfy the following difference equations

$$\begin{aligned}&\frac{e_{{\upphi }}^{n+1}-e_{{\upphi }}^{n}}{\Delta t}-{\upgamma }_{1}\Delta e_{{\upphi }}^{n+1/2}+2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2}\nonumber \\&\quad =\frac{1}{\int _{\Omega }\mathrm {d}\mathbf {x}}\int _{\Omega }2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2}\mathrm {d}\mathbf {x}+R_{{\upphi }}^{n+1/2}, \end{aligned}$$
(4.32)
$$\begin{aligned}&\frac{e_{q}^{n+1}-e_{q}^{n}}{\Delta t}=\overline{g}^{n+1/2}\frac{e_{{\upphi }}^{n+1}-e_{{\upphi }}^{n}}{\Delta t}+\overline{e_{g}}^{n+1/2}\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta t}+R_{q}^{n+1/2}. \end{aligned}$$
(4.33)

Lemma 4.3

There exists a constant \(C>0\) such that solution \({{\upphi }}^{n}\) of Scheme 3.2 is bounded:

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _{L^\infty }\le C, \quad n=0,1,\ldots ,N. \end{aligned}$$

Proof

Taking inner product of (4.32) with \(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\), \(2\Delta {t}e^{n+1/2}_{\upphi }\), respectively, (4.33) with \(2e_q^{n+1}\), then adding them up and using inequalities, we obtain

$$\begin{aligned} \begin{aligned}&\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}-\Vert e^n_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-{{\upgamma }}_{2}\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2} +\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}\\&\quad -\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n+1}_q\Vert ^2_{L^2}-\Vert e^n_q\Vert ^2_{L^2}\\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2}\\&\quad +\,\Vert e^{n+1}_q\Vert ^2_{L^2}+\Vert e^n_q\Vert ^2_{L^2})+\Delta {t}O(\Delta {t}^4). \end{aligned} \end{aligned}$$
(4.34)

The rest of the proof is similar to (4.22)–(4.30) in the proof of Lemma 4.2 and is thus omitted. \(\square \)

Theorem 4.2

For Scheme 3.2, we have the following error estimates:

$$\begin{aligned} \Vert e^{n}_{\upphi }\Vert ^2_{H^1}+\Vert e^{n}_q\Vert ^2_{L^2}\le C\Delta {t}^4, 0\le n\le N. \end{aligned}$$

Proof

Because \(\Vert {{\upphi }}^{n}\Vert _{L^\infty }(n=0,1,\ldots ,N\)) are bounded, the proof is similar to that in Lemma 4.3. So, we omit the details. \(\square \)

4.3 Error Estimates for the Allen–Cahn Model of a Penalizing Potential Using SAV

Scheme 3.3 can be written as

$$\begin{aligned}&\frac{{{\upphi }}^{{n+1}}-{{\upphi }}^{n}}{\Delta {t}}-{{{\upgamma }}_{1} \Delta {\upphi }}^{n+1/2}+2 {{\upgamma }}_{2} {{\upphi }}^{n+1/2} +2{r}^{n+1/2} \overline{s}^{n+1/2}+\sqrt{{\upeta }}{\upzeta }^{n+1/2}=0, \end{aligned}$$
(4.35a)
$$\begin{aligned}&\frac{r^{n+1}-r^n}{\Delta t}= \int _\Omega \overline{s}^{n+1/2}\frac{({{\upphi }}^{{n+1}}-{{\upphi }}^{n})}{\Delta t}\mathrm {d}\mathbf {x},\end{aligned}$$
(4.35b)
$$\begin{aligned}&\frac{{\upzeta }^{n+1}-{\upzeta }^n}{\Delta t}=\sqrt{{\upeta }}\int _\Omega \frac{{{\upphi }}^{{n+1}}-{{\upphi }}^{n}}{\Delta t}\mathrm {d}\mathbf {x}. \end{aligned}$$
(4.35c)

We deduce the error equations for \(n\ge 0\) as follows

$$\begin{aligned}&\frac{e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}}{\Delta {t}}-{{\upgamma }}_{1}\Delta {e}_{\upphi }^{n+1/2}+2{{\upgamma }}_{2}e_{\upphi }^{n+1/2}\nonumber \\&\quad +\,2r^{n+1/2}{\overline{e}_{s}^{n+1/2}}+2e_r^{n+1/2}\overline{s}^{n+1/2}+\sqrt{{\upeta }}e^{n+1/2}_{\upzeta }=R^{n+1/2}_{\upphi }, \end{aligned}$$
(4.36a)
$$\begin{aligned}&\frac{e_r^{n+1}-e_r^{n}}{\Delta {t}}=\int _\Omega {\overline{s}}^{n+1/2}\frac{e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}}{\Delta {t}} +\overline{e}_{s}^{n+1/2}\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta {t}}\mathrm {d}\mathbf {x}+R_r^{n+1/2},\end{aligned}$$
(4.36b)
$$\begin{aligned}&\frac{e_{\upzeta }^{n+1}-e_{\upzeta }^{n}}{\Delta {t}}=\sqrt{{\upeta }}\int _\Omega \frac{e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}}{\Delta {t}}\mathrm {d}\mathbf {x}+R_{\upzeta }^{n+1/2}. \end{aligned}$$
(4.36c)

Lemma 4.4

There exists a constant \(C>0\) such that the solution \({{\upphi }}^{n}\) of Scheme 3.3 is bounded,

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _{L^\infty }\le C, \quad n=0,1,\ldots ,N. \end{aligned}$$

Proof

Firstly, we note that \(\Vert {{\upphi }}^{0}\Vert _{L^\infty }\le C\) is true by definition. We assume \(\Vert {{\upphi }}^{n}\Vert _{L^\infty } (n=1, 2, \ldots , k)(k< N)\) are bounded. Then, we use mathematical induction to prove that \(\Vert {\upphi }^{k+1}\Vert _{L^\infty }\) is bounded.

We note that \(q({\upphi })\) and \(s({\upphi })\) are continuous as functions of \({\upphi }\) and \({{\upphi }}^{n}(n=1, 2, \ldots , k)\) and are thus bounded. Taking inner product of (4.36a) with \(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\), \(2\Delta {t}e^{n+1/2}_{\upphi }\), respectively, (4.36b) with \(2e_r^{n+1}\) and (4.36c) with \(2e_{\upzeta }^{n+1}\), then adding them up, we obtain

$$\begin{aligned}&\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2}+{{\upgamma }}_{2}(\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2})+\frac{{{\upgamma }}_{1}}{2}(\Vert \nabla {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-\Vert \nabla {e}_{\upphi }^{n}\Vert ^2_{L^2})\nonumber \\&\quad +\,\Vert e^{n+1}_r\Vert ^2_{L^2}-\Vert e^{n}_r\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}-\Vert e^{n}_{\upzeta }\Vert ^2_{L^2}+\frac{1}{\Delta {t}}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{L^2}+\Vert e^{n+1}_r-e^{n}_r\Vert ^2_{L^2}\nonumber \\&\quad +\,\Vert e^{n+1}_{\upzeta }-e^{n}_{\upzeta }\Vert ^2_{L^2}+2\Delta {t}{{\upgamma }}_{1}\Vert \nabla {e}^{n+1/2}_{\upphi }\Vert ^2_{L^2}+4\Delta {t}{{\upgamma }}_{2}\Vert {e}^{n+1/2}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad =\left( \int _\Omega {\overline{s({\upphi })}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n})\mathrm {d}\mathbf {x},2e^{n+1}_r\right) +\left( \int _\Omega \overline{e}_{s}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n}))\mathrm {d}\mathbf {x},2e^{n+1}_r\right) \nonumber \\&\quad +\,\left( \sqrt{{\upeta }}\int _\Omega (e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n})\mathrm {d}\mathbf {x},2e^{n+1}_{\upzeta }\right) -(2r^{n+1/2}{\overline{e}_{s}^{n+1/2}},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad -\,(2e_r^{n+1/2}\overline{s({\upphi })}^{n+1/2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})-(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad -\,(2r^{n+1/2}{\overline{e}_{s}^{n+1/2}},2\Delta {t}e^{n+1/2}_{\upphi })-(2e_r^{n+1/2}\overline{{s}({\upphi })}^{n+1/2},2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad -\,(\sqrt{{\upeta }}e^{n+1/2}_{\upzeta },2\Delta {t}e^{n+1/2}_{\upphi })+(R^{n+1/2}_{\upphi },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})+\Delta {t}(R^{n+1/2}_r,2e^{n+1}_r)\nonumber \\&\quad +(R^{n+1/2}_{\upphi },2\Delta {t}e^{n+1/2}_{\upphi })+\Delta {t}(R^{n+1/2}_{\upzeta },2e^{n+1}_{\upzeta }). \end{aligned}$$
(4.37)

Using Cauchy’s inequality with \({\upvarepsilon }\), we obtain

$$\begin{aligned}&\big |\left( \int _\Omega {\overline{s}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}){\mathrm {d}\mathbf {x}},2e^{n+1}_r\right) \big |\nonumber \\&\quad \le |(\Vert 3{g}^n-{g}^{n-1}\Vert _{L^2}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert _{L^2},e^{n+1}_r)|\nonumber \\&\quad \le \frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{L^2}+C\Delta {t}{\upvarepsilon }\Vert e^{n+1}_r\Vert ^2_{L^2}. \end{aligned}$$
(4.38)

By regularity assumption (4.5), Sobolev inequalities (4.1) and inequality (4.3), we get the following inequalities

$$\begin{aligned}&\left| \left( \int _\Omega \overline{e}_{s}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n})){ \mathrm {d}\mathbf {x}},2e^{n+1}_r\right) \right| \nonumber \\&\quad \le |(\Vert 3e_{s}^n-e_{s}^{n-1}\Vert _{L^2}\Vert {\upphi }(t_{n+1})-{\upphi }(t_{n})\Vert _{L^2},e^{n+1}_r)|\nonumber \\&\quad \le \Vert 3e_{s}^n-e_{s}^{n-1}\Vert _{L^2}\Vert {\upphi }(t_{n+1})-{\upphi }(t_{n})\Vert _{L^2}\Vert e^{n+1}_r\Vert _{L^2}\nonumber \\&\quad \le C\Delta {t}(\Vert 3e_{s}^n\Vert ^2_{L^4}+\Vert e_{s}^{n-1}\Vert ^2_{L^4})+C\Delta {t}\Vert e^{n+1}_r\Vert ^2_{L^2}\nonumber \\&\quad \le C\Delta {t}(\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2})+C\Delta {t}\Vert e^{n+1}_r\Vert ^2_{L^2}, \end{aligned}$$
(4.39)

and

$$\begin{aligned}&|(\sqrt{{\upeta }}\int _\Omega {(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n})}\mathrm {d}\mathbf {x},2e^{n+1}_{\upzeta })|\nonumber \\&\quad \le \sqrt{{\upeta }}(|\Omega |\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert _{L^2},2e^{n+1}_{\upzeta })| \le \frac{C}{4\Delta {t}{\upvarepsilon }}\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_{L^2}+C\Delta {t}{\upvarepsilon }\Vert e_{\upzeta }^{n+1}\Vert ^2_{L^2}. \end{aligned}$$
(4.40)

Analogous to the proof in Lemma 4.2, we obtain estimates for the other items. Choosing appropriate \({\upvarepsilon }\) and combining the above inequalities (4.38)–(4.40) and other items with (4.37), we have

$$\begin{aligned}&\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n+1}_r\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}\nonumber \\&\quad -\,(\Vert e^{n}_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert e^{n}_{\upphi }\Vert ^2_{L^2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}+\Vert e^{n}_r\Vert ^2_{L^2}+\Vert e^{n}_{\upzeta }\Vert ^2_{L^2})\nonumber \\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}\nonumber \\&\quad +\,\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2} +\Vert e^{n+1}_r\Vert ^2_{L^2}+\Vert e^n_r\Vert ^2_{L^2}+\Vert e^{n+1}_{\upzeta }\Vert ^2_{L^2}+\Vert e^n_{\upzeta }\Vert ^2_{L^2})\nonumber \\&\quad +\,\Delta {t}(\Vert R^{n+1/2}_{\upphi }\Vert ^2_{L^2}+\Vert R^{n+1/2}_r\Vert ^2_{L^2}+\Vert R^{n+1/2}_{\upzeta }\Vert ^2_{L^2}). \end{aligned}$$
(4.41)

The rest of the proof is the same as (4.22)–(4.30) in Lemma 4.2. So, we skip the details and claim the following result

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _{L^\infty }\le C, \quad n=0,1,\ldots ,N. \end{aligned}$$

\(\square \)

Theorem 4.3

For Scheme 3.3, we have the following error estimate:

$$\begin{aligned} \Vert e^{n}_{\upphi }\Vert ^2_{H^1}+\Vert e^{n}_r\Vert ^2_{L^2}+\Vert e^{n}_{\upzeta }\Vert ^2_{L^2}\le C\Delta {t}^4, \quad 0\le n\le N. \end{aligned}$$

Proof

Because \(\Vert {{\upphi }}^{n}\Vert _{L^\infty }(n=0,1,\ldots ,N\)) are bounded, the proof is similar to that in Lemma 4.4. \(\square \)

4.4 Error Estimates for the Allen–Cahn Model of a Lagrange Multiplier Using SAV

We rewrite Scheme 3.4 in the following form,

$$\begin{aligned} \frac{{{\upphi }}^{{n+1}}-{\upphi }^{n}}{\Delta t}=&-\left[ -{\upgamma }_{1}\Delta {\upphi }^{n+1/2}+2{\upgamma }_{2}{\upphi }^{n+1/2}+2r^{n+1/2}\overline{s}^{n+1/2}\right] \nonumber \\&+\frac{1}{\int _{\Omega }\mathrm {d}\mathbf {x}}\int _{\Omega }(2{\upgamma }_{2}{\upphi }^{n+1/2}+2r^{n+1/2}\overline{s}^{n+1/2})\mathrm {d}\mathbf {x}, \end{aligned}$$
(4.42a)
$$\begin{aligned} \frac{r^{n+1}-r^{n}}{\Delta t}=&\int _\Omega \overline{s}^{n+1/2}\frac{{{\upphi }}^{{n+1}}-{\upphi }^{n}}{\Delta t}\mathrm {d}\mathbf {x}. \end{aligned}$$
(4.42b)

Then, we derive the equations for the error functions for \(n\ge 0\) as follows

$$\begin{aligned}&\frac{e_{{\upphi }}^{n+1}-e_{{\upphi }}^{n}}{\Delta t}-{\upgamma }_{1}\Delta e_{{\upphi }}^{n+1/2}+2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2r^{n+1/2}\overline{e_{s}}^{n+1/2}+2e_{r}^{n+1/2}\overline{s}^{n+1/2}\nonumber \\&\quad =\frac{1}{\int _{\Omega }\mathrm {d}\mathbf {x}}\int _{\Omega }2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2r^{n+1/2}\overline{e_{s}}^{n+1/2}+2e_{r}^{n+1/2}\overline{s}^{n+1/2}\mathrm {d}\mathbf {x}+R_{{\upphi }}^{n+1/2}, \end{aligned}$$
(4.43)
$$\begin{aligned}&\frac{e_{r}^{n+1}-e_{r}^{n}}{\Delta t}=\int _\Omega \overline{s}^{n+1/2}\frac{e_{{\upphi }}^{n+1}-e_{{\upphi }}^{n}}{\Delta t}+\overline{e_{s}}^{n+1/2}\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta t}\mathrm {d}\mathbf {x}+R_{r}^{n+1/2}. \end{aligned}$$
(4.44)

Lemma 4.5

There exists a constant \(C>0\) such that the solution \({{\upphi }}^{n}\) of Scheme 3.4 is bounded

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _{L^\infty }\le C, \quad n=0,1,\ldots ,N. \end{aligned}$$

Proof

Taking inner product of (4.43) with \(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\), \(2\Delta {t}e^{n+1/2}_{\upphi }\), respectively, (4.44) with \(2e_r^{n+1}\), then adding them up and using a series of inequalities, we obtain

$$\begin{aligned} \begin{aligned}&\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}-\Vert e^n_{\upphi }\Vert ^2_{L^2}+{{\upgamma }}_{2}\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{L^2}-{{\upgamma }}_{2}\Vert {e}_{\upphi }^{n}\Vert ^2_{L^2}\\&\quad +\,\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}-\frac{{{\upgamma }}_{1}}{2}\Vert \nabla {e}^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n+1}_r\Vert ^2_{L^2}-\Vert e^n_r\Vert ^2_{L^2}\\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert e^n_{\upphi }\Vert ^2_{L^2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n+1}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n}_{\upphi }\Vert ^2_{L^2}+\Vert \nabla {e}^{n-1}_{\upphi }\Vert ^2_{L^2}\\&\quad +\,\Vert e^{n+1}_r\Vert ^2_{L^2}+\Vert e^n_r\Vert ^2_{L^2})+\Delta {t}O(\Delta {t}^4). \end{aligned} \end{aligned}$$
(4.45)

The rest of the proof is similar to (4.22)–(4.30) in that of Lemma 4.2 and is thus omitted. \(\square \)

Theorem 4.4

For Scheme 3.4, we have the following error estimates

$$\begin{aligned} \Vert e^{n}_{\upphi }\Vert ^2_{H^1}+\Vert e^{n}_r\Vert ^2_{L^2}\le C\Delta {t}^4, \quad 0\le n\le N. \end{aligned}$$

Proof

Because \(\Vert {{\upphi }}^{n}\Vert _{L^\infty }(n=0,1,\ldots ,N\)) are bounded, the proof is similar to that in Lemma 4.5 and thus omitted. \(\square \)

4.5 Error Estimates of Fully Discrete Numerical Schemes

In this subsection, we omit the space symbol ij for simplicity. Then, fully discrete Scheme 3.5 can be written as follows

$$\begin{aligned} \frac{{{\upphi }}^{{n+1}}-{\upphi }^{n}}{\Delta t}=&\,{\upgamma }_{1}\Delta _h{\upphi }^{n+1/2}-2{\upgamma }_{2}{\upphi }^{n+1/2}-2q^{n+1/2}\overline{g}^{n+1/2}\nonumber \\&+\frac{1}{\int _{\Omega }\mathrm {d}\mathbf {x}}[1\star (2{\upgamma }_{2}{\upphi }^{n+1/2}+2q^{n+1/2}\overline{g}^{n+1/2})], \end{aligned}$$
(4.46a)
$$\begin{aligned} \frac{q^{n+1}-q^{n}}{\Delta t}=&\,\overline{g}^{n+1/2}\frac{{{\upphi }}^{{n+1}}-{\upphi }^{n}}{\Delta t}. \end{aligned}$$
(4.46b)

The error functions for \(n\ge 0\) satisfy the following difference equations

$$\begin{aligned}&\frac{e_{{\upphi }}^{n+1}-e_{{\upphi }}^{n}}{\Delta t}-{\upgamma }_{1}\Delta _h e_{{\upphi }}^{n+1/2}+2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2}\nonumber \\&\quad =\frac{1}{\int _{\Omega }\mathrm {d}\mathbf {x}}[1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2})] +{\uptau }_{{\upphi }}^{n+1/2}, \end{aligned}$$
(4.47)
$$\begin{aligned}&\frac{e_{q}^{n+1}-e_{q}^{n}}{\Delta t}=\overline{g}^{n+1/2}\frac{e_{{\upphi }}^{n+1}-e_{{\upphi }}^{n}}{\Delta t}+\overline{e_{g}}^{n+1/2}\frac{{\upphi }(t_{n+1})-{\upphi }(t_{n})}{\Delta t}+{\uptau }_{q}^{n+1/2}, \end{aligned}$$
(4.48)

where the corresponding truncation error

$$\begin{aligned} |{\uptau }^{n+1/2}_{\upphi }|\le C_1({h}^2+{\Delta t}^2), |{\uptau }^{n+1/2}_q|\le C_2{\Delta t}^2. \end{aligned}$$

Lemma 4.6

There exists a constant \(C>0\) such that solution \({{\upphi }}^{n}\) of Scheme 3.5 is bounded:

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _\infty \le C, \quad n=0,1,\ldots ,N. \end{aligned}$$

Proof

Firstly, we note that \(\Vert {{\upphi }}^{0}\Vert _\infty \le C\) is true by definition. We assume \(\Vert {{\upphi }}^{n}\Vert _\infty (n=1, 2, \ldots , k)(k< N)\) are bounded. Next, we use mathematical induction to prove \(\Vert {\upphi }^{k+1}\Vert _\infty \) is bounded.

We note that \(q({\upphi })\) and \(g({\upphi })\) are continuous as functions of \({\upphi }\) and \({{\upphi }}^{n}(n=1, 2, \ldots , k)\) and thus are bounded. Taking discrete inner product of (4.47) with \(e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\) and \(2\Delta {t}e^{n+1/2}_{\upphi }\), respectively, summing over i and j, we obtain

$$\begin{aligned}&\frac{1}{\Delta {t}}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{2}+\frac{{{\upgamma }}_{1}}{2}(\Vert \nabla _h{e}_{{\upphi }}^{{n+1}}\Vert ^2_{2}-\Vert \nabla _h{e}_{\upphi }^{n}\Vert ^2_{2}) +{{\upgamma }}_{2}(\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{2})\nonumber \\&\quad +\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad +\,(2e_q^{n+1/2}\overline{g({\upphi })}^{n+1/2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})-([1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}\nonumber \\&\quad +\,2e_{q}^{n+1/2}\overline{g}^{n+1/2})],e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&=({\uptau }^{n+1/2}_{\upphi },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}) \end{aligned}$$
(4.49)

and

$$\begin{aligned}&\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{2}+2\Delta {t}{{\upgamma }}_{1}\Vert \nabla _h{e}^{n+1/2}_{\upphi }\Vert ^2_{2}+4\Delta {t}{{\upgamma }}_{2}\Vert {e}^{n+1/2}_{\upphi }\Vert ^2_{2}\nonumber \\&\quad +\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad +\,(2e_q^{n+1/2}\overline{g({\upphi })}^{n+1/2},2\Delta {t}e^{n+1/2}_{\upphi })-([1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}\nonumber \\&\quad +\,2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2})],2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&=({\uptau }^{n+1/2}_{\upphi },2\Delta {t}e^{n+1/2}_{\upphi }). \end{aligned}$$
(4.50)

Taking discrete inner product of (4.48) with \(2e_q^{n+1}\), summing over i and j, we have

$$\begin{aligned}&\Vert e^{n+1}_q\Vert ^2_{2}-\Vert e^{n}_q\Vert ^2_{2}+\Vert e^{n+1}_q-e^{n}_q\Vert ^2_{2}\nonumber \\&\quad =({\overline{g}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),2e^{n+1}_q)+(\overline{e}_{g}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n})),2e^{n+1}_q)\nonumber \\&\quad +\,\Delta {t}({\uptau }^{n+1/2}_q,2e^{n+1}_q). \end{aligned}$$
(4.51)

Combining (4.49)-(4.51),we have

$$\begin{aligned}&\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{2}+{{\upgamma }}_{2}(\Vert {e}_{{\upphi }}^{{n+1}}\Vert ^2_{2}-\Vert {e}_{\upphi }^{n}\Vert ^2_{2})\nonumber \\&\quad +\frac{{{\upgamma }}_{1}}{2}(\Vert \nabla _h{e}_{{\upphi }}^{{n+1}}\Vert ^2_{2}-\Vert \nabla _h{e}_{\upphi }^{n}\Vert ^2_{2})+\Vert e^{n+1}_q\Vert ^2_{2}-\Vert e^{n}_q\Vert ^2_{2}\nonumber \\&\quad +\,\frac{1}{\Delta {t}}\Vert e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}\Vert ^2_{2}+\Vert e^{n+1}_q-e^{n}_q\Vert ^2_{2}+ +2\Delta {t}{{\upgamma }}_{1}\Vert \nabla _h{e}^{n+1/2}_{\upphi }\Vert ^2_{2}+4\Delta {t}{{\upgamma }}_{2}\Vert {e}^{n+1/2}_{\upphi }\Vert ^2_{2}\nonumber \\&\quad =({\overline{g({\upphi })}}^{n+1/2}(e_{{\upphi }}^{{n+1}}-e_{\upphi }^{n}),2e^{n+1}_q)+(\overline{e}_{g}^{n+1/2}({\upphi }(t_{n+1})-{\upphi }(t_{n})),2e^{n+1}_q)\nonumber \\&\quad -\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})-(2e_q^{n+1/2}\overline{g({\upphi })}^{n+1/2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad -\,(2q^{n+1/2}{\overline{e}_{g}^{n+1/2}},2\Delta {t}e^{n+1/2}_{\upphi })-(2e_q^{n+1/2}\overline{{g}({\upphi })}^{n+1/2},2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad +\,([1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2})],e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})\nonumber \\&\quad +\,([1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2})],2\Delta {t}e^{n+1/2}_{\upphi })\nonumber \\&\quad +\,({\uptau }^{n+1/2}_{\upphi },e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})+\Delta {t}({\uptau }^{n+1/2}_q,2e^{n+1}_q)+({\uptau }^{n+1/2}_{\upphi },2\Delta {t}e^{n+1/2}_{\upphi }). \end{aligned}$$
(4.52)

Similar to the proof of Lemma 4.2, we apply the corresponding inequalities to have

$$\begin{aligned}&|([1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2})],e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})|\nonumber \\&\quad \le |(\Vert 2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2}\Vert _{2},e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n})|\nonumber \\&\quad \le C\Delta {t}{\upvarepsilon }(\Vert 2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2}\Vert _{2}^2)+\frac{C}{4\Delta {t}{\upvarepsilon }}(\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_2)\nonumber \\&\quad \le C\Delta {t}{\upvarepsilon }(\Vert e_{{\upphi }}^{{n+1}}\Vert ^2_{2}+\Vert e_{\upphi }^{n}\Vert ^2_{2}+\Vert e^n_{\upphi }\Vert ^2_{2} +\Vert \nabla _h{e}^n_{\upphi }\Vert ^2_{2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{2}+\Vert \nabla _h{e}^{n-1}_{\upphi }\Vert ^2_{2}\nonumber \\&\quad +\,\Vert e^{n+1}_q\Vert ^2_{2}+\Vert {e}^n_q\Vert ^2_{2})+\frac{C}{4\Delta {t}{\upvarepsilon }}(\Vert e_{{\upphi }}^{{n+1}}-e_{{\upphi }}^{n}\Vert ^2_2) \end{aligned}$$
(4.53)

and

$$\begin{aligned}&|([1\star (2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2})],2\Delta {t}e^{n+1/2}_{\upphi })|\nonumber \\&\quad \le \Delta {t}(\Vert 2{\upgamma }_{2}e_{{\upphi }}^{n+1/2}+2q^{n+1/2}\overline{e_{g}}^{n+1/2}+2e_{q}^{n+1/2}\overline{g}^{n+1/2}\Vert ^2_2+\Vert e^{n+1/2}_{\upphi }\Vert ^2_2)\nonumber \\&\quad \le C\Delta {t}(\Vert e_{{\upphi }}^{{n+1}}\Vert ^2_{2}+\Vert e_{\upphi }^{n}\Vert ^2_{2}+\Vert e^n_{\upphi }\Vert ^2_{2} +\Vert \nabla _h{e}^n_{\upphi }\Vert ^2_{2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{2}+\Vert \nabla _h{e}^{n-1}_{\upphi }\Vert ^2_{2}\nonumber \\&\quad +\,\Vert e^{n+1}_q\Vert ^2_{2}+\Vert {e}^n_q\Vert ^2_{2}). \end{aligned}$$
(4.54)

Thus, we have the following result

$$\begin{aligned}&\Vert e^{n+1}_{\upphi }\Vert ^2_{2}+{{\upgamma }}_{2}\Vert e^{n+1}_{\upphi }\Vert ^2_{2}+\frac{{{\upgamma }}_{1}}{2}\Vert \nabla _h{e}^{n+1}_{\upphi }\Vert ^2_{2}+\Vert e^{n+1}_q\Vert ^2_{2}-(\Vert e^{n}_{\upphi }\Vert ^2_{2}+{{\upgamma }}_{2}\Vert e^{n}_{\upphi }\Vert ^2_{2}\nonumber \\&\quad +\,\frac{{{\upgamma }}_{1}}{2}\Vert \nabla _h{e}^{n}_{\upphi }\Vert ^2_{2}+\Vert e^{n}_q\Vert ^2_{2})\nonumber \\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{2}+\Vert e^n_{\upphi }\Vert ^2_{2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{2}+\Vert \nabla _h{e}^{n}_{\upphi }\Vert ^2_{2}+\Vert \nabla _h{e}^{n-1}_{\upphi }\Vert ^2_{2} +\Vert e^{n+1}_q\Vert ^2_{2}+\Vert e^n_q\Vert ^2_{2})\nonumber \\&\quad +\,\Delta {t}(\Vert {\uptau }^{n+1/2}_{\upphi }\Vert ^2_{2}+\Vert {\uptau }^{n+1/2}_q\Vert ^2_{2})\nonumber \\&\quad \le C\Delta {t}(\Vert e^{n+1}_{\upphi }\Vert ^2_{2}+\Vert e^n_{\upphi }\Vert ^2_{2}+\Vert e^{n-1}_{\upphi }\Vert ^2_{2}+\Vert \nabla _h{e}^{n+1}_{\upphi }\Vert ^2_{2}+\Vert \nabla _h{e}^{n}_{\upphi }\Vert ^2_{2}\nonumber \\&\quad +\,\Vert \nabla _h{e}^{n-1}_{\upphi }\Vert ^2_{2}+\Vert e^{n+1}_q\Vert ^2_{2}+\Vert e^n_q\Vert ^2_{2})\nonumber \\&\quad +\Delta {t}(\Vert {\uptau }^{n+1/2}_{\upphi }\Vert ^2_{2}+\Vert {\uptau }^{n+1/2}_q\Vert ^2_{2}). \end{aligned}$$
(4.55)

Summing (4.55) over for time steps 1 to m and applying the Gronwall’s inequality and discrete Sobolev inequalities

$$\begin{aligned} \Vert f\Vert ^2_{4}\le C\Vert f\Vert _{2}\Vert f\Vert _{H_h^1}, \Vert f\Vert ^2_{\infty }\le C\Vert f\Vert _{H_h^1}\Vert f\Vert _{H_h^2}, \end{aligned}$$
(4.56)

we arrive at

$$\begin{aligned} \Vert e^{k+1}_{\upphi }\Vert ^2_{H^1_h}+\Vert e^{k+1}_q\Vert ^2_{2}\le C({h}^2+{\Delta t}^2)^2. \end{aligned}$$
(4.57)

The rest of the proof is then similar to (4.27)–(4.30) in the proof of Lemma 4.2. So, we have

$$\begin{aligned} \Vert {{\upphi }}^{n}\Vert _\infty \le C, \quad n=0,1,\ldots ,N. \end{aligned}$$
(4.58)

\(\square \)

Theorem 4.5

For numerical solutions of Scheme 3.5, we have the following fully discrete error estimate for \(0\le n\le N\):

$$\begin{aligned} \Vert e^{n}_{\upphi }\Vert ^2_{H^1_h}+\Vert e^{n}_q\Vert ^2_{2}\le C(h^2+\Delta {t}^2)^2. \end{aligned}$$

Proof

Because \(\Vert {{\upphi }}^{n}\Vert _\infty (n=0,1,\ldots ,N\)) are bounded, the proof is similar to (4.49)–(4.57) in the proof of Lemma 4.6 and is thus omitted. \(\square \)

5 Numerical Results

In this section, we conduct some numerical experiments to show the accuracy and usefulness of the numerical schemes. In the numerical experiments, we use square domain: \(\Omega =[0,1]\times [0,1]\) and model parameter values \({\upeta }=10^4, C_0=10^4\) wherever relevant.

5.1 Mesh Refinement

We first use the initial condition

$$\begin{aligned} {\upphi }(x,y,0)=\frac{1}{2}+\frac{1}{2}cos(4\pi x)cos(4\pi y) \end{aligned}$$

for the mesh refinement test and set the parameter values as \({{\upgamma }}_{1}=0.2, {{\upgamma }}_{2}=10\) and \(M=1\times 10^{-3}\). Since we do not have the exact solution, we use the difference between results on successive coarse and finer grids to evaluate the numerical errors. We output the errors at time \(T=1.0\). The mesh refinement test results are summarized in Table 1, 2, 3, 4 for temporal mesh refinement at fixed \(h=1/256\) and in Table 5 for spatial mesh refinement at fixed \(\Delta t=1.0\times 10^{-4}\). Second order convergence rates are observed in all the tests.

Table 1 Convergence rates in time of Scheme 3.1
Table 2 Convergence rates in time of Scheme 3.2
Table 3 Convergence rates in time of Scheme 3.3
Table 4 Convergence rates in time of Scheme 3.4
Table 5 Convergence rates in space of Scheme 3.5

5.2 Merging Drops

To test the properties of volume-conservation and energy dissipation for the Allen–Cahn equations with nonlocal constraints, we conduct a numerical experiment in which four drops merge into a large one. We set the initial condition as follows

Fig. 1
figure 1

The snapshots of numerical simulations of four drop merging experiments at \(T=0, 0.08, 0.4, 2.4, 3.2, 8\) for a the Allen–Cahn model, b the Allen–Cahn model with a penalizing potential and c the Allen–Cahn model with a Lagrange multiplier using EQ methods, respectively. Clearly, the Allen–Cahn model gives the wrong result in the long time simulation while the modified Allen–Cahn models with nonlocal constraints preserve the volume of the drops and dissipate the total energy as well

Fig. 2
figure 2

The snapshots of numerical simulations of four drop merging at \(T=0, 0.08, 0.4, 2.4, 3.2, 8\) for a the Allen–Cahn model, b the Allen–Cahn model with a penalizing potential and c the Allen–Cahn model with a Lagrange multiplier using SAV methods, respectively. Clearly, the Allen–Cahn model gives the wrong result in long time simulations while the modified Allen–Cahn models with nonlocal constraints preserve the volume of the drops and dissipate the total energy as well

Fig. 3
figure 3

Time evolution of the volume and the free energy of the Allen–Cahn model and the Allen–Cahn models with nonlocal constraints. In short time, the Allen–Cahn models give similar results; whereas in long time, the Allen–Cahn model yields a zero volume and zero free energy while the modified Allen–Cahn models with nonlocal constraints preserve the volume and reaches a nearly steady state with a non-zero free energy. AC-{EQ,SAV} the Allen–Cahn equation discretized using {EQ, SAV} methods. AC-P-{EQ,SAV} the Allen–Cahn equation with a penalizing potential discretized using {EQ,SAV} methods. AC-L-{EQ,SAV} the Allen–Cahn equation with a Lagrange multiplier discretized using {EQ, SAV} methods

$$\begin{aligned} \left\{ \begin{array}{lr} 1,&{} r_1\le 0.2-{\updelta }\quad \text {or}\quad r_2\le 0.2-{\updelta }\quad \text {or}\quad r_3\le 0.2-{\updelta }\quad \text {or}\quad r_4\le 0.2-{\updelta },\\ tanh\left( \frac{0.2+{\updelta }-r_1}{{\updelta }}\right) ,&{} 0.2-{\updelta }<r_1<0.2+{\updelta },\\ tanh\left( \frac{0.2+{\updelta }-r_2}{{\updelta }}\right) ,&{} 0.2-{\updelta }<r_2<0.2+{\updelta },\\ tanh\left( \frac{0.2+{\updelta }-r_3}{{\updelta }}\right) ,&{} 0.2-{\updelta }<r_3<0.2+{\updelta },\\ tanh\left( \frac{0.2+{\updelta }-r_4}{{\updelta }}\right) ,&{} 0.2-{\updelta }<r_4<0.2+{\updelta },\\ 0,&{} \text{ other }, \end{array} \right. \end{aligned}$$

where \({\updelta }=0.01\), \(r_1=\sqrt{(x-0.3+{\updelta })^2+(y-0.3+{\updelta })^2}\), \(r_2=\sqrt{(x-0.7-{\updelta })^2+(y-0.3+{\updelta })^2}\), \(r_3=\sqrt{(x-0.3+{\updelta })^2+(y-0.7-{\updelta })^2}\), \(r_4=\sqrt{(x-0.7-{\updelta })^2+(y-0.7-{\updelta })^2}\).

In this example, we set the parameter values as \({{\upgamma }}_{1}=0.02, {{\upgamma }}_{2}=100\), and \(M=1\). We use \(\Delta t=1.0\times 10^{-4}\) and \(N_x=N_y=256\) in the simulation. The numerical results calculated by the EQ schemes and SAV schemes for the same model are consistent (Figs. 1 and 2). It shows that the classical Allen–Cahn model does not conserve the volume, which leads to disappearance of the drops after sometime (Figs.1, 2a). However, the model with a penalizing potential and the model with a lagrange multiplier conserve the volume pretty well ( Figs. 1b, c,  2b, c,  3b). Concerning energy dissipation, the energy curve of the Allen–Cahn model will decay to zero until the drop disappears (Fig. 3a), whereas the energy curves of both modified models with nonlocal constraints decrease with time until a steady state plateau is reached, which means the four initial droplets have merged into one large droplet with its volume equal to the combined volume of the four small drops (Figs. 1b, c, 2b, c, 3a, b). Both volume conservation and energy dissipation in the schemes are clearly demonstrated by the example.

6 Conclusion

We have developed two pairs of numerical schemes for two Allen–Cahn equations with nonlocal constraints using EQ and SAV methods, respectively. The schemes are shown as unconditionally energy stable and volume-preserving. The linear systems resulting from the schemes are uniquely solvable. We then carry out a series of error estimates for the four semi-discrete numerical schemes and one representative fully discrete scheme, and verify their second-order convergence rates in time and space, respectively. Numerical simulations are conducted to illustrate the accuracy of the proposed numerical schemes and their conservative properties. Under the volume-preserving constraints, both modified Allen–Cahn models with nonlocal constraints preserve the volume pretty well in the numerical experiments. Therefore, the Allen–Cahn models with nonlocal constraints can be used as an effective alternative to the Cahn–Hilliard model when modeling multi-component material systems where phase volume and energy dissipation are important quantities to preserve.