1 Introduction

The phase-field method has been extensively used in fluid [1], material [2, 3], and biological [4, 5] fields in the past twenty years. An important factor of the popularity of the phase-field method lies in the energy-based structure, i.e., most phase-field models can be derived from the free energy functional and the equilibrium state usually corresponds to the minimization of energy functional. This basic property is called the energy dissipation property or the energy stability. The energy dissipation law also provides a criterion to develop the so-called energy stable numerical methods. For phase-field models, the convex splitting approach proposed by Eyre [6] is a practical way. Based on the convex splitting method, Hu et al. [7] developed energy-stable finite difference method for the phase-field crystal (PFC) model. Meanwhile, nonlinear multigrid technique was adopted in their work to accelerate the convergence. Later, Wise et al. [8] performed estimations of energy stability and convergence for the PFC model. Recently, the convex splitting method has been extensively used to construct second-order time-accurate method for the Cahn–Hilliard (CH) equation, please refer to [9, 10] for some details. Different from the convex splitting method, the stabilization approach can be used to construct linear and energy-stable schemes, earlier applications for the Allen–Cahn (AC) and the CH equations can be found in [11]. The stabilization approach generally needs to replace the original non-linear potential with a truncated potential. Pei et al. [12] recently developed linear, second-order time-accurate, and energy-stable method for the PFC equation by using the stabilization approach. The applications of second-order stabilization method for the CH equation can be found in [13]. In recent years, the IEQ approach [14] and the SAV approach [15,16,17] are good choices to construct unconditionally energy stable schemes for the family of phase-field problems.

For a given free energy, one can obtain two systems based on the L2- and H− 1-gradient flow approaches in general. For example, the well-known AC and CH equations are derived from the Ginzburg–Landau free energy with respect to the L2- and H− 1-gradient flows, respectively. In this study, we will focus on the Swift–Hohenberg (SH) and the PFC equations which are obtained from a SH type free energy functional with respect to the L2- and H− 1-gradient flow approaches, respectively.

The PFC model was originally introduced in [18] to study the crystallization. In recent years, many researchers studied the dynamics of this model by using various numerical methods. Wang et al. [19] proposed a convex splitting-based unconditionally stable method to solve the PFC model. Lee et al. [20] numerically investigated the PFC equation by using an operator splitting approach. Shin et al. [21] numerically investigated the PFC model by using a new convex splitting method. Yang and Han [22] first treated the PFC equation by adopting the IEQ method. In their work, second-order time-accurate schemes were developed by using the Crank–Nicolson and second-order backward difference formulas. To strictly preserve the positivity in square root, Liu and Li [23] proposed several modified IEQ methods and analytically performed the error analysis. Wang et al. [24] studied the error analysis of the SAV finite element method for the PFC model. Li and Shen [25] established detailed convergence and error estimations for the PFC model by using the SAV Fourier-spectral method.

The SH model was original proposed by Swift and Hohenberg [26] to study the thermal convection of the Rayleigh–Benard instability. Moreover, this model has been applied for various pattern formations [27,28,29]. From the numerical point of view, Gomez and Nogueira [30] developed a novel time-space discretization for solving the SH equation. Su et al. [31] proposed a spatial fourth-order accurate finite difference method for simulating the SH model. Lee [32] developed second-order time-accurate energy stable scheme for the SH model with cubic non-linearity. Wang and Zhai [33] proposed an efficient solver for the conservative SH model. Based on the IEQ method, Liu and Yin [34] constructed unconditionally energy-stable scheme, where the discontinuous Galerkin (DG) method was adopted to perform spatial discretization. Later, Liu and Yin [35] proposed arbitrarily high-order Runge–Kutta IEQ method for the SH model. Based on the SAV DG method, Liu and Yin [36] studied effective schemes for the SH model and other fourth-order gradient flows.

Although the convex splitting approach, the IEQ approach, and the SAV approach can be used to develop energy stable schemes for the PFC and the SH models, the convex splitting approach will leads to non-linear systems and proper iteration techniques are needed. To avoid solving non-linear systems, the IEQ or the SAV approach may be a good choice. However, there are two shortcomings: (i) Numerical methods based on the IEQ or the SAV approach only dissipate a modified energy rather than an original energy. (ii) The IEQ and the SAV approaches must assume the non-linear term or its integral satisfies the bounded-from-below restriction. It is well known that the PFC and the SH model will cause the negative energy. Especially, the lower bound of the non-linear potential in the SH equation appears more involved due to the parameters [35, 36]. Therefore, the classical IEQ and SAV approaches have to estimate the lower bound properly. To overcome these shortcomings, we develop first- and second-order accurate energy stable schemes for the PFC and the SH models by using a new developed Lagrange multiplier approach. The main merits of the proposed methods are as follows: (i) The time-discretized energy dissipation law is satisfied with respect to an original energy at least for the first-order case; (ii) the non-linear term does not need to satisfy the bounded-from-below restriction; and (iii) the proposed method is simple to implement.

The rest parts are organized as follows. We introduce the original governing equations and their equivalent forms in Section 2. In Section 3, we give the time-discretized schemes and rigorously prove their energy stability. In Section 4, we introduce efficient algorithms to solve the resulting systems in step-by-step way. In Section 5, we numerically validate our schemes. In Section 6, the conclusions are drawn.

2 Governing equations

Before the start of this section, we first define the notations which will be used in this study. Let p = p(x) and q = q(x) be two space-dependent functions, the L2-inner product is defined as \((p,q) = {\int \limits }_{{\varOmega }} (p \cdot q) d\textbf {x}\). The L2-norm of function p is defined as \(\|p\| = \sqrt {(p,p)}\).

2.1 Original PFC equation

Let Ω be the domain and define ϕ = ϕ(x,t) be a space and time-dependent phase-field function and ϕ = 1 or − 1 in two materials. The total free energy of the PFC system introduced in [18] is written to be

$$ \begin{array}{@{}rcl@{}} \mathcal{E}(\phi) = {\int}_{{\varOmega}} \left( F(\phi) + \frac{1}{2}\phi^2 - |\nabla\phi|^2 + \frac{1}{2}({\Delta}\phi)^2 \right)d\textbf{x}, \end{array} $$
(1)

where F(ϕ) = ϕ4/4 − 𝜖ϕ2/2 is the non-linear potential, 𝜖 is a positive constat, ∇ and Δ are the gradient and Laplace operators, respectively. The governing equations of the PFC system can be obtained by taking the variational approach to (1)

$$ \begin{array}{@{}rcl@{}} \phi_t &=& {\Delta} \mu, \end{array} $$
(2)
$$ \begin{array}{@{}rcl@{}} \mu &=& F^{\prime}(\phi) + \phi + 2{\Delta} \phi + {\Delta}\kappa, \end{array} $$
(3)
$$ \begin{array}{@{}rcl@{}} \kappa &=& {\Delta}\phi, \end{array} $$
(4)

where ϕt is the time derivative and \(F^{\prime }(\phi ) = \phi ^{3} - \epsilon \phi \), μ is the chemical potential. On the domain boundary Ω, the proper boundary conditions are

$$ \begin{array}{@{}rcl@{}} (\mathrm{i})~ \text{periodic}, ~~~(\text{ii})~ \partial_{\textbf{n}}\phi = \partial_{\textbf{n}}\mu = \partial_{\textbf{n}}\kappa = 0, \end{array} $$
(5)

where n is the unit normal vector to Ω. By multiplying (2), (3), (4) by μ, − ϕt, Δϕ and taking the integrals, and then combining them together, the following energy dissipation law is obtained

$$ \begin{array}{@{}rcl@{}} \frac{d}{dt}\mathcal{E}(\phi) = -\|\nabla\mu\|^2 \le 0, \end{array} $$
(6)

where the integral by parts and boundary conditions, (5) are used. The inequality (6) indicates that the energy dissipates with the evolution of (2) and (3).

2.2 Equivalent PFC equation

Inspired by a new Lagrange multiplier approach [37], we define a time-dependent variable η = η(t) = 1 and rewrite (2) and (3) to be the equivalent form

$$ \begin{array}{@{}rcl@{}} \phi_t &=& {\Delta} \mu, \end{array} $$
(7)
$$ \begin{array}{@{}rcl@{}} \mu &=& \eta F^{\prime}(\phi) + \phi + 2{\Delta}\phi + {\Delta}\kappa, \end{array} $$
(8)
$$ \begin{array}{@{}rcl@{}} \kappa &=& {\Delta}\phi, \end{array} $$
(9)
$$ \begin{array}{@{}rcl@{}} \frac{d}{dt}{\int}_{{\varOmega}} F(\phi) d\textbf{x} &=& \eta{\int}_{{\varOmega}} F^{\prime}(\phi) \phi_t d\textbf{x}. \end{array} $$
(10)

