1 Introduction

Surfactants are usually organic compounds that can alter or reduce the surface tension of the solution, and allows for the mixing of dissimilar (immiscible) liquids. A typical well-known example of dissimilar liquids is the mixture of oil and water, where the water molecule is polar, and it does not hang out with nonpolar molecules like oil. Hence, in order to make the mixing more favorable, a molecular intermediate, commonly referred as surfactants, is needed. The surfactant molecules are amphiphilic, they are capable of binding to both water and oil molecules (hydrophilic heads into the water, hydrophobic tails into the oil), allowing these molecules to mix via reducing the surface tension between water and oil. This is the essential reason that people can clean the hands or clothes using soaps or detergents. Except the daily uses in cleaning, surfactants have been widely used in industrial fields for various purposes, e.g., oil recovery [52] and food processing [37], etc.

There is a large quantity of studies on the modeling and numerical simulations to investigate the binary fluid-surfactant system. In the pioneering work of Laradji et al. [26, 27], the diffuse interface approach, or called the phase field method, was firstly used to study the phase transition behaviors of the monolayer microemulsion system, formed by surfactant molecules. Following Laradji’s work, a number of phase field type of fluid-surfactant models have been developed during the last two decades, see also [12, 14, 25, 53,54,55]. In this paper, we consider the numerical approximations for solving the model that was developed by Komura et al. in [25] since it appears to be the minimal model with the least number of nonlinear coupling entropy terms in the free energy. The main difference between the surfactant models for fluid-surfactant system and the most classical Cahn–Hilliard phase field model for two phase system, that was proposed by Cahn and Hilliard in [4] and well-studied in [5, 6, 9, 13, 21, 23, 28, 29, 33, 35, 51, 61, 65, 66] and the references therein, is that an extra phase variable (surfactant) has to be used. Hence two physical phase field variables are incorporated in the model, where one is used to represent the local densities of the fluids, and the other is used for the local concentration of the surfactant. Except the regular potentials, e.g., the hydrophilic (gradient entropy) and hydrophobic part (nonlinear double well potential) for each phase field variable, some nonlinear coupling entropy terms are participated in the total free energy. By minimizing the total energy via the variational approach, one can obtain the governing system that consists two nonlinearly coupled Cahn–Hilliard type equations.

From the numerical point of view, although the phase field variable is continuous and smooth, the induced models are still very stiff where the stiffness is induced by an order parameter that represents the thickness of the interface. It can be seen clearly from a fact that some severe stability conditions on the time step will occur if the nonlinear term is discretized in some normal ways like fully implicit or explicit type approaches. Such a constraint on the time step can cause very high computational cost in practice [11, 45]. Hence, it is desirable to establish efficient numerical schemes that can verify the so-called energy stable property at the discrete level irrespectively of the coarseness of the discretization. Such kinds of algorithms are usually called unconditionally energy stable or thermodynamically consistent. The scheme with this property is specially preferred since it is not only critical for the numerical scheme to capture the correct long time dynamics of the system, but also provides sufficient flexibility for dealing with the stiffness issue. Although a variety of the phase field models of the fluid-surfactant system [25,26,27, 54] had been built for over twenty years, we must notice that there are very few successful attempts in designing unconditional energy stable schemes where the main difficulty lies in the discretization for the nonlinear terms, in particular the nonlinear coupling term associated with multiple phase field variables. In [22], a second order in time, nonlinear scheme was developed based on the Crank–Nicolson method. However, the scheme could be computationally expensive due to its highly nonlinear and coupling nature. Moreover, since the nonlinear terms are mostly treated implicitly, the energy stability of the scheme does not hold at all, and the solvability is unknown yet.

Therefore, the main purpose of this paper is to construct some time discretization schemes that are expected to be easy-to-implement (linear system) and unconditionally energy stable (with a discrete energy dissipation law). We achieve this goal by adopting the “Invariant Energy Quadratization” (IEQ) approach (cf. [7, 18, 58, 62,63,64, 67, 68, 73, 74]) for the nonlinear double well potentials, and a subtle explicit-implicit treatment for the nonlinear coupling term. As a result, in each time step, the scheme leads to two decoupled linear systems. Moreover, we show that each corresponding linear operator is symmetric positive definite, so that one can solve it using the well-developed fast matrix solvers efficiently (CG or other Krylov subspace methods). To the best of the author’s knowledge, the numerical scheme proposed in this paper is the first linear, decoupled schemes for the nonlinearly coupled multivariable phase-field model.

The rest of the paper is organized as follows. In Sect. 2, we present the whole model and give the PDE energy law. In Sect. 3, we develop a linear, totally decoupled, first order time stepping scheme and prove the well-posedness and unconditional stability. We further develop a linear, totally decoupled second order time stepping schemes based on the Adam-Bashforth method. Various numerical experiments are carried out in Sect. 4 to validate the accuracy and stability of the proposed scheme. Finally, some concluding remarks are presented in Sect. 5.

2 Models

We now give a brief introduction for binary fluid-surfactant phase field model. To fix the notations, without ambiguity, we denote by \((f(\varvec{x}),g(\varvec{x}))=(\int _\Omega f(\varvec{x})g(\varvec{x})d\varvec{x})^{\frac{1}{2}}\) the \(L^2\) inner product between functions \(f(\varvec{x})\) and \(g(\varvec{x})\), by \(\Vert f\Vert =(f,f)\) the \(L^2\) norm of function \(f(\varvec{x})\), where \(\Omega \) is the computed domain.

In the ternary fluid flow system for the mixture of water, oil and surfactant, monolayers of surfactant molecules form microemulsions as a random phase. Such a microemulsion system usually exhibits various interesting microstructures depending on the temperature or the composition. In [25], the dynamics of microphase separation in microemulsion systems was modeled by a phase field model with two order parameters, where, the free energy of the system is given as follows,

$$\begin{aligned} E(\phi ,\rho )= & {} \int _\Omega \Bigg (\underbrace{\frac{1}{2}|\nabla \phi |^2+\frac{\alpha }{2}(\Delta \phi )^2+\frac{1}{4\epsilon ^2}(\phi ^2-1)^2}_{\hbox {part A}}\nonumber \\&+ \underbrace{\frac{\beta }{2}|\nabla \rho |^2+\frac{1}{4\eta ^2} \rho ^2(\rho -\rho _s)^2}_{\hbox {part B}}-\underbrace{\theta \rho |\nabla \phi |^2}_{\hbox {part C}}\Bigg )d\varvec{x}\end{aligned}$$
(2.1)

where \(\alpha ,\beta ,\epsilon ,\eta , \rho _s, \theta \) are all positive parameters.

Now we give some brief descriptions about the free energy. More detailed descriptions about the modeling can be found in [25].

In part A, the phase field variable \(\phi \) is introduced to label the local densities of the two fluids, e.g., water and oil, where the fourth order polynomial is the double well Ginzburg–Landau potential. Thus there are two minimum values for this polynomial which means the two bulk state for \(\phi \), i.e.,

