1. Introduction
Multiphase flows in complex geometries have many applications in the physical and biological sciences. To numerically simulate such physical phenomena involves solving interfacial problems with complex geometries and moving contact lines that separate fluid components at solid boundaries. In addition, special treatment of the contact line is needed to regularize the stress singularity. These are highly challenging problems for numerical simulation. Using standard discretization methods to solve these problems requires a triangulation of the complicated domain and thus rules out coarse-scale discretizations and with it efficient multilevel solutions. Many numerical methods have been developed for solving multiphase flows in complex geometries. Examples are fictitious domain methods (Glowinski et al. Reference Glowinski, Pan, Hesla, Joseph and Périaux2001; Zhang et al. Reference Zhang, Walayat, Chang and Liu2018), extended finite element methods (Fries & Belytschko Reference Fries and Belytschko2010), immersed boundary methods (Schneider Reference Schneider2015; Stein, Guy & Thomases Reference Stein, Guy and Thomases2017), immersed interface methods (Li Reference Li2003; Chen, Li & Lin Reference Chen, Li and Lin2007; Gong et al. Reference Gong, Zhao, Yang and Wang2018; O'Brien & Bussmann Reference O'Brien and Bussmann2018) and the volume penalty method (Shirokoff & Nave Reference Shirokoff and Nave2014; De Stefano, Nejadmalayeri & Vasilyev Reference De Stefano, Nejadmalayeri and Vasilyev2016), where the complex geometry is embedded in a larger, regular domain with a test function being used to enforce the boundary conditions at solid–fluid interfaces. Other methods include boundary integral methods (Biros, Ying & Zorin Reference Biros, Ying and Zorin2004; Mittal et al. Reference Mittal, Dong, Bozkurttas, Najjar, Vargas and von Loebbecke2008), which explicitly incorporate the boundary conditions in the reformulated equations, front-tracking methods (Tryggvason et al. Reference Tryggvason, Bunner, Esmaeeli, Juric, Al-Rawahi, Tauber, Han, Nas and Jan2001; Zolfaghari, Izbassarov & Muradoglu Reference Zolfaghari, Izbassarov and Muradoglu2017) and arbitrary Eulerian–Lagrangian methods (Hu, Patankar & Zhu Reference Hu, Patankar and Zhu2001; Gilmanov & Sotiropoulos Reference Gilmanov and Sotiropoulos2005; Anjos et al. Reference Anjos, Mangiavacchi, Borhani and Thome2013) that utilize a separate Lagrangian mesh to track the complex boundary and either smear the boundary conditions across several mesh points or explicitly enforce the boundary conditions on the Lagrangian mesh that cuts across the Eulerian mesh using body forces or modified discretizations. Methods along these lines include level-set, ghost-fluid, volume of fluid/level-set and cut-cell methods (Kirkpatrick, Armfield & Kent Reference Kirkpatrick, Armfield and Kent2003; Gao et al. Reference Gao, Ingram, Causon and Mingham2007; Herrmann Reference Herrmann2008; de Zélicourt et al. Reference de Zélicourt, Ge, Wang, Sotiropoulos, Gilmanov and Yoganathan2009; Zhang & Ni Reference Zhang and Ni2014; Gutiérrez et al. Reference Gutiérrez, Favre, Balcázar, Amani and Rigola2018; Cao et al. Reference Cao, Sun, Wei, Yu and Li2019). However, most of these methods require modifications of standard finite element or finite difference software packages.
The diffuse domain (DD) method was proposed in Li et al. (Reference Li, Lowengrub, Rätz and Voigt2009) to solve partial differential equations in stationary/moving complex geometries with Dirichlet, Neumann or Robin boundary conditions. In this method, the complex geometry is extended to a larger, regular domain and a phase-field function is used to smoothly approximate the characteristic function of the original domain. The original partial differential equation is then reformulated on the larger domain with additional source terms that approximate the boundary conditions. It has been shown that the reformulated partial differential equation asymptotically converges to the original system as the width of the diffuse interface layer tends to zero (Li et al. Reference Li, Lowengrub, Rätz and Voigt2009; Yu, Chen & Thornton Reference Yu, Chen and Thornton2012; Lervag & Lowengrub Reference Lervag and Lowengrub2015; Chadwick et al. Reference Chadwick, Stewart, Enrique, Du and Thornton2018; Poulsen & Voorhees Reference Poulsen and Voorhees2018; Yu, Guo & Lowengrub Reference Yu, Guo and Lowengrub2020). The advantages of such a method are that no modifications of standard software packages are required and the stationary/moving complex boundary can be imposed easily and smoothly.
The DD method has recently been coupled with a standard two-phase diffuse interface model to study two-phase fluid flows in complex geometries (Aland, Lowengrub & Voigt Reference Aland, Lowengrub and Voigt2010), where the fluid model is restricted to the case that the densities and viscosities of the two fluids are exactly the same. Phase-field, or diffuse interface, models have now emerged as a powerful method to simulate many types of multiphase flows (Guo, Lin & Lowengrub Reference Guo, Lin and Lowengrub2014a; Guo, Lin & Wang Reference Guo, Lin and Wang2014b; Guo & Lin Reference Guo and Lin2015; Jiang et al. Reference Jiang, Lin, Guo and Dong2015; Zhang & Wang Reference Zhang and Wang2016; Guo et al. Reference Guo, Lin, Lowengrub and Wise2017). The basic idea is to introduce a phase variable (order parameter) that varies continuously over thin interfacial layers and is mostly uniform in the bulk phases. In this way the phase variable can characterize different fluid component regions. Sharp interfaces are replaced by thin transition regions with non-zero thickness. One set of governing equations for the whole computational domain can be derived using variational techniques with respect to a free energy. The order parameter fields satisfy an advection–diffusion equation (usually the advective Cahn–Hilliard equations) and are coupled to Navier–Stokes-type equations through extra reactive stresses that mimic surface tension.
The classical phase-field model, Model H (Hohenberg Reference Hohenberg1977), was initially developed for simulating a binary incompressible fluid with density-matched components, and was later generalized for simulating binary incompressible fluids with variable density components (Boyer Reference Boyer2002; Ding, Spelt & Shu Reference Ding, Spelt and Shu2007; Abels, Garcke & Grun Reference Abels, Garcke and Grun2012; Dong & Shen Reference Dong and Shen2012; Aki et al. Reference Aki, Dreyer, Giesselmann and Kraus2014; Gong, Zhao & Wang Reference Gong, Zhao and Wang2017; Gong et al. Reference Gong, Zhao, Yang and Wang2018; Shokrpour Roudbari et al. Reference Shokrpour Roudbari, Şimşek, van Brummelen and van der Zee2018). Some of these models, however, do not satisfy Galilean invariance, local mass conservation or are not thermodynamically consistent. A challenge is maintaining local mass conservation, thermodynamic consistency and Galilean invariance. In Lowengrub & Truskinovsky (Reference Lowengrub and Truskinovsky1998), Model H was extended to a thermodynamically consistent model for variable density flows using the mass concentration as the phase variable and the mass-averaged velocity as the velocity field. Moreover, the fluids mix at the interfacial region which generates changes in the density even if the fluid components are incompressible individually. Such a system was called quasi-incompressible and leads to a (generally) non-solenoidal velocity field ($\boldsymbol {\nabla }\boldsymbol {\cdot } \boldsymbol {v}\ne 0$) and an extra pressure term appears in the Cahn–Hilliard equation compared to Model H. More recently, two other quasi-incompressible phase-field models (Gong et al. Reference Gong, Zhao and Wang2017; Shokrpour Roudbari et al. Reference Shokrpour Roudbari, Şimşek, van Brummelen and van der Zee2018) were developed to study binary fluids with variable densities, where the volume fraction was employed as the phase variable and a different free energy was used for the model derivations.
In this paper, we couple the DD method and a two-phase diffuse interface model to simulate binary flow in complex geometries. In particular, we first develop a thermodynamically consistent diffuse interface model, which we refer to as the quasi-incompressible Navier–Stokes Cahn–Hilliard model (q-NSCH), that allows for large density and viscosity differences between the two fluids. The model also employs the volume fraction as the phase variable. Compared to the models in Gong et al. (Reference Gong, Zhao and Wang2017) and Shokrpour Roudbari et al. (Reference Shokrpour Roudbari, Şimşek, van Brummelen and van der Zee2018), we use a different free energy and a different derivation framework that leads to a simple formulation of the system equations. We then combine the DD method with the q-NSCH system, namely the q-NSCH-DD model, to simulate two-phase flows in complex geometries. We perform a matched asymptotic analysis for the q-NSCH-DD model to show that it converges to the original q-NSCH model as the thickness of the DD interface shrinks to zero ($\epsilon \rightarrow 0$) with first-order accuracy, e.g.
$O(\epsilon )$. We present several numerical tests that illustrate the flexibility and accuracy of the approach.
The outline of the paper is as follows. In § 2, we present our q-NSCH model and, in § 3, its DD reformulation (the q-NSCH-DD system). Appendix A shows the asymptotic analysis of the q-NSCH-DD model. The numerical method and its implementation are described in appendix B. In § 4, we show several numerical simulations and results. Finally in § 5, we share some parting thoughts about the work presented here.
2. Derivation of the q-NSCH model
Here we follow the thermodynamic framework in Guo & Lin (Reference Guo and Lin2015) and derive a new diffuse interface model for two-phase flows with variable density and viscosity. The model equations are derived through a variational procedure that guarantees thermodynamic consistency.
2.1. Phase variable and variable density
Suppose in a control volume $V$ we have two fluids (labelled by
$i= 1,2$) that fill volumes
$V_{i}$ separately. The volume fraction for the
$i$th fluid can be given by
$c_{i}= {V_{i}}/{V}$. Further we assume that the two fluids can mix within an interfacial region separating the two fluids and the volume occupied by a given amount of mass of the single fluid does not change after mixing. Therefore
$c_1+c_2=1$ within the control volume
$V$. Given the total mass and volume for the mixture,
$M=M_{1}+M_{2}$ and
$V=V_{1}+V_{2}$, we introduce the actual local mass density
$\rho _{i}$ for each fluid, and the local volume-averaged mass density
$\tilde {\rho }_{i}$ taken over a sufficient small volume
$V$:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn1.png?pub-status=live)
where $\rho _i$ is a positive constant. We then define the volume-averaged density of the mixture as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn2.png?pub-status=live)
Since $c_{1}+c_{2}=1$, we assume that the phase variable with respect to volume fraction is given by
$c=c_{1}=1-c_{2}$. The corresponding variable density for the mixture can be rewritten as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn3.png?pub-status=live)
Suppose that the two fluids move with different velocities $\boldsymbol {u}_i(\boldsymbol {x},t)$, then mass conservation for the mixture is given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn4.png?pub-status=live)
The mass-averaged velocity $\boldsymbol {u} := {(\tilde {\rho }_{1}\boldsymbol {u}_{1}+\tilde {\rho }_{2}\boldsymbol {u}_{2})}/{\rho }$ and
$\rho$, defined in (2.2), satisfy the mass conservation equation:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn5.png?pub-status=live)
2.2. Balance laws
We next consider the balance laws for the two-fluid mixture. Suppose the two-phase fluid is combined in a domain $\varOmega$. We then take an arbitrary control volume
$V(t)\subset \varOmega$ that moves with the mixture. Within the control volume, we define the following quantities for the two-phase fluid:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn6.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn7.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn8.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn9.png?pub-status=live)
where $M$,
$\boldsymbol {P}$,
$E$ and
$C$ are the total mass, momentum, free energy and constituent volume of fluid 1 within the control volume
$V(t)$. Further,
$\rho (c)$ is the variable density of the mixture,
$\boldsymbol {u}$ is the mass-averaged velocity of the mixture,
$|\boldsymbol {u}|^2/2$ is the kinetic energy per unit mass,
$g$ is the gravitational constant,
$\boldsymbol {z}$ is the vector in the vertical direction,
$\tilde {\sigma } F(c)+{\tilde {\sigma }\epsilon _c |\boldsymbol {\nabla } c|^2}/{2}$ is the Cahn–Hilliard-type interfacial free energy,
$F(c)=c^2(c-1)^2/4\epsilon _c$ is double-well potential,
$\epsilon _c$ is a small parameter that characterizes the thickness of the diffuse interface separating the fluid components and
$\tilde {\sigma }$ is the surface tension that is related to the physical surface tension
$\sigma$ through
$\sigma =6\sqrt {2}\tilde {\sigma }$. The general forms of the physical balance laws associated with
$M$,
$\boldsymbol {P}$,
$E$ and
$C$ can be given as follows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn10.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn11.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn12.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn13.png?pub-status=live)
where ${\boldsymbol{\mathsf{m}}}$ is a tensor,
${\boldsymbol{\mathsf{q}}}_{E}$ and
${\boldsymbol{\mathsf{q}}}_{C}$ are fluxes and
$D$ is the dissipation function, which will be specified later. The mass balance (2.10) ensures (2.5) is satisfied. The momentum balance (2.11) leads to
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn14.png?pub-status=live)
where ${{\mathrm {D}}}/{{\mathrm {D}}t}=\partial _{t}+\boldsymbol {u} \boldsymbol {\cdot } \boldsymbol {\nabla }$. The constituent volume balance equation (2.13) gives that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn15.png?pub-status=live)
Further, by using the definition of $\rho$ in (2.3) and the mass conservation (2.5), we obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn16.png?pub-status=live)
Substituting ${{\mathrm D}c}/{{\mathrm D}t}$ in (2.15), we obtain the quasi-incompressibility in the interfacial region for the two-phase flows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn17.png?pub-status=live)
where $\alpha =(\rho _{2}-\rho _{1})/\rho _{2}$.
We now consider the energy balance (2.12). We first take the time derivative of the free energy (2.8) to obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn18.png?pub-status=live)
where we have used the following identities:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn19.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn20.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn21.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn22.png?pub-status=live)
Substituting $\rho ({{\mathrm D}\boldsymbol {u}}/{{\mathrm D}t})$ and
${{\mathrm D}c}/{{\mathrm D}t}$ in (2.14) and (2.15), respectively, and applying the divergence theorem, we obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn23.png?pub-status=live)
where we denote the general stress tensor by ${\boldsymbol{\mathsf{m}}} ={\boldsymbol{\mathsf{m}}}_0 + {\tau }$, in which
${\tau }$ is the deviatoric stress tensor with zero trace,
${\boldsymbol{\mathsf{m}}}_0$ is the unknown part to be defined later and
${\boldsymbol{\mathsf{D}}} \boldsymbol {u}=\boldsymbol {\nabla } \boldsymbol {u}-({\boldsymbol \nabla } \boldsymbol {\cdot } \boldsymbol {u}){\boldsymbol{\mathsf{I}}} /3$ is the deviatoric part of
${\boldsymbol \nabla } \boldsymbol {u}$. Moreover, using the following identity and (2.17):
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn24.png?pub-status=live)
we define the pressure $p$ as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn25.png?pub-status=live)
such that
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn26.png?pub-status=live)
Moreover, the term $({\boldsymbol{\mathsf{m}}}_0 +\tilde {\sigma }\epsilon _c ({\boldsymbol \nabla } c \otimes {\boldsymbol \nabla } c) ): {\boldsymbol {D}}\boldsymbol {u}=0$ due to the above identity. By using (2.24), we rewrite (2.23) as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn27.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn28.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn29.png?pub-status=live)
Therefore, to ensure the non-positivity of the dissipation term ($D \leqslant 0$, the second law of thermodynamics), we specify the unknown terms in the form
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn30.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn31.png?pub-status=live)
where $M(c)\geqslant 0$ is the mobility function,
$\nu (c)=\nu _{1}c+\nu _{2}(1-c)$ is variable viscosity for the two-phase fluid and
$\nu _{i}$ is the viscosity for the
$i$th fluid,
$\mu =\tilde {\sigma } F'(c)-\epsilon _c\tilde {\sigma }{\rm \Delta} c$. Combining (2.29) and (2.30) we obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn32.png?pub-status=live)
2.3. Governing equations
By substituting (2.30)–(2.32) in (2.14) and (2.15), and using the identity
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn33.png?pub-status=live)
we obtain the q-NSCH system equations governing two-phase flows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn34.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn35.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn36.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn37.png?pub-status=live)
Here $M(c)=\sqrt {c^2(1-c)^2}$ is the degenerate mobility, which becomes zero in the bulk regions ensuring that the velocity field is divergence free for single-phase flow. Moreover, the following boundary conditions on
$\partial \varOmega$ are imposed:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn38.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn39.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn40.png?pub-status=live)
Here $\boldsymbol {u}_{g}=(g_{u},g_{v})$ is the velocity on the boundary
$\partial \varOmega$ and
$\boldsymbol {n}$ is the outward normal vector to
$\varOmega$. Assuming
$\partial \varOmega$ is closed, the boundary velocity needs to satisfy
$\int _{\partial \varOmega }\boldsymbol {u}_{g}\boldsymbol {\cdot }\boldsymbol {n}\,{\mathrm d}S=0$. Further, the contact angle
$\theta$ is the static contact angle between the fluid–fluid interface and the physical boundary. This form of the boundary condition (2.40) was derived in Jacqmin (Reference Jacqmin1999) (see also Gránásy et al. (Reference Gránásy, Pusztai, Saylor and Warren2007), Do-Quang & Amberg (Reference Do-Quang and Amberg2009) and Aland et al. (Reference Aland, Lowengrub and Voigt2010) in the context of the DD method). In particular, for an interface in equilibrium, a contact angle condition (Young's law) may be posed:
$\cos (\theta )=(({\sigma _{2S}-\sigma _{1S}})/{\sigma })$, where
$\theta$ is the (equilibrium) contact angle and
$\sigma _{iS}$ is the interfacial energy between the solid and component
$i$. The contact angle characterizes the wettability of the surface with
$\theta =0$ denoting complete wetting. However, in the dynamical setting with the no-slip condition, the force needed to move a contact line is infinite making it necessary to regularize the system. Numerous methods have been implemented to regularize the problem including introducing a slip velocity, microscopic interactions, a precursor film or a diffuse interface.
Recently, two other quasi-incompressible two-fluid models have been presented in Gong et al. (Reference Gong, Zhao and Wang2017) and Shokrpour Roudbari et al. (Reference Shokrpour Roudbari, Şimşek, van Brummelen and van der Zee2018), where a different phase variable $\phi$ is introduced leading to a different Cahn–Hilliard free energy and different systems of equations. In the paper by Shokrpour Roudbari et al. (Reference Shokrpour Roudbari, Şimşek, van Brummelen and van der Zee2018), in order to ensure the energy conservation for both the model equations and the corresponding numerical method, they introduced a dual-density form (two formulations of the variable density of the mixture) to the modelling framework. These two forms of the density appear in the model simultaneously and cannot be used interchangeably, leading to an extra mass conservation equation that needs to be solved along with the model equations. Our model equations are more compact and satisfy the energy conservation naturally. There is only one form of the variable density, and no extra mass conservation equation. In the paper by Gong et al. (Reference Gong, Zhao and Wang2017), the modelling framework they follow is based on the free energy dissipation which means that the framework is mainly focused on the isothermal case. Our modelling framework is more general, as the total energy, free energy and entropy can be introduced to the system in a thermodynamically consistent way, so that we can derive more general models to simulate the non-isothermal case or two-phase flows with non-uniform surface tension (surface tension gradient induced by the gradient of temperature or concentration of surfactants). Moreover, in their modelling framework, they did not provide the specific formulation for the Cahn–Hilliard free energy, which shortens the model derivation. However, to ensure the mass conservation of the fluid mixture and each fluid component, a parameter ‘
$B$’ is introduced to the Cahn–Hilliard equation, serving as the coefficient of the mobility of the chemical potential. In their work, the calculation of ‘
$B$’ seems quite long and complicated, and the resulting ‘
$B$’ also makes the model equations more complicated compared to our model.
3. Diffuse domain reformulation: q-NSCH-DD
We next assume that the domain $\varOmega$ has a complex boundary
$\partial \varOmega$. To solve the q-NSCH model (2.34)–(2.40) numerically, we extend the results in Aland et al. (Reference Aland, Lowengrub and Voigt2010) and propose a DD approximation of the q-NSCH model in a larger and simpler domain
$\tilde {\varOmega }$ (see figure 1). The q-NSCH-DD model is
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn41.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn42.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn43.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn44.png?pub-status=live)
with the boundary conditions $\boldsymbol {u}=\boldsymbol {0}$,
$\boldsymbol {n}\boldsymbol {\cdot }\boldsymbol {\nabla }c=\boldsymbol {n}\boldsymbol {\cdot }\boldsymbol {\nabla }(\mu +\alpha p)=0$ on
$\partial \tilde {\varOmega }$. Note that the solution in
$\varOmega$ is insensitive to the boundary conditions on
$\partial \tilde {\varOmega }$ if
$\partial \varOmega$ and
$\partial \tilde {\varOmega }$ are sufficiently far apart (e.g. the distance between
$\partial \varOmega$ and
$\partial \tilde {\varOmega }$ is
$\geqslant 10\epsilon$; Yu et al. (Reference Yu, Guo and Lowengrub2020)). Here the DD function
$\phi$, given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn45.png?pub-status=live)
is used to approximate the characteristic function of the original domain $\varOmega$. The function
$r(\boldsymbol {x},t)$ is the signed distance to
$\partial \varOmega$ (
$r<0$ inside
$\varOmega$) and
$\epsilon$ is the thickness of the DD boundary. We fix
$\epsilon _{c}$ and let
$\epsilon \rightarrow 0$ unless otherwise stated. The reformulated
$BC_{*}$ are used to enforce the original boundary conditions (2.38)–(2.40) on
$\partial \varOmega$. In particular,
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn46.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn47.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn48.png?pub-status=live)
Here, we extend $\boldsymbol {u}_{g}$ into
$\tilde {\varOmega }$ constantly in the normal direction. The advantage of the q-NSCH-DD system is that it is posed on a regular domain and can be solved by any standard approach (e.g. finite difference, finite element). In appendix A, we show that the q-NSCH-DD system (3.1)–(3.4) asymptotically converges to the original q-NSCH system (2.34)–(2.37) with boundary conditions (2.38)–(2.40) as
$\epsilon \rightarrow 0$. Moreover, the numerical methods and the corresponding implementation are shown in appendix B.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig1.png?pub-status=live)
Figure 1. Schematic of the DD method. The sharp (physical) interface domain $\varOmega$ is embedded in a larger, square domain
$\tilde {\varOmega }$ where a phase-field function
$\phi$ approximates the characteristic function of the deposition domain.
4. Numerical results
4.1. Cavity flow
We first consider a two-phase fluid flow in a driven cavity (Boyer Reference Boyer2002). The numerical results from the q-NSCH system (2.34)–(2.37) on the physical domain $\varOmega = [0,1]^2$ are compared to those from the q-NSCH-DD system (3.1)–(3.4) on an extended domain
$\tilde \varOmega = [-0.25,1.25]^2$. For the original q-NSCH system, the boundary conditions on
$\partial \varOmega$ are imposed as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn49.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn50.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn51.png?pub-status=live)
where $\boldsymbol {u}_{g}=(g_{u},g_{v})=(g_{u},0)$, and
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn52.png?pub-status=live)
For the q-NSCH-DD system, the function $\phi$, given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn53.png?pub-status=live)
is used to approximate the characteristic function of $\varOmega$, and
$g_{u}$ is extended to
$\tilde \varOmega$ as follows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn54.png?pub-status=live)
For both systems, the initial $c$ is
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn55.png?pub-status=live)
such that $c=0$ for the fluid at the bottom and
$c=1$ for the top fluid. In addition, we set
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn56.png?pub-status=live)
We present the evolution of the phase-field variable $c$ obtained from the q-NSCH-DD system in figure 2 and compare
$c$ at
$t=15$ with the one from the q-NSCH system at the same time in figure 3.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig2.png?pub-status=live)
Figure 2. Evolution of the phase-field variable $c$ in a cavity flow. The results are obtained using the q-NSCH-DD system with a grid size
$h=1.5/256$,
$\textrm {d}t = 2.5\times 10^{-3}$ and
$\epsilon =0.025$ in
$\tilde \varOmega$. The white box represents the physical domain
$\varOmega$.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig3.png?pub-status=live)
Figure 3. Comparisons between the phase-field variable obtained from the q-NSCH-DD system (a) and that from the q-NSCH system (b) at $t=15$. The white box in (a) marks the physical domain
$\varOmega$.
Moreover, we compare the results between the q-NSCH and q-NSCH-DD solutions to test the convergence of the q-NSCH-DD system as $\epsilon \rightarrow 0$. In particular, we use the results, including the velocities
$u_{exc}$,
$v_{exc}$, and phase variable
$c_{exc}$, from the q-NSCH system with a grid size
$h=1/1024$ and a time step
$\textrm {d}t=3.90625\times 10^{-5}$ as the exact solutions. For the q-NSCH-DD system, we obtain the corresponding numerical solutions
$u_\epsilon$,
$v_\epsilon$ and
$c_\epsilon$ using different values of
$\epsilon$, namely
$0.1$,
$0.05$,
$0.025$,
$0.0125$,
$0.00625$. We start with a grid size
$h = 1.5/64$ and time step
$\textrm {d}t=10^{-2}$ and
$\epsilon =0.1$, and refine them together. For each
$\epsilon$, we restrict the solutions from q-NSCH-DD to the original domain
$\varOmega$ (see the smaller region bounded by the white solid line in figure 2) and compute the
$L^2$ (
$E^{(2)}$) and
$L^\infty$ (
$E^{(\infty )}$) errors as
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn57.png?pub-status=live)
where $y_\epsilon$ represents
$u_\epsilon$,
$v_\epsilon$,
$c_\epsilon$ and
$y_{exc}$ represents
$u_{exc}$,
$v_{exc}$,
$c_{exc}$. Note that
$E_{y}^{(\infty )}$ is computed where
$\phi \geqslant 0.5$. The errors at
$t=0.1$ are presented in tables 1 and 2. We observe that our DD approximation converges to the q-NSCH model with
$\mathcal {O}(\epsilon )$.
Remark Another choice of $BC_u = -\epsilon ^{-3}(1-\phi )(\boldsymbol {u}-\boldsymbol {u_g})$ was presented by Li et al. (Reference Li, Lowengrub, Rätz and Voigt2009) and later the scheme was shown to be
$\mathcal {O}(\epsilon \ln (\epsilon ))$ accurate by Yu et al. (Reference Yu, Guo and Lowengrub2020). We here provide the numerical results using
$BC_u = -\epsilon ^{-3}(1-\phi )(\boldsymbol {u}-\boldsymbol {u}_{\boldsymbol {g}})$ for the cavity flow example in tables 3 and 4. This form of the velocity boundary condition was also used by Aland et al. (Reference Aland, Lowengrub and Voigt2010). The numerical set-up is identical to that considered above. We find that the errors are of a similar order of magnitude but are larger than those using
$BC_u = -\epsilon ^{-2}(1-\phi )(\boldsymbol {u}-\boldsymbol {u}_{\boldsymbol {g}})$ and are sub-first-order accurate, which is consistent with the results of Yu et al. (Reference Yu, Guo and Lowengrub2020). In the following, we use
$BC_u = -\epsilon ^{-2}(1-\phi )(\boldsymbol {u}-\boldsymbol {u}_{\boldsymbol {g}})$ exclusively. Moreover, our numerical results agree with the convergence results shown in Franz et al. (Reference Franz, Roos, Gärtner and Voigt2012).
Table 1. The $L^2$ errors and convergence rate (
$k$) of the velocities
$u$,
$v$ and phase-field variable
$c$ with different values of
$\epsilon$ in a cavity flow in § 4.1. Here
$k$ stands for the convergence rate. See text for details.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab1.png?pub-status=live)
Table 2. The $L^\infty$ errors and convergence rate (
$k$) of the velocities
$u$,
$v$ and phase-field variable
$c$ in a cavity flow in § 4.1. Here
$k$ stands for the convergence rate. See text for details.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab2.png?pub-status=live)
Table 3. The $L^2$ errors and convergence rate (
$k$) of the velocities
$u$,
$v$ and phase-field variable
$c$ in a cavity flow using another choice of
$BC_u = -\epsilon ^{-3}(1-\phi )(\boldsymbol {u}-\boldsymbol {u_g})$. See the remark in § 4.1 for details.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab3.png?pub-status=live)
Table 4. The $L^\infty$ errors of the velocities
$u$,
$v$ and phase-field variable
$c$ in a cavity flow using another choice of
$BC_u = -\epsilon ^{-3}(1-\phi )(\boldsymbol {u}-\boldsymbol {u_g})$. See the remark in § 4.1 for details.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab4.png?pub-status=live)
4.2. Droplet spreading
In order to test the accuracy of the q-NSCH-DD system with the moving contact line, we consider an example of a water droplet spreading on a flat substrate. In particular, we assume that there is a water droplet in the air, and is placed above a flat substrate. Due to the effect of gravity, the droplet falls down and spreads on the substrate. For the original q-NSCH system, the computational domain is $\varOmega =[0,1]^2$ with the following boundary conditions on
$\partial \varOmega$:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn58.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn59.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn60.png?pub-status=live)
For the q-NSCH-DD system, we extend the computational domain to $\tilde {\varOmega }=[-0.25,1.25]^2$ with the following boundary conditions on
$\partial \tilde {\varOmega }$:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn61.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn62.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn63.png?pub-status=live)
Moreover, we use the function $\phi$, given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn64.png?pub-status=live)
to approximate the characteristic function of $\varOmega$. For both systems, the initial condition for the phase variable
$c$ is given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn65.png?pub-status=live)
with $r=\sqrt {(x-0.5)^2+(y-0.21)^2}$, such that
$c=0$ for the water droplet and
$c=1$ for the air. In addition, we set
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn66.png?pub-status=live)
In figure 4, we show the domains $\tilde {\varOmega }$ and
$\varOmega$ together with the initial
$c$ for both systems. In figure 5, we show the dynamics of the contact line of the moving droplet, where the solid (dotted) lines represent the contour line (
$c=0.5$) of the numerical results obtained from the q-NSCH (the q-NSCH-DD) system. A good agreement can be observed between the two results. Again, we compare the results obtained from the two systems, and test the convergence rate of the q-NSCH-DD system as
$\epsilon \rightarrow 0$. As in the previous section, we use the results of phase variable
$c_{exc}$ from the q-NSCH system with agrid size
$h=1/1024$ and a time step
$\textrm {d}t=3.90625\times 10^{-5}$ as the exact solutions. For the q-NSCH-DD system, we obtain the corresponding numerical solutions
$c_\epsilon$ using different values of
$\epsilon$, namely
$0.1$,
$0.05$,
$0.025$,
$0.0125$,
$0.00625$. We start with a grid size
$h = 1.5/64$ and time step
$\textrm {d}t=10^{-2}$ and
$\epsilon =0.1$, and refine them together. For each
$\epsilon$, we restrict the solutions from q-NSCH-DD to the original domain
$\varOmega$ and compute the
$L^2$ (
$E^{(2)}$) and
$L^\infty$ (
$E^{(\infty )}$) errors as shown in (4.9a,b). The errors at
$t=0.1$ are presented in table 5, where we observe that our DD approximation converges to the q-NSCH system with
$\mathcal {O}(\epsilon )$.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig4.png?pub-status=live)
Figure 4. The computational domain for the q-NSCH-DD system (a) and the q-NSCH system (b), and the initial condition for phase variable $c$. The white box in (a) marks the physical domain
$\varOmega$.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig5.png?pub-status=live)
Figure 5. The dynamics of moving contact line of a water droplet on a solid substrate, where the solid (dotted) lines are the contour lines ($c=0.5$) of the numerical results obtained from the q-NSCH (q-NSCH-DD) system.
Table 5. The $L^2$ and
$L^{\infty }$ errors and convergence rate (
$k$) of the phase-field variable restricted on
$\varOmega$,
$\phi c$, at time
$t=0.1$ with contact angle
$\theta = 60^{\circ }$. See § 4.2 for details.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab5.png?pub-status=live)
4.3. Droplet on cylinder
We next consider a circular droplet of diameter $d$ wetting and dewetting on a solid cylinder. Initially, the droplet is placed on the cylinder of the same diameter
$d$ with contact angle
$\theta _{0}=90^{\circ }$ (see figure 6). We mention that careful studies for wetting and dewetting phenomena using a phase-field model have been presented in Gránásy et al. (Reference Gránásy, Pusztai, Saylor and Warren2007), Dziwnik, Münch & Wagner (Reference Dziwnik, Münch and Wagner2017) and Rainer et al. (Reference Rainer, Steven, Marco and Axel2019). With
$\theta$ being the static contact angle, the contact line of the droplet recedes if
$\theta <\theta _{0}$ or spreads if
$\theta >\theta _{0}$, and eventually reaches an equilibrium with the interface intersecting the solid cylinder at an angle of
$\theta$. In the absence of gravity, the equilibrium state of the droplet can be obtained analytically by carving the cylinder out of a circle (Liu & Ding Reference Liu and Ding2015; O'Brien & Bussmann Reference O'Brien and Bussmann2018); see figure 7. The distance between the centres of the droplet and the cylinder,
$d_{c}$, and the diameter of the circle,
$d_{l}$, can be computed by solving
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn67.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn68.png?pub-status=live)
where
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn69.png?pub-status=live)
The exact solution $c_{exc}$ is given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn70.png?pub-status=live)
and $r_{exc}=\sqrt {(x-1.25d)^2+(y-0.6d-d_{c})^2}$. To apply the q-NCSH-DD system, we extend
$\varOmega$ to a larger domain
$\tilde \varOmega$ =
$[0,2.5d]\times [0,2.5d]$. The initial
$\phi$ and
$c$ are given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn71.png?pub-status=live)
where $r_{\phi }\!=\!\sqrt {(x\!-\!1.25d)^2\!+\!(y\!-\!0.6d)^2}$ and
$r_c\!=\!\sqrt {(x\!-\!1.25d)^2\!+\!(y\!-\!0.6d\!-\!0.5\sqrt {2}d)^2}$, such that
$c=1$ for the droplet (indicated by 1) and
$c=0$ for the surrounding fluid medium (indicated by 2). All the other parameters are set as follows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn72.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig6.png?pub-status=live)
Figure 6. Set-up for droplet on cylinder.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig7.png?pub-status=live)
Figure 7. Comparisons between the numerical results at equilibrium (solid lines) and the analytic solutions (dashed lines) with different static contact angles, where the angles are indicated inside the blue cylinders. See text for details.
We solve the q-NSCH-DD system with different values of $\epsilon$ (
$=\epsilon _{c}$) and various
$\theta$ (
$=30^\circ , 90^\circ ,120^\circ$) to obtain the numerical solutions
$c$ at equilibrium and then compare with the corresponding analytical solutions
$c_{exc}$ in both
$L^2$ and
$L^{\infty }$ norm:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn73.png?pub-status=live)
We start with a grid size $h=2.5/128$, a time step
$\textrm {d}t=0.01$ and
$\epsilon =\epsilon _c=0.02$ and conduct the error analysis by refining them together. In tables 6 and 7, we present the
$L^2$ and
$L^\infty$ errors and find that our q-NSCH-DD system provides a first-order approximation to the exact solution (sharp interface).
Table 6. The $L^2$ errors and convergence rate (
$k$) of the phase-field variable restricted on
$\varOmega$,
$\phi c$, at equilibrium with different static contact angles
$30^{\circ }$,
$90^{\circ }$ and
$120^{\circ }$.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab6.png?pub-status=live)
Table 7. The $L^{\infty }$ errors of the phase-field variable restricted on
$\varOmega$,
$\phi c$, at equilibrium with different static contact angles
$30^{\circ }$,
$90^{\circ }$ and
$120^{\circ }$. See text for details.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_tab7.png?pub-status=live)
In figure 7, we also present the numerical solutions $\phi c$ with analytical solutions at equilibrium from the q-NSCH-DD system with various
$\theta$ (
$=30^{\circ }, 90^\circ ,120^\circ$). The analytical solutions are the dashed curves. Here the grid size is
$n=2048$ and
$\epsilon =\epsilon _{c}=0.00125$. There is excellent agreement between the numerical and analytical solutions.
4.4. Penetration of a liquid droplet into porous media
As a final test, we consider a two-dimensional droplet falling through a porous substrate consisting of three cylinders ($C_i$,
$i=1,2,3$) with different wettabilities, as shown in figure 8. We also fix the contact angle of the fluid–fluid interface at the walls to be
$90^{\circ }$. The extended domain
$\tilde \varOmega = [0,1]\times [0,1]$ is discretized on a uniform mesh of
$[1024\times 1024]$. The original physical domain is
$\varOmega = \tilde \varOmega /(\cup C_i)$. There are three cylinders in the domain with radii
$r_1=0.1$,
$r_2=0.12$,
$r_3=0.15$, and centres
$(0.3,0.6)$,
$(0.4,0.25)$,
$(0.7,0.5)$, respectively. Initially, a heavy liquid drop with radius
$r_d=0.15$ is placed above the cylinders with the centre
$(0.5,0.8)$. Note that the initial
$\phi$ and
$c$ can be given by a slight modification of (4.23). Again, we let
$c=1$ stand for the heavy fluid droplet and
$c=0$ stands for the light fluid medium. All other parameters are set as follows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn74.png?pub-status=live)
The dynamics of droplet impact is shown in figure 8 via snapshots at different times. Initially, the droplet starts moving downwards due to gravitational forces. Dramatic deformations are observed when the droplet comes into contact with the left and right cylinders. After impacting on the cylinder at the bottom, the droplet splits into several parts. In the end, it is interesting to see that there is no liquid on the cylinders with contact angle of $\theta =90^{\circ }$ and
$\theta =120^{\circ }$. All the liquid rests either on the cylinder with
$\theta =60^{\circ }$ or on the walls.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig8.png?pub-status=live)
Figure 8. Snapshots of the penetration of a liquid droplet into porous media with different static contact angles, where the angles are indicated inside the white cylinders.
4.5. Moving domains
In the next example, we simulate solid hydrophobic and hydrophilic balls impacting an air–water interface in two dimensions. The extended domain is $\tilde {\varOmega }=[0,1]\times [0,1]$, and the air is placed on top of the water, with a flat interface at
$y=0.5$. Figure 9 shows the initial
$\phi$ (the complex domain) and
$c$ (the air–water interface), which are given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn75.png?pub-status=live)
where $r_{\phi }=\sqrt {(x-0.5d)^2+(y-0.65d)^2}$ and such that
$\phi =0$ for the solid ball (in white) and
$\phi =0$ for the bulk regions with water (in red) or air (in blue). Here we assume that the ball moves with a constant velocity
$\boldsymbol {v}_{ball}=(0,-1)$. All the other parameters are set as follows:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn76.png?pub-status=live)
Two contact angle boundary conditions, namely $\theta _{0}=60^{\circ }$ (hydrophilic) and
$\theta _{0}=120^{\circ }$ (hydrophobic), are imposed at the boundary of the solid ball. Figures 9 and 10 show the results of the simulations. For the hydrophilic ball, the contact line moves continuously on the surface of the ball until reaching the ball peak, at which the liquid merges and detaches from the surface of the ball. In contrast, for the hydrophobic ball, the contact line initially moves along the ball surface, but eventually rests on the ball. As a consequence of the pinned contact line, the length of the air cavity keeps growing. A neck then appears at the cavity and breaks up, thereby generating a bubble attached at the top of the ball.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig9.png?pub-status=live)
Figure 9. Snapshots of water entry of a hydrophilic ball with contact angle $60^{\circ }$. Here the white region represents the solid falling ball, the blue region represents the air and the red region represents the water.
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_fig10.png?pub-status=live)
Figure 10. Snapshots of water entry of a hydrophobic ball with contact angle $120^{\circ }$. Here the white region represents the solid falling ball, the blue region represents the air and the red region represents the water.
5. Discussion
A DD method was proposed to simulate two-phase flows with moving contact lines in complex geometries. We first derived a new thermodynamically consistent, locally mass conservative diffuse interface model, the q-NSCH system, for two-phase fluid flows with variable physical properties. We then combined this model with the DD method, to yield the q-NSCH-DD system in which a phase-field function $\phi$ was introduced to approximate the characteristic function of the original complex domain. Moreover, the q-NSCH-DD system contains extra source terms to enforce the boundary conditions on the complex domain. In the sharp interface limit, we showed that the q-NSCH-DD system converged to the q-NSCH system as the thickness
$\epsilon$ of the DD boundary shrinks to zero at an
$\mathcal {O}(\epsilon )$ rate.
We solved the q-NSCH-DD system using an existing finite difference multigrid solver on a staggered grid. Using the DD formulation, the system was solved on a larger, regular domain without any modification of the solver. Numerical results confirmed that the solution to the q-NSCH-DD system converged to that of the q-NSCH system and to analytical solutions. In addition, we showed that the q-NSCH-DD system not only allowed the contact line to move on the curved boundaries, but also made the fluid–fluid interface intersect the solid object at an angle consistent with the prescribed contact angle.
In Yu et al. (Reference Yu, Guo and Lowengrub2020), the authors proposed that using a modified version of the boundary condition term $BC_u = -\epsilon ^{-3}(1-\phi )(\boldsymbol {u}-\boldsymbol {u_g}-r\boldsymbol {n}\boldsymbol {\cdot }\boldsymbol {\nabla }\boldsymbol {u})$, where
$r$ is the signed distance function to
$\varOmega$, could achieve second-order accuracy in
$L^2$ and 1.5-order accuracy in
$L^\infty$, although this was only shown to be the case in problems in Yu et al. (Reference Yu, Guo and Lowengrub2020). In preliminary work, we implemented this form of the boundary condition but did not find the expected improvement in convergence rate. This is likely due to the vector form of the problem, and the quasi-incompressibility condition, which couples the derivatives of the velocity. In future work, we will extend the asymptotic analysis in § 4 and use the approach developed in Yu et al. (Reference Yu, Guo and Lowengrub2020) to guide the development of a higher-order-accurate version of the q-NSCH-DD system. Moreover, we will also consider dynamic contact angle formulations developed in Liu & Wu (Reference Liu and Wu2019). Since the DD formulation is dimension-independent, we also plan to develop a three-dimensional, spatially adaptive version of the solver.
Acknowledgements
J.L. acknowledges partial support from funding from the National Science Foundation-Division of Mathematical Sciences (NSFDMS) through grant DMS-1719960 and the Center for Multiscale Cell Fate Research at UC Irvine, which is supported by NSF-DMS (DMS-1763272) and the Simons Foundation (594598, QN). J.L. additionally acknowledges partial funding from the National Institutes of Health (NIH) through grant 1U54CA217378-01A1 for a National Center in Cancer Systems Biology at the University of California, Irvine, and NIH grant P30CA062203 for the Chao Comprehensive Cancer Center at the University of California, Irvine. S.W. acknowledges partial support from the NSFDMS through grants NSF-DMS 1719854 and NSF-DMS 2012634. P.L. acknowledges partial support from NSFC grant 11771040 and NSFC grant 11861131004.
Declaration of interests
The authors report no conflict of interest.
Appendix A. Asymptotic analysis of q-NSCH-DD
We use the method of matched asymptotic expansions to analyse the q-NSCH-DD system. In particular, we expand the variables in powers of the interface thickness in regions close to and far from the boundary. Parameter $Y$ represents
${\boldsymbol {u}}$,
$c$,
$\mu$ or
$p$. The two expansions are then matched in a region where both are valid. We assume
$\partial {\varOmega }$ is smooth, but we are able to compute solutions accurately even if
$\partial {\varOmega }$ has corners.
A.1. Outer expansions
On each side far from the domain boundary $\partial {\varOmega }$, there exists an outer expansion, here labelled
$\bar {Y}_1(\boldsymbol {x};\epsilon )$ where
$r<0$ and
$\phi =1$ (e.g. inside
$\varOmega$), and
$\bar {Y}_2(\boldsymbol {x};\epsilon )$ where
$r>0$ and
$\phi =0$ (e.g. outside
$\varOmega$), where
$\bar {Y}_i$ represents
$\bar {\boldsymbol {u}}_i$,
$\bar {c}_i$,
$\bar {\mu }_i$ or
$\bar p_i$. The outer expansion is away from
$\partial \tilde \varOmega$. On the boundary of
$\partial \tilde \varOmega$, we assume the following boundary conditions:
${\boldsymbol {n}}\boldsymbol {\cdot } {\boldsymbol {\nabla }} \bar {\boldsymbol {u}}_2=0$ and
$\boldsymbol {n}\boldsymbol {\cdot } \boldsymbol {\nabla } \bar {p}_2=\boldsymbol {n}\boldsymbol {\cdot }\boldsymbol {\nabla } \bar {\mu }_2= \boldsymbol {n}\boldsymbol {\cdot } \boldsymbol {\nabla } \bar {c}_2=0$. We assume the outer solution
$Y_1$ has a regular expansion
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn77.png?pub-status=live)
Plugging into (3.1)–(3.4), we obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn78.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn79.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn80.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn81.png?pub-status=live)
Now, if $\bar {\boldsymbol {u}}_1^{(0)}$,
$\bar p_1^{(0)}$,
$\bar \mu _1^{(0)}$ and
$\bar {c}_1^{(0)}$ satisfy the corresponding boundary conditions on
$\partial \varOmega$ so that they are the unique solutions to q-NSCH (2.34)–(2.37), then the q-NSCH-DD system recovers the q-NSCH model at leading order. Assuming a similar expansion for
$\bar {Y}_2$, we obtain
$\bar {\boldsymbol {u}}_2 = {\boldsymbol {u}}_g$,
${\boldsymbol {n}}\boldsymbol {\cdot } {\boldsymbol {\nabla }}\bar {p}_2={\boldsymbol {n}}\boldsymbol {\cdot } {\boldsymbol {\nabla }}\bar {\mu }_2={\boldsymbol {n}}\boldsymbol {\cdot } {\boldsymbol {\nabla }}\bar {c}_2=0$. The boundary conditions at
$\partial \varOmega$ are obtained by matching the outer and inner expansions.
A.2. Inner expansions
For the inner expansions, we introduce a local coordinate system near the domain boundary $\partial {\varOmega }$:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn82.png?pub-status=live)
where $\boldsymbol {X}(\boldsymbol {s};\epsilon )$ is a parametrization of the interface,
$\boldsymbol {n}(\boldsymbol {s};\epsilon )$ is the interface normal vector that points out of
$\varOmega$,
$\boldsymbol {s}$ is the tangential vector and
$z$ is the stretched variable given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn83.png?pub-status=live)
where $r(\boldsymbol {x})$ is the signed distance function to
$\partial \varOmega$. Note that
$\lim _{z\rightarrow -\infty }\phi =1$ and
$\lim _{z\rightarrow +\infty }\phi =0$. In the local coordinate system, the derivatives become
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn84.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn85.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn86.png?pub-status=live)
where $\kappa = \boldsymbol {\nabla }_{\boldsymbol {s}}\boldsymbol {\cdot } \boldsymbol {n}$ is the total curvature of
$\partial {\varOmega }$. We assume that the inner expansion is given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn87.png?pub-status=live)
where $\hat {Y}$ represents
$\hat {\boldsymbol {u}}$,
$\hat {c}$,
$\hat {\mu }$ and
$\hat {p}$. In a region of overlap where both expansions are valid, we have
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn88.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn89.png?pub-status=live)
Combining (A 1), (A 11)–(A 13), we have the following asymptotic matching conditions at the first two leading orders:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn90.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn91.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn92.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn93.png?pub-status=live)
Plugging the inner expansions into q-NSCH-DD and using (A 8)–(A 10), we derive the following inner equations at the leading order $\mathcal {O}(\epsilon ^{-2})$:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn94.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn95.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn96.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn97.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn98.png?pub-status=live)
Note that the momentum (3.1) is expanded in both normal and tangential directions. Here we assume $\nu =1$ for simplicity and obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn99.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn100.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn101.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn102.png?pub-status=live)
where ${C}_*$ are constants, and
$I_0$ and
$K_0$ are the modified Bessel functions of the first and second kinds, respectively. Combining (A 23) and (A 24) with the leading-order matching conditions for
$\boldsymbol {u}$ (A 14) and (A 16), we derive
$\bar {\boldsymbol {u}}_1^{(0)} = \hat {\boldsymbol {u}}^{(0)} = \boldsymbol {u}_{g}$, and
$C_{5}=\bar {c}^{(0)}$.
At the next order of (3.2)–(3.4), $\mathcal {O}(\epsilon ^{-1})$, we obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn103.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn104.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn105.png?pub-status=live)
Integrating (A 28) and (A 29) both sides from $-\infty$ to
$+\infty$ with respect to
$z$, we have
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn106.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn107.png?pub-status=live)
Using the matching condition (A 15), we obtain
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn108.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn109.png?pub-status=live)
Therefore, the outer solutions $\bar {\boldsymbol {u}}_1^{(0)}$,
$\bar {\mu }_1^{(0)}$,
$\bar {p}_1^{(0)}$ and
$\bar {c}_1^{(0)}$ satisfy the original boundary conditions (2.38)–(2.40). Hence the q-NSCH-DD system recovers the q-NSCH model at leading order.
Appendix B. Numerical method and implementation
We now present a projection method for the q-NSCH-DD system (3.1)–(3.4) at the time-discrete level. Let $\textrm {d} t>0$ denote the time step, and assume
$\boldsymbol {u}^{n}$,
$p^{n}$,
$c^{n}$ and
$\mu ^{n}$ are the solutions at time
$t=n\,\textrm {d}t$. The solutions at time
$t= (n+1)\,\textrm {d} t$, namely
$\boldsymbol {u}^{n+1}$,
$p^{n+1}$,
$c^{n+1}$ and
$\mu ^{n+1}$, are given by
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn110.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn111.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn112.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn113.png?pub-status=live)
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn114.png?pub-status=live)
with the following boundary conditions:
![](https://static.cambridge.org/binary/version/id/urn:cambridge.org:id:binary:20201126132316770-0093:S0022112020007909:S0022112020007909_eqn115.png?pub-status=live)
Here we introduce a temporary velocity, $\tilde {\boldsymbol {u}}$, to split the original momentum (3.1). We first solve (B 1) and (B 2) to get
$c^{n+1}$ and
$\mu ^{n+1}$ , we then obtain
$\tilde {\boldsymbol {u}}^{n+1}$ and
$p^{n+1}$ from (B 3) and (B 4). Finally the velocity
$\boldsymbol {u}^{n+1}$ is updated in (B 5).
At the fully discrete level, our method uses a finite difference method on a staggered grid and implemented using an efficient, practical nonlinear multigrid solver, which was originally developed for solving a diffuse interface model for two-phase flows (Guo et al. Reference Guo, Lin, Lowengrub and Wise2017). In particular, we save the vector field, the velocity $\boldsymbol {u}=(u,v)$, as the edge-centred variables, and all the scalar variables
$c$,
$\mu$,
$\phi$ and
$p$ as the cell-centred variables. Here we use a regularized
$\tilde {\phi }=\phi +\delta$, where
$\delta =10^{-6}$. The scheme is comprised of a standard FAS method for the Cahn–Hilliard equations (B 1) and (B 2), and a method based on the Vanka-type smoothing strategy for the Navier–Stokes equations (B 3)–(B 5). As demonstrated in Guo et al. (Reference Guo, Lin, Lowengrub and Wise2017), the numerical method is first-order accurate in time and second-order accurate in space.