It can be observed that (7)–(10) and (2)–(4) are equivalent because η = 1 in a time-continuous version. By multiplying (7), (8), (9) by μ, − ϕt, Δϕ and taking the integrals, and then using (10), the original energy dissipation law (6) can be easily obtained. Based on (7)–(10), we will develop temporally first- and second-order accurate methods for the PFC equation in Sections 3.1 and 3.2, respectively.

2.3 Original SH equation

Let ψ = ψ(x,t) be a space and time-dependent phase-field function and ψ = 1 or − 1 in two materials. The total free energy of the SH model with quadratic-cubic non-linearity [26, 32] is as follows

$$ \begin{array}{@{}rcl@{}} \mathcal{F}(\psi) = {\int}_{{\varOmega}} \left( G(\psi) + \frac{1}{2}\psi^2 - |\nabla\psi|^2 + \frac{1}{2}({\Delta}\psi)^2 \right)d\textbf{x}, \end{array} $$
(11)

where G(ψ) = ψ4/4 − gψ3/3 − 𝜖ψ2/2; g and 𝜖 are non-negative constants. The governing equation of the SH system with quadratic-cubic non-linearity is

$$ \begin{array}{@{}rcl@{}} \psi_t &=& -G^{\prime}(\psi) - \psi - 2{\Delta}\psi - {\Delta}\nu, \end{array} $$
(12)
$$ \begin{array}{@{}rcl@{}} \nu &=& {\Delta}\psi, \end{array} $$
(13)

where \(G^{\prime }(\psi ) = \psi ^{3} - g\psi ^{2} - \epsilon \psi \). On the domain boundary Ω, the following boundary conditions are considered

$$ \begin{array}{@{}rcl@{}} (\mathrm{i})~ \text{periodic}, ~~~(\text{ii})~ \partial_{\textbf{n}}\psi = \partial_{\textbf{n}}\nu = 0. \end{array} $$
(14)

By multiplying (12), (13) by − ψt, Δψ and taking the integral, we have

$$ \begin{array}{@{}rcl@{}} \frac{d}{dt}\mathcal{F}(\psi) = -{\int}_{{\varOmega}} (\psi_t)^2 d\textbf{x} \le 0, \end{array} $$
(15)

where the integral by parts and boundary conditions, (14) are used. The above inequality indicates that the energy is non-increasing with the evolution.

2.4 Equivalent SH equation

Here, we define another time-dependent variable r = r(t) = 1 and rewrite (12) as

$$ \begin{array}{@{}rcl@{}} \psi_t &=& -r G^{\prime}(\psi) - \psi - 2{\Delta}\psi - {\Delta}\nu, \end{array} $$
(16)
$$ \begin{array}{@{}rcl@{}} \nu &=& {\Delta}\psi, \end{array} $$
(17)
$$ \begin{array}{@{}rcl@{}} \frac{d}{dt}{\int}_{{\varOmega}} G(\psi) d\textbf{x} &=& r{\int}_{{\varOmega}} G^{\prime}(\psi)\psi_t d\textbf{x}. \end{array} $$
(18)

It is obvious that (16)–(18) and (12)–(13) are equivalent. By multiplying (16), (17) by − ψt, Δψ and taking the integral, and then using (18), the original energy dissipation law (15) is satisfied. Based on (16) and (18), the time-dsicretized schemes will be established in Sections 3.3 and 3.4.

3 Numerical schemes and energy stability

Before the beginning of this section, we define the time step to be δt = T/N, where T is the final time and N is the number of time iteration.

3.1 First-order time-accurate scheme for the PFC model

For the equivalent PFC model (7)–(10), the temporally first-order accurate method based on the backward Euler formula is

$$ \begin{array}{@{}rcl@{}} \frac{\phi^{n+1}-\phi^n}{\delta t} &=& {\Delta}\mu^{n+1}, \end{array} $$
(19)
$$ \begin{array}{@{}rcl@{}} \mu^{n+1} &=& \eta^{n+1} F^{\prime}(\phi^n) + \phi^{n+1} + 2{\Delta}\phi^n + {\Delta} \kappa^{n+1}, \end{array} $$
(20)
$$ \begin{array}{@{}rcl@{}} \kappa^{n+1} &=& {\Delta} \phi^{n+1}, \end{array} $$
(21)
$$ \begin{array}{@{}rcl@{}} \frac{(F(\phi^{n+1})-F(\phi^n),\textbf{1})}{\delta t} &=& \eta^{n+1}\left( F^{\prime}(\phi^n),\frac{\phi^{n+1}-\phi^n}{\delta t}\right),\end{array} $$
(22)

where 1 is the vector with all entries equal to 1. Here, ϕn is the approximation of ϕ(⋅,t) at t = nδt. We use the periodic or the following zero Neumann boundary conditions

$$ \begin{array}{@{}rcl@{}} \partial_{\textbf{n}}\phi^{n+1} = \partial_{\textbf{n}}\mu^{n+1} = \partial_{\textbf{n}}\kappa^{n+1} = 0. \end{array} $$

Theorem 3.1

The numerical solutions of (19)–(22) dissipate the following time-discretized version of the original energy functional, (1):

$$ \begin{array}{@{}rcl@{}} \mathcal{E}^{1,d}(\phi^n) = (F(\phi^n),\textbf{1}) + \frac{1}{2}\|\phi^n\|^2 - \|\nabla\phi^{n}\|^2 + \frac{1}{2}\|{\Delta}\phi^n\|^2. \end{array} $$
(23)

Proof

To verify the time-discretized energy dissipation law with respect to \(\mathcal {E}^{1,d}(\phi ^{n})\), we first multiply (19) by δtμn+ 1 and take the integral, we have

$$ \begin{array}{@{}rcl@{}} (\phi^{n+1}-\phi^n,\mu^{n+1}) = -\delta t\|\nabla\mu^{n+1}\|^2. \end{array} $$
(24)

By multiplying (20) by − (ϕn+ 1ϕn) and taking the integral, and in view of the following equalities

$$ \begin{array}{@{}rcl@{}} 2(p-q,p) = |p|^2 - |q|^2 + |p-q|^2, ~~~~2(p-q,q) = |p|^2 - |q|^2 - |p-q|^2, \end{array} $$

we have

$$ \begin{array}{@{}rcl@{}} -(\phi^{n+1}-\phi^n,\mu^{n+1}) &=& -(\eta^{n+1}F^{\prime}(\phi^n),\phi^{n+1}-\phi^n)\\ &-&\frac{1}{2}(\|\phi^{n+1}\|^2-\|\phi^n\|^2+\|\phi^{n+1}-\phi^n\|^2)\\ &-& (\|\nabla\phi^n\|^2-\|\nabla\phi^{n+1}\|^2+\|\nabla\phi^n-\nabla\phi^{n+1}\|^2) \\ &-& ({\Delta} \kappa^{n+1},\phi^{n+1}-\phi^n). \end{array} $$
(25)

By multiplying (21) by Δ(ϕn+ 1ϕn) and taking the integral, we have

$$ \begin{array}{@{}rcl@{}} (\kappa^{n+1},{\Delta}(\phi^{n+1}-\phi^n)) &=& ({\Delta}\kappa^{n+1},\phi^{n+1}-\phi^n) \\ &=& \frac{1}{2}(\|{\Delta}\phi^{n+1}\|^2 - \|{\Delta}\phi^n\|^2 + \|{\Delta}\phi^{n+1}-{\Delta}\phi^n\|^2). \end{array} $$
(26)

By combining (24)–(26) together and using (22), we obtain

$$ \begin{array}{@{}rcl@{}} &&(F(\phi^{n+1})-F(\phi^n),\textbf{1}) + \frac{1}{2}(\|\phi^{n+1}\|^2-\|\phi^n\|^2) - \|\nabla\phi^{n+1}\|^2 + \|\nabla\phi^n\|^2\\ &&+ \frac{1}{2}\|{\Delta}\phi^{n+1}\|^2 - \frac{1}{2}\|{\Delta}\phi^n\|^2 = -\delta t\|\nabla\mu^{n+1}\|^2 - \frac{1}{2}\|\phi^{n+1}-\phi^n\|^2\\ &&-\|\nabla\phi^n-\nabla\phi^{n+1}\|^2 - \frac{1}{2}\|{\Delta}\phi^{n+1}-{\Delta}\phi^n\|^2 \le 0. \end{array} $$
(27)

