1 Introduction

In this contribution we consider the compressible flow of homogeneous fluids that occur in two phases: a liquid and a vapour phase. We focus on a spatial scale such that the phase boundaries exist as isolated flow patterns, i.e. single droplets are fully resolved in the model. For the mathematical modelling of a compressible fluid with liquid–vapour phase transitions one can then use either models which represent the phase boundary as a codimension-1 manifold (Sharp-Interface (SI) approach) or as a steep but continuous transition zone (Diffuse-Interface (DI) approach), see Fig. 1 for an illustration.

Fig. 1
figure 1

Graphical representation of a sharp interface (left) and a diffuse interface (right)

Both concepts are related via a SI-limit. This means, that a sequence of solutions of the DI model converges to a solution of the SI model for vanishing diffuse-interface parameter.

The thermodynamical setting is summarised in Sect. 2. We proceed with the SI concept in Sect. 3. The mathematical model can then be seen as a free boundary value problem that consists of appropriate coupling conditions across the interface, and evolution equations in the bulk domains. We shortly review the one-dimensional case, which amounts (in the absence of viscous forces) to solving a Riemann problem. Notably, the phase boundary shows up as a discontinuous wave, similar to a shock wave. Since exact Riemann solvers are not available for arbitrary thermodynamical settings we develop in the in the SFB–TRR 75 a new multiscale approach. This method determines the speed of a phase boundary locally by solving a molecular-dynamical problem. In Sect. 4 we present some results of the research on DI models. After a short review of the classical Navier–Stokes–Korteweg system we give a sketch for a new model. This model relies on a nonlocal free-energy formulation that has been previously suggested to describe two-phase equilibria in solid mechanics. The special structure of the resulting capillarity tensor can be exploited to compensate for the occurrence of a spinodal region in two-phase thermodynamics. As a consequence the resulting model can be solved numerically in a straightforward way using standard CFD codes for compressible flow. We conclude with some numerical experiments on droplet ensembles with various phase transition phenomena.

This article bases largely on the publications of the authors and (former) members of the working group that have been involved in the SFB–TRR 75. It contains results of the PhD thesis of the first author [25].

Fig. 2
figure 2

The van der Waals pressure \(p(\rho )\) and free Helmholtz energy density \( \rho \psi (\rho ) \) for \(T_{\textrm{ref}} < T_{\textrm{crit}}\) as a prototypical example to describe a liquid with two phases

2 Thermodynamics of Compressible Two-Phase Flow

A central role in modelling two-phase flow plays the accurate representation of the thermodynamic properties of fluids. For this purpose, equations of state (EOS) are prescribed that put thermodynamic quantities in relation. Typically, an equation of state contains a function \(\psi (\rho , T)\) that determines the specific Helmholtz free energy \(\psi \) from the fluid density \(\rho \) and the fluid temperature \(T\). From this dependency the fluid pressure \(p\) and specific Gibbs free energy \(\mu \) can be inferred for temperature \(T > 0\) via

$$\begin{aligned} p&= p(\rho ) = \rho ^2 \tfrac{\textrm{d}}{\textrm{d}\rho } \psi (\rho ), \end{aligned}$$
(1)
$$\begin{aligned} \mu&= \mu (\rho ) = \psi (\rho ) + \frac{p(\rho )}{\rho }. \end{aligned}$$
(2)

In what follows, we consider for the sake of simplicity the case of constant temperature \(T=T_\textrm{ref}\) (with the exception of Sect. 3.2). A prototypical example for an isothermal two-phase flow model is the van der Waals-fluid, for which one considers the pressure function

$$\begin{aligned} p(\rho ) :=\frac{R T_{\textrm{ref}} \rho }{1 - b \rho } - a \rho ^2, \end{aligned}$$
(3)

