A Roadmap for Discretely Energy-Stable Schemes for Dissipative Systems Based on a Generalized Auxiliary Variable with Guaranteed Positivity
Zhiguo Yang, Suchuan Dong

TL;DR
This paper introduces a unified framework for creating discretely energy-stable schemes for dissipative systems using a generalized auxiliary variable that guarantees positivity and stability regardless of time step size.
Contribution
The paper proposes the gPAV method, a novel approach that ensures positivity and energy stability in numerical schemes for dissipative systems, applicable to a wide class of problems.
Findings
Guaranteed positivity of the auxiliary variable at discrete level.
Energy stability of the proposed schemes for various dissipative systems.
Effective performance and robustness demonstrated through numerical experiments.
Abstract
We present a framework for devising discretely energy-stable schemes for general dissipative systems based on a generalized auxiliary variable. The auxiliary variable, a scalar number, can be defined in terms of the energy functional by a general class of functions, not limited to the square root function adopted in previous approaches. The current method has another remarkable property: the computed values for the generalized auxiliary variable are guaranteed to be positive on the discrete level, regardless of the time step sizes or the external forces. This property of guaranteed positivity is not available in previous approaches. A unified procedure for treating the dissipative governing equations and the generalized auxiliary variable on the discrete level has been presented. The discrete energy stability of the proposed numerical scheme and the positivity of the computed auxiliary…
| parameter | value | parameter | value |
|---|---|---|---|
| (spatial tests) or (temporal tests) | |||
| Element order | (varied) | Elements | |
| (varied) | |||
| S | (variable mobility solver) | or (constant mobility solver) | |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
A Roadmap for Discretely Energy-Stable Schemes for Dissipative Systems
Based on a Generalized Auxiliary Variable with Guaranteed Positivity
Zhiguo Yang, Suchuan Dong
Center for Computational and Applied Mathematics
Department of Mathematics
Purdue University, USA Author of correspondence. Email: [email protected]
((March 29, 2019))
Abstract
We present a framework for devising discretely energy-stable schemes for general dissipative systems based on a generalized auxiliary variable. The auxiliary variable, a scalar number, can be defined in terms of the energy functional by a general class of functions, not limited to the square root function adopted in previous approaches. The current method has another remarkable property: the computed values for the generalized auxiliary variable are guaranteed to be positive on the discrete level, regardless of the time step sizes or the external forces. This property of guaranteed positivity is not available in previous approaches. A unified procedure for treating the dissipative governing equations and the generalized auxiliary variable on the discrete level has been presented. The discrete energy stability of the proposed numerical scheme and the positivity of the computed auxiliary variable have been proved for general dissipative systems. The current method, termed gPAV (generalized Positive Auxiliary Variable), requires only the solution of linear algebraic equations within a time step. With appropriate choice of the operator in the algorithm, the resultant linear algebraic systems upon discretization involve only constant and time-independent coefficient matrices, which only need to be computed once and can be pre-computed. Several specific dissipative systems are studied in relative detail using the gPAV framework. Ample numerical experiments are presented to demonstrate the performance of the method, and the robustness of the scheme at large time step sizes.
Keywords: *energy stability; unconditional stability; dissipative systems; conservative systems; auxiliary variables; positivity *
1 Introduction
Dissipative systems are of immense interest to science and engineering. Physical systems encountered in the real world are dissipative, thanks to the second law of thermodynamics. In dissipative systems there exists a storage function that is bounded from below Willems1972 . We will refer to this function as the energy in the current work. Dissipative systems are distinguished from general dynamical systems by the dissipation inequality, which basically states that the increase in storage of the system over a time interval cannot exceed the supply to the system during that interval Willems1972 ; Willems2007 . The governing partial differential equations (PDE) describing dissipative systems are typically nonlinear, and they satisfy a balance equation for the energy (or entropy) as an embodiment of the dissipation inequality GrootM1984 ; Ottinger2005 ; AndersonMW1998 ; LowengrubT1998 ; AbelsGG2012 ; Dong2018 .
A highly desirable property for numerical algorithms for dissipative systems is the preservation of the energy dissipation (or conservation) on the discrete level. This not only preserves one important aspect of the underlying structure of the continuous system HairerLW2006 , but more practically also provides a control on the numerical stability in actual computer simulations. The history for such strategies is long and they can be traced to at least the work of CourantFL1928 on discrete energy conservation for finite difference approximations in the 1920s. While energy-stable schemes for specific domains of science and engineering have been under intensive studies and these efforts have borne invaluable fruits, the schemes and methods developed usually have only limited applicability across domains. The energy-stable schemes for one area are hardly transferable to a different field, and they can hardly shed light on the development of such types of schemes in new unexplored domains. Unified techniques that can be broadly applied to treat different PDEs from different domains for devising energy-stable schemes are generally lacking. The metaphor used in Iserles2008 (page 139) to compare the motley collection of PDEs to a hugh unhappy family (each unhappy in its own way; Tolstoy, “Anna Karenina”) seems fitting in describing this situation (see also Celledonietal2012 ).
Occasionally, certain methods appear and seem to be broadly applicable to a wide class of problems spanning different areas. The average vector field (AVF) method Celledonietal2012 ; QuispelM2008 and the discrete variational derivative method (DVDM) FurihataM2011 , both of which can be traced to the idea of discrete gradients Gonzalez1996 ; McLachlanQR1999 , are two such examples. For gradient systems that can be expressed into the form where is an anti-symmetric or negative semi-definite matrix, is the field variable, is the energy functional and denotes the variational derivative, the AVF and DVDM methods can preserve the energy conservation (resp. energy dissipation) discretely. We refer the reader to e.g. Furihata1999 ; DahlbyO2011 ; MiyatakeM2014 ; CaiLW2018 ; EidnesOR2018 (among others) for related and variants of these methods. A potential drawback of these methods is their computational cost. Because these are fully implicit schemes and the governing PDEs are in general nonlinear, these methods will entail the solution of nonlinear algebraic equations on the discrete level. Consequently, some nonlinear algebraic solver (e.g. Newton type methods) will be required for computing the field functions, and the associated computational cost can be substantial.
In the current work we present a framework for devising energy-stable schemes for general dissipative systems that can potentially be useful and applicable to different domains. Our method does not require the governing PDEs to be in any particular form, as long as they are dissipative (or conserving). When devising the energy-stable numerical schemes, we are particularly mindful of the computational cost involved therein. The resultant energy-stable schemes from our method involve only the solution of linear algebraic equations when computing the field functions within a time step, and no nonlinear algebraic solver is needed. Furthermore, with appropriate choice of the operator in the scheme, the resultant linear algebraic systems upon discretization can involve only constant and time-independent coefficient matrices, which only need to be computed once and can be pre-computed during pre-processing. Thanks to these properties, the presented method and the resultant energy-stable schemes are computationally very competitive and attractive. In terms of the computational cost the presented method enjoys a notable advantage when compared with the aforementioned methods.
The key to achieving the above useful properties for general dissipative systems in the presented method lies in the introduction of a generalized auxiliary variable. The generalized auxiliary variable introduced here is inspired by the scalar auxiliary variable (SAV) approach proposed by ShenXY2018 , and to a lesser extent, by the invariant energy quadratization (IEQ) method Yang2016 , both of which are devised for gradient flows; see also e.g. ShenX2018 ; GongZYW2018 ; ChengS2018 ; Zhaoetal2018 ; KouSW2018 ; LiZW2019 ; YangLD2019 ; Yang2019 (among others) for extensions and applications of these techniques. In SAV a scalar-valued auxiliary variable is defined, as the square root of the shifted potential energy integral. In IEQ an auxiliary field variable is defined, as the square root of the shifted potential energy density function. With these auxiliary variables, energy-stable schemes can be devised for gradient flows and their discrete energy stability can be proven in the SAV and IEQ methods. In both SAV and IEQ, the use of the square root function is critical to the proof of the discrete energy stability of the resultant numerical schemes, due to the interesting property that the square root is the only function form that satisfies the relation
[TABLE]
In the current work we will show that the square root function is not essential to devising energy-stable schemes. In the generalized auxiliary variable method developed here, the auxiliary variable (a scalar number) can be defined by a rather general class of functions (conditions specifically given in Section 2.1) in terms of the energy functional, which is why the method is termed “generalized”, and the resultant numerical schemes can be proven to be discretely energy stable.
The method presented here is applicable to general dissipative systems, which is another key difference from previous auxiliary-variable approaches. The ability to deal with general dissipative systems hinges on how the governing PDEs are treated based on the generalized auxiliary variable and how the generalized auxiliary variable is numerically treated on the discrete level. A unified procedure for treating discretely the dissipative governing equations and the generalized auxiliary variable has been presented. These numerical treatments have drawn inspirations from the recent developments in LinYD2019 ; YangD2018 for incompressible Navier-Stokes equations and for the incompressible two-phase flows, which are not gradient-type systems.
The generalized auxiliary variable method proposed herein has another remarkable property: The computed values for the auxiliary variable are guaranteed to be positive on the discrete level. Such a property is not available in the SAV (or IEQ) method. In both SAV and IEQ, as well as in the current method, the auxiliary variable is computed discretely by solving an associated dynamic equation, which is derived based on the definition of the auxiliary variable in terms of the square root function in SAV and IEQ or a general function in the current method. The auxiliary variable physically should be positive according to its definition. However, this positivity property is in general not guaranteed in the computed values for the auxiliary variable, because they are obtained by numerically solving a differential equation. Indeed, in numerical experiments we have observed negative values for the computed auxiliary variable using the previous methods, especially at large time step sizes. With the current method, on the other hand, we can prove that the computed values for the generalized auxiliary variable are guaranteed to be positive, regardless of the time step sizes or the external forces. The guaranteed positivity of the auxiliary variable in the current method is intimately related to and is critical to the proof of discrete energy stability of the proposed numerical schemes.
Because of these crucial properties, we will refer to the framework proposed herein as “gPAV”, which stands for the generalized Positive Auxiliary Variable method.
In this paper we consider general dissipative systems and outline the gPAV procedure for devising discretely energy-stable schemes. The discrete energy stability of the proposed numerical scheme and the positivity property of the computed auxiliary variable will be proven for general dissipative systems. As already mentioned, the gPAV method requires only the solution of linear algebraic equations within a time step, and with appropriate choice of the operator in the algorithm, the resultant linear algebraic systems involve only constant and time-independent coefficient matrices that can be pre-computed. We demonstrate the gPAV procedure by looking into three specific dissipative systems: a chemo-repulsion model Gonzalez2019 , the Cahn-Hilliard equation CahnH1958 with constant and variable mobility, and the nonlinear Klein-Gordon equation Strauss1978 . Ample numerical experiments are provided for each system to demonstrate the performance of the algorithm and the effects of the parameters.
The current work contains several new aspects: (i) the framework for developing discretely energy-stable schemes for general dissipative systems; (ii) the generalized auxiliary variable introduced herein; and (iii) the guaranteed positivity of the computed auxiliary variable on the discrete level. Some other aspects, such as the generalization of the numerical algorithm as discussed in Remarks 2.5 and 2.6, are also potentially useful to other researchers and the community.
The remainder of this paper is structured as follows. In Section 2 we introduce a generalized auxiliary variable and present the gPAV framework for devising discretely energy-stable schemes for general dissipative systems. The discrete energy stability of the presented algorithm and the positivity of the computed auxiliary variable will be proven. The solution algorithm for implementing the proposed energy-stable scheme will be presented. An alternative formulation for the energy-stable scheme will also be discussed in this section. Then in the three subsequent sections (Sections 3–5) we apply the gPAV framework to three specific dissipative systems (a chemo-repulsion model, Cahn-Hilliard equation with constant and variable mobility, and Klein-Gordon equation). Ample numerical experiments are provided to demonstrate the performance of the method for each system, and numerical results with large time step sizes are presented to show the robustness of the proposed scheme. Section 6 concludes the discussions with some closing remarks. In Appendix A we provide a method for approximating the variables for the first time step, which guarantees the positivity of the computed auxiliary variable to start off. This startup procedure is important for the proof of discrete energy stability of the presented numerical scheme.
2 The gPAV Framework for Energy-Stable Schemes for Dissipative Systems
Consider a domain in two or three dimensions and a dissipative system on this domain, whose dynamics is described by,
[TABLE]
where and denote the spatial coordinate and time, denotes the state variables of the system and can be a scalar- or vector-valued field function, and is an external source term (hereafter referred to as the external force). is an operator that gives rise to the dissipative dynamics of the system and can be nonlinear in general. Equation (2.1) is supplemented by the boundary condition
[TABLE]
where denotes the domain boundary, is an external source term on the boundary, which will be referred to as the external boundary force hereafter, and is assumed to be a linear operator for the sake of simplicity. The initial condition is
[TABLE]
where is the initial distribution of the state variable.
Because the system is dissipative, there exists a storage function that is bounded from below Willems1972 , which hereafter will be referred to as the energy,
[TABLE]
where is the energy density function. The evolution of the energy is described by
[TABLE]
where we have used equation (2.1). With integration by part, the right-hand-side (RHS) of equation (2.5) can be transformed into
[TABLE]
where denotes the volume terms involving the external force , which satisfies the property
[TABLE]
The rest of the volume terms are denoted by , not involving . denotes the boundary terms, which may involve the boundary source term () through the boundary conditions.
Substituting equation (2.6) into equation (2.5), we arrive at the following energy balance equation for the system,
[TABLE]
We assume that the boundary conditions (2.2) satisfy the following property,
[TABLE]
The dissipative nature of the system ensures that in the absence of the external forces (i.e. and ). Because the domain can be arbitrary, it follows that must be non-negative, i.e.
[TABLE]
2.1 Reformulated Equivalent System
To facilitate energy-stable numerical approximations of the system (2.1), we define a shifted energy of the following form
[TABLE]
where is a chosen energy constant such that for , and is the time interval on which the computation is to be carried out. Note that for a physical system the energy is bounded from below, and thus can always be found.
Let denote a one-to-one increasing differentiable function, with its inverse , satisfying the property
[TABLE]
We define a scalar variable by
[TABLE]
where is the shifted energy given by (2.11). then satisfies the following evolution equation,
[TABLE]
which is obtained by taking the time derivative of equation (2.13b) and using equation (2.11).
Remark 1**.**
The choice for and is rather general. Some examples are,
[TABLE]
or
[TABLE]
where and are positive constants. It is important to notice that a function like (with an integer ) or does not automatically guarantee that with arbitrary . However, if one can ensure that the argument satisfies , the property can be guaranteed with such choices of functions when defining . This point is critical in the subsequent development of the numerical algorithm.
Noting that we rewrite equation (2.1) into an equivalent form
[TABLE]
where is a chosen linear operator about . should be of the same spatial order as . For improved accuracy should be an approximation of in some way, such as the linear component of or a linearized approximation of . For improved numerical efficiency should be easy to compute and implement.
Remark 2.1**.**
* often consists of linear components and nonlinear components for many systems, and oftentimes one can choose the linear components as the operator. One can also add/subtract certain linear operators, and treat one part freely and the other part together with as in equation (2.17). By choosing an operator that involves only time-independent (or constant) coefficients, the resultant method will become computationally very efficient, because the coefficient matrices for the linear algebraic systems upon discretization will be time-independent and therefore can be pre-computed when solving the field variables. This point will become clearer from later discussions.*
We reformulate equation (2.14) as follows,
[TABLE]
where it can be noted that a number of zero terms have been incorporated. In the above equation \big{|}(\cdot)\big{|} denotes the absolute value of . In light of (2.6), we transform equation (2.18) into the final reformulated equivalent form
[TABLE]
The reformulated system consists of equations (2.17) and (2.19), the boundary conditions (2.2), the initial condition (2.3) for , and the following initial condition for ,
[TABLE]
In the reformulated system, the dynamic variables are and , which are coupled in the equations (2.17) and (2.19). is given by equation (2.11). Note that in this system is determined by solving the coupled system of equations, not by using the equation (2.13a).
{comment}
Remark 2.2**.**
In the developments of this section, we will assume periodic boundary conditions for (or essentially no boundaries for the domain). This is because with no knowledge about the specific structure (e.g. spatial order) of the operator , it is difficult to discuss the boundary conditions in general terms. The goal of this section is to demonstrate the general strategy for the development of energy-stable schemes for these systems. When looking into the applications of the general framework to specific systems in subsequent sections, some commonly-used boundary conditions will be considered. Numerical treatment of those boundary conditions will be illustrated in these later sections.
2.2 An Energy-Stable Scheme
We next present an energy-stable scheme for the reformulated system consisting of (2.17) and (2.19), together with the boundary condition (2.2) and the initial conditions (2.3) and (2.20).
Let denote the time step index, and represent the variable at time step , corresponding to the time , where is the time step size. If a real-valued parameter is involved, represents the variable at time step (), corresponding to the time .
Let denote a generic scalar or vector-valued variable. We consider the following second-order approximations:
[TABLE]
where (2.21b) is the second-order backward differentiation formula (BDF) and is an explicit approximation of . We also consider the following second-order approximation of \left.\frac{d\mathscr{F}(\chi)}{d\chi}\right|^{n+1}=\mathscr{F}^{\prime}(\chi)\Big{|}^{n+1} based on the discrete directional derivative Gonzalez1996 ,
[TABLE]
which satisfies the property
[TABLE]
Note that in these equations and are given by (2.21a). If represents a scalar-valued variable, one can also approximate \mathscr{F}^{\prime}(\chi)\Big{|}^{n+1} by
[TABLE]
which satisfies the same property (2.23).
We propose the following scheme to approximate the reformulated system:
[TABLE]
In the above equations, and are defined by (2.21b), is defined by (2.22) (or (2.24)), is defined by (2.21c), and is defined by (2.21a). and are second-order approximations of and , respectively, to be specifically defined later in (2.43).
Remark 2.3**.**
It is critical to note that in the scheme (2.25a)–(2.25e), is approximated at step () while the other variables are approximated at step (). This feature, together with the approximation (2.22), allows to be computed from a linear algebraic equation (no nonlinear algebraic solver), and endows the scheme with the property that the computed and (resp. and , for all ) are guaranteed to be positive. These points will become clear from later discussions. It should be noted that the approximation at step () is a second-order approximation of . In fact, the approximation involving any real parameter ,
[TABLE]
is a second-order approximation of , as long as and are second-order approximations of and at time . Therefore, the approximation in (2.25b) does not affect the second-order accuracy of the scheme.
The scheme given by (2.25a)–(2.25e) has the following property.
Theorem 2.1**.**
In the absence of the external force and external boundary force (i.e. and ), the following relation holds with the scheme (2.25):
[TABLE]
if the approximation of at time step is positive, i.e. Y_{0}=R^{n+1/2}\Big{|}_{n=0}>0.
Proof.
By equations (2.21b) and (2.22), we have
[TABLE]
Taking the inner product between equation (2.25a) and , and adding the resultant equation to equation (2.25e) and noting equation (2.28), we arrive at
[TABLE]
where we have used equation (2.25b), and is defined by
[TABLE]
Then it follows that, if and ,
[TABLE]
where we have used the relations (2.7) and (2.9).
Note that and , in light of (2.11) and (2.10). If , then based on the property (2.12). By induction, we can conclude from equation (2.31) that for all . The inequality in (2.27) then holds. We therefore conclude that, if ,
[TABLE]
Thus, the scheme is unconditionally energy stable with respect to the modified energy , if the approximation of at time step is positive. ∎
There are many ways to approximate to ensure that it is positive at time step and that the overall scheme is second-order accurate in time. One such method is given in the Appendix A. Therefore we have the following result:
Theorem 2.2**.**
With and approximated using the method from Appendix A, in the absence of external forces ( and ), the scheme represented by (2.25a)–(2.25e) is unconditionally energy-stable in the sense of the relation (2.32).
Remark 2.4**.**
If the functional form of is such that for all , e.g. (with an integer ), then the scheme given by (2.25a)–(2.25e) is unconditionally energy stable regardless of the approximation of at the time step .
Remark 2.5**.**
The scheme (2.25) is devised by enforcing the system of equations consisting of (2.17), (2.19) and (2.2) at time step (), approximating at time step (), and employing the approximations (2.21a)–(2.22). Inspired by the recent work YangLD2019 , we can generalize this scheme by enforcing the system of equations at time step (), where is a real-valued parameter, to arrive at a family of energy-stable schemes.
In brief, let us consider the following second-order approximations at time step () with : ( denoting a generic variable, and denoting a real parameter below)
[TABLE]
and the following approximation of based on discrete directional derivative,
[TABLE]
These approximations satisfy the following properties:
[TABLE]
Note that the parameter in (2.33b) can often be used to control the numerical dissipation of the approximations, which will be useful for approximating energy-conserving systems. An example will be given with the Klein-Gordon equation in a later section. The scheme given in (2.25) corresponds to and .
By approximating the terms in equations (2.17), (2.19) and (2.2) at time step (), except for the term , which will be approximated at time step (), and employing the approximations (2.33a)–(2.34), one can prove that the resultant family of schemes (with and as parameters) is unconditionally energy-stable. The details will not be provided here.
{comment}
Note that in Yang2019 , a family of energy stable scheme for Cahn-Hilliard type equations has been proposed and the key idea is to approximate the variable at time step as follows
[TABLE]
However, these approximations are not sufficient to obtain an energy stable scheme at time step for the current method. In equations (2.21b) and (2.22), the approximation at the time step and (adjacent to the time step ) is used such that \mathscr{F}^{\prime}[R]\Big{|}^{n+1}\frac{dR}{dt}\Big{|}^{n+1} leads to the difference of at the adjacent time steps, see equation (2.28). In view of this, we adopt the corresponding second-order approximations at time step as follows:
where and in (2.33b) is a constant to adjust the artificial dissipation of the approximation. Therefore, by using the above approximations at time step for equations (2.25a)-(2.25e) and approximate equation (2.25b) at time step it is direct to show that the resultant scheme is unconditionally energy stable.
2.3 Solution Algorithm
Let us now consider how to implement the algorithm represented by equations (2.25a)-(2.25e). We first introduce some notations ( again denoting a generic variable):
[TABLE]
Then the approximation in (2.21b) can be written as
[TABLE]
Inserting notation (2.38) into equation (2.25a), we have
[TABLE]
Note that and are both explicitly known, and is an unknown depending on . Taking advantage of the fact that is a scalar number instead of a field function and the linearity of the operator in the boundary condition (2.2), we introduce two field functions as solutions to the following two linear systems:
[TABLE]
[TABLE]
Since the operator is chosen to be a linear operator and relatively easy to compute, and can be solved efficiently from these equations. Then we have the following result.
Theorem 2.3**.**
Given scalar value the following function solves the system consisting of equations (2.25a) and (2.25d):
[TABLE]
where and are given by the equations (2.40a)-(2.41b).
The scalar value still needs to be determined. Define
[TABLE]
which are second-order approximations of and . These field variables can be explicitly computed after and are obtained. By equation (2.25b), we have
[TABLE]
Note that equation (2.25e) can be transformed into equation (2.29). Inserting equation (2.44) into equation (2.29) leads to the solution for ,
[TABLE]
where and are given by (2.43), is given by equation (2.30), and is computed by equation (2.25c).
In light of equations (2.44) and (2.21a), we can then compute by
[TABLE]
The following result holds.
Theorem 2.4**.**
The scalar value computed by equation (2.45) and the variable () computed by equation (2.46) are always positive, if the approximation of at time step is positive, i.e. .
Proof.
If , then based on (2.12). Since is a positive function, and , we conclude by induction computed from (2.45) is always positive.
Note that according to equation (2.20). In light of the property (2.12), we conclude that and computed from equation (2.46) are both positive. ∎
Using the method from the Appendix A can ensure the positiveness of the approximation of at the time step . We have the following result.
Theorem 2.5**.**
With and computed based on the method from Appendix A, the given by (2.45) and and given by (2.46) satisfy the property
[TABLE]
for all , regardless of the external forces and and the time step size .
Combining the above discussions, we arrive at the solution procedure for solving the system consisting of equations (2.25a)-(2.25e). Given , we compute through the following steps:
Solve equations (2.40a)–(2.40b) for ;
Solve equations (2.41a)–(2.41b) for . 2. 2.
Compute and based on equation (2.43);
Compute , and based on equations (2.11), (2.6) and (2.30). 3. 3.
Compute based on equation (2.45). 4. 4.
Compute based on equation (2.42). Compute based on equation (2.46).
It can be noted that the numerical scheme and the solution algorithm developed in this section has several attractive properties: (i) Only linear systems need to be solved for the field variables within a time step. Moreover, with appropriate choice for the operator, the system can involve only constant and time-independent coefficient matrices, which can be pre-computed. Therefore, the solution for will be computationally very efficient. (ii) The auxiliary variables and can be computed by a well-defined explicit formula, and no nonlinear algebraic solver is involved. Their computed values are guaranteed to be positive. (iii) The auxiliary variable can be defined by a rather general class of functions ( and ) using the method developed here. (iv) The scheme is unconditionally energy-stable for general dissipative systems.
2.4 An Alternative Formulation and Energy-Stable Scheme
The numerical formulation presented in the previous subsections is not the only way to devise energy-stable schemes for dissipative systems. In this subsection we outline an alternative formulation and associated energy-stable scheme. The process is analogous to the developments in the sections 2.1–2.3. So many details will be omitted in the following discussions.
The main idea with the alternative formulation is to realize that with the auxiliary variable defined in (2.13a). Therefore, one can potentially employ , instead of , in the numerical formulations. With appropriate reformulation and treatments of different terms, it turns out that a discretely energy-stable scheme can be obtained with similar attractive properties, such as the guaranteed positiveness of the computed values for the variable .
Note that is defined by (2.13a), where is a one-to-one increasing differentiable function with and for . satisfies the following dynamic equation
[TABLE]
where is defined by (2.11).
We reformulate equation (2.1) into
[TABLE]
where the notations follow those defined in previous subsections. Analogously, by incorporating appropriate zero terms we can transform (2.48) into
[TABLE]
The reformulated system now consists of equations (2.49) and (2.50), the boundary condition (2.2), and the initial conditions (2.3) and (2.20).
We discretize the reformulated system as follows:
[TABLE]
In these equations is defined by (2.21c), and are defined by (2.21a), and and are second-order approximations of and respectively to be specified later.
Taking the inner product between and equation (2.51a), and summing up the resultant equation and equation (2.51e), we get
[TABLE]
where is given by the equation (2.30). In the absence of external forces ( and ), and equation (2.52) leads to
[TABLE]
where we have used (2.51b). Note that , , and that and for . By induction we can conclude from (2.53) that (for all ) if the approximation of at time step is non-negative. Equation (2.52) then leads to the following result.
Theorem 2.6**.**
In the absence of external forces ( and ), if the approximation of at time step is non-negative, the scheme given by (2.51a)–(2.51e) is unconditionally energy-stable in the sense that
[TABLE]
In the Appendix A, we have presented a method for computing the first time step, which can ensure that the approximation of at step is positive. This leads to the following result.
Theorem 2.7**.**
In the absence of external forces ( and ), when the first time step is approximated using the method from Appendix A, the numerical scheme given by (2.51a)–(2.51e) is unconditionally energy-stable in the sense of equation (2.54).
The scheme represented by (2.51a)–(2.51e) can be implemented in a similar way to that of Section 2.3, with the following steps:
- •
Compute and by solving equations (2.40a)–(2.41b).
- •
Define and again by equations (2.43). These variables can be computed.
- •
Compute based on equation (2.52), specifically by
[TABLE]
where is given by (2.30).
- •
Compute by equation (2.42). Compute by
[TABLE]
where we have used equations (2.51b) and (2.21a).
Noting the positiveness of energy and the other functions involved in equations (2.55) and (2.56), we have the following result.
Theorem 2.8**.**
If the first time step is approximated using the method from Appendix A, regardless of the external forces and and the time step size , the computed values for and with the scheme (2.51a)–(2.51e) satisfy the property,
[TABLE]
for all time steps.
Remark 2.6**.**
In the current paper we have used the total energy (shifted) (see equation (2.11)) to define the auxiliary variable . One can also define an auxiliary variable based on a part of the total energy. Suppose the total energy of the system can be written as
[TABLE]
where each of the energy components and is bounded from below. One can define an auxiliary variable based on e.g. (shifted appropriately),
[TABLE]
where the chosen energy constant is to ensure that . By appropriate reformulation of the system one can devise energy-stable schemes in an analogous way. We refer the reader to YangD2018 for such an energy-stable scheme for incompressible two-phase flows with different densities and viscosities for the two fluids, which corresponds to a specific mapping function . A drawback with this lies in that one needs to solve a nonlinear algebraic equation (or a quadratic equation), albeit about a scalar number, when computing the auxiliary variable, and that the property for guaranteed positiveness of the computed auxiliary-variable values will be lost.
In the subsequent sections, we consider three dissipative (or conserving) systems (a chemotaxis model, Cahn-Hilliard equation, and Klein-Gordon equation) as specific applications and demonstrations of the gPAV method developed in this section.
3 A Chemo-Repulsion Model
3.1 Model and Numerical Scheme
Consider the following repulsive-productive chemotaxis model with a quadratic production term (see e.g. Gonzalez2019 ) in a domain (with boundary ):
[TABLE]
where is the quadratic production term, is the cell density, and is the chemical concentration. , , and denote the volume and boundary source terms, respectively. and are the initial distributions of the field variables. This system is dissipative in the absence of the source terms, with the total energy given by (see Gonzalez2019 )
[TABLE]
By taking the inner products between (3.1a) and and between (3.1b) and , summing them up and performing integration by part and imposing boundary conditions in (3.1c), we can obtain the following energy balance equation:
[TABLE]
Following the gPAV procedure from section 2, we define a shifted energy according to equation (2.11)
[TABLE]
where is a chosen energy constant such that . Define a scalar auxiliary variable according to equation (2.13a). Thus, equation (2.14) becomes
[TABLE]
Following equations (2.17)-(2.19), we reformulate equations (3.1a)-(3.1b) into the following equivalent form:
[TABLE]
By incorporating the following zero terms into the right hand side of equation (3.5),
[TABLE]
we can transform this equation into
[TABLE]
where we have used the fact and the boundary conditions (3.1c).
The reformulated equivalent system consist of equations (3.6a)-(3.7) and (3.1c)-(3.1d). The energy-stable scheme for this system is as follows:
[TABLE]
and
[TABLE]
In these equations, , and are defined by equation (2.21b). and are defined by (2.21c). and are second-order approximations of and to be specified later in (3.21). and are second-order approximations of and to be specified later in (3.22). in equation (3.9) is given by
[TABLE]
where
[TABLE]
These equations are supplemented by the following initial conditions
[TABLE]
Theorem 3.1**.**
In the absence of the external force and with homogeneous boundary conditions the scheme consisting of (3.8a)-(3.9) is unconditionally energy stable in the sense that:
[TABLE]
if the approximation of at the time step is non-negative.
This theorem can be proved in a way analogous to Theorem 2.1. We can apply the method from Appendix A to this chemo-repulsion model for the first time step, and this ensures that .
3.2 Solution Algorithm and Implementation
Using the notation (2.38), we rewrite equations (3.8a)-(3.8b) into
[TABLE]
Barring the unknown scalar (3.14) and (3.15) are two decoupled Helmholtz-type equations about and respectively.
Note that is a scalar number instead of a field function, we define two sets of variables as the solutions to the following equations:
[TABLE]
Then we have the following result: Given the scalar number the following field functions solve the system consisting of equations (3.14)-(3.15):
[TABLE]
where is given by equations (3.16)-(3.19), respectively.
Once are known, we determine , , and according to (2.43), specifically by
[TABLE]
In light of equations (3.1b), (3.21) and (3.11) , we compute in equation (3.9) by
[TABLE]
where is given by (3.11).
Combining equations (3.8a)–(3.8b) and (3.9), and using the property (2.23), we have
[TABLE]
This gives rise to
[TABLE]
in which is given by (3.10), is to be computed by (3.23), and is given by (3.8d). With known, and can be evaluated directly by (2.46) and (3.20), respectively.
We employ -continuous high-order spectral elements for spatial discretizations in our implementation. Note that equations (3.16)–(3.19) involve Helmholtz type equations with Neumann type boundary conditions. The weak formulations of these equations are: Find and for such that
[TABLE]
for , where
[TABLE]
These weak forms can be discretized using spectral elements in the standard way KarniadakisS2005 .
3.3 Numerical Results
3.3.1 Convergence Rate
We first employ a manufactured analytical solution to the chemo-repulsion model to demonstrate the spatial and temporal convergence rates of the proposed algorithm.
Consider the computational domain and the following contrived solution to the system (3.1) on this domain
[TABLE]
The external forces and boundary forces therein are chosen such that the expressions in (3.27) satisfy (3.1) .
The domain is discretized with four equal-sized quadrilateral elements. The initial cell density and initial chemical concentration are given according to the analytic expressions in (3.27) by setting We simulate this problem from to Then we compare the numerical solutions of and at with the analytic solutions in (3.27) and various norms of the errors are computed. The element order and time step sizes are varied systematically in order to investigate their effects on the numerical errors. We employ the function for defining the auxiliary variable and the energy constant in the following convergence tests.
We first study the spatial convergence rate. A fixed and is employed and the element order is varied systematically between 2 and 20. We record the errors at between the numerical solution and the contrived solution (3.27) in both and norms with respect to the element orders. Figure 3.1(a) shows these numerical errors as a function of the element order. We observe an exponential decrease of the numerical errors with increasing element order, and a level-off of the error curves beyond element order 10 and 8, respectively for and , due to the saturation of temporal errors.
The study of the temporal convergence rate is summarized by the results in Figure 3.1(b). Here we fix the integration time and the element order at a large value 18, and vary systematically between and This figure demonstrates the and errors of and as a function of . It is evident that the proposed scheme has a second-order convergence rate in time.
3.3.2 Study of Unconditional Stability and Effect of Algorithmic Parameters
We next consider the test problem used in Gonzalez2019 , and show the efficiency and unconditional stability of the method proposed here. Consider the domain and the initial distributions for the cell density and chemical concentration in this domain given by
[TABLE]
The external forces and boundary forces in (3.1) are set to The computational domain is discretized with 400 equal-sized quadrilateral elements, and the element order is fixed to be 10.
Figures 3.2 and 3.3 demonstrate the dynamics of the system. These results are obtained with , and in the numerical algorithm. Figure 3.2 shows the evolution of the cell density with a temporal sequence of snapshots of the distribution visualized by the contour plots. The coordinate corresponds to in these plots. The system exhibits a very rapid dynamics. The initial cell density has a Gaussian type distribution, taking a minimal value 0.0001 at the domain center and gradually approaching the maximal value 10.0001 near the domain boundary. In a very short time the maximal density increases to around 16, attained near the boundary of a circular region with radius 0.6 and center at ; see Figure 3.2(b). Then the maximal density gradually moves from the circular boundary to the domain boundary between and ; see Figure 3.2(c)-(f). The high density near the domain boundary then appears to diffuse to the low density region near the center , and the system finally reaches an equilibrium state between and with a constant density level; see Figure 3.2(g)-(i). Figure 3.3 illustrates the evolution of the chemical concentration . Figure 3.3(a) shows the distribution of the initial chemical concentration. It has also a Gaussian type distribution, with a maximal value 100.0001 at the origin and decreasing to 0.0001 gradually near the domain boundary. The concentration diffuses rapidly between to (Figures 3.3(a)-(e)), and the maximal concentration decreases to around 10 at the origin. From to the contrast in the concentration levels in the domain becomes even smaller (Figure 3.3(f)-(h)), and the concentration reaches its equilibrium with a constant level around 36.6 (Figure 3.3(i)).
Figure 3.4 shows time histories of three quantities: , , and , corresponding to three time step sizes , and . Note that is computed based on equation (3.4), is computed based on the obtained from the algorithm, and is computed based on equation (3.25). These results are obtained with and in the algorithm. It is observed from Figure 3.4(a) that both and decrease over time and gradually level off at certain levels over time. A comparison of the histories obtained using different indicates that they are quite close, with only some slight difference on the interval between and . Note that is an approximation of in the current method, and the evolution equation for stems from this relation; see equations (2.13a)–(2.14). Therefore, the difference between and , and also the quantity , can serve as an indicator of the accuracy of the simulations. If the difference between and is small, or the deviation of from the unit value is small, then the simulation tends to be more accurate. On the other hand, when the difference between and is pronounced, or the deviation between and the unit value is significant, it implies that is no longer an accurate approximation of and the simulation will contain large numerical errors. Here it can be observed that and computed with essentially overlap with each other, indicating approximates well the quantity However, the time histories for and obtained with and exhibit noticeable discrepancies. This suggests that in these cases is no longer an accurate approximation of We also observe from Figure 3.4(b) that computed by is essentially 1, while with larger values and the computed attains values significantly smaller than 1. These results indicate that with the larger time step sizes and the simulation results contain pronounced errors and they are not accurate any more. Because this problem exhibits very rapid dynamics (see Figures 3.2 and 3.3), to capture such dynamics accurately the requirement on is very stringent.
Thanks to its energy-stable nature, our algorithm can produce stable simulation results even with very large values. This is demonstrated by Figure 3.5 with several large time step sizes, ranging from to , with and in the algorithm. We show the time histories of the total energy (see equation (3.2)) and the ratio for a much longer simulation (up to ). The long time histories demonstrate that the computations with these large values are indeed stable using the current algorithm. On the other hand, because these values are very large, we cannot expect that the results will be accurate. This is evident from the values of in Figure 3.5(b). These time histories for tend to level off at very small but positive values, with large deviations from the unit value. It is noted that the simulations are nonetheless stable, regardless of .
When defining the modified energy (see equation (3.4)) we have incorporated an energy constant . The goal of is to ensure that for all time, even in certain extreme cases such as when , so that (as in ) is always well-defined. We observe that the choice of the value seems to have some influence on the numerical results. This effect is illustrated by Figure 3.6. Here we employ and and , and depict the time histories of and obtained with several values (, , and ). With the smaller , the obtained histories corresponding to different values overlap with one another. The computed values are essentially , with a discrepancy on the order of magnitude of . This discrepancy between the computed and the unit value is associated with the smaller and . With the larger and , no difference can be observed at this scale. This suggests that with a small (so that the simulation result is generally accurate) a larger value tends to give rise to more accurate in terms of its discrepancy from the unit value. Figures 3.6(c) and (d) are the corresponding result obtained with a larger , in which case the simulation result is no longer accurate. In this case it is observed that with the larger and the energy history curves exhibit a bump, apparently artificial; see Figure 3.6(c). In contrast, with the smaller and , such a bump is not quite obvious from the energy history curves. In addition, with the larger and , the computed attains a very small value (close to 0), while attains a value around with the smaller and . This indicates that, with larger (when simulation loses accuracy), the simulation results obtained with a smaller may be better than those obtained with a larger , even though all the results become inaccurate. The results of this group of tests suggest the following. With small values, a larger tends to give rise to more accurate results in the sense that the computed tends to be closer to the unit value. However, a that is very large seems to have an adverse effect when becomes large, because it can lead to computed values that deviate from the unit value more severely. The majority of simulations in this section are performed using .
The method developed in the current work can employ a general function (with inverse ) to define the auxiliary variable , as long as is a one-to-one increasing differentiable function satisfying (2.12). We observe that the choice for the specific mapping seems to have very little or no influence on the simulation results using the current method. This point is demonstrated by Figure 3.7. Here we have considered several functions, () and with and . Figure 3.7 shows the time histories of and obtained using these mappings, together with a fixed and two time step sizes and . It can be observed that the time history curves for both and corresponding to different functions overlap with one another, suggesting no or very little difference in the simulation results. In particular, Figure 3.7(d) shows the history curves corresponding to different obtained with the smaller , with the vertical axis magnified around the unit value. It can be observed that the difference between various curves is on the order of magnitude . Since little difference in the numerical results is observed with different mapping functions using the current method, the majority of numerical tests reported in this and subsequent sections will be carried out using the simplest mapping .
In Section 2.4 we have discussed another unconditionally energy-stable scheme (referred to as “alternative method”), which is based on an alternative formulation with . The dynamic equation for the auxiliary variable is accordingly replaced by equation (2.48). Figure 3.8 is a comparison of the time histories for and obtained using these two methods. The results in Figure 3.8(a) and (b) are obtained with a mapping function (or equivalently ), and those in (c) and (d) correspond to (or ). We observe that there seems to be little difference in the computed total energy . But some difference can be noted with the histories. The computed values using the current method (with ) seem to be consistently larger than those using the alternative method (with ). While all these values deviate from the unit value substantially because of the time step size , the deviation with the current method appears noticeably smaller than that with the alternative method. This seems to suggest that, while the simulation results using these methods are not very much different, the formulation using may be somewhat better than the alternative formulation using .
4 Cahn-Hilliard Equation with Constant and Variable Mobility
We apply the gPAV method to simulate the Cahn-Hilliard equation CahnH1958 in this section. This equation has widespread applications in the phase-field modeling of materials science, two-phase and multiphase flows (see e.g. LowengrubT1998 ; Chen2002 ; LiuS2003 ; YueFLS2004 ; KimL2005 ; DingSS2007 ; DongS2012 ; Dong2012 ; Dong2014 ; LiuSY2015 ; WuX2017 ; XuLWB2019 , among others). Consider the Cahn-Hilliard equation on a domain (with boundary ):
[TABLE]
supplemented by the initial condition
[TABLE]
In these equations, is the phase field function, , and are prescribed source terms for the purpose of convergence testing only, and will be set to in actual simulations. is the free energy functional,
[TABLE]
in which is the characteristic interfacial thickness scale, and is referred to as the mixing energy density coefficient and is related to other physical parameters. For example, for two-phase flow problems is given by where is the surface tension. is referred to as the chemical potential, and the nonlinear term is given by . is referred to as the potential free energy density function, which can take many different forms. In this paper we only consider the double-well form as given in (4.3). is the mobility, and in this work we consider two cases: (i) , and (ii) , with being a given positive constant.
We take the inner product between (4.1a) and , perform integration by part and impose the boundary condition (4.1d). This leads to the energy balance equation,
[TABLE]
Based on equations (2.11) and (4.4), we define the shifted total energy by
[TABLE]
where is chosen to ensure . Let us define and and based on equations (2.13a)–(2.13b). Following equation (2.14) and using (4.5), we have
[TABLE]
where the boundary condition (4.1d) has been used.
4.1 Constant Mobility
Assume that is a constant. We reformulate equations (4.1a)–(4.1c) as follows,
[TABLE]
where is chosen constant satisfying a condition to be specified later. Note that a zero term is added in these equations. We reformulate equation (4.6) as follows,
[TABLE]
where is given by (4.1b), and the following zero terms have been incorporated into the RHS,
[TABLE]
The energy-stable scheme for the equations (4.7a)–(4.7b), (4.1d) and (4.8) is as follows:
[TABLE]
and
[TABLE]
These are supplemented by the initial conditions
[TABLE]
In the above equations, and are defined by (2.21b), and is defined by (2.21c). , and are second-order approximations of , and , respectively, to be specified later in (4.25)–(4.27). is an approximation of to be specified later in (4.26).
Theorem 4.1**.**
In the absence of the external force and with zero boundary conditions the scheme consisting of (4.10)-(4.11) is unconditionally energy stable in the sense that
[TABLE]
if the approximation of at time step is positive.
Proof.
Multiplying to equation (4.10a), integrating over the domain, and adding the resultant equation to equation (4.11), we obtain the energy balance relation as follows:
[TABLE]
where we have used the relation (2.28). If and , then
[TABLE]
If , one can conclude by induction that for any . This leads to (4.13). ∎
The method from the Appendix A can be employed to compute the first time step, which can ensure that the approximation of at the step is positive.
To implement the scheme we note that equation (4.10a) can be transformed into
[TABLE]
where we have used the notation in equation (2.38). This equation can be reformulated into the following two Helmholtz type equations that are de-coupled from each other (barring the unknown scalar number ), (see e.g. DongS2012 ; YangLD2019 for details)
[TABLE]
where is an auxiliary field variable defined by (4.17b), and the constant is given by and the chosen constant must satisfy
[TABLE]
In light of (4.17b) and (4.10c), the boundary condition (4.10b) can be transformed into
[TABLE]
To solve equations (4.17a)-(4.17b) together with the boundary conditions (4.19) and (4.10c), we take advantage of the fact that is a scalar number and introduce two sets of field functions as solutions of the following equations:
For :
[TABLE]
For :
[TABLE]
For :
[TABLE]
For :
[TABLE]
Then for given scalar number the following field functions solve the system consisting of equations (4.17), (4.19) and (4.10c):
[TABLE]
where are given by equations (4.20a)-(4.23).
Now we are ready to determine the unknown scalar Following equations (2.43), we define
[TABLE]
where equation (4.17b) has been used. Accordingly, in light of equations (4.1b) and (2.38), we define
[TABLE]
We further define
[TABLE]
Combining equations (4.10d) and (4.14), we obtain the formula for ,
[TABLE]
where is given by
[TABLE]
Once is known, and can be obtained directly by equation (4.24) and can be computed based on equation (2.46).
Equations (4.17a)-(4.23) are Helmholtz type equations with Neumann type boundary conditions. They can be implemented with spectral elements in a straightforward fashion.
Remark 4.1**.**
In equation (4.10a), we have treated the nonlinear term explicitly by . When becomes large, can no longer approximate well. Thus, although the scheme (4.10)-(4.11) is unconditionally stable, the simulation will lose accuracy for large time steps. One possible approach to improve the accuracy is to replace in equation (4.10a) by
[TABLE]
where is a chosen field function close to , e.g. a snapshot of the field in the recent past. The first term in the above equation serves as a linearized approximation of and the second term serves as a correction to this approximation. By doing so, equation (4.10a) with the mentioned modification is still linear, but can no longer be decoupled straightforwardly. One needs to solve either a fourth-order linear equation or a coupled linear system. However, this treatment can result in improved accuracy besides unconditional stability. We will demonstrate this in the forthcoming case for the Cahn-Hilliard equation with variable mobility.
4.2 Variable Mobility
Next, we consider the case with a variable mobility, . We reformulate the equations (4.1a)–(4.1c) into
[TABLE]
In these equations, is given by (4.1b), is a chosen field distribution corresponding to at a certain time instant or at some time instants, and
[TABLE]
where is a chosen constant. By incorporating the following zero terms into the RHS of (4.6),
[TABLE]
we can transform this equations into,
[TABLE]
Following equations (2.25a)-(2.25e), we propose the following scheme:
[TABLE]
and
[TABLE]
together with the boundary condition (4.10c) and the initial condition (4.12). In these equations, and are defined in (2.21b), is given by (2.21c), and and are computed by
[TABLE]
, , , and are approximations to be specified later.
Theorem 4.2**.**
In the absence of the external source term (), and with zero boundary conditions (), the scheme consisting of (4.34)-(4.35) is unconditionally energy stable in the sense that
[TABLE]
if the approximation of at time step is positive.
Proof.
We take the inner product between \big{(}-\lambda\nabla^{2}\phi^{n+1}+h(\phi^{n+1})\big{)} and equation (4.34a), and add the resultant equation to equation (4.35). This leads to
[TABLE]
By the same arguments as in the proof of Theorem 4.1, we arrive at the relation (4.37) based on the above equation. ∎
For implementation of the scheme, one notes that equation (4.34a) can be transformed into
[TABLE]
Barring the unknown scalar equations (4.39), (4.34b), (4.34e) and (4.10c) can be solved as follows. Introduce two pairs of field functions as the solution of the following equations:
For :
[TABLE]
For :
[TABLE]
Then for given scalar value the following field functions solve the system consisting of equations (4.34a)-(4.34e) and (4.10c):
[TABLE]
where are given by equations (4.40)-(4.41).
The unknown scalar value remains to be determined. Following equation (2.43), and are again given by equations (4.25) and (4.26), where based on equation (4.34b) we compute by
[TABLE]
The approximation is given by (4.27). As a result, can be computed by,
[TABLE]
where is given by (4.29), and and can be evaluated by equations (4.42) and (2.46), respectively.
Equations (4.40)-(4.41) can be discretized in space by spectral elements, and their weak forms are:
For : Find such that
[TABLE]
for all
For : Find such that
[TABLE]
for all
Remark 4.2**.**
If one chooses and , then the scheme (4.34a)–(4.35) can also be implemented by solving four de-coupled Helmholtz type equations in a way similar to the constant mobility case in Section 4.1.
4.3 Numerical Results
We next provide numerical examples to demonstrate the accuracy and unconditional stability of the proposed schemes (4.10)-(4.11) and (4.34)-(4.35) for Cahn-Hilliard equation with constant and variable mobilities. For cases with variable mobility we employ in the algorithm with these tests, where and will be specified below.
4.3.1 Convergence Rates
Consider domain and a contrived solution in this domain:
[TABLE]
The external force and boundary source terms , and in (4.1a), (4.1c) and (4.1d) are chosen such that the analytic expression (4.49) satisfies (4.1).
The computational domain is discretized with two equal-sized quadrilateral elements. The algorithms (4.10)-(4.11) for the constant-mobility case and (4.34)-(4.35) for the variable-mobility case are employed to numerically integrate the Cahn-Hilliard equation from to . The initial field function is obtained by setting in the contrived solution (4.49). The numerical errors are computed by comparing the numerical solution against the analytic solution (4.49) at In the following convergence tests, we fix and in (4.34). The values for the simulation parameters are summarized in Table 1.
In the spatial convergence test, we fix and , and vary the element order systematically from 2 to 20. The numerical errors in and norms at are then recorded. For the algorithm with constant mobility, in equation (4.10) is chosen as while for the algorithm with variable mobility we use Figures 4.1(a) and (b) show the numerical errors as a function of the element order from these tests. It can be observed that the errors decrease exponentially with increasing element order and that the error curves level off at around and beyond element order 8 and 10, respectively for these two solvers, due to the saturation of temporal errors.
In the temporal convergence test, we fix the element order at a large value 18, and , and vary systematically from to to study the behavior of numerical errors. For the constant-mobility case, (where ), while for the variable-mobility case Figures 4.1(c) and (d) show the numerical errors as a function of for these cases. We observe a second-order convergence rate in time for both cases.
4.3.2 Constant Mobility: Coalescence of Two Drops
We next consider the coalescence of two drops to demonstrate the numerical properties of the proposed scheme (4.10)-(4.11) for problems with constant mobility. Consider a square domain and two materials contained in this domain. It is assumed that the dynamics of the material regions is governed by the Cahn-Hilliard equation with a constant mobility, , and that and correspond to the bulk of the first and second materials, respectively. We assume that at the first material occupies two circular regions that are right next to each other and the the rest of the domain is filled by the second material.
To be more specific, the initial distribution of the material takes the form
[TABLE]
where and are the centers of the circular regions for the first material, and is the radius of these circles. The external force and the boundary source terms in (4.1) are set to We discretize the domain using 400 equal-sized quadrilateral elements with element order 10. We employ a mapping function for this problem. The simulation parameters are listed as follows:
[TABLE]
Figure 4.2 shows the evolution of the two material regions with a temporal sequence of snapshots of the interfaces between these two materials visualized by the contour level It can be observed that the two separate regions of the first material gradually coalescence with each other to form a single drop under the Cahn-Hilliard dynamics.
To investigate the effect of time step size on the accuracy of the simulation results, in Figure 4.3 we compare the distributions of the material interfaces at obtained with several time step sizes, ranging from to The distribution computed with and are essentially the same. With the larger time step size some difference can be noticed in the material distribution compared with those obtained using smaller values. This suggests the simulation is starting to lose accuracy with time step sizes and larger.
Figure 4.4 shows the time histories of the total energy (see equation (4.3)) and the ratio obtained using time step sizes to It can be observed that the history curves essentially overlap with one another for different time step sizes. The computed values for are very close to 1 for each , suggesting that is a good approximation for and the numerical approximation is accurate with these time steps.
Thanks to the energy stability property of the current method, we can use fairly large time step sizes for the simulations. In Figure 4.5, we depict some longer time histories (up to ) of the total energy and the ratio obtained using several large time step sizes At these large values we can no longer expect the results to be accurate. Indeed, in Figure 4.5(a), increases initially, and levels off over time at around Meanwhile, decreases rapidly to a smaller number close to 0, suggesting that there is a large discrepancy between and While these computation results are not accurate, they nonetheless demonstrate the proposed method is stable and robust with large time steps.
As discussed in previous sections, the current scheme guarantees the positivity of the computed and values, regardless of the time step size or the external forces. In Figure 4.6, we compare the time histories of the computed auxiliary variable obtained using the current method and the scalar auxiliary variable (SAV) method from ShenXY2018 . In the SAV method, the auxiliary variable is computed by a dynamic equation stemming from the relation , where . Therefore, is expected to be positive on the continuous level. In reality, however, the discrete solutions for computed by the SAV method can become negative. This is evident from Figure 4.6(b), where the result obtained using the SAV method with a large is shown. On the other hand, the discrete solutions for from the current method are guaranteed to be positive, which is evident from Figure 4.6(a).
4.3.3 Variable Mobility: Evolution of a Drop
We next consider the evolution of a square drop governed by the Cahn-Hilliard equation with a variable mobility. The computational domain and the settings follow those for the coalescence of two drops discussed above. The difference lies in the initial distribution of the materials. To be precise, the initial distribution of field function is set as follows:
[TABLE]
where is the center of the domain and
Figure 4.7 shows the evolution of the system with a temporal sequence of snapshots of the interfaces between the two materials. These results are computed with a time step size , , , and the mapping function . The in the algorithm is taken as the field at every fifth time step, i.e. (). In other words, the field and also the coefficient matrices of the system are updated every time steps in this set of tests. These results illustrate the process for the evolution of the initial square region into a circular region under the Cahn-Hilliard dynamics.
In Figure 4.8, we show the time histories of the total energy and obtained with several time step sizes ranging from to Note that the variable mobility is . Here we have considered two ways to simulate the problem:
- •
by setting in the algorithm. This leads to and , and a time-independent coefficient matrix for the system, which can be pre-computed. We refer to this setting as the standard way.
- •
by setting () in the algorithm. The field and the coefficient matrix are quasi time-independent, and they are updated every time steps.
With the smaller time step sizes and , we set in the algorithm (the standard way) when performing simulations. With the larger , we have conducted simulations in both ways with the algorithm. In Figure 4.8(a) the results from these two settings are marked by “no update” (standard way) and “update” (second way) in the legend corresponding to . It is observed that the energy histories corresponding to and , and with updated periodically, essentially overlap with each other. However, the energy history corresponding to with exhibits a pronounced discrepancy compared with the other cases. These results indicate that with the standard way (by setting ) in the algorithm the simulation result would cease to be accurate when the time step size increases to . However, if one uses the second way (by updating periodically), accurate simulation result can be obtained even with . In other words, by updating in the algorithm from time to time, one can improve the accuracy of the simulations even at larger time step sizes. We depict in Figure 4.8(b) the time histories of corresponding to these time step sizes. Shown for in this plot is the result with updated periodically. It is observed that the computed is essentially 1 with and With (and updated periodically), the computed is substantially smaller than 1. But interestingly, the simulation results for the field function are still quite accurate with this larger . This group of tests suggests that one possible way to improve the accuracy of the proposed energy-stable scheme is to update the in the algorithm periodically, e.g. every time steps. By choosing an appropriate for a given problem, one can enhance the simulation accuracy even at large or fairly large time step sizes. Because and the coefficient matrix for the system only needs to be updated infrequently, the cost associated with updating the coefficient matrix can be manageable. There is a drawback with this, however. The computations using the second way (updating periodically) seems not as robust as the standard way (by setting ) for large . Because of the non-zero field in the algorithm, the conditioning of the system coefficient matrix using the second way seems to become worse for large . We observe that for larger the system coefficient matrix using the second way can become singular and the computation may break down.
5 Nonlinear Klein-Gordon Equation
We consider an energy-conserving system, the nonlinear Klein-Gordon equation, in this section and apply the gPAV method to this system. Consider the nonlinear Klein-Gordon equation Strauss1978 on a domain (with boundary )
[TABLE]
where , and are positive constants. These equations are supplemented by the initial conditions
[TABLE]
In these equations and is a potential energy function with The above system satisfies the following energy balance law:
[TABLE]
We define a shifted total energy according to equation (2.11),
[TABLE]
where is chosen such that . Choose and , and define the auxiliary variable based on equation (2.13a). Following equation (2.14), we have
[TABLE]
where integration by part has been used.
Following equations (2.17)-(2.19), we reformulate equations (5.2) and (5.7) into
[TABLE]
Note that when deriving (5.8b) we have incorporated the following zero terms to the RHS,
[TABLE]
The reformulated system consists of equations (5.1), (5.8a)-(5.8b) and (5.3)-(5.4), which is equivalent to the original system (5.1)-(5.4).
Since the Klein-Gordon equation is conservative (in the absence of external source term and with appropriate boundary condition), we will employ the Crank-Nicolson method for time discretization of the field variables, by enforcing the discretized equations at step . This corresponds to the approximations (2.33a)–(2.34) with and . So the method here is slightly different than the one presented in Section 2.2, which corresponds to and in the approximations (2.33a)–(2.34). The energy-stable scheme for the nonlinear Klein-Gordon equation is then as follows:
[TABLE]
together with
[TABLE]
These equations are supplemented by the initial conditions
[TABLE]
where is evaluated by
[TABLE]
In the above equations, is defined by (2.34) with , and
[TABLE]
and are second-order approximations of and respectively, defined later in (5.22)-(5.23).
Theorem 5.1**.**
In the absence of the external force and with homogeneous boundary condition () and suppose that the initial condition satisfies the compatibility condition the scheme consisting of (5.9)-(5.11) conserves the modified energy in the sense that:
[TABLE]
Proof.
Multiplying \big{(}-\alpha^{2}\nabla^{2}u^{n+\frac{1}{2}}+\varepsilon_{1}^{2}u^{n+\frac{1}{2}}+g(u^{n+\frac{1}{2}})\big{)} to equation (5.9a), to equation (5.9b), taking the integrals, and summing up the resultant equations with equation (5.10), we arrive at the relation,
[TABLE]
where we have used equations (2.21b)-(2.22). If , then and for all . Based on the definition of in the equation (5.23) below, it is straightforward to verify that as long as . Furthermore, if the volume integrals in equation (5.15) vanish. This leads to equation (5.14). ∎
Remark 5.1**.**
Since is an approximation of the discrete conservation for in equation (5.14) does not imply the conservation for on the discrete level. However, it does lead to an unconditionally energy stable scheme for long time simulations.
Despite the complication caused by the unknown scalar variable the proposed scheme can be solved in a decoupled fashion. Combining equations (5.9a) and (5.13), we get
[TABLE]
Inserting equation (5.16) into (5.9b) leads to
[TABLE]
To solve this equations, we introduce and as solutions of the following two equations:
[TABLE]
and
[TABLE]
Then the solution to equation (5.17), together with the boundary condition (5.9e), is given by
[TABLE]
where is to be determined.
We define
[TABLE]
By combining equations (5.9c) and (5.15), we can determine ,
[TABLE]
With known, and can be computed by equations (5.21) and (5.16), respectively. can be computed by,
[TABLE]
The weak formulations for equations (5.18) and (5.20) are: Find such that
[TABLE]
[TABLE]
These can be implemented with spectral elements in a straightforward fashion.
5.1 Numerical Results
We next provide numerical examples to demonstrate the accuracy and unconditional stability of the proposed scheme to the Klein-Gordon equation (5.1)-(5.3). Specifically, we fix the parameters therein and the potential energy function as
[TABLE]
This corresponds to the dimensionless relativistic Sine-Gordon equation (DRSG) (see e.g. Bao2012 ).
5.1.1 Convergence Rates
To study the convergence rates in space and time of the proposed method, we employ the following manufactured analytic solution
[TABLE]
The external force in (5.2) and the external boundary source term are chosen such that the above expression (5.29) satisfies equations (5.1)-(5.3).
The computational domain is discretized using two equal-sized quadrilateral elements, with the element order and the time step size varied systematically in the spatial and temporal tests. The algorithm presented in this section is employed to numerically integrate the DRSG equation from to The mapping and are used in these computations. The initial condition and are obtained by setting in the analytic expression (5.29) and using (5.1). We then record the numerical errors in different norms by comparing the numerical solution with the analytic solution at
To conduct the spatial convergence test, we vary systematically the element order from 2 to 20 and depict in Figure 5.1(a) the and errors of as a function of the element order with a fixed and It is observed that the numerical errors decay exponentially with increasing element order, and levels off beyond element order 12, caused by the saturation of temporal errors.
To study the temporal convergence rate, we fix the element order at a large value 18 and . The time step size is varied systematically from 0.2 to and the numerical errors in and norms are depicted in Figure 5.1(b). A second-order convergence rate in time is clearly observed.
5.1.2 Study of Method Properties
We next study the remarkable stability of the proposed method with the DRSG equation. Consider the DRSG equation on the domain , with zero external force and zero boundary source term in (5.3). The initial conditions are set to
[TABLE]
With these initial and boundary conditions, the DRSG equation is energy conserving.
The domain is discretized with 400 equal-sized quadrilateral elements with a fixed element order 10. We employ a mapping function () and the energy constant in the algorithm. Figure 5.2 illustrates the evolution of by a sequence of snapshots of its contour levels. One can observe a circular wave pattern starting from the center of the domain and propagating outward toward the boundaries. As the wave reaches the boundaries, the interaction with the Dirichlet boundary () gives rise to an extremely complicated wave pattern; see Figure 5.2(d).
Figure 5.3(a) shows the time histories of the energy errors, , obtained using several time step sizes (, and ). One can observe oscillations in the history curves about their respective mean values that are consistent with a second order accuracy in time. It should again be noted that the current algorithm conserves the modified energy discretely, not the original energy . Figure 5.3(b) shows time histories of the ratio corresponding to these values. The computed values are essentially , indicative of the accuracy of these simulations.
We then increase the time step size to and , and depict in Figure 5.4(a) the time histories of and for a long time simulation to . Large discrepancies between the energy and can be observed, especially for and , suggesting that no longer approximates well the energy with these time step sizes. Note that the histories obtained by different large values overlap with one another. This is consistent with Theorem 5.1 that the current scheme conserves the modified energy . It can be observed from Figure 5.4(b) that the computed becomes significantly smaller than 1, indicative of large errors in the simulations with these large time step sizes. However, the computations are evidently stable, even with these large values.
6 Concluding Remarks
In this paper we have presented a framework (gPAV) for developing unconditionally energy-stable schemes for general dissipative systems. The scheme is based on a generalized auxiliary variable (which is a scalar number) associated with the energy functional of the system. We find that the square root function, which is critical to previous auxiliary-variable approaches, is not essential to devising energy-stable schemes. In the current method, the auxiliary variable can be defined by a rather general class of functions, not limited to the square-root function. The gPAV method is applicable to general dissipative systems, and a unified procedure for discretely treating the dissipative governing equations and the generalized auxiliary variable has been presented. The discrete energy stability of the proposed scheme has been proven for general dissipative systems. The presented method has two attractive properties:
- •
The scheme requires only the solution of linear algebraic equations within a time step, and no nonlinear solver is needed. Furthermore, with appropriate choice of the operator in the algorithm, the resultant linear algebraic systems upon discretization involve only constant and time-independent coefficient matrices, which only need to be computed once and can be pre-computed. In terms of computational cost, the scheme is computationally very competitive and attractive.
- •
The generalized auxiliary variable can be computed directly by a well-defined explicit formula. The computed values for the auxiliary variable are guaranteed to be positive, regardless of the time step size or the external forces or source terms.
Three specific dissipative systems (a chemo-repulsion model, Cahn-Hilliard equation with constant and variable mobility, and the nonlinear Klein-Gordon equation) have been studied in relative detail to demonstrate the gPAV framework developed herein. Ample numerical experiments have been presented for each system to demonstrate the performance of the method, the effects of algorithmic parameters, and the stability of the scheme with large time step sizes.
All physically meaningful systems in the real world are energy dissipative (or conserving) due to the second law of thermodynamics, and these systems are typically nonlinear. The design of energy-stable and computationally-efficient schemes for such systems is critical to their numerical simulations, and this is in general a very challenging task. The gPAV framework presented here lays out a roadmap for devising discretely energy-stable schemes for general dissipative systems. The computational efficiency (e.g. involving linear equations with pre-computable coefficient matrices) and the guaranteed positivity of the computed auxiliary variable of the method are particularly attractive, in the sense that the gPAV method is not only unconditionally energy-stable but also can be computationally efficient and competitive. We anticipate that the gPAV method will be useful and instrumental in numerical simulations of a number of computational science and engineering disciplines.
Acknowledgement
This work was partially supported by NSF (DMS-1522537).
Appendix A. Approximation for the First Time Step
We present a method on how to deal with the first time step such that the approximation for the auxiliary variable at time step shall be positive. We consider below only the formulation based on . It is noted that for the alternative formulation based on (see Section 2.4) one can modify the following scheme in a straightforward fashion to achieve the same property. The notations here follow those employed in the main text.
Consider the system consisting of equations (2.17), (2.19), the boundary condition (2.2), and the initial conditions (2.3) and (2.20). Define
[TABLE]
One notes that and .
We compute the first time step in two substeps. In substep one we compute an approximation of (), denoted by (), and in substep two we compute the final (). More specifically, the scheme is as follows:
Substep One:
[TABLE]
Substep Two:
[TABLE]
Note that in the above equations the superscript of a variable such as and denotes the time step index. In (6.2b) and (6.2e) is an approximation of and will be specified later in (6.12). In (6.3e) is an approximation of and will be specified later also in (6.12). In (6.3b), (6.3c) and (6.3e), , and are defined by
[TABLE]
It can be noted that the above scheme represents a first-order approximation of () for the first time step.
Combine equations (6.2a) and (6.2e) and we have
[TABLE]
where In light of (6.2b), this leads to
[TABLE]
Since , we conclude that and based on these equations. It follows that in light of equation (6.4).
Similarly, combining equations (6.3a) and (6.3e) gives rise to
[TABLE]
where In light of (6.3b) and (6.4), we have
[TABLE]
We therefore conclude that , and .
We still need to determine and , and specify and . Note that and are linear operators. Equations (6.2a) and (6.2d), and also equations (6.3a) and (6.3d), can be solved as follows. Define two variables and as solutions to the following systems, respectively:
For :
[TABLE]
For :
[TABLE]
Then it is straightforward to verify that, for given and , the following functions respectively solve the equations (6.2a) and (6.2d), and equations (6.3a) and (6.3d),
[TABLE]
We then specify and as follows,
[TABLE]
The solution for () at the first time step consists of the following procedure:
- •
Solve equations (6.9a)–(6.9b) for ;
Solve equations (6.10a)–(6.10b) for .
- •
Compute and by equation (6.12);
Compute and by equation (6.6);
Compute by equation (6.11a).
- •
Compute and based on equation (6.4);
Compute and based on equation (6.8);
Compute by equation (6.11b).
We can make the following conclusion based on the above discussions.
Theorem 6.1**.**
The scheme represented by (6.2a)–(6.3e) for computing the first time step has the property that
[TABLE]
where and are given by (6.4), regardless of the time step size and the external forces and .
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] H. Abels, H. Garcke, and G. Grün. Thermodynamically consistent, frame indifferent diffuse interface models for incompressible two-phase flows with different densities. Mathematical Models and Methods in Applied Sciences , 22:1150013, 2012.
- 2[2] D.M. Anderson, G.B. Mc Fadden, and A.A. Wheeler. Diffuse-interface methods in fluid mechanics. Annual Review of Fluid Mechanics , 30:139–165, 1998.
- 3[3] W. Bao and X. Dong. Analysis and comparison of numerical methods for the Klein-Gordon equation in the nonrelativistic limit regime. Numerische Mathematik , 120:189–229, 2012.
- 4[4] J.W. Cahn and J.E. Hilliard. Free energy of a nonuniform system. I interfacial free energy. Journal of Chemical Physics , 28:258–267, 1958.
- 5[5] W. Cai, H. Li, and Y. Wang. Partitioned averaged vector field methods. Journal of Computational Physics , 370:25–42, 2018.
- 6[6] E. Celledoni, V. Grimm, R.I. Mc Lachlan, D.I. Mc Laren, D. O’Neale, B. Brown, and G.R.W. Quispel. Preserving energy resp. dissipation in numerical PD Es using the ”average vector field” method. Journal of Computational Physics , 231:6770–6789, 2012.
- 7[7] L.Q. Chen. Phase-field models for microstructure evolution. Annual Review of Materials Research , 32:113–140, 2002.
- 8[8] Q. Cheng and J. Shen. Multiple scalar auxiliary variable (sav) approach and its application to the phase-field vesicle membrane model. SIAM J. Sci. Comput. , 40:A 3982–A 4006, 2018.