which indicates (19)–(22) dissipates the original energy functional in time-discretized version. □

3.2 Second-order time-accurate scheme for the PFC model

For the equivalent PFC model (7)–(10), the temporally second-order accurate method based on the BDF2 formula is

$$ \begin{array}{@{}rcl@{}} &&\frac{3\phi^{n+1}-4\phi^n+\phi^{n-1}}{2\delta t} = {\Delta}\mu^{n+1}, \end{array} $$
(28)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1} = \eta^{n+1}F^{\prime}(\phi^{*}) + \phi^{n+1} + 2(2{\Delta}\phi^n-{\Delta}\phi^{n-1}) + {\Delta}\kappa^{n+1}, \end{array} $$
(29)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1} = {\Delta}\phi^{n+1}, \end{array} $$
(30)
$$ \begin{array}{@{}rcl@{}} &&\frac{(3F(\phi^{n+1})-4F(\phi^n)+F(\phi^{n-1}),\textbf{1})}{2\delta t} = \\ &&~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\eta^{n+1}\left( F^{\prime}(\phi^{*}),\frac{3\phi^{n+1}-4\phi^n+\phi^{n-1}}{2\delta t} \right),\end{array} $$
(31)

where ϕ = 2ϕnϕn− 1 is the extrapolation from the information at n th and (n − 1)th time levels. By using the periodic or homogeneous Neumann boundary condition for ϕn+ 1, μn+ 1, and κn+ 1 on Ω.

Theorem 3.2

. The numerical solutions of (28)–(31) dissipate the following time-discretized pseudo-energy functional:

$$ \begin{array}{@{}rcl@{}} \mathcal{E}^{2,d}(\phi^n,\phi^{n-1}) &=& \frac{1}{2}(3F(\phi^{n})-F(\phi^{n-1}),\textbf{1}) + \frac{1}{4}(\|\phi^{n}\|^2+\|2\phi^{n}-\phi^{n-1}\|^2)\\ &&-\frac{1}{2}(\|\nabla\phi^n\|^2+\|2\nabla\phi^n-\nabla\phi^{n-1}\|^2-2\|\nabla\phi^n-\nabla\phi^{n-1}\|^2) \\ && +\frac{1}{4}(\|{\Delta}\phi^n\|^2 + \|2{\Delta}\phi^n-{\Delta}\phi^{n-1}\|^2). \end{array} $$
(32)

Proof

To verify the time-discretized energy dissipation law with respect to \(\mathcal {E}^{2,d}(\phi ^{n},\phi ^{n-1})\), we multiply (28) by 2δtμn+ 1 and take the integral, we get

$$ \begin{array}{@{}rcl@{}} (3\phi^{n+1}-4\phi^n+\phi^{n-1},\mu^{n+1}) = -2\delta t\|\nabla\mu^{n+1}\|^2. \end{array} $$
(33)

By multiplying (29) by − (3ϕn+ 1 − 4ϕn + ϕn− 1) and taking the integral, and in view of the following equalities

$$ \begin{array}{@{}rcl@{}} 2(3p-4q+l,p) &=& |p|^2-|q|^2+|2p-q|^2-|2q-l|^2+|p-2q+l|^2,\\ 2(3p-4q+l,2q-l) &=& (|p|^2+|2p-q|^2-2|p-q|^2)-(|q|^2+|2q-l|^2\\ &&-2|q-l|^2) - 3|p-2q+l|^2, \end{array} $$

we have

$$ \begin{array}{@{}rcl@{}} -(3\phi^{n+1}-4\phi^n+\phi^{n-1},\mu^{n+1}) &=& -(\eta^{n+1}F^{\prime}(\phi^{*}),3\phi^{n+1}-4\phi^n+\phi^{n-1})\\ &-&\frac{1}{2}(\|\phi^{n+1}\|^2-\|\phi^n\|^2+\|2\phi^{n+1}-\phi^n\|^2\\ &-&\|2\phi^n-\phi^{n-1}\|^2+\|\phi^{n+1}-2\phi^n+\phi^{n-1}\|^2)\\ &+& (\|\nabla\phi^{n+1}\|^2+\|2\nabla\phi^{n+1}-\nabla\phi^n\|^2 \end{array} $$
$$ \begin{array}{@{}rcl@{}} &-&2\|\nabla\phi^{n+1}-\nabla\phi^n\|^2)-(\|\nabla\phi^n\|^2\\ \phantom{-(3\phi^{n+1}-4\phi^n+\phi^{n-1},\mu^{n+1})}&+&\|2\nabla\phi^n-\nabla\phi^{n-1}\|^2-2\|\nabla\phi^n-\nabla\phi^{n-1}\|^2)\\ &-&3\|\nabla\phi^{n+1}-2\nabla\phi^n+\nabla\phi^{n-1}\|^2 \\ &-& ({\Delta}\kappa^{n+1},3\phi^{n+1}-4\phi^n+\phi^{n-1}).\end{array} $$
(34)

By multiplying (30) by Δ(3ϕn+ 1 − 4ϕn + ϕn− 1) and taking the integral, we get

$$ \begin{array}{@{}rcl@{}} (\kappa^{n+1},{\Delta}(3\phi^{n+1}-4\phi^n+\phi^{n-1})) &=& ({\Delta}\kappa^{n+1},3\phi^{n+1}-4\phi^n+\phi^{n-1})\\ &=& \frac{1}{2}(\|{\Delta}\phi^{n+1}\|^2-\|{\Delta}\phi^n\|^2\\ &+&\|2{\Delta}\phi^{n+1}-{\Delta}\phi^n\|^2 - \|2{\Delta}\phi^n-{\Delta}\phi^{n-1}\|^2 \\ &+& \|{\Delta}\phi^{n+1}-2{\Delta}\phi^n+{\Delta}\phi^{n-1}\|^2). \end{array} $$
(35)

By combining (33)–(35) together and using (31), we obtain the desired inequality as follows

$$ \begin{array}{@{}rcl@{}} &&\frac{1}{2}(3F(\phi^{n+1})-F(\phi^{n-1}),\textbf{1}) - \frac{1}{2}(3F(\phi^n)-F(\phi^{n-1}),\textbf{1})\\ &&+\frac{1}{4}(\|\phi^{n+1}\|^2+\|2\phi^{n+1}-\phi^n\|^2-\|\phi^n\|^2-\|2\phi^n-\phi^{n-1}\|^2)\\ &&-\frac{1}{2}(\|\nabla\phi^{n+1}\|^2+\|2\nabla\phi^{n+1}-\nabla\phi^n\|^2-2\|\nabla\phi^{n+1}-\nabla\phi^n\|^2)\\ &&+ \frac{1}{2}(\|\nabla\phi^{n}\|^2+\|2\nabla\phi^{n}-\nabla\phi^{n-1}\|^2-2\|\nabla\phi^{n}-\nabla\phi^{n-1}\|^2)\\ &&-\frac{1}{4}(\|{\Delta}\phi^{n+1}\|^2+\|2{\Delta}\phi^{n+1}-{\Delta}\phi^n\|^2-\|{\Delta}\phi^n\|^2-\|2{\Delta}\phi^n-{\Delta}\phi^{n-1}\|^2)\\ &&= -\delta t\|\nabla\mu^{n+1}\|^2-\frac{1}{4}\|\phi^{n+1}-2\phi^n+\phi^{n-1}\|^2 -\frac{3}{2}\|\nabla\phi^{n+1}-2\nabla\phi^n+\nabla\phi^{n-1}\|^2 \\ &&-\frac{1}{4}\|{\Delta}\phi^{n+1}-2{\Delta}\phi^n+{\Delta}\phi^{n-1}\|^2\le0,\end{array} $$
(36)

3.3 First-order time-accurate scheme for the SH model

For the equivalent SH model (16)–(18), the temporally first-order accurate method based on the backward Euler formula is

$$ \begin{array}{@{}rcl@{}} &&\frac{\psi^{n+1}-\psi^n}{\delta t} = -r^{n+1}G^{\prime}(\psi^n)-\psi^{n+1}-2{\Delta}\psi^n - {\Delta} \nu^{n+1}, \end{array} $$
(37)
$$ \begin{array}{@{}rcl@{}} &&\nu^{n+1} = {\Delta} \phi^{n+1}, \end{array} $$
(38)
$$ \begin{array}{@{}rcl@{}} &&\frac{(G(\psi^{n+1})-G(\psi^n),\textbf{1})}{\delta t} = r^{n+1}\left( F^{\prime}(\phi^n),\frac{\psi^{n+1}-\psi^n}{\delta t}\right).\end{array} $$
(39)