with some constants \(R,a,b > 0\), and the reference temperature \(T_{\textrm{ref}} > 0\). For temperatures \(T_{\textrm{ref}}\) below the critical temperature \(T_{\textrm{crit}} = \tfrac{8 a}{27 R b}\), the pressure function becomes non-monotone, see Fig. 2. The interval where the pressure is decreasing, i.e. \(\mathcal {A}_{\textrm{spin}} = (\rho ^{\textrm{max}}_{+}, \rho ^{\textrm{min}}_{-}) = \{\rho \in (0, \tfrac{1}{b}) ~:~ p'(\rho ) < 0\} \) is called spinodal region. In this region, the liquid is in a meta-stable state, and the system (4) below is not hyperbolic anymore. For that reason, we define the admissible density intervals \(\mathcal {A}_{+} = (0, \rho ^{\textrm{max}}_{+}) \) and \(\mathcal {A}_{-} = (\rho ^{\textrm{min}}_{-}, \tfrac{1}{b}) \). These intervals can be associated with the two fluid phases, which means \(\mathcal {A}_{+}\) indicates the density interval for the vapour phase, and \(\mathcal {A}_{-}\) for the liquid phase.

3 Sharp-Interface Modelling

This section is devoted to SI models that incorporate the well-known transmission conditions at liquid–vapour interfaces [4]. The focus is on ideal fluids and the development of interface Riemann solvers for the description of phase boundary dynamics. We do not consider viscous fluids, which would not be accessible by self-similar solutions in a conservation law framework.

In this article, we provide a summary of a multiscale approach that allows to access complex scenarios like temperature-dependent flow and multi-component flow. For project-related results within the SFB–TRR 75, we refer for the basic two-phase Riemann solvers and the free boundary value problem to [23, 31,32,33]. In collaboration with sub-project A2 within SFB–TRR 75, the ghost-fluid method and two-phase Riemann solvers were further developed and applied in existing CFD-code, see [16,17,18] Concerning two-phase multiscale modeling, we refer to e.g. [25, 32] and for the related work about constraint-aware surrogate solvers to [26]. A sharp interface approach in the framework of the Stefan problem is pursued in [12].

3.1 Isothermal Two-Phase Flow

For the sharp-interface representation of two-phase flow, we consider a domain \(\Omega \subset \mathbb {R}^d\) that is split into two open, disjoint, time-dependent subdomains \(\Omega _{+}(t)\), \(\Omega _{-}(t)\), \(t \in (0, t_{\textrm{end}}) \), by a \((d-1)\)-dimensional manifold \(\Gamma (t)\), see Fig. 1. It is assumed that in each subdomain \(\Omega _{+}(t)\), \(\Omega _{-}(t)\) only one phase is present. Furthermore, we assume that in both domains, the fluid flow is described by the same set of PDEs. Neglecting external forces, inviscid two-phase flow is governed for constant temperature by the isothermal Euler equations

$$\begin{aligned} \begin{aligned} \partial _t \rho + \nabla \cdot (\rho \textbf{v})&= 0, \\ \partial _t (\rho \textbf{v}) + \nabla \cdot (\rho \textbf{v} \otimes \textbf{v} + p {{{\textbf {{\textsf {I}}}}}})&= \textbf{0}, \end{aligned}&\text { in } \Omega _{\pm }(t) \text { for } t \in (0,t_{\textrm{end}}). \end{aligned}$$
(4)

In (4), \(\rho = \rho (\textbf{x},t)\) denotes the fluid density, \(\textbf{v} = \textbf{v}(\textbf{x},t)\) the fluid velocity, \({{{\textbf {{\textsf {I}}}}}}\) the d-dimensional identity matrix. The pressure \(p = p(\rho )\) is defined by an equation of state; we refer to the discussion in Sect. 2. The system (4) is supplemented by appropriate initial conditions. Additionally, we assume no-flow boundary conditions on \(\partial \Omega \).

For a fixed point \(\mathbf {\xi } \in \Gamma (t)\) on the interface, the normal vector (pointing into the vapor region \(\Omega _{+}(t)\)) is denoted by \(\textbf{n} = \textbf{n}(\mathbf {\xi }, t) \in \mathbb {S}^{d-1}\) and the speed of the interface \(\Gamma (t)\) in normal direction is indicated by \(s = s(\mathbf {\xi },t) \in \mathbb {R}\).

We assume that the interface \(\Gamma (t)\) does not store any mass, and impose a momentum balance involving curvature effects. For constant surface tension \(\sigma \in \mathbb {R}\), this implies a no-slip condition for the tangential velocities (see [2] for a rational derivation of balance laws for interfacial transport). Altogether, we have

(5)

with \(\kappa = \kappa (\mathbf {\xi },t) = -\nabla _{\Gamma (t)} \cdot \textbf{n}(\mathbf {\xi }, t)\) denoting the mean curvature of the interface, given by the negative surface divergence of \(\textbf{n}\) on the interface \(\Gamma (t)\). The jump operator \(\llbracket \,\cdot \, \rrbracket \) computes the difference between vapour and liquid phase quantities at the interface \(\Gamma \). For an arbitrary function \(a :\mathbb {R}^d \rightarrow \mathbb {R}\) it is defined by

$$\begin{aligned} \llbracket a \rrbracket&:=\overline{a}_{+} - \overline{a}_{-}, \text { with } \overline{a}_{\pm } :=\lim _{\begin{array}{c} \epsilon \rightarrow 0 \\ \epsilon > 0 \end{array}} a(\mathbf {\xi } \pm \epsilon \textbf{n}). \end{aligned}$$
(6)

In order to obtain a well-posed model, an additional condition at the interface is required, that determines the mass transfer across the interface. A direct prescription of it might not be consistent with the second law of thermodynamics. Therefore, we follow the ansatz in [1, 36] and formulate an algebraic equation at the interface—the so-called kinetic relation that specifies the entropy dissipation at the interface. For this purpose, let a driving force \(\mathcal {K} :\mathbb {R} \rightarrow \mathbb {R} : j \mapsto \mathcal {K}(j)\) be given that depends on the relative mass flux \(j\) across the interface, i.e.

$$\begin{aligned} j = \rho _{\pm } (\textbf{v}_{\pm } \cdot \textbf{n} - s). \end{aligned}$$
(7)

In the isothermal case, a kinetic relation takes the following form

(8)

To see the thermodynamical significance of (8), let us assume for the moment that \((\rho , \rho \textbf{v})\) is a classical solution of Eqs. (4) in both bulk phases \(\Omega _{\pm }(t)\) fulfilling the interface conditions (5) and the kinetic relation (8) with a driving force \(\mathcal {K}(j)\). In this case, if the driving force upholds

$$\begin{aligned} j \mathcal {K}(j) \ge 0, ~ \text { for all } j \in \mathbb {R}, \end{aligned}$$
(9)

it can be shown that the solution satisfies the second law of thermodynamics. This means, the solution dissipates the energy at the interface, i.e. it holds

$$\begin{aligned} -s\,\llbracket E \rrbracket -s (d-1) \kappa \sigma + \llbracket (E + p(\rho )) \textbf{v} \cdot \textbf{n} \rrbracket = -j \mathcal {K}(j) \le 0. \end{aligned}$$
(10)

For classical solutions in both bulk phases \(\Omega _{\pm }(t)\) and closed interfaces \(\Gamma (t)\) we deduce the energy inequality

$$\begin{aligned} \frac{\textrm{d}}{\textrm{d}t} \Bigl ( \int _{\Omega } \rho \psi (\rho ) + \tfrac{1}{2} \rho |\textbf{v} |^2 \,\textrm{d} \textbf{x} + \sigma I[\Gamma (t)] \Bigr ) \le 0. \end{aligned}$$
(11)

For static solutions we infer that the sharp-interface solutions minimize the functional

$$\begin{aligned} F^{\textrm{SI}}[\rho ] :=\int _{\Omega } \rho \psi \, \textrm{d} \textbf{x} + \sigma I[\Gamma ], \end{aligned}$$
(12)

where \(I[\Gamma ]\) is the \((d-1)\)-dimensional surface measure of the interface \(\Gamma \).

In our project, we developed a Riemann solver for two-phase flow that is applicable to a wide range of kinetic relations [32, 37]. That means in particular, that we are able to compute two-phase Riemann solutions that are consistent with the second law of thermodynamics. For details on the Riemann solvers we refer to [32]. For numerical simulations it suffices to know that the Riemann solver is a mapping of the following form

$$\begin{aligned} \mathcal {R} :\mathcal {P}_{-} \times \mathcal {P}_{+} \rightarrow \mathcal {P}_{-} \times \mathcal {P}_{+} \times \mathbb {R} : (\textbf{u}_{-}, \textbf{u}_{+}) \mapsto (\textbf{u}^{*}_{-}, \textbf{u}^{*}_{+}, s). \end{aligned}$$
(13)

It takes the liquid state \(u_{-} \in \mathcal {P}_{-} \subset \mathbb {R}^{d+1}\) and the vapour state \(u_{+} \in \mathcal {P}_{+} \subset \mathbb {R}^{d+1}\) directly at the phase boundary and returns the wave speed \(s \in \mathbb {R}\) of the phase boundary wave, as well as the adjacent wave states \(\textbf{u}^{*}_{-}\), \(\textbf{u}^{*}_{+}\), see Fig. 3.

Fig. 3
figure 3

Exemplary wave pattern of an isothermal two-phase Riemann solution

In Fig. 4 we show exemplary Riemann solutions computed by the aforementioned Riemann solver [32] for three kinetic relations and the corresponding Liu entropy solution. All choices lead to a three-wave solutions consisting of two bulk-phase shock waves and a subsonic phase-boundary wave (with attached rarefaction due to loss of genuine nonlinearity). The terms \(\mathcal {K}_1\) and \(\mathcal {K}_3\) are the lowest-order polynomial choices that ensure (10) via the monotonicity condition (9), i.e.

$$\begin{aligned} \mathcal {K}_1(j)&= j,&\mathcal {K}_3(j)&= {\text {sign}}(j) j^2. \end{aligned}$$
(14)

These choices lead to a positive entropy dissipation. The function \(\mathcal {K}_7\) denotes a limit relation, as it admits only phase boundaries connecting the Maxwell states, i.e. the entropy dissipation is zero. For the sake of comparison we added the so-called Liu-solution. The Liu solution is the classical Riemann solution of the isothermal Euler equations (4) when the free energy \(\rho \psi (\rho )\) is substituted by its convex envelope, which leads to a non-decreasing pressure function.

Fig. 4
figure 4

(Source [32], reprinted with permission from Springer Nature under No. 5039260679728)

Riemann solutions for isothermal liquid–vapour flow for three different kinetic relations compared to the corresponding Liu entropy solution (dashed line). The Riemann solver [32] was used to compute the solutions. The left figure shows the fluid pressure, the right figure the fluid velocity. Both are plotted with respect to the Lagrangian space variable at time \(t=1\)

3.2 Temperature-Dependent Two-Phase Flow

Up to now, we have focused on isothermal two-phase flow. Most application-relevant processes, however, are temperature-dependent. For example, latent heat can have a strong influence on the local temperature distribution. Therefore, we turn to the temperature-dependent Euler equations

$$\begin{aligned} \begin{aligned} \partial _t \rho + \nabla \cdot (\rho \textbf{v})&= 0, \\ \partial _t (\rho \textbf{v}) + \nabla \cdot (\rho \textbf{v} \otimes \textbf{v} + p {{{\textbf {{\textsf {I}}}}}})&= \textbf{0}, \\ \partial _t E + \nabla \cdot ((E + p) \textbf{v})&= 0 \end{aligned}&\text { in } \Omega _\pm (t) \text { for } t \in (0,t_{\textrm{end}}), \end{aligned}$$
(15)

with the total energy density \(E = E(\textbf{x},t)\) satisfying \(E = \rho \varepsilon + \tfrac{1}{2} \rho |\textbf{v}|^2\), with \(\varepsilon \) denoting the specific internal energy. The fluid state variables of Eq. (15) are also written in the form of a state vector \(\textbf{u} = (\rho , \rho \textbf{v}, E)\). For the system given by Eq. (15), we have to specify equations of state, that put in relation the pressure \(p = p(\rho , T)\), the specific internal energy \(\varepsilon = \varepsilon (\rho , T)\), and the temperature \(T >0\).

In [37] the aforementioned isothermal Riemann solver is extended to the temperature-dependent case. Unfortunately, finding an appropriate kinetic relation is a non-trivial problem and the corresponding Riemann solutions may exhibit overly large temperature jumps. As a matter of fact, and as discussed in [21], it appears that the classical approach (using kinetic relations, and in absence of heat flux) is unable to reproduce physically consistent behaviour. To circumvent this problem one might model the heat flux across the interface. Yet this introduces new challenges and requires further closure relations, which are difficult to obtain.

Fig. 5
figure 5

Graphical representation of the multiscale scheme illustrating its modules [25]

Therefore, we propose a novel approach to model the interface dynamics, that is based on the microscopic dynamics of the fluid molecules at the interface. On this scale, only the interactions between the fluid molecules have to be modelled, and continuum-scale properties such as mass or heat flux emerge naturally. The multiscale model consists of several modules, namely

  • a continuum-scale sharp-interface two-phase model,

  • the interface-preserving finite-volume algorithm on moving meshes (IPFV-algorithm),

  • the microscale interface solver, based on molecular dynamics simulations,

  • constraint-aware neural networks, that account for underlying physical properties.

A schematic representation of the multiscale model and the aforementioned modules is shown in Fig. 5.

To set up the multiscale model, we consider on the continuum scale the system (15). Note that the EOS on the continuum scale has to be consistent with the microscale MD system—in our case we apply the EOS for the Lennard–Jones fluid presented in [35].

For the discretisation of the sharp-interface continuum-scale two-phase flow, we apply an interface preserving finite volume method on moving meshes [7]. It has the advantage, that the sharp interface is resolved within the mesh and the fluid phases are strictly separated, which means that on the discretisation-level fluid states are not mixed across the phases. Moreover, this method enables us to use a dedicated interface solver directly at the interface.

This microscale interface solver \(\mathcal {R}_{\textrm{MD}}\) is of the same type as \(\mathcal {R}\) in (13), i.e.

$$\begin{aligned} \mathcal {R}_{\textrm{MD}} :\mathcal {P}_{-} \times \mathcal {P}_{+} \rightarrow \mathcal {P}_{-} \times \mathcal {P}_{+} \times \mathbb {R} : (\textbf{u}_{-}, \textbf{u}_{+}) \mapsto (\textbf{u}^{*}_{-}, \textbf{u}^{*}_{+}, s). \end{aligned}$$
(16)

Instead of determining the interface speed \(s\) and wave states \(\textbf{u}^{*}_{-}\), \(\textbf{u}^{*}_{+}\) analytically, \(\mathcal {R}_{\textrm{MD}}\) determines them via molecular dynamics (MD) simulations This means that large particle systems are considered, consisting of symmetric mono-atomic particles that interact via the Lennard–Jones potential. Now, evaluating \(\mathcal {R}_{\textrm{MD}}\) corresponds to simulate one large MD simulation that is set up analogously to a continuum-scale Riemann problem. More specifically, we divide the MD simulation-domain into two parts: the liquid phase and the vapour phase. In each phase, we set up particle distributions that correspond to continuum-scale fluid states at the phase boundary. Note that in the current implementation the interface curvature is not considered in the MD simulations. Therefore, surface tension effects are also neglected on the continuum scale. Starting from these Riemann problem-like initial data, we perform the MD simulation and obtain the interface position and speed \(s\), as well as the interface wave states \(\textbf{u}^{*}_{-}\), \(\textbf{u}^{*}_{+}\) via local averaging on the MD scale.

To reduce the computational complexity of performing an MD simulation at every single time step during the continuum-scale simulation, we employ a machine-learned surrogate solver substituting \(\mathcal {R}_{\textrm{MD}}\). For this purpose, we apply constraint-resolving neural networks [26] that satisfy mass conservation at the phase boundary.

For a fully detailed description of the multiscale scheme we refer to the PhD-thesis of the first author [25].

3.3 Numerical Simulation Results

In the following, we present numerical simulation results of the multiscale model. In Fig. 6 we present a one-dimensional continuum-scale multiscale solution overlaid over the corresponding MD Riemann solution. In this simulation, a vapour wave hits the liquid, and increases the temperature near the phase boundary. We observe that the multiscale solution is quantitatively consistent with the microscale MD solution, up to some diffusive effects that are present only in the particle model.

The two-dimensional simulation shown in Fig. 7 illustrates, that the multiscale scheme can be successfully applied to more complex situations. In this simulation, a liquid droplet oscillates and gets hit by a vapour wave. The need for a surrogate solver becomes evident. If we had to run a MD simulation—taking roughly 5 min—for each of the approximately 200 interface edges in each of the 1000 time steps, the whole simulation would have taken at least 16,000 h which is clearly unfeasible. By employing the surrogate solver, we can reduce the computational time for the simulation to roughly 15 h.

Fig. 6
figure 6

Multiscale simulation for the temperature-dependent two-phase flow model in one space dimension and the corresponding MD simulations (a binned statistic is shown, averaged over 50 MD simulations) [25]. The initial data \(\rho _- = 0.58\), \(v_- = 0\), \(T_- = 1.0\), \(\rho _+ = 0.05\), \(v_+ = -0.5\), \(T_+ = 1.0\) is chosen in such a way that a vapour phase wave hits the liquid phase

Fig. 7
figure 7

Two-dimensional multiscale simulation of the temperature-dependent two-phase flow model. Initially the liquid droplet and the vapour atmosphere are not in equilibrium, resulting in oscillations. Then a wave hits the liquid droplet, that increases the fluid temperature and deforms the droplet [25]

Fig. 8
figure 8

Two-dimensional multiscale simulation of two-component, two-phase flow model for an argon–methane mixture. A gaseous wave consisting mostly of argon hits a liquid droplet that consists primarily of methane. The upper part of each sub-figure shows \(\rho _{\text {Me}}\), \(\textbf{v}_{\text {Me}}\) for methane, and the lower part \(\rho _{\text {Ar}}\), \(\textbf{v}_{\text {Ar}}\) for argon [25]

3.4 Isothermal Two-Component Two-Phase Flow

An advantage of the multiscale model is that it is straightforward to consider more complex fluids and fluid mixtures. Isothermal two-component flow can be modelled, for example, with the continuum-scale, multi-component model derived in [6], which has the following form for each component i

$$\begin{aligned} \begin{aligned} \partial _t \rho _i + \nabla \cdot (\rho _i \textbf{v}_i)&= 0, \\ \partial _t (\rho _i \textbf{v}_i) + \nabla \cdot (\rho _i \textbf{v}_i \otimes \textbf{v}_i)&= -\rho _i \nabla \mu _i - T \sum _{j} f_{ij} \rho _i \rho _j (\textbf{v}_i - \textbf{v}_j), \end{aligned} \end{aligned}$$
(17)

in \(\Omega _{\pm }(t)\) for \(t \in (0,t_{\textrm{end}})\). The primary variables are the partial mass densities \(\rho _i\) and the partial velocities \(\textbf{v}_i\). The friction factor \(f_{ij} = f_{ji} > 0\) between the components \(i\) and \(j\) is proportional to the reciprocal of the Maxwell–Stefan diffusion coefficients \(\text {">}_{ij}\). The chemical potential of component \(i\) with respect to mass is denoted by \(\mu _i\), and given by the EOS. We decided to apply the PC-SAFT EOS [20] as it is in good agreement with our MD results.

To test the multiscale model, we consider a mixture of the two components argon and methane, i.e. \(i \in \{\text {Ar}, \text {Me}\}\). The structure of the corresponding molecules is simple enough to be approximated by basic Lennard–Jones particles, only the parameters of the interaction potential need to be adapted.

The basic principle of the multiscale model does not change compared to the single-component case—for all details we refer to [25].

In Fig. 8 two-dimensional simulation results are shown for a two-phase argon–methane mixture. In it, a liquid droplet, consisting mostly of methane, is hit by a vapour wave, that is composed mostly of argon. The droplet in turn deforms and is pushed through the fluid domain, while evaporating methane into and accumulating argon from the vapour atmosphere.

4 Diffuse-Interface Modelling

The SI approach from Sect.  3 is physically well-grounded as long as the interfaces are separated. However, it comes with a severe disadvantage if interfaces meet. Coalescence, splitting, formation or distinction events go along with singular curvature states, rendering the original approach to fail. For such reasons, diffuse-interface (DI) models have been suggested to describe the dynamics of a compressible fluid with liquid-vapour phase transition. The DI models split into at least two sub-groups. Whereas there are the widely-used phase-field models for compressible liquid-vapour flow (e.g. [3, 5, 29]), we favour a second-gradient approach which does not require to bind an artificial order parameter to the density determining the phase state. Prescisely, we rely on models of the Navier–Stokes–Korteweg (NSK) class. As in Sect. 3 the phases are then uniquely determined by the density state (if temperature is kept constant). Starting with the work of [14] there is by now a vast amount on literature for the NSK equations concerning analysis as well as numerics (see e.g. the reviews [3, 30] for a partial overview). We will shortly review the classical NSK system in Sect. 4.1, and then report on new model variants that have been obtained within the SFB–TRR 75. In Sect. 4.2 we will then present numerical simulations for the new model approaches.

This part uses material that has already been published in [8,9,10,11, 13, 15, 22, 28].

4.1 Navier–Stokes–Korteweg (NSK) Equations for Two-Phase Flow

We keep the temperature fixed at \(T_{\textrm{ref}} <T_{\textrm{crit}}\), such that a liquid and a vapour phase co-exist (see Fig. 2 for the corresponding pressure \(p=p(\rho )\) omitting the temperature dependence). For what follows, the unknowns will depend on a parameter \(\epsilon > 0\) governing the width of the diffuse interface. For \(\epsilon \rightarrow 0\) we expect under appropriate scaling of viscosity and capillarity parameters to recover certain solutions of models in Sect. 3. As initial conditions for density and velocity we then set

$$\begin{aligned} \rho ^\epsilon (\cdot ,0) = \rho _0,\, \textbf{v}^\epsilon (\cdot ,0) = \textbf{v}_0 \text { in } \Omega . \end{aligned}$$
(18)

The Classical Navier–Stokes–Korteweg Equations. Let the capillarity parameter \(\gamma =\gamma (\epsilon )>0\) and \({{\textbf {T}}}^\epsilon \) be the viscous part of the stress tensor, given for the dynamical shear viscosity \(\eta =\eta (\epsilon )\), and the bulk viscosity \(\lambda =\lambda (\epsilon )\) with \(\eta \ge 0\), \(3\lambda + 2\eta \ge 0 \) by

$$\begin{aligned} {{\textbf {T}}}^\epsilon _{ij}[\textbf{v}]&:=\lambda (\nabla \cdot \textbf{v}) \delta _{ij} + 2\eta {{\textbf {D}}}_{ij}[\textbf{v}],&{{\textbf {D}}}_{ij}[\textbf{v}]&= \frac{1}{2} \big ( v^\epsilon _{j,x_i} + v^\epsilon _{i,x_j}\big ), \end{aligned}$$
(19)

for \(i,j\in \{1,\ldots ,n\}\). For the unknowns, density \(\rho ^\epsilon =\rho ^\epsilon (\textbf{x},t):\Omega \times [0,t_{\textrm{end}}]\rightarrow (0,1/b)\), velocity \(\textbf{v}= \textbf{v}(\textbf{x},t): \Omega \times [0,t_{\textrm{end}}]\rightarrow \mathbb {R}^d\), the classical NSK system extends the Navier–Stokes system and reads as [14]

$$\begin{aligned} \begin{aligned} \partial _t \rho ^\epsilon + \nabla \cdot (\rho ^\epsilon \textbf{v}^\epsilon )&=0, \\ \partial _t {(\rho ^\epsilon \textbf{v}^\epsilon )} + \nabla \cdot (\rho ^\epsilon \textbf{v}^\epsilon \otimes \textbf{v}^\epsilon + p(\rho ^\epsilon ) {{{\textbf {{\textsf {I}}}}}})&= \nabla \cdot ({{\textbf {T}}}^\epsilon [\textbf{v}^\epsilon ]) + \gamma \rho ^\epsilon \nabla \Delta \rho ^\epsilon , \end{aligned} \end{aligned}$$
(20)

in \(\Omega \times (0,t_{\textrm{end}})\). Besides the initial conditions (18), we fix, for \(\textbf{n}_\Omega \in \mathbb {S}^{d-1}\) being the outer normal of \(\partial \Omega \), the boundary conditions

$$\begin{aligned} \textbf{v}^\epsilon (\cdot ,t) =\textbf{0},\quad \textbf{n}_\Omega \cdot \nabla \rho ^\epsilon (\cdot ,t) =0 \quad \text { on } \partial \Omega . \end{aligned}$$
(21)

This choice induces a \(90^{\circ }\)-degree contact angle between the phases at the solid wall boundary. The model is thermodynamically consistent, i.e. using (1), classical solutions of (18), (20), (21) satisfy for all \(t\in (0,t_{\textrm{end}})\) and \(\lambda \), \(\eta \) as above

$$\begin{aligned} \frac{\textrm{d}}{\textrm{d}t}&\Big (\int _{{\Omega }} \frac{1}{2}\rho ^\epsilon (\textbf{x},t) |\textbf{v}^\epsilon (\textbf{x},t)|^2 + \rho ^\epsilon (\textbf{x},t)\psi (\rho ^\epsilon (\textbf{x},t)) + \frac{\gamma }{2} |\nabla \rho ^\epsilon (\textbf{x},t)|^2 \, \textrm{d}\textbf{x} \Big ) \nonumber \\&\quad \le {} - \int _{\Omega } 2\eta {{\textbf {D}}}[\textbf{v}^\epsilon (\textbf{x},t)]: {{\textbf {D}}}[\textbf{v}^\epsilon (\textbf{x},t)] + \lambda (\nabla \cdot (\textbf{v}^\epsilon (\textbf{x},t)))^2\, \textrm{d}\textbf{x} \le 0. \end{aligned}$$
(22)

The energy inequality (22) is the DI analogue to the SI energy inequality (11).

Let us consider static equilibrium solutions for (20). The generalized energy in (22) reduces then to the van der Waals energy

$$\begin{aligned} F^{\mathrm {DI-NSK}}[\rho ^\epsilon ] :=\int _\Omega \rho ^\epsilon (\textbf{x})\psi (\rho ^\epsilon (\textbf{x})) + \frac{\gamma }{2} |\nabla \rho ^\epsilon (\textbf{x})|^2 \, \textrm{d}\textbf{x}. \end{aligned}$$
(23)

In other words, the density component of the time-asymptotic limit of solutions of the Eqs. (18), (20), (21) can be expected to minimize the functional \(F^{\mathrm {DI-NSK}}\). For the scaling \(\gamma (\epsilon ) = {\mathcal O}(\epsilon ^2)\), minimizers of (23) approach minimizers of the SI functional \(F^{\textrm{SI}}\) in (12) (see e.g. [27]). Additionally, with \(\lambda (\epsilon )\), \(\eta (\epsilon )= {\mathcal {O}}(\epsilon )\) one recovers for \(\epsilon \rightarrow 0\) solutions of Eqs. (4), (5), (8) with \(\sigma =0\) (see [13] for formal asymptotic-analysis results in this direction including alternative scalings).

The Relaxed Navier–Stokes-Korteweg Equations. The classical NSK system involves third-order derivatives, which makes it numerically quite complicated. Moreover, the Euler-type operator in Eq. (20) is of mixed hyperbolic–elliptic type, i.e. the flux Jacobian has complex eigenvalues for densities in the spinodal region (see Fig. 2). As one practical consequence, it is not possible to extend modern numerical methods for the Navier–Stokes equations because these require the hyperbolicity. Therefore, we aim at developing alternative formulations of the NSK system (20) that avoid this difficulty. First, one can substitute the Laplacian in the momentum balance of Eq. (20) by a convolution term (see [8, 28]) that relies on analytical arguments from [9]. This approach necessitates the solution of an extra elliptic equation. As a second approach we re-formulate the ansatz leading to a hyperbolic–parabolic system that is solvable for any standard solver for the Navier–Stokes equations.

To be precise, for a relaxation parameter \(\alpha > 0 \) we consider the relaxed NSK system, given by

$$\begin{aligned} \begin{aligned} \partial _t {\rho ^{\epsilon ,\alpha }} + \nabla \cdot (\rho ^{\epsilon ,\alpha } \textbf{v}^{\epsilon ,\alpha }) = {}&{} 0, \\ {\partial _t {(\rho ^{\epsilon ,\alpha } \textbf{v}^{\epsilon ,\alpha })}} {+} { \nabla \cdot {(\rho ^{\epsilon ,\alpha } \textbf{v}^{\epsilon ,\alpha }\otimes \textbf{v}^{\epsilon ,\alpha }+ p(\rho ^{\epsilon ,\alpha }){{{\textbf {{\textsf {I}}}}}} )}} = {}&{} \nabla \cdot ({{\textbf {T}}}^\epsilon [\textbf{v}^{\epsilon ,\alpha }]) \\&+ \alpha { \rho ^{\epsilon ,\alpha } \nabla (c^{\epsilon ,\alpha }-\rho ^{\epsilon ,\alpha }) }, \\ \beta c_t {-} \gamma \Delta c^{\epsilon ,\alpha } = {}&{} \alpha (\rho ^{\epsilon ,\alpha } -c^{\epsilon ,\alpha }) \end{aligned} \end{aligned}$$
(24)

in \(\Omega \times (0,t_{\textrm{end}})\). Here, \(\beta =\beta (\alpha )\) is a mobility parameter. The system (24) extends the classical NSK system by a heat equation for the relaxation quantity \(c^{\epsilon ,\alpha }= c^{\epsilon ,\alpha }(\textbf{x},t) \in \mathbb {R}\). The unknown c should be close to \(\rho ^{\epsilon ,\alpha }\) such that the initial conditions are chosen as

$$\begin{aligned} \rho ^{\epsilon ,\alpha }(\cdot ,0) = c^{\epsilon ,\alpha }(\cdot ,0) = \rho _0,\, \textbf{v}^{\epsilon ,\alpha }(\cdot ,0) = \textbf{v}_0 \quad \text { in } \Omega . \end{aligned}$$
(25)

Note that Eq. (24) does not contain higher derivatives on \(\rho ^{\epsilon ,\alpha }\). The boundary conditions from Eq. (21) with a Neumann condition on \(\rho ^{\epsilon ,\alpha }\) transfer to

$$\begin{aligned} \textbf{v}^{\epsilon ,\alpha }(\cdot ,t) =\textbf{0}, \quad \textbf{n}_\Omega \cdot \nabla c^{\epsilon ,\alpha }(\cdot ,t) =0 \quad \text { on } \partial \Omega . \end{aligned}$$
(26)

Local well-posedness of classical solutions for the Eqs. (24),(25),(26) can be derived with standard contraction techniques. Before we go on to discuss the relation between the relaxed NSK system and the NSK system (20) let us note that it is a straightforward computation to verify that (24) is thermodynamically consistent. Classical solutions \((\rho ^{\epsilon ,\alpha },\textbf{v}^{\epsilon ,\alpha },c^{\epsilon ,\alpha })\) of Eqs. (24), (25), (26) obey for \(t\in [0,t_{\textrm{end}})\) the inequality

$$\begin{aligned} \begin{aligned} \frac{\textrm{d}}{\textrm{d}t} \mathcal {E}^{\epsilon ,\alpha }(t) :={}&{} \frac{\textrm{d}}{\textrm{d}t} \Big (\int _{{\Omega }} \frac{1}{2}\rho ^{\epsilon ,\alpha }(\textbf{x},t) |\textbf{v}^{\epsilon ,\alpha }(\textbf{x},t)|^2 + \rho ^{\epsilon ,\alpha }(\textbf{x},t)\psi (\rho ^{\epsilon ,\alpha }(\textbf{x},t)) \\&\qquad + \frac{\alpha }{2} (\rho ^{\epsilon ,\alpha }(\textbf{x},t) - c(\textbf{x},t))^2 + \frac{\gamma }{2} |\nabla c (\textbf{x},t)|^2 \, \textrm{d}\textbf{x} \Big ) \\ ={}&{} - \int _{\Omega } 2\eta {{\textbf {D}}}[\textbf{v}^{\epsilon ,\alpha }(\textbf{x},t)]: {{\textbf {D}}}[\textbf{v}^{\epsilon ,\alpha }(\textbf{x},t)] \\&\qquad + \lambda (\nabla \cdot (\textbf{v}^{\epsilon ,\alpha }(\textbf{x},t)))^2 + \beta \big (c_t(\textbf{x},t) \big )^2 \, \textrm{d}\textbf{x} \\ \le {}&{} 0. \end{aligned} \end{aligned}$$
(27)

Static equilibrium solutions of Eq. (24) are provided by minimizers of the functional

$$\begin{aligned}&F^{\mathrm {DI-rNSK}}[\rho ^{\epsilon ,\alpha },c^{\epsilon ,\alpha }] :=\nonumber \\&\qquad \quad \int _\Omega \rho ^{\epsilon ,\alpha }(\textbf{x})\psi (\rho ^{\epsilon ,\alpha }(\textbf{x})) + \frac{\alpha }{2} \bigl ( \rho ^{\epsilon ,\alpha }(\textbf{x}) -c^{\epsilon ,\alpha }(\textbf{x}) \bigr )^2 + \frac{\gamma }{2} |\nabla c^{\epsilon ,\alpha }(\textbf{x}) |^2 \, \textrm{d}\textbf{x}. \end{aligned}$$
(28)

One observes that minima of the Van-der-Waals functional (23) are (formally) recovered when considering the Korteweg limit \(\alpha \rightarrow \infty \) for a sequence of minimizers of Eq. (28) (see [34] for rigorous results, always keeping \(\epsilon \) fixed). Likewise, we have achieved analytical and numerical evidence that solutions of the relaxed NSK system (24) with \(\beta = \mathcal {O}(\epsilon \alpha ^{-1})\) converge for \(\alpha \rightarrow \infty \) to solutions of the NSK system (20) [10, 15, 28], that have been extended later in e.g. [19]. In turn, keeping \(\alpha \) fixed and scaling \(\gamma (\epsilon ) = {\mathcal O}(\epsilon ^2)\), \(\lambda (\epsilon ),\eta (\epsilon ) = {\mathcal O}(\epsilon )\) we conjecture that the SI limit \(\epsilon \rightarrow 0\) equals the ones for Eqs. (23), (20), respectively.

4.2 Numerical Simulations for the Relaxed NSK System

Based on the analysis of the Korteweg limit \(\alpha \rightarrow \infty \) for the relaxed NSK problem (24)–(26) as described in Sect. 4.1, we view it as an approximation of the original NSK problem (18), (20), (21). We have developed several numerical schemes to solve the relaxed problems focusing on the Local Discontinuous-Galerkin method that appears to be most flexible for this type of equations. For details we refer to [11, 22, 28]. Before we conclude this section with a series of numerical experiments let us clarify why the relaxed system is more appropriate for the numerical discretisation.

First, the relaxed NSK system contains only second-order and local differential operators as compared to the third-order system (20). Note that solving the additional equation for the relaxation unknown \(c^{\epsilon ,\alpha }\) is not a problem. This equation is a simple linear heat equation, which can be solved extremely efficiently. But there is another issue which makes Eq. (24) attractive. Neglecting the viscous part of the stress tensor in Eq. (24) the momentum balance can be re-written in the form

$$\begin{aligned} {\partial _t {(\rho ^{\epsilon ,\alpha } \textbf{v}^{\epsilon ,\alpha })}} {+}{ \nabla \cdot {\bigl (\rho ^{\epsilon ,\alpha } \textbf{v}^{\epsilon ,\alpha }\otimes \textbf{v}^{\epsilon ,\alpha }+ p_\alpha (\rho ^{\epsilon ,\alpha }){{{\textbf {{\textsf {I}}}}}} \bigr )}} = \alpha \rho ^{\epsilon ,\alpha } \nabla c, \end{aligned}$$
(29)

using the re-defined pressure

$$\begin{aligned} p_\alpha (\rho ) :=p(\rho ) + \frac{\alpha }{2} \rho ^2. \end{aligned}$$
(30)

One readily observes that for \(\alpha \gg 1\), the function \(p_\alpha \) is monotonically increasing. Then the entire Euler operator in Eq. (24) (, i.e., substituting p by \(p_\alpha \) in Eq. (24)) becomes hyperbolic. In turn the relaxed NSK system is accessible to standard methods for hyperbolic-parabolic equations of Navier–Stokes type. In the sequel we report on two examples from [22], which have been computed by an extension of the CFD-code FLEXI [24].

Fig. 9
figure 9

(Source [22], reprinted with permission from Elsevier under No. 5039260334246)

Evolution of a droplet ensemble and trend to (spherical) equilibrium

Merging of multiple droplets, Ostwald ripening, and trend to equilibrium (from [22]). For the first example, we start in \(t=0.0\) with an ensemble of droplets in \(\Omega =(0,1)^2\), as displayed in the upper-left box in Fig. 9. The initial velocity vanishes and for the parameters in Eq. (24) we make the choices

$$ \lambda = -\frac{2}{3} \epsilon , \, \eta = \epsilon ,\, \beta = \epsilon \alpha ^{-1}, \, \gamma = \epsilon ^2,\, \epsilon =0.01, \, \alpha = 100. $$

As pressure, the van der Waals function (3) is chosen with \(a= 1/b =3\), \(R=8/3\) and \(T_{\textrm{ref}}=0.85\). The results of the simulation can be seen in Fig. 9. One observes several phase transition effects. Smaller droplets merge and unite to a bigger one which is driven into spherical (quasi-)equilibrium. Notably, there is also Ostwald ripening taking place: droplets get smaller and vanish without contact to other droplets. For this slow process the liquid mass is transported through the surrounding low-density vapour phase. For the end of the simulation, one sees, that a spherical droplet remains, confirming the discussion of equilibria in Sect. 4.1.

Fig. 10
figure 10

(Source [22], reprinted with permission from Elsevier under No. 5039260334246)

Evolution of two colliding droplets. The figures display representative contour surfaces of the density field at different times

Head-on collisions and discrete energy dissipation (from [22]). For the second example in \(\Omega = (0,1)^3\), we take all parameters as in the first one. The initial density field is arranged, such that there are two droplets with density \(\rho _{l}\) in a vapor atmosphere of density \(\rho _v\), see the upper-left box in Fig. 10. The initial velocity is chosen such that the droplets are forced together. For the exact set-up we refer to [22, Sect. 4.3.2.]. The resulting collision scenario is shown in Fig. 10, where the contour surfaces for the mean value of \(\rho _l\) and \(\rho _v\) are plotted. The two droplets merge and result in one squashed droplet. This droplet oscillates, and finally evaporates completely. It is remarkable, that for this numerical simulation, there holds a discrete analogue of the energy decay as expressed in the relation (27). Its time evolution is tracked in Fig. 11. We employed a third-order version of the spectral element approach in FLEXI [24], with a spatial resolution of \(64^3\) elements, resulting in \(256^3\) degrees of freedom. For a complete study of head collisions with its various topological droplet scenarios we refer to [22].

Fig. 11
figure 11

(Source [22])

Time evolution of the discrete energy \(\mathcal {E}^{\epsilon ,\alpha }(t)\) for different collision velocities \(v_{\textrm{rel}}\). The plot at the top corresponds to the simulation shown in Fig. 10. Just as for the exact solution (see (27)), the discrete energy in the numerical simulations decreases monotonically.

5 Conclusions

In the course of the project, we have developed novel approaches to model and simulate two-phase flows.

For the SI modelling approach, an analytical two-phase solver was developed, that is applicable to a wide range of kinetic closure relations. Furthermore, a new multiscale model was designed, that does not need prescribed closure relations at the interface. Instead, the phase boundary dynamics are determined from MD simulations on a more fundamental level. The versatility of this approach is proven by the fact that even multi-component flow can be simulated.

Within the DI modelling framework, we considered a NSK-system, which, in its basic form, is quite expensive to solve. Thus, we proposed and investigated alternative formulations of the system, which are more efficient to simulate.