$$\begin{aligned} \phi (\varvec{x},t)={\left\{ \begin{array}{ll} 1 &{}\quad \text {fluid I, }\\ -1 &{} \quad \text {fluid II}. \end{array}\right. } \end{aligned}$$
(2.2)

The interface of the fluid mixture is described by the zero level set \(\Gamma _t=\{\varvec{x}: \phi (\varvec{x},t)=0\}\). Part I is the well-known “mixing” energy for phase field model, where the linear part (\((\Delta \phi )^2\) and \(|\nabla \phi |^2\)) contributes to the hydrophilic type (tendency of mixing) of interactions between the materials and the double well potential represents the hydrophobic type (tendency of separation) of interactions. As the consequence of the competition between the two types of interactions, the equilibrium configuration will include a diffusive interface. About the theoretical or numerical study about the Cahn–Hilliard or Allen–Cahn system derived from this part of energy, we refer to [1, 6, 17, 20, 29,30,31, 38, 41, 43,44,45,46,47,48, 50, 59, 60, 71, 72, 75, 76].

In part B, the second phase field variable \(\rho (\varvec{x},t)\) is introduced to represent the local concentration of surfactants where another fourth double well polynomial potential is used as well. There are two minimum values that enable two bulk states for \(\rho \), i.e., \(\rho =0\) and \(\rho =\rho _s\). The state of \(\rho =0\) corresponds to the case in which the system is locally occupied either by oil of water without surfactants. The state of \(\rho =\rho _s\) corresponds to the case in which the local volume is occupied only by surfactants. The quantity \(\rho _s\) can be considered to represent the density of condensed hydrocarbon chains of surfactants when they self-assemble. In the numerical experiments, we simply set \(\rho _s=1\).

Part C represents the coupling between the surfactants and fluid interface, i.e., the state \(\rho =\rho _s\) tends to occupy the narrow region around the oil-water interfaces. It is also essential in microemulsions that the interfacial tension vanishes when the interface is saturated with surfactants.

The time evolution equation is assumed to be the Cahn–Hilliard type, i.e., the gradient flow in \(H^{-1}\), the system reads as follows,

$$\begin{aligned} \phi _t= & {} M_\phi \Delta \mu _\phi , \end{aligned}$$
(2.3)
$$\begin{aligned} \mu _\phi= & {} \frac{\delta E}{\delta \phi }=-\Delta \phi +\alpha \Delta ^2\phi +\frac{1}{\epsilon ^2}\phi (\phi ^2-1)+2\theta \nabla \cdot (\rho \nabla \phi ), \end{aligned}$$
(2.4)
$$\begin{aligned} \rho _t= & {} M_\rho \Delta \mu _\rho , \end{aligned}$$
(2.5)
$$\begin{aligned} \mu _\rho= & {} \frac{\delta E}{\delta \rho }=-\beta \Delta \rho +\frac{1}{\eta ^2}\rho (\rho -\rho _s) \left( \rho -\frac{\rho _s}{2}\right) -\theta |\nabla \phi |^2. \end{aligned}$$
(2.6)

For the domain \(\Omega \), the boundary conditions can be

$$\begin{aligned}&\mathrm{(i)} \hbox { all variables are periodic}; \hbox {or } \mathrm{(ii)}\; \partial _{\varvec{n}} \phi |_{\partial \Omega }=\partial _{\varvec{n}} \rho |_{\partial \Omega }\nonumber \\&\quad =\nabla \mu _\phi \cdot {\varvec{n}}|_{\partial \Omega }=\nabla \mu _\rho \cdot {\varvec{n}}|_{\partial \Omega }=0, \end{aligned}$$
(2.7)

where \(\varvec{n}\) is the outward normal on the domain boundary \(\partial \Omega \). The system (2.3)–(2.5) conserves the local mass density, i.e., \(\frac{d}{dt} \int _\Omega \phi d\varvec{x}=\frac{d}{dt} \int _\Omega \rho d\varvec{x}=0\).

It is straight forward to obtain the PDE energy law for the Cahn–Hilliard system (2.3)–(2.6). By taking the \(L^2\) inner product of (2.3) with \(\mu _\phi \), of (2.4) with \(\phi _t\) of (2.5) with \(\mu _\rho \), of (2.6) with \(\rho _t\), performing integration by parts, and combining all equalities, we can derive

$$\begin{aligned} \frac{d}{dt} E(\phi ,\rho )=-M_\phi \Vert \nabla \mu _\phi \Vert ^2-M_\rho \Vert \nabla \mu _\rho \Vert ^2\le 0. \end{aligned}$$
(2.8)

Remark 2.1

Alternatively, one can also assume the Allen–Cahn dynamics for the phase variables, namely

$$\begin{aligned} \begin{aligned}&\phi _t=-M_\phi \mu _\phi ,\\&\rho _t=-M_\rho \mu _\rho , \end{aligned} \end{aligned}$$
(2.9)

with periodic boundary conditions or no-flux boundary condition as \(\partial _{\varvec{n}} \phi |_{\partial \Omega }=\partial _{\varvec{n}} \rho |_{\partial \Omega }=0\). Note that the volume conservation property does not hold for Allen–Cahn type dynamics. To overcome it, one can equip (2.9) with a scalar Lagrange multiplier to enforce this conservation property (cf. [43, 59]), or modify the free energy functional (2.1) by adding a penalty term for mass conservation, similar as the method used in [9, 34]. Both ways will not introduce any mathematical or numerical difficulties and all analysis for Cahn–Hilliard system can be carried out for Allen–Cahn system without further difficulties, thus we shall not study the Allen–Cahn system in this paper.

Remark 2.2

The total free energy (2.1) is the rescale of the free energy proposed in [25]. We notice that the gradient term \(|\nabla \rho |^2\) is actually neglected in [25]. The absence of this term is “physically” reasonable since the energy cost due to the direct attachment between hydrocarbon chains and oil molecules or between hydrophilic head and water molecules is small. But in this paper, we add this term back “mathematically” because this term may help the total energy \(E(\phi ,\rho )\) to be bounded from below. However, it is not a trivial work to prove the total free energy to be bounded from below even with this gradient potential, where the main difficulty is how to bound the nonlinear coupling potential (part C). A possible way is to follow Caffarelli and Muler’s work for the classical Cahn–Hilliard equation [3], namely, to prove the concentration variable \(\rho \) is \(L^\infty \) bounded. Then the part C can be bounded by other terms. The related PDE analysis is out of the scope of this paper, hence we only present the evolution of the free energy through the numerical experiments in Sect. 4. Indeed, the coupling term between \(\phi \) and \(\rho \) in part C can cause serious hurdles to obtain the error estimates for the schemes even though its energy stability can be formally derived. We will consider this issue in the future work.

Remark 2.3

When concerning the hydrodynamics effects, by assuming both fluids are incompressible, the system reads as follows, see also [39],

$$\begin{aligned}&\phi _t+\nabla \cdot (\varvec{u}\phi )=M_\phi \Delta \mu _\phi , \end{aligned}$$
(2.10)
$$\begin{aligned}&\rho _t+\nabla \cdot (\varvec{u}\rho )=M_\rho \Delta \mu _\rho , \end{aligned}$$
(2.11)
$$\begin{aligned}&\varvec{u}_t+(\varvec{u}\cdot \nabla ) \varvec{u}+\nabla p-\nu \Delta \varvec{u}+\phi \nabla \mu _\phi +\rho \nabla \mu _\rho =0, \end{aligned}$$
(2.12)
$$\begin{aligned}&\nabla \cdot \varvec{u}=0, \end{aligned}$$
(2.13)

where \(\varvec{u}\) is the fluid velocity, p is the pressure, \(\nu \) is the viscosity, the two nonlinear terms related to \(\phi \) and \(\rho \) in the momentum equation are the induced stresses due to the total free energy. The numerical method for the hydrodynamics coupled phase field models in various situations, e.g., multiphase complex fluids, liquid crystals, had been well-studied in literatures, see also [24, 29, 32, 36, 40, 44, 46, 47, 70, 75].

3 Numerical Schemes

We now construct time stepping schemes to solve the model system (2.3)–(2.6). The aim is to construct schemes that are not only easy-to-implement, but also unconditionally energy stable. Here the term “easy-to-implement” is referred to “linear” and “decoupled” in comparison with its counter parts: “nonlinear” and “coupled”.

We notice that there are two numerical challenges, including how to decouple the computations of \(\phi \) and \(\rho \); and how to discretize the two double well polynomial terms for \(\phi \) and \(\rho \). For the nonlinear coupled potential of \(\phi \) and \(\rho \), we have to develop a subtle explicit-implicit technique to obtain a decoupling and linear scheme. For the double well polynomial potential terms, we recall that there are two commonly used techniques to discretize this term while preserving the energy stability. The first well-known technique is the so-called convex splitting approach [10, 18, 19, 42, 75, 76], where the convex part of the potential is treated implicitly and the concave part is treated explicitly. The convex splitting approach is energy stable, however, it produces a nonlinear scheme at most cases. Thus its implementation is complicated and the computational cost is high, that excludes this method in this paper. The second technique is the linear stabilization approach (cf. [6, 31, 34, 43,44,45, 47,48,49,50, 56, 57, 59, 60, 69, 71, 72]), where the nonlinear term is simply treated explicitly and some linear stabilizing terms are added to maintain the stability. This approach is linear so it is very efficient and easy to implement. But its stability requests a special property (generalized maximum principle) satisfied by the classical solution of the PDE and the numerical solution, that is usually very hard to prove.

We now describe our special treatments to discretize the nonlinear terms to preserve the energy stability. For the polynomial terms, we adopt the IEQ approach, which has been successfully applied to solve a variety of gradient flow type models (cf. [58, 63, 64, 74]). Its idea, that is very simple but quite different from those traditional methods like implicit, explicit, nonlinear splitting, or other various tricky Taylor expansions to discretize the nonlinear potentials, is to make the free energy quadratic. More precisely, we introduce two auxiliary functions as

$$\begin{aligned} U= & {} \phi ^2-1, \end{aligned}$$
(3.1)
$$\begin{aligned} V= & {} \rho (\rho -\rho _s). \end{aligned}$$
(3.2)

In turn, the total energy can be rewritten as

$$\begin{aligned}&E(\phi ,\rho ,U,V)\nonumber \\&\quad = \int _\Omega \left( \frac{1}{2}|\nabla \phi |^2+\frac{\alpha }{2}(\Delta \phi )^2+\frac{1}{4\epsilon ^2}U^2+ \frac{\beta }{2}|\nabla \rho |^2+\frac{1}{4\eta ^2} V^2-\theta \rho |\nabla \phi |^2\right) d\varvec{x}.\qquad \end{aligned}$$
(3.3)

Now, we have a new, but equivalent PDE system as follows,

$$\begin{aligned} \phi _t= & {} M_\phi \Delta \mu _\phi , \end{aligned}$$
(3.4)
$$\begin{aligned} \mu _\phi= & {} -\Delta \phi +\alpha \Delta ^2\phi +\frac{1}{\epsilon ^2}H U+2\theta \nabla \cdot (\rho \nabla \phi ), \end{aligned}$$
(3.5)
$$\begin{aligned} \rho _t= & {} M_\rho \Delta \mu _\rho , \end{aligned}$$
(3.6)
$$\begin{aligned} \mu _\rho= & {} -\beta \Delta \rho +\frac{1}{\eta ^2} G V-\theta |\nabla \phi |^2, \end{aligned}$$
(3.7)
$$\begin{aligned} U_t= & {} 2 H\phi _t, \end{aligned}$$
(3.8)
$$\begin{aligned} V_t= & {} 2G\rho _t, \end{aligned}$$
(3.9)

where \(H(\phi )=\phi , G(\rho )=\rho -\frac{\rho _s}{2}\).

The boundary conditions for the new system are still (2.7) since the Eqs. (3.8) and (3.9) for the new variable U and V are simply ODEs with time. The initial conditions read as

$$\begin{aligned} \phi |_{(t=0)}=\phi _0,\; \rho |_{(t=0)}=\rho _0,\;U|_{(t=0)}=\phi _0^2-1,\; V|_{(t=0)}=\rho _0(\rho _0-\rho _s). \end{aligned}$$
(3.10)

To derive the energy dissipative law for this system, we take the \(L^2\) inner product of (3.4) with \(\mu _\phi \), of (3.5) with \(-\phi _t\), of (3.6) with \(\mu _\rho \), of (3.7) with \(-\rho _t\), of (3.8) with \(\frac{1}{2\epsilon ^2}U\), of (3.9) with \(\frac{1}{2\eta ^2}V\) and combining all terms together, we obtain the new energy dissipation law as follows,

$$\begin{aligned} \frac{d}{dt} E(\phi , \rho ,U, V)=-M_\phi \Vert \nabla \mu _\phi \Vert ^2-M_\rho \Vert \nabla \mu _\rho \Vert ^2\le 0. \end{aligned}$$
(3.11)

Remark 3.1

We consider the two quartic, double well polynomial potential for \(\phi \) and \(\rho \) as two quadratic functionals by applying appropriate substitutions if needed. Therefore, after simple substitutions using new variables \(U,V\), the energy is transformed to an equivalent quadratic form. We emphasize that the new transformed system (3.4)–(3.9) is exactly equivalent to the original system (2.3)–(2.6) since (3.1)–(3.2) can be easily obtained by integrating (3.8)–(3.9) with respect to the time. Therefore, the energy law (3.11) for the transformed system is exactly the same as the energy law (2.8) for the original system for the time-continuous case. We will develop time-marching schemes for the new transformed system (3.4)–(3.9) that in turn follows the new energy dissipation law (3.11) instead of the energy law (2.8) for the original system.

3.1 First Order Scheme

We now present a first order time marching scheme to solve the system (3.4)–(3.9).

Scheme 1

Assuming that \(\phi ^{n}, \rho ^{n}, U^{n}, V^n\) are already known, we compute \(\phi ^{n+1}, \rho ^{n+1}, U^{n+1}, V^{n+1}\) from the following first order temporal semi-discrete system:

Step 1: We update \(\rho ^{n+1}\) and \(V^{n+1}\) as follows,

$$\begin{aligned} \frac{\rho ^{n+1}-\rho ^n}{\delta t}= & {} M_\rho \Delta \mu _\rho ^{n+1}, \end{aligned}$$
(3.12)
$$\begin{aligned} \mu _\rho ^{n+1}= & {} -\beta \Delta \rho ^{n+1}+\frac{1}{\eta ^2} G^n V^{n+1}-\theta |\nabla \phi ^{n}|^2, \end{aligned}$$
(3.13)
$$\begin{aligned} V^{n+1}-V^n= & {} 2G^n (\rho ^{n+1}-\rho ^n). \end{aligned}$$
(3.14)

Step 2: We update \(\phi ^{n+1}\) and \(U^{n+1}\) as follows,

$$\begin{aligned} \frac{\phi ^{n+1}-\phi ^n}{\delta t}= & {} M_\phi \Delta \mu _\phi ^{n+1}, \end{aligned}$$
(3.15)
$$\begin{aligned} \mu _\phi ^{n+1}= & {} -\Delta \phi ^{n+1}+\alpha \Delta ^2\phi ^{n+1} +\frac{1}{\epsilon ^2}H^n U^{n+1}+2\theta \nabla \cdot \left( \rho ^{n+1}\nabla \frac{\phi ^{n+1}+\phi ^n}{2}\right) , \nonumber \\ \end{aligned}$$
(3.16)
$$\begin{aligned} U^{n+1}-U^n= & {} 2H^n (\phi ^{n+1}-\phi ^n). \end{aligned}$$
(3.17)

The boundary conditions can be

$$\begin{aligned}&\hbox {(i)} \hbox { all variables are periodic}; \hbox {or } \hbox {(ii)}\; \partial _{\varvec{n}} \phi ^{n+1}|_{\partial \Omega }\nonumber \\&\quad =\partial _{\varvec{n}} \rho ^{n+1}|_{\partial \Omega }=\nabla \mu _\phi ^{n+1}\cdot {\varvec{n}}|_{\partial \Omega }=\nabla \mu _\rho ^{n+1}\cdot {\varvec{n}}|_{\partial \Omega }=0. \end{aligned}$$

Remark 3.2

When computing \(\rho ^{n+1}\) in step 1, we only need \(\phi ^n\). When computing \(\phi ^{n+1}\) in step 2, \(\rho ^{n+1}\) is already obtained from step 1. Thus the computations of \(\phi \) and \(\rho \) are totally decoupled. Furthermore, when computing \(\rho ^{n+1}\) and \(\phi ^{n+1}\), one does not need calculate \(U^{n+1}\) and \(V^{n+1}\). Note the coefficient H and G of the new variables \(U\) and V are both treated explicitly, thus we can rewrite the Eqs. (3.14) and (3.17) as follows:

$$\begin{aligned} \left\{ \!\begin{aligned}&V^{n+1}=2G^n\rho ^{n+1}+D^n, \\&U^{n+1}=2H^n\phi ^{n+1}+S^n, \end{aligned} \right. \end{aligned}$$
(3.18)

where \(D^n=V^n-2G^n\rho ^n\) and \(S^n=U^n-2H^n\phi ^n\). Thus (3.12), (3.13) can be rewritten as the following linear system

$$\begin{aligned} \frac{1}{\delta t}\rho ^{n+1}= & {} M_\rho \Delta \mu _\rho ^{n+1}+\frac{1}{\delta t}\rho ^{n}, \end{aligned}$$
(3.19)
$$\begin{aligned} \mu _\rho ^{n+1}= & {} P(\rho ^{n+1})+g^n_1, \end{aligned}$$
(3.20)

where \(P(\rho )=-\beta \Delta \rho +\frac{2}{\eta ^2} (G^n)^2\rho , g^n_1=\frac{1}{\eta ^2}G^nD^n-\theta |\nabla \phi ^n|^2\). Similarly, (3.15), (3.16) can be rewritten as the following linear system

$$\begin{aligned} \frac{1}{\delta t}\phi ^{n+1}= & {} M_\phi \Delta \mu _\phi ^{n+1}+\frac{1}{\delta t}\phi ^{n}, \end{aligned}$$
(3.21)
$$\begin{aligned} \mu _\phi ^{n+1}= & {} Q(\phi ^{n+1})+g^n_2, \end{aligned}$$
(3.22)

where \(Q(\phi )=-\Delta \phi +\alpha \Delta ^2\phi +\frac{2}{\epsilon ^2} (H^n)^2\phi +\theta \nabla \cdot (\rho ^{n+1}\nabla \phi )\) and \(g_2^n=\frac{1}{\epsilon ^2} H^nS^n+\theta \nabla \cdot (\rho ^{n+1}\nabla \phi ^n)\). Therefore, we can solve \(\rho ^{n+1}\) and \(\psi ^{n+1}\) directly from (3.19), (3.20) and (3.21), (3.22). Once we obtain \(\phi ^{n+1},\rho ^{n+1}\), then \(V^{n+1}, U^{n+1}\) are automatically given in (3.18). Namely, the new variables V an \(U\) will not involve any extra computational costs.

We first show the well-posedness of the linear system (3.12)–(3.14) [or (3.19), (3.20)] as follows.

Theorem 3.1

The linear system (3.19), (3.20) admits a unique solution in \(H^1(\Omega )\), and the linear operator is symmetric positive definite.

Proof

From (3.19), by taking the \(L^2\) inner product with 1, we have

$$\begin{aligned} \int _\Omega \rho ^{n+1}d\varvec{x}=\int _\Omega \rho ^{n}d\varvec{x}=\cdots =\int _\Omega \rho ^0d\varvec{x}. \end{aligned}$$
(3.23)

Let \({ V}_\rho =\frac{1}{|\Omega |}\int _\Omega \rho ^0d\varvec{x}\), \({ V}_\mu =\frac{1}{|\Omega |}\int _\Omega \mu _\rho ^{n+1}d\varvec{x}\), and we define

$$\begin{aligned} \widehat{\rho }^{n+1}=\rho ^{n+1}-{ V}_\rho , \,\widehat{\mu }_\rho ^{n+1}=\mu _\rho ^{n+1}-{ V}_\mu . \end{aligned}$$
(3.24)

Thus, from (3.19), (3.20), \((\widehat{\rho }^{n+1},\widehat{\mu }_\rho ^{n+1})\) are the solutions for the following equations with unknowns \((\rho ,\mu )\),

$$\begin{aligned} \frac{1}{M_\rho \delta t}\rho -\Delta \mu= & {} f, \end{aligned}$$
(3.25)
$$\begin{aligned} \mu +{ V}_\mu -P(\rho )= & {} g, \end{aligned}$$
(3.26)

where \(f=\frac{1}{M_\rho \delta t}\widehat{\rho }^n\), \( g=g^n_1+\frac{2}{\eta ^2} G^n G^n V_\rho \). Moreover, \(f,\rho \) and \(\mu \) are all mean 0, i.e., \(\int _\Omega f d\varvec{x}=\int _\Omega \rho d\varvec{x}=\int _\Omega \mu d\varvec{x}=0\).

Define the inverse Laplace operator u (with \(\int _\Omega u d\varvec{x}=0\)) \(\mapsto v:=\Delta ^{-1}u\) by

$$\begin{aligned} \left\{ \!\begin{aligned}&\Delta v= u,\quad \int _\Omega v d\varvec{x}=0,\\&\text {with the boundary conditions either }\hbox {(i) }v\hbox { is periodic}, \hbox {or (ii) } \partial _{\varvec{n}} v|_{\partial \Omega }=0. \end{aligned} \right. \end{aligned}$$
(3.27)

Applying \(-\Delta ^{-1}\) to (3.25) and using (3.26), we obtain

$$\begin{aligned} -\frac{1}{M_\rho \delta t}\Delta ^{-1}\rho +P(\rho )-{ V}_\mu = -\Delta ^{-1} f- g, \end{aligned}$$
(3.28)

then we can express the above linear system (3.28) as \(\mathbb {A}\rho =b\).

  1. (i)

    For any \(\rho _1\) and \(\rho _2\) in \(H^1(\Omega )\) satisfy the boundary conditions (2.7) and \(\int _\Omega \rho _1 dx=\int _\Omega \rho _2 dx=0\), using integration by parts, we derive

    $$\begin{aligned} (\mathbb {A}(\rho _1) ,\rho _2)= & {} -\frac{1}{M_\rho \delta t}\left( \Delta ^{-1}\rho _1,\rho _2\right) +\left( P(\rho _1),\rho _2\right) \nonumber \\\le & {} C_1\left( \Vert \nabla \Delta ^{-1}\rho _1\Vert \Vert \nabla \Delta ^{-1}\rho _2\Vert \!+\! \Vert \nabla \rho _1\Vert \Vert \nabla \rho _2\Vert \!+\!\Vert \rho _1\Vert \Vert \rho _2\Vert \!\right) \nonumber \\\le & {} C_2\Vert \rho _1\Vert _{H^1}\Vert \rho _2\Vert _{H^1}. \end{aligned}$$
    (3.29)

    Therefore, the bilinear form \((\mathbb {A}(\rho _1),\rho _2)\) is bounded for any \(\rho _1,\rho _2\in H^1(\Omega )\) with mean 0.

  2. (ii)

    For any \(\rho \in H^1(\Omega )\) with mean 0, it is easy to derive that,

    $$\begin{aligned} \begin{aligned} (\mathbb {A}(\rho ),\rho )=\frac{1}{M_\rho \delta t}\Vert \nabla \Delta ^{-1}\rho \Vert ^2+\beta \Vert \nabla \rho \Vert ^2+\frac{2}{\eta ^2}\Vert G^n\rho \Vert ^2\ge C_3\Vert \rho \Vert _{H^1}^2, \end{aligned} \end{aligned}$$
    (3.30)

    from Poincare inequality. Thus the bilinear form \((\mathbb A(\rho _1),\rho _2)\) is coercive. Then from the Lax–Milgram theorem, we conclude the linear system (3.28) admits a unique solution in \(H^1(\Omega )\). For any \(\rho _1, \rho _2\) with \(\int _\Omega \rho _1 d\varvec{x}=0\) and \(\int _\Omega \rho _2 d\varvec{x}=0\), we can easily derive

    $$\begin{aligned} \begin{aligned} \left( \mathbb {A}\rho _1, \rho _2\right) =\left( \rho _1, \mathbb {A}\rho _2\right) . \end{aligned} \end{aligned}$$
    (3.31)

    Thus \(\mathbb {A}\) is self-adjoint. Meanwhile, from (3.30), we derive \((\mathbb {A}\rho , \rho )\ge 0\) for any \(\rho \in H^1(\Omega )\) and mean 0, where “\(=\)” is valid if only if \(\rho =0\). This concludes the linear operator \(\mathbb {A}\) is positive definite.\(\square \)

Likewise, the linear system (3.15)–(3.17) [or (3.21), (3.22)] is well-posed, symmetric positive definite, and admits a unique solution in \(H^2(\Omega )\). The proof is very similar to Theorem 3.1, thus we omit the details here.

We show the unconditional energy stability of the scheme (3.12)–(3.17) as follows.

Theorem 3.2

The scheme (3.12)–(3.17) is unconditionally energy stable and satisfies the following discrete energy dissipation law,

$$\begin{aligned} \frac{1}{\delta t}\left( \mathbb {E}^{n+1}-\mathbb {E}^{n}\right) \le -M_\phi \Vert \nabla \mu _\phi ^{n+1}\Vert ^2-M_\rho \Vert \nabla \mu _\rho ^{n+1}\Vert ^2, \end{aligned}$$
(3.32)

where

$$\begin{aligned} \mathbb {E}^n= & {} \int _\Omega \left( \frac{1}{2}|\nabla \phi ^n|^2+\frac{\alpha }{2}(\Delta \phi ^n)^2\right. \nonumber \\&\left. +\,\frac{1}{4\epsilon ^2}(U^n)^2+\frac{\beta }{2}|\nabla \rho ^n|^2+\frac{1}{4\eta ^2} (V^n)^2-\theta \rho ^n|\nabla \phi ^n|^2\right) d\varvec{x}. \end{aligned}$$
(3.33)

Proof

By taking the \(L^2\) inner product of (3.12) with \(\delta t\mu _\rho ^{n+1}\), we obtain

$$\begin{aligned} \left( \rho ^{n+1}-\rho ^n,\mu _\rho ^{n+1}\right) =-M_\rho \delta t\Vert \nabla \mu _\rho ^{n+1}\Vert ^2. \end{aligned}$$
(3.34)

By taking the \(L^2\) inner product of (3.13) with \(-(\rho ^{n+1}-\rho ^n)\), and applying the following identities

$$\begin{aligned} 2(a-b,a)=|a|^2-|b|^2+|a-b|^2, \end{aligned}$$
(3.35)

we obtain

$$\begin{aligned} \begin{aligned} -\left( \mu _\rho ^{n+1}, \rho ^{n+1}-\rho ^n\right) =&-\frac{\beta }{2}\left( \Vert \nabla \rho ^{n+1}\Vert ^2-\Vert \nabla \rho ^{n}\Vert ^2+\Vert \nabla (\rho ^{n+1}-\rho ^n)\Vert ^2\right) \\&-\frac{1}{\eta ^2}\left( G^n V^{n+1}, \rho ^{n+1}-\rho ^n\right) +\theta \left( |\nabla \phi ^n|^2,\rho ^{n+1}-\rho ^n\right) . \end{aligned} \end{aligned}$$
(3.36)

By taking the \(L^2\) inner product of (3.14) with \(\frac{1}{2\eta ^2} V^{n+1}\), we obtain

$$\begin{aligned} \begin{aligned} \frac{1}{4\eta ^2}\left( \Vert V^{n+1}\Vert ^2-\Vert V^{n}\Vert ^2+\Vert V^{n+1}-V^n\Vert ^2\right)&=\frac{1}{\eta ^2}\left( G^n \left( \rho ^{n+1}-\rho ^n\right) ,V^{n+1}\right) . \end{aligned} \end{aligned}$$
(3.37)

By taking the \(L^2\) inner product of (3.15) with \(\delta t\mu _\phi ^{n+1}\), we obtain

$$\begin{aligned} \left( \phi ^{n+1}-\phi ^n,\mu _\phi ^{n+1}\right) =-M_\phi \delta t\Vert \nabla \mu _\phi ^{n+1}\Vert ^2. \end{aligned}$$
(3.38)

By taking the \(L^2\) inner product of (3.16) with \(-(\phi ^{n+1}-\phi ^n)\), we obtain

$$\begin{aligned} \begin{aligned} -\left( \mu _\phi ^{n+1}, \phi ^{n+1}-\phi ^n\right) =&-\frac{1}{2}\left( \Vert \nabla \phi ^{n+1}\Vert ^2-\Vert \nabla \phi ^{n}\Vert ^2+\Vert \nabla \left( \phi ^{n+1}-\phi ^n\right) \Vert ^2\right) \\&-\frac{\alpha }{2}\left( \Vert \Delta \phi ^{n+1}\Vert ^2-\Vert \Delta \phi ^{n}\Vert ^2+\Vert \Delta \left( \phi ^{n+1}-\phi ^n\right) \Vert ^2\right) \\&-\frac{1}{\epsilon ^2}\left( H^nU^{n+1}, \phi ^{n+1}-\phi ^n\right) +\theta \left( \rho ^{n+1}, |\nabla \phi ^{n+1}|^2-|\nabla \phi ^{n}|^2\right) . \end{aligned} \end{aligned}$$
(3.39)

By taking the \(L^2\) inner product of (3.17) with \(\frac{1}{2\epsilon ^2} U^{n+1}\), we obtain

$$\begin{aligned} \begin{aligned} \frac{1}{4\epsilon ^2}\left( \Vert U^{n+1}\Vert ^2-\Vert U^{n}\Vert ^2+\Vert U^{n+1}-U^n\Vert ^2\right)&=\frac{1}{\epsilon ^2}\left( H^n (\phi ^{n+1}-\phi ^n),U^{n+1}\right) . \end{aligned} \end{aligned}$$
(3.40)

Combining (3.34)–(3.40) and using the following identity

$$\begin{aligned}&\left( |\nabla \phi ^n\Vert ^2,\rho ^{n+1}-\rho ^n\right) +\left( \rho ^{n+1}, |\nabla \phi ^{n+1}|^2-|\nabla \phi ^{n}|^2\right) \nonumber \\&\quad =\left( \rho ^{n+1}, |\nabla \phi ^{n+1}|^2\right) -\left( \rho ^{n},|\nabla \phi ^{n}|^2\right) , \end{aligned}$$
(3.41)

we can obtain

$$\begin{aligned} \begin{aligned}&\frac{\beta }{2}\left( \Vert \nabla \rho ^{n+1}\Vert ^2 -\Vert \nabla \rho ^{n}\Vert ^2+\Vert \nabla \left( \rho ^{n+1}-\rho ^n\right) \Vert ^2\right) \\&\qquad +\frac{1}{2}\left( \Vert \nabla \phi ^{n+1}\Vert ^2-\Vert \nabla \phi ^{n+1}\Vert ^2+\Vert \nabla \left( \phi ^{n+1}-\phi ^n\right) \Vert ^2\right) \\&\qquad +\frac{\alpha }{2}\left( \Vert \Delta \phi ^{n+1}\Vert ^2-\Vert \Delta \phi ^{n}\Vert ^2 +\Vert \Delta \left( \phi ^{n+1}-\phi ^n\right) \Vert ^2\right) \\&\qquad +\frac{1}{4\epsilon ^2}\left( \Vert U^{n+1}\Vert ^2-\Vert U^n\Vert ^2+\Vert U^{n+1}-U^n\Vert ^2\right) \\&\qquad +\frac{1}{ 4\eta ^2}\left( \Vert V^{n+1}\Vert ^2-\Vert V^n\Vert ^2+\Vert V^{n+1}-V^n\Vert ^2\right) \\&\qquad -\theta \left( \left( \rho ^{n+1}, |\nabla \phi ^{n+1}|^2\right) -\left( \rho ^{n},|\nabla \phi ^{n}|^2\right) \right) \\&\quad =-M_\phi \delta t\Vert \nabla \mu _\phi ^{n+1}\Vert ^2-M_\rho \delta t\Vert \nabla \mu _\rho ^{n+1}\Vert ^2. \end{aligned} \end{aligned}$$
(3.42)

Finally, we obtain the desired result (3.32) after dropping some positive terms. \(\square \)

Remark 3.3

We note that the idea of the IEQ approach is very simple but quite different from the traditional time marching schemes. More precisely, it does not require the convexity required by the convex splitting approach (cf. [10]) or the boundedness for the second order derivative required by the stabilization approach (cf. [6, 45, 56]). Through a simple substitution of new variables, the complicated nonlinear potentials are transformed into quadratic forms. We summarize the great advantages of this quadratic transformations as follows: (i) this quadratization method works well for various complex nonlinear terms as long as the corresponding nonlinear potentials are bounded from below; (ii) the complicated nonlinear potential is transferred to a quadratic polynomial form which is much easier to handle; (iii) the derivative of the quadratic polynomial is linear, which provides the fundamental support for linearization method; (iv) the quadratic formulation in terms of new variables can automatically maintain this property of positivity (or bounded from below) of the nonlinear potentials.

When the nonlinear potential is the fourth order polynomial, e.g., the double well potential, the IEQ method is exactly the same as the so-called Lagrange Multiplier method developed in [16]. We remark that the idea of Lagrange Multiplier method only works well for the fourth order polynomial potential (\(\phi ^4\)). This is because the nonlinear term \(\phi ^3\) (the derivative of \(\phi ^4\)) can be naturally decomposed into a multiplication of two factors: \(\lambda (\phi )\phi \) that is the Lagrange multiplier term, and the \(\lambda (\phi )=\phi ^2\) is then defined as the new auxiliary variable U. However, this method might not succeed for other type potentials. For instance, we notice the Flory–Huggins potential is widely used in two-phase model or fluid-surfactant model, see also [4, 53, 58]. The induced nonlinear term is logarithmic type as \(\mathrm{ln} (\frac{\phi }{1-\phi })\). If one forcefully rewrites this term as \(\lambda (\phi )\phi \), then \(\lambda (\phi )= \frac{\mathrm{ln} (\frac{\phi }{1-\phi })}{\phi }\) that is the definition of the new variable U. Obviously, such a form is unworkable for algorithms design. About the application of the IEQ approach to handle other type of nonlinear potentials, we refer to the authors’ other work in [58, 63, 64].

Remark 3.4

The IEQ approach provides more efficiency than the nonlinear approach. Let us consider the double well potential case, i.e., \(E(\phi )=\int _\Omega (\phi ^{2}-1)^2 d\varvec{x}\), then IEQ scheme will generate the linear scheme as \((\phi ^{n})^2\phi ^{n+1}\). The implicit or convex splitting approach will produces the scheme as \((\phi ^{n+1})^3\). Therefore, if the Newton iterative method is applied for this term, at each iteration the nonlinear convex splitting approach would yield the same linear operator as IEQ approach. Hence the cost of solving the IEQ scheme is the same as the cost of performing one iteration of Newton method for the implicit/convex splitting approach, provided that the same linear solvers are applied (for instance multi-grid with Gauss-Seidel relaxation). It is clear that the IEQ scheme would be much more efficient than the nonlinear schemes.

Remark 3.5

The proposed scheme follows the new energy dissipation law (3.11) formally instead of the energy law for the originated system (2.8). In the time-continuous case, the two energy laws are the same. In the time-discrete case, the energy \(\mathbb {E}^{n+1}\) [defined in (3.33)] can be rewritten as a first order approximation to the Lyapunov functionals in \(E(\phi ^{n+1},\rho ^{n+1})\) (defined in (2.8)), that can be observed from the following facts heuristically. From (3.17), we have

$$\begin{aligned} U^{n+1}-\left( \left( \phi ^{n+1}\right) ^2-1\right) =U^{n}-\left( \left( \phi ^{n}\right) ^2-1\right) +R_{n+1}, \end{aligned}$$
(3.43)

where \(R_{n+1}=O((\phi ^{n+1}-\phi ^n)^2)\). Since \(R_{k}= O(\delta t^2)\) for \(0\le k\le n+1\) and \(U^0=(\phi ^{0})^2-1\), by mathematical induction we can easily get

$$\begin{aligned} U^{n+1}=\left( \phi ^{n+1}\right) ^2-1+O(\delta t). \end{aligned}$$
(3.44)

3.2 Second Order Schemes

For the IEQ approach, it is quite standard to develop second order version based on either BDF2 or Crank–Nicolson, the details are referred to the author’s recent work in [58, 63, 64]. However, for the surfactant model studied in this paper, the nonlinear coupling term between \(\rho \) and \(\phi \) presents a huge barrier to obtain the energy stabilities, i.e., it is questionable about if the nonlinear potential is bounded from below (see Remark 2.2). Even though the second order scheme is unconditionally energy stable for all numerical tests that we have performed in next section, it is still an open question about its stability proof or how to construct any second order linear schemes with unconditional energy stability. In this paper, following the strategy that we develop the first order scheme by combining the IEQ approach and explicit-implicit technique, we still list the second order BDF2 version as follows, for consistency.

Scheme 2

(BDF2) Assuming that \(\phi ^{n-1}\), \(\rho ^{n-1}\), \({ U}^{n-1}\), \({ V}^{n-1}\) and \(\phi ^{n}\), \(\rho ^{n}\), \({ U}^{n}\), \({ V}^n\) are known, we solve \(\phi ^{n+1}\), \(\rho ^{n+1}\), \({ U}^{n+1}\), \({ V}^{n+1}\) from the following second order scheme:

Step 1: We update \(\rho ^{n+1}\) and \(V^{n+1}\) as follows,

$$\begin{aligned}&\frac{3\rho ^{n+1}-4\rho ^n+\rho ^{n-1}}{2\delta t}=M_\rho \Delta \mu _\rho ^{n+1}, \end{aligned}$$
(3.45)
$$\begin{aligned}&\mu _\rho ^{n+1}=-\beta \Delta \rho ^{n+1}+\frac{1}{\eta ^2} G^\star V^{n+1}-\theta |\nabla \phi ^{\star }|^2, \end{aligned}$$
(3.46)
$$\begin{aligned}&3V^{n+1}-4V^n+V^{n-1}=2G^\star (3\rho ^{n+1}-4\rho ^n+\rho ^{n-1}). \end{aligned}$$
(3.47)

Step 2: We update \(\phi ^{n+1}\) and \(U^{n+1}\) as follows,

$$\begin{aligned}&\frac{3\phi ^{n+1}-4\phi ^n+\phi ^{n-1}}{2\delta t}=M_\phi \Delta \mu _\phi ^{n+1}, \end{aligned}$$
(3.48)
$$\begin{aligned}&\mu _\phi ^{n+1}=-\Delta \phi ^{n+1}+\alpha \Delta ^2\phi ^{n+1}+\frac{1}{\epsilon ^2}H^\star U^{n+1}+2\theta \nabla \cdot (\rho ^{n+1}\nabla \phi ^{n+1}), \end{aligned}$$
(3.49)
$$\begin{aligned}&3U^{n+1}-4U^n+U^{n-1}=2H^\star (3\phi ^{n+1}-4\phi ^n+\phi ^{n-1}), \end{aligned}$$
(3.50)

where

$$\begin{aligned} \phi ^\star =2\phi ^n-\phi ^{n-1}, H^\star =H(\phi ^\star ), G^\star =G(2\rho ^n-\rho ^{n-1}), \end{aligned}$$

Remark 3.6

The algorithm design for the hydrodynamics coupled model (2.10)–(2.13) presents further numerical challenges, e.g., how to decouple the computations of the velocity from the phase variables. This can be overcome by combining the proposed scheme in this paper for the two Cahn–Hilliard equations and the projection method [15] for the Navier-Stokes equations. Furthermore, one can use a decoupling technique that was developed in [36, 47, 48, 50, 71] to decouple the computations or \(\phi \) and \(\rho \) from the velocity field. Since this paper is focused on the development of efficient linear schemes for solving the nonlinearly coupled Cahn–Hilliard equations with multiple variables, the details of numerical schemes for the hydrodynamics coupled model that are in the similar vein as [29, 44, 46, 47, 75], are left to the interested readers.

4 Numerical Simulations

We now present numerical experiments in two dimensions to validate the theoretical results derived in the previous section and demonstrate the efficiency, energy stability and accuracy of the proposed numerical schemes. The phase separation [25, 54] of dissimilar fluids are often carried out in the periodic domain, which is also adopted here. The computed domain is \([0,2\pi ]^2\), if not explicitly specified, the default values of order parameters are given below:

$$\begin{aligned} \begin{aligned} M_\rho&={2.5\hbox {e}{-}4},\, M_\phi ={2.5\hbox {e}{-}4}, \,\alpha = {2.5\hbox {e}{-}4},\, \\ \beta&=1,\,\epsilon =0.05, \, \eta =0.08, \, \theta =0.3, \,\rho _s=1. \end{aligned} \end{aligned}$$
(4.1)

We use the Fourier-spectral method to discretize the space, and \(129^2\) Fourier modes are used so that the errors from the spatial discretization is negligible compared with the time discretization errors.

Remark 4.1

The order parameter \(\epsilon \) is chosen as the \(0.8\%\)(\(=\frac{\epsilon }{2\pi }\)) of the domain size, that is a reasonable choice for the computations of phase field models, see also [6, 29,30,31, 41, 43,44,45, 47, 48, 50, 59, 60, 71, 72, 75, 76]. In addition, note in quite a number of literatures, the choice of mobility parameter therein (denoted by \(M_{old}\)) is often chosen as 1, but our choice of the mobility parameter is \(M=\epsilon ^2={2.5\hbox {e}{-}4}\) (\(M_{\rho }\) and \(M_{\phi }\)) that seems to be much smaller. This is because the free energy in those literatures (denoted by \(E_{old}\)) is \(E_{old}=\int _\Omega (\frac{\epsilon ^2}{2}|\nabla \phi |^2+(\phi ^2-1)^2)d\varvec{x}\) that is the rescale of the free energy given in this paper, namely, their Cahn–Hilliard equation reads as \(\frac{\phi _t}{\epsilon ^2M_{old}}+\Delta (\Delta \phi +\frac{\phi (\phi ^2-1)}{\epsilon ^2})=0\), but our model reads as \(\frac{\phi _t}{M}+\Delta (\Delta \phi +\frac{\phi (\phi ^2-1)}{\epsilon ^2})=0\). Therefore, the mobility parameter M in this paper corresponds to \(\epsilon ^2M_{old}\) instead of \(M_{old}\) itself.

Table 1 The summation of \(L^2\) numerical errors for \(\phi \) and \(\rho \) at \(t=0.1\) that are computed by schemes LS1, LS2 using various temporal resolutions with the initial conditions of (4.2), for mesh refinement test in time
Fig. 1
figure 1

Time evolution of the free energy functional for various time step sizes using the scheme LS1, LS2 and the second order fully implicit scheme. The small inset figure shows the small differences in the energy evolution for the considered time steps. The energy curves show the decays for all time step sizes, that confirms that our algorithm is unconditionally stable

Fig. 2
figure 2

Spinodal decomposition for \(\overline{\phi }_0=0\) using parameters (4.1). Snapshots of phase variables \(\phi \) and \(\rho \) are taken at \(t=1, 10,20, 50,100, 200, 400, 1000,1500,2000\). For each subfigure, the left is the profile of \(\phi \), and the right is the profile of \(\rho \)

Fig. 3
figure 3

Spinodal decomposition for \(\overline{\phi }_0=0.2\) using parameters (4.1). Snapshots of phase variables \(\phi \) and \(\rho \) are taken at \(t=1, 10,20, 50,100, 200, 400, 1000,1500,2000\). For each subfigure, the left is the profile of \(\phi \), and the right is the profile of \(\rho \)

Fig. 4
figure 4

Spinodal decomposition for \(\overline{\phi }_0=-0.5\) using parameters (4.1). Snapshots of phase variables \(\phi \) and \(\rho \) are taken at \(t=1, 10,20, 50,100, 200, 400, 1000,1500,2000\). For each subfigure, the left is the profile of \(\phi \), and the right is the profile of \(\rho \)

Fig. 5
figure 5

Time evolution of the free energy functional for spinodal decomposition with A \(\overline{\phi }_0=0\), B \(\overline{\phi }_0=0.2\), C \(\overline{\phi }_0=-0.5\) with order parameters (4.1)

4.1 Accuracy Test

We first test convergence rates of the two numerical schemes, the first order scheme (3.12)–(3.17) (denoted by LS1) and the second order BDF2 scheme (3.45)–(3.50) (denoted by LS2). The following initial conditions

$$\begin{aligned} \left\{ \!\begin{aligned} \phi _0(x,y)&=0.3\cos (3x)+0.5\cos (y), \\ \rho _0(x,y)&=0.2\sin (2x)+0.25\sin (y) \end{aligned} \right. \end{aligned}$$
(4.2)

are used.

We perform the refinement test of the time step size, and choose the approximate solution obtained by using the scheme LS2 with the time step size \(\delta t={7.8125\hbox {e}{-}5}\) as the benchmark solution (approximately the exact solution) for computing errors. We present the summations of the \(L^2\) errors of two phase variables between the numerical solution and the exact solution at \(t= 0.1\) with different time step sizes in Table 1. We observe that the schemes, LS1 and LS2, are first order and second order accurate respectively. Moreover, the second order scheme LS2 gives better accuracy than the first order scheme LS1 does when using the same time step. For instance, if the accuracy is required to be around \({2\hbox {e}{-}5}\), then for LS2, we can take the time step \({5\hbox {e}{-}3}\), but for LS1, we have to take the time step \({6.25\hbox {e}{-}4}\), therefore, the second order scheme LS2 can use the time step that is around 8 (\(=\frac{{1\hbox {e}{-}2}}{{5\hbox {e}{-}4}}\)) times larger than the first order scheme LS1.

4.2 Spinodal Decomposition

In this example, we study the phase separation dynamics that is called “spinodal decomposition”. The process of the phase separation can be studied by considering a homogeneous binary mixture, which is quenched into the unstable part of its miscibility gap. In this case, the spinodal decomposition takes place, which manifests in the spontaneous growth of the concentration fluctuations that leads the system from the homogeneous to the two-phase state. Shortly after the phase separation starts, the domains of the binary components are formed and the interface between the two phases can be specified [2, 8, 77].

The initial conditions are taken as the randomly perturbed concentration fields as follows,

$$\begin{aligned} \begin{aligned}&\phi _0(x,y)=\overline{\phi }_0+0.001\mathrm{rand}(x,y), \\&\rho _0(x,y)=0.2+0.001\mathrm{rand}(x,y), \end{aligned} \end{aligned}$$
(4.3)

where the \(\mathrm{rand}(x,y)\) is the random number in \([-1,1]\) and has zero mean. We will vary \(\overline{\phi }_0\) in next simulations.

We first choose \(\overline{\phi }_0=0\) and compare the evolution of the free energy functional between the two proposed schemes and the second order fully implicit scheme with various time steps until \(t=5\) in Fig. 1. We take the computed solution of the fully implicit scheme by using a very tiny time step of \(\delta t={1\hbox {e}{-}7}\) as the exact solution and compare with the results obtained from the schemes LS1 and LS2. For the first order scheme LS1, we choose four time steps with \(\delta t={1\hbox {e}{-}2},{1\hbox {e}{-}3},{5\hbox {e}{-}4}\) and \({1\hbox {e}{-}4}\). We observe that all energy curves show the decays for all time step sizes, that confirm that our algorithms are unconditionally stable for any time step. Furthermore, when the time step size \(\delta t\) is 0.01, the energy curve using the scheme LS1 is considerable (but not very far) away from the exact solution. For other smaller time steps, the obtained energy curves match well with the exact solution. This means the time step size has to be smaller than 0.01 at least in order to get reasonably good accuracy if using the scheme LS1 in practice. For the scheme LS2, we choose the time step \(\delta t={1\hbox {e}{-}2}\), the obtained energy curve is already well matched with the exact solution. Moreover, we notice that its extent of agreement with the exact solution is even better than that of the scheme LS1 when using \(\delta t={5\hbox {e}{-}4}\). In other words, under the same magnitude of accuracy requests, the second order scheme LS2 can use the time step that is around 20 (\(=\frac{{1\hbox {e}{-}2}}{{5\hbox {e}{-}4}}\)) times larger than the first order scheme LS1 at least. Therefore, we use the scheme LS2 and choose the time step \(\delta t={1\hbox {e}{-}3}\) to perform the following spinodal decomposition simulations.

In Figs. 2, 3, and 4, we present the time evolution of the phase separation dynamics for \(\overline{\phi }_0=0\), 0.2, \(-0.5\), respectively. Snapshots are taken at \(t=1, 10, 20,50,100,200,400,1000,1500\) and 2000 for all cases. Initially, the two fluids are well mixed, and they sooner start to decompose due to surface tensions. A relatively high value of the concentration variable \(\rho \) is always driven to be located at the fluid interface. For \(\overline{\phi }_0=0\) in Fig. 2, the volume fractions of two fluids are the same, thus we observe the fluid interfaces are partially entangled and isolated. For other values of \(\overline{\phi }_0= 0.2, -0.5\), we observe that the fluids are accumulated to small drops finally. Overall, the numerical solutions in these simulations present similar features to those obtained in [22, 25,26,27, 54]. We plot the evolution of energy curves in Fig. 5 for all three cases, where the energy monotonically decays with respect to the time.

5 Concluding Remarks

Although the phase field approach had been widely used to model the binary fluid-surfactant system for over twenty years, the development of energy stable schemes still remained very scarce due to its complex nature of nonlinearities. In this paper, we develop two linear, decoupled, computationally efficient schemes to solve the model, where the first order version is unconditionally energy stable. While we have considered only time discretizations here, the results can carry over to any consistent finite-dimensional Galerkin approximations (finite elements or spectral) since the proofs are all based on variational formulations with all test functions in the same space as the trial function. We also presented ample numerical results to validate the accuracy of the proposed schemes.