We use the periodic or the following zero Neumann boundary conditions

$$ \begin{array}{@{}rcl@{}} \partial_{\textbf{n}}\psi^{n+1} = \partial_{\textbf{n}}\nu^{n+1} = 0.\end{array} $$

Theorem 3.3

The numerical solutions of (37)–(39) dissipate the following time-discretized version of the original energy functional, (11):

$$ \begin{array}{@{}rcl@{}} \mathcal{F}^{1,d}(\psi^n) = (G(\psi^n),\textbf{1}) + \frac{1}{2}\|\psi^n\|^2-\|\nabla\psi^{n}\|^2 + \frac{1}{2}\|{\Delta}\psi^n\|^2. \end{array} $$
(40)

Proof

To verify the time-discretized energy dissipation law with respect to \(\mathcal {F}^{1,d}\) (ψn), we multiply (37) by − (ψn+ 1ψn) and take the integral, we get

$$ \begin{array}{@{}rcl@{}} &&(r^{n+1}G(\psi^n),\psi^{n+1}-\psi^n) + \frac{1}{2}(\|\psi^{n+1}\|^2-\|\psi^n\|^2+\|\psi^{n+1}-\psi^n\|^2)\\ &&+(\|\nabla\psi^n\|^2-\|\nabla\psi^{n+1}\|^2+\|\nabla\psi^n-\nabla\psi^{n+1}\|^2) + ({\Delta}\nu^{n+1},\psi^{n+1}-\psi^n)\\ &&= -\frac{1}{\delta t}\|\psi^{n+1}-\psi^n\|^2. \end{array} $$
(41)

By multiplying (38) by Δ(ψn+ 1ψn) and taking the integral, we have

$$ \begin{array}{@{}rcl@{}} (\nu^{n+1},{\Delta}(\psi^{n+1}-\psi^n)) &=& ({\Delta}\nu^{n+1},\psi^{n+1}-\psi^n) = \frac{1}{2}(\|{\Delta}\phi^{n+1}\|^2 \\ &-&\|{\Delta}\psi^n\|^2+\|{\Delta}\psi^{n+1}-{\Delta}\psi^n\|^2).\end{array} $$
(42)

By combining (41)–(42) and using (39), we obtain the following energy inequality

$$ \begin{array}{@{}rcl@{}} &&(G(\psi^{n+1})-G(\psi^n),\textbf{1}) + \frac{1}{2}(\|\psi^{n+1}\|^2-\|\psi^n\|^2) +(\|\nabla\psi^n\|^2-\|\nabla\psi^{n+1}\|^2) \\ &&+ \frac{1}{2}(\|{\Delta}\psi^{n+1}\|^2-\|{\Delta}\psi^n\|^2) = -\frac{1}{\delta t}\|\psi^{n+1}-\psi^n\|^2 - \frac{1}{2}\|\psi^{n+1}-\psi^n\|^2\\ &&-\|\nabla\psi^{n}-\nabla\psi^{n+1}\|^2 - \frac{1}{2}\|{\Delta}\psi^{n+1}-{\Delta}\psi^n\|^2 \le 0. \end{array} $$
(43)

3.4 Second-order time-accurate method for the SH model

For the equivalent SH model (16)–(18), the temporally second-order accurate method based on the BDF2 formula is

$$ \begin{array}{@{}rcl@{}} &&\frac{3\psi^{n+1}-4\psi^n+\psi^{n-1}}{2\delta t} = -r^{n+1}G^{\prime}(\psi^{*})-\psi^{n+1}-2(2{\Delta}\psi^n-{\Delta}\psi^{n-1})\\ &&~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-{\Delta}\nu^{n+1}, \end{array} $$
(44)
$$ \begin{array}{@{}rcl@{}} &&\nu^{n+1} = {\Delta}\psi^{n+1}, \end{array} $$
(45)
$$ \begin{array}{@{}rcl@{}} &&\frac{(3G(\psi^{n+1})-4G(\psi^n)+G(\psi^{n-1}),\textbf{1})}{2\delta t} = \\ &&~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~r^{n+1}\left( G^{\prime}(\psi^{*}),\frac{3\psi^{n+1}-4\psi^n+\psi^{n-1}}{2\delta t}\right),\end{array} $$
(46)

where ψ = 2ψnψn− 1. By using the periodic or homogeneous Neumann boundary condition for ψn+ 1 and νn+ 1 on Ω.

Theorem 3.4

. The numerical solutions of (44)–(46) dissipate the following time-discretized pseudo-energy functional:

$$ \begin{array}{@{}rcl@{}} \mathcal{F}^{2,d}(\psi^n,\psi^{n-1}) &=& \frac{1}{2}(3G(\psi^{n})-G(\psi^{n-1}),\textbf{1})+\frac{1}{4}(\|\psi^{n}\|^2+\|2\psi^n-\psi^{n-1}\|^2)\\ &-&\frac{1}{2}(\|\nabla\psi^n\|^2+\|2\nabla\psi^n-\nabla\psi^{n-1}\|^2-2\|\nabla\psi^n-\nabla\psi^{n-1}\|^2)\\ &+& \frac{1}{4}(\|{\Delta}\psi^{n}\|^2+\|2{\Delta}\psi^{n}-{\Delta}\psi^{n-1}\|^2). \end{array} $$
(47)

Proof

To verify the time-discretized energy dissipation law with respect to \(\mathcal {F}^{2,d}(\psi ^{n},\) ψn− 1), we multiply (44) by − (3ψn+ 1 − 4ψn + ψn− 1) and take the integral, we have

$$ \begin{array}{@{}rcl@{}} &&(r^{n+1}G^{\prime}(\psi^{*}),3\psi^{n+1} - 4\psi^n+\psi^{n-1}) + \frac{1}{2}(\|\psi^{n+1}\|^2-\|\psi^n\|^2 +\|2\psi^{n+1}-\psi^n\|^2 \\ &&-\|2\psi^n - \psi^{n-1}\|^2 + \|\psi^{n+1} - 2\psi^n + \psi^{n-1}\|^2) - (\|\nabla\psi^{n+1}\|^2+\|2\nabla\psi^{n+1} - \nabla\psi^n\|^2\\ &&-2\|\nabla\psi^{n+1} - \nabla\psi^n\|^2) + (\|\nabla\psi^n\|^2 + \|2\nabla\psi^n - \nabla\psi^{n-1}\|^2 - 2\|\nabla\psi^n - \nabla\psi^{n-1}\|^2) \\ &&+ 3\|\nabla\psi^{n+1} -2\nabla\psi^n+\nabla\psi^{n-1}\|^2 + ({\Delta}\nu^{n+1},3\psi^{n+1}-4\psi^n+\psi^{n-1}) \\ &&= -\frac{1}{2\delta t}\|3\psi^{n+1}-4\psi^n+\psi^{n-1}\|^2.\end{array} $$
(48)

By multiplying (45) by Δ(3ψn+ 1 − 4ψn + ψn− 1) and taking the integral, we have

$$ \begin{array}{@{}rcl@{}} (\nu^{n+1},{\Delta}(3\psi^{n+1}-4\psi^n+\psi^{n-1})) &=& ({\Delta}\nu^{n+1},3\psi^{n+1}-4\psi^n+\psi^{n-1})\\ &=& \frac{1}{2}(\|{\Delta}\psi^{n+1}\|^2 -\|{\Delta}\psi^n\|^2\\ &+& \|2{\Delta}\psi^{n+1}-{\Delta}\psi^n\|^2 -\|2{\Delta}\psi^n-{\Delta}\psi^{n-1}\|^2\\ &+&\|{\Delta}\psi^{n+1}-2{\Delta}\psi^n+{\Delta}\psi^{n-1}\|^2). \end{array} $$
(49)

By combining (48)–(49) and using (46), we obtain the following energy inequality

$$ \begin{array}{@{}rcl@{}} &&\frac{1}{2}(3G(\psi^{n+1})-G(\psi^{n}),\textbf{1}) - \frac{1}{2}(3G(\psi^{n})-G(\psi^{n-1}),\textbf{1})\\ &&+\frac{1}{4}(\|\psi^{n+1}\|^2+\|2\psi^{n+1}-\psi^n\|^2-\|\psi^n\|^2-\|2\psi^n-\psi^{n-1}\|^2)\\ &&-\frac{1}{2}(\|\nabla\psi^{n+1}\|^2+\|2\nabla\psi^{n+1}-\nabla\psi^n\|^2-2\|\nabla\psi^{n+1}-\nabla\psi^n\|^2)\\ &&+\frac{1}{2}(\|\nabla\psi^n\|^2+\|2\nabla\psi^n-\nabla\psi^{n-1}\|^2-2\|\nabla\psi^n-\nabla\psi^{n-1}\|^2)\\ &&+\frac{1}{4}(\|{\Delta}\psi^{n+1}\|^2+\|2{\Delta}\psi^{n+1}-{\Delta}\psi^n\|^2-\|{\Delta}\psi^n\|^2-\|2{\Delta}\psi^n-{\Delta}\psi^{n-1}\|^2)\\ &&= -\frac{1}{4\delta t}\|3\psi^{n+1}-4\psi^n+\psi^{n-1}\|^2-\frac{1}{4}\|\psi^{n+1}-2\psi^n+\psi^{n-1}\|^2\\ &&-\frac{3}{2}\|\nabla\psi^{n+1}-2\nabla\psi^n+\nabla\psi^{n-1}\|^2 -\frac{1}{4}\|{\Delta}\psi^{n+1}-2{\Delta}\psi^n+{\Delta}\psi^{n-1}\|^2 \le 0. ~~~~~~~~\end{array} $$
(50)

Remark 1

Comparing with the well-known IEQ or SAV approach, it can be observed that the first-order accurate methods based on the Lagrange multiplier approach derive the energy inequalities with respect to the original energy in time-discretized version. Moreover, the auxiliary variables η and r are equal to 1 in time-continuous version; thus, we do not require any bounded-from-below restriction. Although the error analysis of this new Lagrange multiplier approach is still difficult [37], the results in Section 5 indicate that the proposed schemes have desired accuracy and stability. The detailed convergence and error estimations will be further studied in a separate work. In (20), (29), (37), and (44), we treat Δϕ and Δψ explicitly and this treatment allows us to easily perform the estimations of energy stability. Similar treatments can be found in [22] for the PFC model and [32] for the SH model. We admit that the energy stability can not preserve the convergence and accuracy. Therefore, a relatively small time step is still necessary to obtain accurate numerical solutions.

4 Efficient numerical algorithms

We notice that all schemes in Section 3 are weakly coupled, i.e., the auxiliary variable and phase-field function are coupled in time. To solve those weakly coupled systems, we propose efficient algorithms in this section. In the following parts, we only take the first-order accurate schemes, (19)–(22) and (37)–(39) as examples because the implementations for the second-order schemes are straightforward.

4.1 Numerical algorithm for the PFC model

For the PFC system, we split ϕn+ 1, μn+ 1, and κn+ 1 into the following linear combination

$$ \begin{array}{@{}rcl@{}} \{\phi^{n+1},\mu^{n+1},\kappa^{n+1}\} = \{\phi^{n+1}_1,\mu^{n+1}_1,\kappa^{n+1}_1\} + \eta^{n+1}\{\phi^{n+1}_2,\mu^{n+1}_2,\kappa^{n+1}_2\}, \end{array} $$
(51)

where \(\phi ^{n+1}_{1}\) and \(\phi ^{n+1}_{2}\), \(\mu ^{n+1}_{1}\) and \(\mu ^{n+1}_{2}\), \(\kappa ^{n+1}_{1}\) and \(\kappa ^{n+1}_{2}\) are independent with each other. Thus, (19)–(22) can be expressed to be

$$ \begin{array}{@{}rcl@{}} &&\frac{\phi^{n+1}_1+\eta^{n+1}\phi^{n+1}_2-\phi^n}{\delta t} = {\Delta}(\mu^{n+1}_1+\eta^{n+1}\mu^{n+1}_2), \end{array} $$
(52)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1}_1+\eta^{n+1}\mu^{n+1}_2 = \eta^{n+1}F^{\prime}(\phi^n) + (\phi^{n+1}_1+\eta^{n+1}\phi^{n+1}_2) + 2{\Delta}\phi^n\\ &&~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{\Delta}(\kappa^{n+1}_1+\eta^{n+1}\kappa^{n+1}_2), \end{array} $$
(53)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1}_1+\eta^{n+1}\kappa^{n+1}_2 = {\Delta}(\phi^{n+1}_1+\eta^{n+1}\phi^{n+1}_2), \end{array} $$
(54)
$$ \begin{array}{@{}rcl@{}} &&(F(\phi^{n+1})-F(\phi^n),\textbf{1}) = \eta^{n+1}(F^{\prime}(\phi^n),\phi^{n+1}-\phi^n). \end{array} $$
(55)

Then, the computation of ϕn+ 1 and ηn+ 1 in one time iteration can be split into the following four steps

Step 1-1.:

Update \(\phi ^{n+1}_{1}\) by solving the following linear system with constant coefficients

$$ \begin{array}{@{}rcl@{}} &&\frac{\phi^{n+1}_1-\phi^n}{\delta t} = {\Delta}\mu^{n+1}_1, \end{array} $$
(56)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1}_1 = \phi^{n+1}_1 + 2{\Delta}\phi^n + {\Delta}\kappa^{n+1}_1, \end{array} $$
(57)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1}_1 = {\Delta}\phi^{n+1}_1. \end{array} $$
(58)
Step 1-2.:

Update \(\phi ^{n+1}_{2}\) by solving the following linear system with constant coefficients

$$ \begin{array}{@{}rcl@{}} &&\frac{\phi^{n+1}_2}{\delta t} = {\Delta} \mu^{n+1}_2, \end{array} $$
(59)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1}_2 = F^{\prime}(\phi^n) + \phi^{n+1}_2 + {\Delta}\kappa^{n+1}_2, \end{array} $$
(60)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1}_2 = {\Delta}\phi^{n+1}_2. \end{array} $$
(61)
Step 1-3.:

With the computed \(\phi ^{n+1}_{1}\) and \(\phi ^{n+1}_{2}\), ηn+ 1 is updated by solving the following non-linear algebraic equation with respect to ηn+ 1

$$ \begin{array}{@{}rcl@{}} (F(\phi^{n+1}_1 + \eta^{n+1}\phi^{n+1}_2) - F(\phi^n),\textbf{1}) = \eta^{n+1}(F^{\prime}(\phi^n),\phi^{n+1}_1 + \eta^{n+1}\phi^{n+1}_2 - \phi^n). \end{array} $$
(62)
Step 1-4.:

Update ϕn+ 1 by (51).

4.2 Numerical algorithm for the SH model

For the SH system, we split ψn+ 1 and νn+ 1 into the following linear combination

$$ \begin{array}{@{}rcl@{}} \{\psi^{n+1},\nu^{n+1}\} = \{\psi^{n+1}_1,\nu^{n+1}_1\} + r^{n+1}\{\psi^{n+1}_2,\nu^{n+1}_2\}.\end{array} $$
(63)

where \(\psi ^{n+1}_{1}\) and \(\psi ^{n+1}_{2}\), \(\nu ^{n+1}_{1}\) and \(\nu ^{n+1}_{2}\) are independent with each other. Thus, (37)–(39) can be expressed to be

$$ \begin{array}{@{}rcl@{}} &&\frac{\psi^{n+1}_1+r^{n+1}\psi^{n+1}_2-\psi^n}{\delta t} = -r^{n+1}G^{\prime}(\psi^n) - (\psi^{n+1}_1+r^{n+1}\psi^{n+1}_2)-2{\Delta}\psi^n\\ &&~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-{\Delta}(\nu^{n+1}_1+r^{n+1}\nu^{n+1}_2), \end{array} $$
(64)
$$ \begin{array}{@{}rcl@{}} &&\nu^{n+1}_1+r^{n+1}\nu^{n+1}_2 = {\Delta}(\psi^{n+1}_1+r^{n+1}\psi^{n+1}_2), \end{array} $$
(65)
$$ \begin{array}{@{}rcl@{}} &&(G(\psi^{n+1})-G(\psi^n),\textbf{1}) = r^{n+1}(G^{\prime}(\psi^n),\psi^{n+1}-\psi^n).\end{array} $$
(66)

Then, the computation of ψn+ 1 and rn+ 1 in one time iteration can be split into the following four steps

Step 2-1.:

Update \(\psi ^{n+1}_{1}\) by solving the following linear system with constant coefficients

$$ \begin{array}{@{}rcl@{}} &&\frac{\psi^{n+1}_1-\psi^n}{\delta t} = -\psi^{n+1}_1 - 2{\Delta}\psi^n - {\Delta}\nu^{n+1}_1, \end{array} $$
(67)
$$ \begin{array}{@{}rcl@{}} &&\nu^{n+1}_1 = {\Delta}\psi^{n+1}_1. \end{array} $$
(68)
Step 2-2.:

Update \(\psi ^{n+1}_{2}\) by solving the following linear system with constant coefficients

$$ \begin{array}{@{}rcl@{}} &&\frac{\psi^{n+1}_2}{\delta t} = -G^{\prime}(\psi^n) - \psi^{n+1}_2 - {\Delta}\nu^{n+1}_2, \end{array} $$
(69)
$$ \begin{array}{@{}rcl@{}} &&\nu^{n+1}_2 = {\Delta}\psi^{n+1}_2. \end{array} $$
(70)
Step 2-3.:

With the computed \(\psi ^{n+1}_{1}\) and \(\psi ^{n+1}_{2}\), rn+ 1 is updated by solving the following non-linear algebraic equation with respect to rn+ 1

$$ \begin{array}{@{}rcl@{}} \!\!\!\!\!\!\!\!\!\!(G(\psi^{n+1}_1 + r^{n+1}\psi^{n+1}_2) - G(\psi^n),\textbf{1}) = r^{n+1}(G^{\prime}(\psi^n),\psi^{n+1}_1 + r^{n+1}\psi^{n+1}_2 - \psi^n). \end{array} $$
(71)
Step 2-4.:

Update ψn+ 1 by (63).

Remark 2

Thanks to the efficient algorithms in this section, the weakly coupled systems can be solved in a fully decoupled manner. We can observe that only four linear systems need to be calculated by using any fast and accurate numerical methods. In this work, the fast Fourier transform (FFT) is adopted to solve the linear equations. In each time cycle, we actually do not need any iterative algorithms. The unique solvability of these linear systems can be easily proved by using the Lax–Milgram theorem. Please refer to [15, 17] for the similar processes. For two non-linear algebraic equations with respect to ηn+ 1 and rn+ 1, Newton’s iteration is a proper choice because the exact solutions of η and r are 1; thus, Newton’s iteration quickly converges in general if we use 1 as initial assumption. It is well known that the traditional convex splitting method needs to iteratively compute the PDE until the error is less than a given tolerance. Comparing with the iterative calculation of non-linear PDE, the computational cost of Newton’s iteration for non-linear algebraic equations can be neglected. We note that the unique solvability of η and r is still an open problem, Cheng et al. [37] also reported this for other phase-field models, such as the AC, the CH, and the block copolymer equations. We will further consider this in our future work. In Section 5, we plot the evolutions of η and r with respect to each simulation, the numerical results show that the values of η and r are always close to the desired value 1.

5 Numerical validations

In this section, 2D and 3D simulations are done to validate the proposed numerical schemes. Without specific needs, we use the periodic boundary condition and the Fourier spectral method [32, 38, 39] is used to discretize the equations in space.

5.1 Accuracy test

First of all, we will test the temporal accuracy of the proposed schemes, the first-order accurate method, denoted by Euler, the second-order accurate method, denoted by BDF2. For the PFC and the SH models, the initial states are

$$ \begin{array}{@{}rcl@{}} \phi(x,y,0) = \psi(x,y,0) = \sin\left( \frac{\pi x}{8}\right)\cos\left( \frac{\pi y}{8}\right),\end{array} $$
(72)

in the domain Ω = [0,L]2 and L = 32. The 257 Fourier modes and the parameters 𝜖 = 0.25 and g = 1 are used. A finer time step δtr = 0.1h2 ≈ 1.5625e-4 is used to obtain the reference solution. Here, h = L/256 is the space step. The increasingly coarser time steps δt = 80δtr, 160δtr, 320δtr, and 640δtr are considered. In Table 1, we list the L2-errors and convergence rates for the PFC model at t = 0.2. The results obtained for the SH model are illustrated in Table 2. For the PFC and the SH models, it is clear that the proposed schemes have desired temporal accuracy.

Table 1 L2-errors and convergence rates for the PFC model at t = 0.2
Table 2 L2-errors and convergence rates for the SH model at t = 0.2

5.2 Energy stability

We now investigate the unconditionally energy dissipation law of the proposed first- and second-order accurate methods. For the SH model, we consider the following initial condition [32] in the domain Ω = [0,32]2

$$ \begin{array}{@{}rcl@{}} \psi(x,y,0) &=& 0.07 - 0.02\cos\left( \frac{\pi(x-12)}{16}\right)\sin\left( \frac{\pi(y-1)}{16}\right)\\ &&+ 0.02\cos^2\left( \frac{\pi(x+10)}{32}\right)\sin^2\left( \frac{\pi(y+3)}{32}\right)\\ &&-0.01\sin^2\left( \frac{\pi x}{8}\right)\sin^2\left( \frac{\pi(y-6)}{8}\right).\end{array} $$
(73)

The 129 Fourier modes and the parameters 𝜖 = 0.25, g = 1 are used. Figure 1 lists the snapshots at different computational times by using the second-order scheme and finer time step \(\delta t = \delta t_{\max \limits }/64 \approx 3.9\)e-3. In this test, the maximum time step is set as \(\delta t_{\max \limits } = 0.25\). Figures 2(a) and (b) show the normalized energy curves with respect to different schemes. The evolutions of r with respect to different schemes are plotted in Figs. 2(c) and (d). Here, Fig. 2(e) shows the original energy and pseudo-energy (second-order scheme) with different time steps. As we can observe, both schemes dissipate the energy. The value of r converges to 1 as the refinement of time step.

Fig. 1
figure 1

Snapshots of ψ using the second-order accurate scheme and time step δt = 3.9e-3

Fig. 2
figure 2

Normalized energy curves: the first-order scheme, a \(\mathcal {F}^{1,d}(\psi ^{n})/\mathcal {F}^{1,d}(\psi ^{0})\), and the second-order scheme, b \(\mathcal {F}^{2,d}(\psi ^{n})/\mathcal {F}^{2,d}(\psi ^{0})\), of the SH model. The evolutions of r with respect to c first-order and d second-order schemes. Here, e illustrates the original and pseudo-energy curves

For the PFC model, we consider the grain growth in a supercooled liquid by using the following initial condition [32]

$$ \begin{array}{@{}rcl@{}} \phi(x_l,y_l,0) = 0.285 + 0.446\left( \!\cos\!\left( \frac{0.66}{\sqrt{3}}y_l\right)\cos(0.66x_l) - 0.5\cos\!\left( \frac{1.32}{\sqrt{3}}y_l\right)\right),\end{array} $$
(74)

in the domain Ω = [0,400]2, where the local coordinates are

$$ \begin{array}{@{}rcl@{}} x_l &=& x\sin\theta+y\cos\theta,\\ y_l &=& -x\cos\theta+y\sin\theta. \end{array} $$

Three crystallite patches with length 40 locate in (150,150), (200,250), and (250,150). The corresponding orientations are 𝜃 = 0.25π, 0, and − 0.25π, respectively. The 513 Fourier modes and 𝜖 = 0.25 are considered. Figure 3 shows the snapshots of grain growth by using the second-order method and time step \(\delta t = \delta t_{\max \limits }/8 \approx 6.25\)e-2. In this test, the maximum time step is set as \(\delta t_{\max \limits } = 0.5\). We can find that obvious grain boundaries appear with the growth of crystallites, this phenomenon can be used to interpret the generation of flaw on natural crystal structure. The evolutions of normalized energy curves with respect to first-order and second-order methods are plotted in Fig. 4(a) and (b), respectively. The evolutions of η with respect to first-order and second-order schemes are shown in Fig. 4(c) and (d), respectively. Here, Fig 4(e) displays the original energy curves and pseudo-energy (second-order scheme) curves. It can be observed that all schemes satisfy the energy dissipation law. Comparing with the first-order scheme, the second-order method generally converges fast with the refinement of time step. Therefore, we will use the second-order scheme for the following tests.

Fig. 3
figure 3

Snapshots of grain growth using the second-order accurate scheme and time step δt = 6.25e-2

Fig. 4
figure 4

Normalized energy curves: the first-order scheme, a \(\mathcal {E}^{1,d}(\phi ^{n})/\mathcal {E}^{1,d}(\phi ^{0})\), and the second-order scheme, b \(\mathcal {E}^{2,d}(\phi ^{n})/\mathcal {E}^{2,d}(\phi ^{0})\), of the PFC model. The evolutions of η with respect to c first-order and d second-order schemes. Here, e illustrates the original and pseudo-energy curves

5.3 Pattern formation of the PFC model

In previous works [21, 23], the authors found that the values of concentration will affect the pattern of phase transition. To simulate this benchmark problem, we consider the following initial condition

$$ \begin{array}{@{}rcl@{}} \phi(x,y,0) = \bar{\phi} + 0.1\text{rand}(x,y), \end{array} $$
(75)

where \(\bar {\phi }\) is the average concentration of ϕ, rand(x,y) takes the random value in [− 1,1]. We use 257 Fourier modes, δt = 5e-2, 𝜖 = 0.25 to perform the simulation in the domain Ω = [0,128]2. Figures 5 and 6 display the snapshots of ϕ for \(\bar {\phi } = 0\) and 0.15. For \(\bar {\phi } = 0\), the striped structure appears, while hexagonal structure appears for \(\bar {\phi } = 0.15\). The energy curves plotted in Fig. 7(a) indicate that the original energy and pseudo-energy dissipate with the formation of phase pattern. From Fig. 7(b), we find that the value of η is close to exact value 1.

Fig. 5
figure 5

Pattern formation of the PFC model with respect to \(\bar {\phi } = 0\)

Fig. 6
figure 6

Pattern formation of the PFC model with respect to \(\bar {\phi } = 0.15\)

Fig. 7
figure 7

The evolutions of a normalized energy curves of the PFC model and bη

5.4 Pattern formation of the SH model

Recently, Lee [32] investigated the pattern formation of the SH model with quadratic-cubic non-linearity. The numerical results indicated the value of g played a dominant role in the formation of different structures. In this subsection, we investigate the effect of g by using our proposed method. The computational domain is Ω = [0,128]2. The initial condition is

$$ \begin{array}{@{}rcl@{}} \psi(x,y,0) = 0.15 + 0.1\text{rand}(x,y). \end{array} $$
(76)

The 257 Fourier modes, δt = 5e-2, and 𝜖 = 0.25 are used. Figures 8 and 9 display the snapshots of pattern formation with respect to g = 0 and g = 1, respectively. As g = 0, the effect of cubic term in energy functional is removed and we can observe the formation of striped pattern, this phenomenon is similar with the results in a previous work [32]. As g = 1, the hexagonal pattern forms due to the effect of cubic term. The normalized energy curves plotted in Fig. 10(a) indicate that the original energy and pseudo-energy are non-increasing. The value of r plotted in Fig. 10(b) is always close to 1.

Fig. 8
figure 8

Pattern formation of the SH model with respect to g = 0

Fig. 9
figure 9

Pattern formation of the SH model with respect to g = 1

Fig. 10
figure 10

The evolutions of a normalized energy curves of the SH model and b r

5.5 Formation of mixed pattern

In a previous work [40], the formation of mixed pattern of the PFC model on 3D surface was studied. We now simulate the mixed pattern in Ω = [0,128]2. The 257 Fourier modes, δt = 5e-2, and 𝜖 = 0.25 are used. The initial condition is

$$ \begin{array}{@{}rcl@{}} \phi(x,y,0) = 0.28\left( \frac{90+\sqrt{(x-64)^2+(y-64)^2}}{180} \right)^3 + 0.1\text{rand}(x,y). \end{array} $$
(77)

The snapshots at different computational times are shown in Fig. 11. We can find that the striped pattern forms in the center region of domain, while the hexagonal pattern appears in the rest region. The result in Fig. 12(a) indicates that the original energy and pseudo-energy are non-increasing. The value of η plotted in Fig. 12(b) is always close to 1.

Fig. 11
figure 11

The formation of mixed pattern

Fig. 12
figure 12

The evolutions of a normalized energy and bη

5.6 Comparison with the classical SAV method

The classical SAV method is an effective way to develop linear, second-order time-accurate, and energy stable method for dissipative system. The only drawback of the SAV method is that the resulting energy-dissipation law holds with respect to modified variables instead of the original variables. In this subsection, we perform a comparison study with classical SAV method to show the advantage of the proposed method. Here, only PFC model is considered because the implementation for the SH model is straightforward. Let us first review the SAV method and its numerical implementation. Defining a time-dependent auxiliary variable as \(U = J(\phi ) = \sqrt {{\int \limits }_{{\varOmega }} F(\phi )~d\textbf {x} + B}\), where F(ϕ) = ϕ4/4 − 𝜖ϕ2/2, B is a positive number ensuring the positivity of radicand. Here, we take B = 1e5 [41]. Next, we can obtain the following equivalent equations

$$ \begin{array}{@{}rcl@{}} &&\phi_t = {\Delta}\mu, \end{array} $$
(78)
$$ \begin{array}{@{}rcl@{}} &&\mu = \frac{U}{J(\phi)}F^{\prime}(\phi) + \phi + 2{\Delta}\phi + {\Delta}\kappa, \end{array} $$
(79)
$$ \begin{array}{@{}rcl@{}} &&\kappa = {\Delta}\phi, \end{array} $$
(80)
$$ \begin{array}{@{}rcl@{}} &&U_t = \frac{1}{2}{\int}_{{\varOmega}} \frac{F^{\prime}(\phi)}{J(\phi)}\phi_t ~d\textbf{x}, \end{array} $$
(81)

Here, the periodic boundary condition is used. Based on (78)–(81), the linear, second-order time-accurate scheme can be constructed as follows

$$ \begin{array}{@{}rcl@{}} &&\frac{3\phi^{n+1}-4\phi^n+\phi^{n-1}}{2\delta t} = {\Delta}\mu^{n+1}, \end{array} $$
(82)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1} = \frac{U^{n+1}}{J(\phi^{*})}F^{\prime}(\phi^{*}) + \phi^{n+1} + 2(2{\Delta}\phi^n-{\Delta}\phi^{n-1}) + {\Delta} \kappa^{n+1}, \end{array} $$
(83)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1} = {\Delta}\phi^{n+1}, \end{array} $$
(84)
$$ \begin{array}{@{}rcl@{}} &&3U^{n+1}-4U^n+U^{n-1} = \frac{1}{2}{\int}_{{\varOmega}} \frac{F^{\prime}(\phi^{*})}{J(\phi^{*})}(3\phi^{n+1}-4\phi^n+\phi^{n-1}) ~d\textbf{x}. \end{array} $$
(85)

Here, ϕ = 2ϕnϕn− 1. By taking the inner product of (82) with 2δtμn+ 1, of (83) with − (3ϕn+ 1 − 4ϕn + ϕn− 1), of (84) with Δ(3ϕn+ 1 − 4ϕn + ϕn− 1), of (85) with 2Un+ 1, and combining the results together, we have the following time-discretized energy law

$$ \begin{array}{@{}rcl@{}} &&\frac{1}{2}[ (U^{n+1})^2 + (2U^{n+1}-U^n)^2 - (U^{n})^2 - (2U^{n}-U^{n-1})^2 ] \end{array} $$
$$ \begin{array}{@{}rcl@{}} &&+\frac{1}{4}(\|\phi^{n+1}\|^2+\|2\phi^{n+1}-\phi^n\|^2-\|\phi^n\|^2-\|2\phi^n-\phi^{n-1}\|^2)\\ &&-\frac{1}{2}(\|\nabla\phi^{n+1}\|^2+\|2\nabla\phi^{n+1}-\nabla\phi^n\|^2-2\|\nabla\phi^{n+1}-\nabla\phi^n\|^2)\\ &&+ \frac{1}{2}(\|\nabla\phi^{n}\|^2+\|2\nabla\phi^{n}-\nabla\phi^{n-1}\|^2-2\|\nabla\phi^{n}-\nabla\phi^{n-1}\|^2)\\ &&-\frac{1}{4}(\|{\Delta}\phi^{n+1}\|^2+\|2{\Delta}\phi^{n+1}-{\Delta}\phi^n\|^2-\|{\Delta}\phi^n\|^2-\|2{\Delta}\phi^n-{\Delta}\phi^{n-1}\|^2)\\ &&= -\delta t\|\nabla\mu^{n+1}\|^2-\frac{1}{4}\|\phi^{n+1}-2\phi^n+\phi^{n-1}\|^2 -\frac{3}{2}\|\nabla\phi^{n+1}-2\nabla\phi^n+\nabla\phi^{n-1}\|^2 \\ &&-\frac{1}{4}\|{\Delta}\phi^{n+1}-2{\Delta}\phi^n+{\Delta}\phi^{n-1}\|^2-\frac{1}{2}(U^{n+1} - 2U^n + U^{n-1} )^2\le0,\end{array} $$
(86)

with respect to the modified energy functional

$$ \begin{array}{@{}rcl@{}} \mathcal{E}^{m}(\phi^n,\phi^{n-1}) &=& \frac{1}{2}[ (U^{n})^2 + (2U^{n}-U^{n-1})^2] + \frac{1}{4}(\|\phi^{n}\|^2+\|2\phi^{n}-\phi^{n-1}\|^2)\\ &-&\frac{1}{2}(\|\nabla\phi^n\|^2+\|2\nabla\phi^n-\nabla\phi^{n-1}\|^2-2\|\nabla\phi^n-\nabla\phi^{n-1}\|^2) \\ &+& \frac{1}{4}(\|{\Delta}\phi^n\|^2 + \|2{\Delta}\phi^n-{\Delta}\phi^{n-1}\|^2). \end{array} $$
(87)

Although (82)–(85) satisfy the time-discretized energy dissipation law, we notice that the system is not easy to solve because the coupling between local variable ϕn+ 1 and non-local variable Un+ 1. To achieve simple and decoupled computation, we recast ϕn+ 1, μn+ 1, and κn+ 1 to be the following linear combinations

$$ \begin{array}{@{}rcl@{}} \phi^{n+1} &=& \phi^{n+1}_1 + U^{n+1}\phi^{n+1}_2, \end{array} $$
(88)
$$ \begin{array}{@{}rcl@{}} \mu^{n+1} &=& \mu^{n+1}_1 + U^{n+1}\mu^{n+1}_2, \end{array} $$
(89)
$$ \begin{array}{@{}rcl@{}} \kappa^{n+1} &=& \kappa^{n+1}_1 + U^{n+1}\kappa^{n+1}_2. \end{array} $$
(90)

By using these variables, we can split (82)–(84) to be

$$ \begin{array}{@{}rcl@{}} &&\frac{3\phi^{n+1}_1-4\phi^n+\phi^{n-1}}{2\delta t} = {\Delta}\mu^{n+1}_1, \end{array} $$
(91)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1}_1 = \phi^{n+1}_1 + 2(2{\Delta}\phi^n-{\Delta}\phi^{n-1}) + {\Delta}\kappa^{n+1}_1, \end{array} $$
(92)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1}_1 = {\Delta}\phi^{n+1}_1, \end{array} $$
(93)

and

$$ \begin{array}{@{}rcl@{}} &&\frac{3\phi^{n+1}_2}{2\delta t} = {\Delta}\mu^{n+1}_2, \end{array} $$
(94)
$$ \begin{array}{@{}rcl@{}} &&\mu^{n+1}_2 = \frac{F^{\prime}(\phi^{*})}{J(\phi^{*})} + \phi^{n+1}_2 + {\Delta}\kappa^{n+1}_2, \end{array} $$
(95)
$$ \begin{array}{@{}rcl@{}} &&\kappa^{n+1}_2 = {\Delta}\phi^{n+1}_2. \end{array} $$
(96)

Here, the periodic boundary condition is considered for \(\phi ^{n+1}_{1}\), \(\phi ^{n+1}_{2}\), \(\mu ^{n+1}_{1}\), \(\mu ^{n+1}_{2}\), \(\kappa ^{n+1}_{1}\), and \(\kappa ^{n+1}_{2}\). We can easily obtain \(\phi ^{n+1}_{1}\) and \(\phi ^{n+1}_{2}\) by solving some linear systems with constant coefficients. The unique solvability is easy to show by using Lax–Milgram theorem [15, 17]. With computed \(\phi ^{n+1}_{1}\) and \(\phi ^{n+1}_{2}\), we can update Un+ 1 from (85), i.e.,

$$ \begin{array}{@{}rcl@{}} &&\left[ 3 - \frac{3}{2}{\int}_{{\varOmega}} \frac{F^{\prime}(\phi^{*})}{J(\phi^{*})}\phi^{n+1}_2 ~d\textbf{x}\right]U^{n+1} = 4U^n - U^{n-1}\\ &&~~~~~~~~~~~~~~~~~+ \frac{1}{2}{\int}_{{\varOmega}} \frac{F^{\prime}(\phi^{*})}{J(\phi^{*})}(3\phi^{n+1}_1-4\phi^n+\phi^{n-1}) ~d\textbf{x}. \end{array} $$
(97)

To show the unique solvability of the above equation, we only need to prove \(\left [ 3 - \frac {3}{2}{\int \limits }_{{\varOmega }} \frac {F^{\prime }(\phi ^{*})}{J(\phi ^{*})}\phi ^{n+1}_{2} ~d\textbf {x}\right ] \neq 0\). By taking the inner product of (94) with \(\mu ^{n+1}_{2}\), of (95) with \(\frac {3\phi ^{n+1}_{2}}{2\delta t}\), of (96) with \({\Delta }\phi ^{n+1}_{2}\), and combining the results together, we obtain

$$ \begin{array}{@{}rcl@{}}\!\!\!\!\!\!\!\!\!\!\!\! \frac{3}{2\delta t}\left( \frac{F^{\prime}(\phi^{*})}{J(\phi^{*})}, \phi^{n+1}_2\right) = -\|\nabla\mu^{n+1}_2\|^2 - \frac{3}{2\delta t}\|\phi^{n+1}_2\|^2 - \frac{3}{2\delta t}\|{\Delta}\phi^{n+1}_2\|^2 \le 0, \end{array} $$
(98)

which indicates \(\left [ 3 - \frac {3}{2}{\int \limits }_{{\varOmega }} \frac {F^{\prime }(\phi ^{*})}{J(\phi ^{*})}\phi ^{n+1}_{2} ~d\textbf {x}\right ] > 0\), the solvability is proved. After Un+ 1 is computed, we can directly update ϕn+ 1 from (51).

In the simulation, the initial condition and other parameters are unchanged like those in Section 5.3. Here, \(\bar {\phi } = 0.15\) is considered. A relatively large time step δt = 0.5 is used to perform the comparison. The top and bottom rows of Fig. 13 display the snapshots with respect to the classical SAV method and the proposed method. It can be observed the patterns does not have obvious difference. In Fig. 14(a), the original, modified (SAV method), and pseudo-energy (present method) curves are plotted. As we can observe, the modified energy obtained by the SAV method obviously deviates from the original energy. However, the pseudo-energy calculated by the proposed method consists with the original energy. The evolution of η is plotted in Fig. 14(b), we can find that the value of η is always close to 1.

Fig. 13
figure 13

Snapshots of the PFC model. Here, the top and bottom rows are the results obtained by the classical SAV method and the proposed method

Fig. 14
figure 14

The evolutions of a normalized energy and bη

5.7 3D pattern formations of the PFC and the SH models

In this subsection, we simulate the pattern formations with respect to the PFC and the SH models in 3D space. The computational domain is Ω = [0,128]3 and the initial conditions are

$$ \begin{array}{@{}rcl@{}} \phi(x,y,0) = \psi(x,y,0) = 0.15 + 0.1\text{rand}(x,y). \end{array} $$
(99)

The 129 and 257 Fourier modes are used for the SH and the PFC models, respectively. The parameters are δt = 0.1, 𝜖 = 0.25, g = 1. In Figs. 15 and 16, we can observe the formations of phase pattern with respect to the PFC and the SH models, respectively. The normalized energy curves plotted in Fig. 17(a) indicate that the original energy and pseudo-energy are non-increasing. The values of η and r plotted in Fig. 17(b) are always close to 1.

Fig. 15
figure 15

Pattern formation of the PFC model in 3D space

Fig. 16
figure 16

Pattern formation of the SH model in 3D space

Fig. 17
figure 17

Normalized energy curves for a the PFC model and b the SH model. Here, the evolutions of η and r are shown in c

6 Conclusions

We developed first- and second-order time-accurate energy stable schemes for the PFC and the SH models by using a recently developed Lagrange multiplier approach. The main merits of the proposed schemes were as follows: (i) The energy stability was satisfied with respect to the original energy rather than the modified energy. (ii) The bounded-from-below restriction was removed. The first- and second-order schemes could be established by using the backward Euler and the BDF2 formulas, respectively. The results showed that the proposed schemes not only satisfied energy dissipation property, but also accurately simulated specific structures, such as the striped and hexagonal patterns, mixed pattern, and grain boundaries. In the upcoming works, the proposed methods will be extended to simulate more complex PFC and SH problems [41,42,43,44].