betaFeedback

WorksMathematics

Explicit-Implicit Domain Splitting for Two Phase Flows with Phase Transition

Abstract

Two phase flows that include phase transition, especially phase creation, with a sharp interface remain a challenging task for numerics. We consider the isothermal Euler equations with phase transition between a liquid and a vapor phase. The phase interface is modeled as a sharp interface and the mass transfer across the phase boundary is modeled by a kinetic relation. Existence and uniqueness results were proven in Ref. \cite{Hantke2019a}. Using sharp interfaces for simulating nucleation and cavitation results in the grid containing tiny cells that are several orders of magnitude smaller than the remaining grid cells. This forces explicit time stepping schemes to take tiny time steps on these cells. As a remedy we suggest an explicit implicit domain splitting where the majority of the grid cells is treated explicitly and only the neighborhood of the tiny cells is treated implicitly. We use dual time stepping to solve the resulting small implicit systems. Our numerical results indicate that the new scheme is robust and provides significant speed-up compared to a fully explicit treatment.

Introduction

In this contribution, we study isothermal liquid-vapor flow problems. In particular, we suggest a new method to compute phase creation phenomena such as cavitation or nucleation.

Due to its diverse applications, the topic of two phase flows is widely discussed in the literature. Very recently, experimental studies on cavitation have been published that study the underlying dynamics, see Pfeiffer et al.[48, 49]. In applications these results can, for example, be used to verify the quality of ultrapure water. Further usage of cavitation arise in engineering applications, such as rotating under water turbine blades, or in medicine, for example in the treatment of tumor cells.

Mathematically, different models are available to model two phase flows, each with its own benefits and difficulties. In diffuse interface models such as the Navier-Stokes-Korteweg model, the phase interface is smeared over a certain distance and the interface width is incorporated in the underlying energy potential, see, e.g., Refs. [47, 28] and the references therein. So called phase field models have an individual evolution equation for the phase field coupled to the equations governing the flow dynamics, see, e.g., Refs. [15, 24]. A widely used class models the flow as a diffuse mixture, see Refs. [3, 52, 32, 51]. For further reading and a comparative study we also refer to Zein et al.[59].

In the present work we study compressible two phase flows with phase transitions across a sharp interface, see Refs. [5, 43, 23, 19]. In particular we consider isothermal inviscid two phase flows governed by the Euler equations, where the phase transition is modeled using a kinetic relation. This setting was first discussed by Hantke et al.[23] and then extended by Thein[54] and Hantke and Thein[25]. The use of a kinetic relation for undercompressive shock waves was suggested by Abeyaratne and Knowles [1] for solid-solid phase transitions. This kinetic relation controls the mass transfer across the interface between the two adjacent phases. For a more general context of kinetic relations see LeFloch[36].

A fundamental key for a better understanding of hyperbolic problems is the Riemann problem since it exhibits all non-linear phenomena and is widely used as the core ingredient in numerical methods. A key aspect of Riemann problems is that the constructed solutions are self similar. They consist of constant states, separated by classical rarefaction and shock waves or in the present case of phase boundaries. Here the considered substance, e.g., water, enters the isothermal Euler equations as the equation of state (EOS) given as a non-monotone pressure-density function. The pressure function is composed of three parts: the equations of state for the two single phases and an arbitrary relation for the intermediate state. The two phases are distinguished using the Maxwell construction, also known as the Equal-Area-Rule. The mass transfer is modeled via a kinetic relation, derived in Dreyer et al.[14], based on classical Hertz-Knudsen theory, see Bond and Struchtrup[9]. Without aiming at completeness we refer for further reading to Refs. [46, 57] who also considered the isothermal Euler system. In contrast to the above mentioned work, they model the fluid using the van der Waals equation of state. Instead of a kinetic relation the Liu entropy condition is used to achieve uniqueness. As a consequence non-classical composite waves are needed to construct solutions. A further reference for vapor-liquid phase transitions in the context of conservation laws is the detailed review by Fan and Slemrod[18]. They also treat the isothermal case using the method of vanishing viscosity applied to the Lagrange formulation of the conservation laws. Additional literature in this context can be found in the references given before.

An important question is the proper numerical treatment of two phase problems, which of course depends on the chosen mathematical model. The numerical methods in the literature are as diverse as the available models. Since our focus is on sharp interface methods we briefly refer to Refs. [16, 2, 50, 10, 11] and the references therein for different methods used in other contexts. Sharp interface methods are discussed, for example, in Refs. [53, 19, 37, 6, 31, 39].

Sharp interface methods clearly separate the different phases, and are therefore in better consistency with the underlying physics. Also, they avoid the issue of having to find physically meaningful values for the cells in the phase transition layer. For example, when water is considered the density values of the different phases differ by several orders of magnitude, leading to bad results if the averaging in the numerical method is not performed properly.

On the technical or numerical side though sharp interface methods pose several challenges. Among other things, one needs to create meshes and keep track of cells, as well as develop methods that are stable on the potentially distorted cells. The higher the dimension, the more complicated this becomes. A particularly challenging situation in the context of two phase flows is the situation of phase creation. This is therefore barely discussed in the literature. To make progress in understanding the difficulties and providing suitable numerical methods it is therefore important to first focus on the one dimensional case, which we will do in this contribution. Our goal is to provide a new solution approach for dealing with phase creation in one dimension, which we then plan to extend to higher dimensions in the future. This method is able to efficiently treat and resolve very small cells that occur during cavitation and nucleation while respecting the sharp interface, and hence avoiding wrong mixing of different phases.

Our approach is based on the mixed explicit implicit time stepping scheme suggested by May and Berger[41]. We here extend it from linear advection to two phase flow problems. The method was originally suggested in the context of Cartesian embedded boundary meshes. This corresponds to a specific way of mesh generation that is suitable to deal with complex geometries. In that approach, a given geometry is cut out of a Cartesian background mesh. Where the object intersects the background mesh, so called cut cells are created. These cells can have various shapes and in particular can become arbitrarily small. As a result, when solving time-dependent hyperbolic flow problems on cut cell meshes, one faces the so called small cell problem – that standard explicit time stepping schemes are not stable on the small cut cells if the time step is chosen according to the size of background cells. When dealing with cavitation and nucleation, we experience exactly the same problem.

Over the years, a number of approaches have been suggested to treat the small cell problem in the context of cut cell meshes for single phase problems, see, e.g., Refs. [2, 26, 34, 27, 17, 21, 7, 42, 22]. Note that several of the suggested approaches rely on unifying the solution values of the small cell and their bigger neighbors in a suitable way. This is not a feasible option for two phase flow problems. We therefore follow the mixed explicit implicit approach here, where standard explicit time stepping is used away from the small cell and implicit time stepping is used in the neighborhood of the small cell for stability. A similar approach of combining explicit and implicit time stepping has been used very recently by Fu et al. [20] in the context of locally moving interfaces for the advection problem for higher-order discontinuous Galerkin methods.

As a result of the mixed time stepping, one has to solve an implicit system involving the small cells and its neighbors in each time step. In the context of phase transitions this involves complicated non-linear Riemann solvers. Differentiating through them, as needed for a Newton approach, is non-trivial. Therefore, in this work we use so called dual time stepping to solve the implicit systems. In that approach, which we will describe in more detail in § 3 below, the work that needs to be done in each iteration of the implicit solver is very similar to the work of taking an explicit time step.

This contribution is organized in the following way. First we will introduce the problem setting and point out the main challenges in § 2. In § 3, we will introduce the mixed explicit implicit scheme as well as the dual time stepping routine for solving the resulting implicit systems. In § 4 we will present numerical results for our new method including tests for cavitation and nucleation. We conclude with a short summary in § 5.

Problem Formulation and Main Challenges

Description of two phase flows

For the description of the flow dynamics under study in the present work we will follow Hantke and Thein [25] and give a brief summary in the following.

We study inviscid, compressible and isothermal two phase flows. The two phases are either the liquid or the vapor phase of one substance. The phases are distinguished by the mass density ρ\rho, and are further described by the velocity uu. Sometimes it is convenient to use the specific volume v=1/ρv = 1/\rho instead of the mass density. The physical quantities depend on time t∈R≥0t \in\mathbb{R}_{\ge0} and space x∈Rx \in\mathbb{R}.

In regular points of the bulk phases the fluid is described using the (one dimensional) isothermal Euler equations

∂tρ+∂x(ρu)=0,(1)\partial_t \rho+ \partial_x(\rho u) = 0, \tag*{(1)}
∂t(ρu)+∂x(ρu2+p)=0.(2)\partial_t(\rho u) + \partial_x(\rho u^2 + p) = 0. \tag*{(2)}

The role of the mathematical entropy inequality is here played by the energy inequality

0≥−Tζ=∂∂t(ρf+ρu22)+∂x(ρu(g+u22)).(3)0 \ge-T\zeta= \frac{\partial}{\partial t}\left(\rho f + \rho\frac{u^2}{2}\right) + \partial_x\left(\rho u\left(g + \frac{u^2}{2}\right)\right). \tag*{(3)}

Here ff is the specific free energy and g=f+p/ρg = f + p/\rho is the Gibbs energy of the bulk phase. This is the proper stability condition for a thermodynamic system with uniform and constant temperature, see Refs. [44, 35]. Note that this inequality also includes the heat flux, which is needed as a mechanism for the isothermal process.

The pressure pp is linked to the mass density ρ\rho via the EOS. For the mass density we have ρ∈Ωρ⊆(0,∞)\rho\in\Omega_\rho\subseteq(0,\infty). This domain can be split into the vapor, spinodal, and liquid region, i.e., Ωρ=Ωvap∪Ωspin∪Ωliq\Omega_\rho= \Omega_{vap} \cup\Omega_{spin} \cup\Omega_{liq} with

Ωvap:=(0,ρ~],Ωspin:=(ρ~,ρmin),Ωliq:=[ρmin,∞).\Omega_{vap} := (0,\widetilde{\rho}],\quad\Omega_{spin} := (\widetilde{\rho},\rho_{min}),\quad\Omega_{liq} := [\rho_{min},\infty).

Accordingly the EOS consists of three corresponding parts, i.e., an EOS for the vapor phase, the liquid phase, and an intermediate part, see Figure 1. The EOS satisfies the critical point

Figure 1. Schematic figure of the vv-pp phase plane with the EOS satisfying the Maxwell construction.

Maxwell construction (equal-area rule). For further details we refer to Refs. [54, 25]. From the Maxwell construction we can obtain the maximum vapor pressure p~\widetilde{p} and the minimum liquid pressure pminp_{min}. In the regular phases the EOS has the properties discussed in Ref. [25]. We also note that the (unphysical) intermediate part is characterized by the relation

(∂p∂v)T>0.\left(\frac{\partial p}{\partial v}\right)_T > 0.

Thus the considered Euler system becomes elliptic inside this region. It is this region that is crossed when phase transitions are present leading to the failure of the standard theory for hyperbolic systems. Here the state space is separated into two regions where the system is hyperbolic and these may be connected by so called undercompressive shock waves.

In the present work phase boundaries are considered as sharp interfaces and thus are treated as discontinuities, in particular as undercompressive shocks. These undercompressive shock waves are not of Lax type and hence are lacking the usual uniqueness properties. However, uniqueness can be restored by prescribing an additional algebraic relation. Although this choice remains non-unique there is a preferred choice based on physical considerations. For further reading we refer to Refs. [13, 36, 43].

Since we have a conservative system given by (2.1), the following jump conditions hold across discontinuities

⟦ρ(u−W)⟧=0,(4)\llbracket\rho(u-W) \rrbracket= 0, \tag*{(4)}
ρ(u−W)⟦u⟧+⟦p⟧=0.(5)\rho(u-W)\llbracket u \rrbracket+\llbracket p \rrbracket=0. \tag*{(5)}

Here we write ⟦Ψ⟧=Ψ+−Ψ−\llbracket\Psi\rrbracket=\Psi^{+}-\Psi^{-}, where Ψ+\Psi^{+} is the right and Ψ−\Psi^{-} the left sided limit of the physical quantity Ψ\Psi. Furthermore every discontinuity satisfies the following entropy inequality

ρ(u−W)⟦g+ekin⟧≤0,(6)\rho(u-W)\llbracket g+e^{kin}\rrbracket\leq0, \tag*{(6)}

which is consistent with (3). Here gg denotes the specific Gibbs energy and ekine_{kin} the specific kinetic energy. The quantity WW is the speed of the discontinuity and Z=−ρ(u−W)Z=-\rho(u-W) is the mass flux, where we will distinguish between a classical shock wave and the phase boundary (non-classical shock)

Z={Q,shock wave,z,phase boundary,andW={S,shock wave,w,phase boundary.Z=\begin{cases} Q, & \text{shock wave},\\ z, & \text{phase boundary}, \end{cases} \qquad\text{and}\qquad W=\begin{cases} S, & \text{shock wave},\\ w, & \text{phase boundary}. \end{cases}

Our choice of the kinetic relation, which defines the mass transfer across the interface, is the following, compare Refs. [14, 25],

z=τpV⟦g+ekin⟧.(7)z=\tau p_V\llbracket g+e^{kin}\rrbracket. \tag*{(7)}

Here pVp_V denotes the pressure of the vapor phase and τ>0\tau>0. We verify that this kinetic relation satisfies (6)

ρ(u−W)⟦g+ekin⟧=−z⟦g+ekin⟧=−τpV⟦g+ekin⟧2≤0.\rho(u-W)\llbracket g+e^{kin}\rrbracket=-z\llbracket g+e^{kin}\rrbracket=-\tau p_V\llbracket g+e^{kin}\rrbracket^2\leq0.

Riemann problems

A particular choice of initial data is the Riemann initial data. For the isothermal Euler equations for two phases with and without phase transition the Riemann problem was discussed in Refs. [23, 25]. Thus we will only briefly review the main aspects. The Riemann initial data is given by

ρ(x,0)={ρ−,x<0,ρ+,x>0,andu(x,0)={u−,x<0,u+,x>0,(8)\rho(x,0)=\begin{cases} \rho^{-}, & x<0,\\ \rho^{+}, & x>0, \end{cases} \qquad\text{and}\qquad u(x,0)=\begin{cases} u^{-}, & x<0,\\ u^{+}, & x>0, \end{cases} \tag*{(8)}

where the constant states left and right of the initial discontinuity may belong to different phases or to the same phase which then may lead to nucleation or cavitation. The solution of the Riemann problem is self similar and in the case of two phase initial data it consists of three waves separating four constant states where the phase boundary lies in between the classical outer waves, see Figure 2 (a). We provide more information about how to solve the Riemann problem between two phases in appendix § 8.

Figure 2. Wave patterns. Solid line: classical waves. Dashed line: phase boundary.

For the case of single phase initial data with phase creation the solution consists of four waves separating five constant states where the phase boundaries lie in between the classical outer waves, see Figure 2 (b). Across each wave specific relations hold that are

used to obtain values inside the wave fan. We provide additional information about phase creation in appendix § 9. For further details we again refer to the previous mentioned Refs. [23, 25].

Sharp interfaces and grid alignment

When doing numerical simulations based on a finite volume approach for two phase flows using sharp interfaces, one faces the following issue: By definition, the unknowns UinU_i^n correspond to cell averages in cell IiI_i at time tnt^n. Let us assume that at time tnt^n our grid is aligned to the phase boundaries. We focus on a single boundary moving at the velocity w>0w > 0, located at xi0+1/2x_{i_0+1/2} at tnt^n, see also Figure 3. If we keep the mesh fixed, then at time tn+1t^{n+1} the cell Ii0+1I_{i_0+1} would contain both partially vapor and partially liquid. Computing an unknown Ui0+1n+1U_{i_0+1}^{n+1} by averaging would most likely result in values inside Ωspin\Omega_{\mathrm{spin}} as well as in a diffused interface.

Align grid to the new position of the phase boundary; phase boundary, $\Omega_{\mathrm{vap}}$, $\Omega_{\mathrm{liq}}$, $x_{i_0+1/2}$, $I_{i_0}$, $I_{i_0+1}$, $w\Delta t$, and $x_{i_0+1/2}+w\Delta t$ labels

Figure 3. Align grid to the new position of the phase boundary.

Instead we adjust the mesh appropriately by moving the cell boundary xi0+1/2x_{i_0+1/2} to xi0+1/2+wΔtx_{i_0+1/2} + w\Delta t as indicated in Figure 3. As a result, the cell size changes within the time step. Every now and then cells become too small or too big. We then merge the cells with neighboring cells or split them in two parts.

Note that it is only possible to merge small cells with one of their neighbors if they belong to the same phase. In the situation where a new phase is created, see Figure 4, this is not possible. We therefore need numerical algorithms that can deal with such meshes that contain tiny cells.

Phase creation between the left and right phase boundaries; $(w_{\mathrm{right}}-w_{\mathrm{left}})\Delta t$, $I_{i_0}$, $x_{i_0+1/2}$, and $I_{i_0+1}$ labels

Figure 4. For initial states that belong to one phase phase creation (i.e., cavitation or nucleation) can occur. In the simulation this results in the creation of a small cell from one time step to the next. This cell must not be merged with its neighbors since they belong to different phases.

Time stepping in numerical method

In this section we present the explicit implicit time stepping approach. Our goal is to treat situations of phase creation, as shown in Figure 4, efficiently.

Time stepping and tiny cells

As a simplified model problem for explaining our approach, we consider the mesh shown in Figure 5. For simplicity, we assume that all other cells have the same length hh but this is not necessary. Also, for now we ignore the fact that the length of the small cell might change slightly during the time step and assume the mesh to be fixed. We denote the cell centroid of cell IiI_i with xix_i and the edges with xi±12x_{i\pm\frac{1}{2}}. One can think of the model mesh to correspond to the mesh at time tn+1t^{n+1} in Figure 4 and to keep that mesh fixed.

One-dimensional model problem: equidistant mesh of width $h$ with one small cell of length $\alpha h$, showing cells $I_{k-2}$, $I_{k-1}$, $I_k$, $I_{k+1}$, and $I_{k+2}$

Figure 5. 1d model problem: equidistant mesh of mesh width hh with one small cell (cell IkI_k) of length αh\alpha h, α∈(0,1]\alpha\in(0,1]. Cell IkI_k corresponds to the creation of a new phase.

In space we use a first-order finite volume scheme, also known as Godunov’s method. Our unknowns UinU_i^n approximate the cell averages of the true solution in cell IiI_i with length hih_i at time tnt^n, i.e.,

Uin≈1hi∫xi−12xi+12U(tn,x) dx.(9)\mathbf{U}_i^n \approx\frac{1}{h_i}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}} \mathbf{U}(t^n,x)\,\mathrm{d}x. \tag*{(9)}

To update the solution from time tnt^n to tn+1t^{n+1} we need numerical fluxes at cell edges. Denoting the flux at cell boundary xi±12x_{i\pm\frac{1}{2}} with Fi±12\mathbf{F}_{i\pm\frac{1}{2}}, the update is then given by

Uin+1=Uin−Δthi[Fi+12−Fi−12].(10)\mathbf{U}_i^{n+1}=\mathbf{U}_i^n-\frac{\Delta t}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}-\mathbf{F}_{i-\frac{1}{2}}\right]. \tag*{(10)}

Generally, the fluxes Fi+12\mathbf{F}_{i+\frac{1}{2}} and Fi−12\mathbf{F}_{i-\frac{1}{2}} are computed by solving Riemann problems at cell boundary xi+12x_{i+\frac{1}{2}} with input data Ui\mathbf{U}_i and Ui+1\mathbf{U}_{i+1} and at cell boundary xi−12x_{i-\frac{1}{2}} with input data Ui−1\mathbf{U}_{i-1} and Ui\mathbf{U}_i, respectively. Here, for fluxes at interfaces between cells with equal phases a standard Riemann solver can be used, see e.g. [56] for an overview. We specify our choice when presenting the numerical results. For the cell boundaries with phase transition, i.e., the interfaces between cells Ik−1I_{k-1} and IkI_k as well as cells IkI_k and Ik+1I_{k+1}, we employ special Riemann solvers. For completeness, we provide the description in the appendix § 8. The focus of this contribution is on the choice of the time stepping scheme, i.e., on which instance of time to evaluate the input arguments Ui±1\mathbf{U}_{i\pm1} and Ui\mathbf{U}_i.

The by far most common approach is to employ explicit time stepping. When using explicit Euler in time, this results in

Uin+1=Uin−Δthi[Fi+12(Uin,Ui+1n)−Fi−12(Ui−1n,Uin)].(11)\mathbf{U}_i^{n+1}=\mathbf{U}_i^n-\frac{\Delta t}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}\left(\mathbf{U}_i^n,\mathbf{U}_{i+1}^n\right)-\mathbf{F}_{i-\frac{1}{2}}\left(\mathbf{U}_{i-1}^n,\mathbf{U}_i^n\right)\right]. \tag*{(11)}

Note that the data Ui±1n\mathbf{U}_{i\pm1}^n and Uin\mathbf{U}_i^n is known and can then be used in the Riemann solver as input. For stability, the time step must be chosen to satisfy the CFL-condition

Δt≤CCFLhiSmax⁡n.(12)\Delta t\leq C_{CFL}\frac{h_i}{S_{\max}^n}. \tag*{(12)}

Here, Smax⁡nS_{\max}^n denotes the maximum absolute wave speed in every time step during the numerical simulation. In particular, we expect Δt\Delta t to change in the course of the simulation, i.e., to be precise it should be Δtn\Delta t_n. For better readability, we will drop that index though. The constant CCFLC_{CFL} is the CFL-number. Typically, CCFL∈(0,1]C_{CFL}\in(0,1].

If we want to take the same time step length for all cells, we must choose Δt\Delta t according to our smallest cell. Defining Δtref=CCFLhkSmax⁡n\Delta t_{\mathrm{ref}}=C_{CFL}\frac{h_k}{S_{\max}^n}, we get for the model grid in Figure 5 the CFL constraint Δt≤αΔtref\Delta t\leq\alpha\Delta t_{\mathrm{ref}}. For the nucleation problem that we solve below in § 4.3, α=O(10−7)\alpha=O(10^{-7}), forcing us to take a factor of O(107)O(10^7) more time steps than needed without the presence of the small cell IkI_k. Roughly speaking we expect the running time of the algorithm to also grow with this factor.

One option to reduce some of this additional work is to take a big time step of length Δtref\Delta t_{\mathrm{ref}} on cells away from the small cell IkI_k and to do some form of time-accurate local time stepping in the neighborhood of the small cell IkI_k, i.e., on cells Ik−1,Ik,Ik+1I_{k-1}, I_k, I_{k+1}. Full details for this approach can be found with Müller and Stribia [45]. For our situation, it breaks down to the following: First, one uses a standard explicit Euler time step with step length Δtref\Delta t_{\mathrm{ref}} to update all cells with indices i≤k−2i \le k-2 and i≥k+2i \ge k+2. Then, the values on cells Ik−1I_{k-1}, IkI_k, Ik+1I_{k+1} are updated: here, one applies a time-accurate local time stepping using a step length Δτ=O(αΔtref)\Delta\tau= O(\alpha\Delta t_{\mathrm{ref}}). That means that one needs to take O(1α)O\left(\frac{1}{\alpha}\right) local time steps for each big time step of length Δtref\Delta t_{\mathrm{ref}}.

Another approach is to use implicit time stepping as this does not require such a strict CFL condition for stability. Implicit Euler in particular has very good stability properties. Using implicit Euler results in an update formula of the form

Uin+1=Uin−Δthi[Fi+12(Uin+1,Ui+1n+1)−Fi−12(Ui−1n+1,Uin+1)].(13)\mathbf{U}_i^{n+1} = \mathbf{U}_i^n - \frac{\Delta t}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}\left(\mathbf{U}_i^{n+1}, \mathbf{U}_{i+1}^{n+1}\right) - \mathbf{F}_{i-\frac{1}{2}}\left(\mathbf{U}_{i-1}^{n+1}, \mathbf{U}_i^{n+1}\right)\right]. \tag*{(13)}

Note that now the input arguments Ui−1n+1\mathbf{U}_{i-1}^{n+1} and Uin+1\mathbf{U}_{i}^{n+1} are generally not known. Instead, they are exactly the solution we are looking for. Therefore some kind of implicit solver is necessary in each time step.

For accuracy reasons, we still would want to choose the time step length Δt\Delta t proportional to the (average) cell length. We could for example choose Δt=Δtref\Delta t = \Delta t_{\mathrm{ref}}, i.e., choose Δt\Delta t based on the size of the bigger cells. The big advantage compared to using explicit time stepping is that we would still be stable on the small cell IkI_k in this case. The downside is that the method is much more expensive. In each step we now would need to solve a big non-linear implicit system.

Explicit implicit domain splitting

We therefore suggest a mixed explicit implicit approach: only treat the neighborhood of the small cell IkI_k implicit for stability but treat all the cells away from the small cell explicit to keep the cost low. The question is how to change between explicit and implicit time stepping while ensuring conservation and maintaining stability. May and Berger[41] examined these questions in the context of cut cell meshes. There one also faces similar meshes as shown in Figure 5 that contain tiny cells. The authors suggest to use flux bounding to couple the explicit and the implicit scheme. The work in Ref. [41] only considered the linear advection equation. Here we extend this to more complicated non-linear flow problems, in particular to two phase flow problems.

We explain the general idea using again the model mesh from Figure 5. To keep the implicit region as small as possible, we first update all cells that are not direct neighbors of cell IkI_k using explicit time stepping as given by (11). This is illustrated in Figure 6, Step 1. For stability, we need a fully implicit update on the small cell IkI_k as given in (13). The critical point is how to choose the fluxes Fk−32\mathbf{F}_{k-\frac{3}{2}} and Fk+32\mathbf{F}_{k+\frac{3}{2}}. When we updated the solution on cells Ik−2I_{k-2} and Ik+2I_{k+2} in Step 1, we used the fluxes Fk−32(Uk−2n,Uk−1n)\mathbf{F}_{k-\frac{3}{2}}\left(\mathbf{U}_{k-2}^n,\mathbf{U}_{k-1}^n\right) and Fk+32(Uk+1n,Uk+2n)\mathbf{F}_{k+\frac{3}{2}}\left(\mathbf{U}_{k+1}^n,\mathbf{U}_{k+2}^n\right). We need to reuse these same fluxes for the cell updates for cells Ik−1I_{k-1} and Ik+1I_{k+1} in Step 2 as otherwise conservation may be violated. We therefore get the following updates in the neighborhood of the small cell IkI_k

Schematic illustration of the two-step flux-bounding procedure

Figure 6. Idea behind flux bounding for the time step tn→tn+1t^n \to t^{n+1} (compare Ref. [40]): Step 1: All cells away from the small cell IkI_k are updated (indicated by the symbol ‘◦’) using a standard explicit scheme based on the explicit flux Fn\mathbf{F}^n; Step 2: The neighborhood of the small cell is updated (indicated by the symbol ‘□’) using implicit fluxes Fn+1\mathbf{F}^{n+1} for the faces xk±12x_{k\pm\frac{1}{2}}.

Uk−1n+1=Uk−1n−Δth[Fk−12(Uk−1n+1,Ukn+1)−Fk−32(Uk−2n,Uk−1n)],(14)\mathbf{U}_{k-1}^{n+1}=\mathbf{U}_{k-1}^{n}-\frac{\Delta t}{h}\left[\mathbf{F}_{k-\frac{1}{2}}\left(\mathbf{U}_{k-1}^{n+1},\mathbf{U}_{k}^{n+1}\right)-\mathbf{F}_{k-\frac{3}{2}}\left(\mathbf{U}_{k-2}^{n},\mathbf{U}_{k-1}^{n}\right)\right], \tag*{(14)}
Ukn+1=Ukn−Δtαh[Fk+12(Ukn+1,Uk+1n+1)−Fk−12(Uk−1n+1,Ukn+1)],(15)\mathbf{U}_{k}^{n+1}=\mathbf{U}_{k}^{n}-\frac{\Delta t}{\alpha h}\left[\mathbf{F}_{k+\frac{1}{2}}\left(\mathbf{U}_{k}^{n+1},\mathbf{U}_{k+1}^{n+1}\right)-\mathbf{F}_{k-\frac{1}{2}}\left(\mathbf{U}_{k-1}^{n+1},\mathbf{U}_{k}^{n+1}\right)\right], \tag*{(15)}
Uk+1n+1=Uk+1n−Δth[Fk+32(Uk+1n,Uk+2n)−Fk+12(Ukn+1,Uk+1n+1)].(16)\mathbf{U}_{k+1}^{n+1}=\mathbf{U}_{k+1}^{n}-\frac{\Delta t}{h}\left[\mathbf{F}_{k+\frac{3}{2}}\left(\mathbf{U}_{k+1}^{n},\mathbf{U}_{k+2}^{n}\right)-\mathbf{F}_{k+\frac{1}{2}}\left(\mathbf{U}_{k}^{n+1},\mathbf{U}_{k+1}^{n+1}\right)\right]. \tag*{(16)}

Note how the update on the small cell IkI_k is fully implicit by using fluxes Fk+12(Ukn+1,Uk+1n+1)\mathbf{F}_{k+\frac{1}{2}}\left(\mathbf{U}_{k}^{n+1},\mathbf{U}_{k+1}^{n+1}\right) and Fk−12(Uk−1n+1,Ukn+1)\mathbf{F}_{k-\frac{1}{2}}\left(\mathbf{U}_{k-1}^{n+1},\mathbf{U}_{k}^{n+1}\right) and how solution updates on cells Ik±1I_{k\pm1} have an explicit flux on one side and an implicit flux on the other side. This is also illustrated in Figure 6, Step 2.

To sum it up, for a model mesh like shown in Figure 5, in each time step,

  1. we first update all cells with indices i≤k−2i \le k-2 and i≥k+2i \ge k+2 using a fully explicit update as given in (11);

  1. we then update solution values on cells Ik−1,Ik,Ik+1I_{k-1}, I_k, I_{k+1} using (3.6).

We note that for a fully explicit treatment using time-accurate local time stepping on the neighborhood of the small cell, the first step would be the same. The difference is how to update the small cell and its face neighbors.

By construction, the mixed explicit implicit scheme preserves conservation. Further, it was shown in Ref. [41] that for the linear advection equation ut+cux=0u_t+cu_x=0 (cc constant) on a model mesh as given in Figure 5, the scheme is monotonicity preserving and total variation diminishing for a time step length Δt≤h∣c∣\Delta t \le\frac{h}{|c|}, i.e., independent of α\alpha. In other words, this way of coupling preserves desirable stability properties. In terms of accuracy, numerical tests for linear advection show first order accuracy for the mixed explicit implicit scheme as described here.

Dual time stepping

In the mixed explicit implicit approach, the implicit time stepping only couples solution values on cells Ik−1,Ik,Ik+1I_{k-1}, I_k, I_{k+1}. Nevertheless, given that the update formulae involve non-linear flux functions, in particular Riemann solvers for phase changes, solving the resulting implicit system is non-trivial.

We suggest dual time stepping for doing this. Dual time stepping can be interpreted as an iterative method, for which the work in each iteration looks very similar to executing a time step with an explicit time stepping scheme. We expect a more Newton-like approach for solving the implicit system to be more efficient and will explore that in the future. The advantage of dual time stepping is that there is no need to differentiate through the Riemann solver. The implementation work for changing a running code from explicit time stepping to implicit time stepping that uses dual time stepping to solve the resulting implicit systems is quite small.

Dual time stepping, or also called pseudo time stepping, has already been around for a number of years and has become more popular again recently, see, e.g., Refs. [29, 30, 8, 38]. The idea is the following: assume we have a first-order finite volume space discretization and use implicit Euler in time for the update on cell IiI_i resulting in the update formula given in (13). We introduce a function GG as

G(W)=1Δt(−Wi+Uin)−1hi[Fi+12(Wi,Wi+1)−Fi−12(Wi−1,Wi)].G(\mathbf{W}) = \frac{1}{\Delta t}\left(-\mathbf{W}_i + \mathbf{U}_i^n\right) - \frac{1}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}(\mathbf{W}_i,\mathbf{W}_{i+1}) - \mathbf{F}_{i-\frac{1}{2}}(\mathbf{W}_{i-1},\mathbf{W}_i)\right].

Obviously, if we find W\mathbf{W} such that G(W)=0G(\mathbf{W}) = 0, then Wi\mathbf{W}_i corresponds to the searched solution Uin+1\mathbf{U}_i^{n+1}. In order to solve the implicit system described by G(W)=0G(\mathbf{W}) = 0, we reinterpret this as the steady state solution of the time-dependent problem

∂τW−G(W)=0,\partial_\tau\mathbf{W} - G(\mathbf{W}) = 0,

i.e., we introduce a dual or pseudo time scale with respect to τ\tau. We can now solve for the steady state by using a standard time stepping scheme for doing time stepping and by running until the solution does not change anymore, i.e., until we have reached (computational) steady state. We use explicit Euler time stepping for the arguments W\mathbf{W} within the flux evaluation and implicit Euler time stepping for the isolated instance of Wi\mathbf{W}_i resulting in the time step formula

Wil+1=Wil+ΔτΔt(−Wil+1+Uin)−Δτhi[Fi+12(Wil,Wi+1l)−Fi−12(Wi−1l,Wil)].\mathbf{W}_i^{l+1} = \mathbf{W}_i^l + \frac{\Delta\tau}{\Delta t}\left(-\mathbf{W}_i^{l+1} + \mathbf{U}_i^n\right) - \frac{\Delta\tau}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}(\mathbf{W}_i^l,\mathbf{W}_{i+1}^l) - \mathbf{F}_{i-\frac{1}{2}}(\mathbf{W}_{i-1}^l,\mathbf{W}_i^l)\right].

Here, Wl\mathbf{W}^l denotes the given iterate at time τl\tau^l and Wl+1\mathbf{W}^{l+1} the iterate at τl+1=τl+Δτ\tau^{l+1} = \tau^l + \Delta\tau that we want to compute. We solve for Wl+1\mathbf{W}^{l+1} to get

Wil+1=11+ΔτΔt(Wil+ΔτΔtUin−Δτhi[Fi+12(Wil,Wi+1l)−Fi−12(Wi−1l,Wil)]).(17)\mathbf{W}_i^{l+1} = \frac{1}{1+\frac{\Delta\tau}{\Delta t}}\left(\mathbf{W}_i^l + \frac{\Delta\tau}{\Delta t}\mathbf{U}_i^n - \frac{\Delta\tau}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}(\mathbf{W}_i^l,\mathbf{W}_{i+1}^l) - \mathbf{F}_{i-\frac{1}{2}}(\mathbf{W}_{i-1}^l,\mathbf{W}_i^l)\right]\right). \tag*{(17)}

Note that the work for executing this iteration is essentially the same as taking one explicit Euler step for the original scheme, i.e., for evaluating (11). In particular, everything on the right hand side is known and can simply be evaluated. On the downside, as we treat the fluxes explicitly when running to steady state, we need to enforce the CFL condition (12). As we use dual time stepping to compute the updates in the neighborhood of the small cell, this results in the time step constraint Δτ≤αΔtref\Delta\tau\le\alpha\Delta t_{\mathrm{ref}}.

So what did we gain by going this complicated way to dual time stepping? The big advantage is that we do not need to be time-accurate anymore when running to the steady state. We are allowed to use local time stepping where we update each cell based on their own local CFL and therefore direct neighbors might advance at different speeds. Therefore, the correct formulation of (17) is

Wil+1=11+ΔτiΔt(Wil+ΔτiΔtUin−Δτihi[Fi+12(Wil,Wi+1l)−Fi−12(Wi−1l,Wil)]),(18)\mathbf{W}_i^{l+1} = \frac{1}{1+\frac{\Delta\tau_i}{\Delta t}}\left(\mathbf{W}_i^l+\frac{\Delta\tau_i}{\Delta t}\mathbf{U}_i^n-\frac{\Delta\tau_i}{h_i}\left[\mathbf{F}_{i+\frac{1}{2}}(\mathbf{W}_i^l,\mathbf{W}_{i+1}^l)-\mathbf{F}_{i-\frac{1}{2}}(\mathbf{W}_{i-1}^l,\mathbf{W}_i^l)\right]\right), \tag*{(18)}

with using individual Δτi\Delta\tau_i instead of a global Δτ\Delta\tau.

In our model problem, we treat three cells (namely Ik−1I_{k-1}, IkI_k, Ik+1I_{k+1}) implicitly with cell lengths hh, αh\alpha h, hh (and α≪1\alpha\ll1). Using the notation Δτi=θiΔtref\Delta\tau_i = \theta_i \Delta t_{\mathrm{ref}}, we need to enforce θk±1∈(0,1]\theta_{k\pm1} \in(0,1] and θk∈(0,α]\theta_k \in(0,\alpha] for stability (assuming that the maximum wave speed during the time tn→tn+1t^n \to t^{n+1} does not change). We comment on our specific choices of θk±1\theta_{k\pm1} and θk\theta_k in section 4, where we present numerical results.

Note that there is a huge difference to using time-accurate local time stepping as sketched above in a fully explicit setup. First, for time-accurate local time stepping, for the update of the solution on cell IkI_k from tnt^n to tn+1t^{n+1}, one needs to take O(1α)O\left(\frac{1}{\alpha}\right) time steps. In our approach here we only take as many iterations as needed to reach steady state. Second, in the time-accurate local time stepping, for the update on the small cell one always needs to extract the correct flux data from the bigger neighbors by a sort of interpolation. This is also not needed here.

We summarize all the necessary steps for implementing dual time stepping in our setting in algorithms 1 and 2 in table 1. Note that in algorithm 2, when not executing Part 2 but simply using the output Un,∗\mathbf{U}^{n,*} as approximation for Un+1\mathbf{U}^{n+1}, one might violate conservation. Therefore, in Part 2 fluxes are recomputed based on the accepted iterate and the standard conservative update formula is applied. We comment on our choices for the stopping criteria and for θi\theta_i in section 4.

Accounting for changing cell sizes

Most of the discussion so far focused on the model mesh in figure 5 with fixed cell lengths. As mentioned above, when using sharp interfaces, cell lengths can change. Shifting the cell boundaries results in cells becoming smaller or larger. Every now and then we need to reorganize by splitting cells that are too large (e.g., more than twice the length of an average cell) in two parts or by unifying two cells if one gets too small. The latter is of course only possible if the two cells belong to the same phase. For details we refer to Thein [54].

Thus we need to take into account that the cell sizes can change during the time step of length Δt\Delta t. Generally, we expect the tiny cell that contains the new phase to become bigger and therefore its neighbors to become a bit smaller. Therefore, instead of using (10), the general update formula needs to be changed to

Uin+1=hinhin+1Uin−Δthin+1[Fi+12−Fi−12],(19)\mathbf{U}_i^{n+1} = \frac{h_i^n}{h_i^{n+1}}\mathbf{U}_i^n - \frac{\Delta t}{h_i^{n+1}}\left[\mathbf{F}_{i+\frac{1}{2}}-\mathbf{F}_{i-\frac{1}{2}}\right], \tag*{(19)}

with hinh_i^n and hin+1h_i^{n+1} being the cell sizes at the times tnt^n and tn+1t^{n+1}. One immediately verifies that (19) reduces to (10) for constant cell sizes. Note that when using explicit time stepping, hin+1h_i^{n+1} is predicted explicitly by using wave speed information from the Riemann solutions of Fi+12(Uin,Ui+1n)\mathbf{F}_{i+\frac{1}{2}}(\mathbf{U}_i^n,\mathbf{U}_{i+1}^n) and Fi−12(Ui−1n,Uin)\mathbf{F}_{i-\frac{1}{2}}(\mathbf{U}_{i-1}^n,\mathbf{U}_i^n).

All formulae given above for the mixed explicit implicit approach need to be adjusted accordingly. For example, the update for Ukn,l+1\mathbf{U}_k^{n,l+1} in algorithm 2 then is given by

Ukn,l+1=Ukn,l1+ΔτkΔt+ΔτkΔt1+ΔτkΔt(hknhkn,l+1Ukn−Δthkn,l+1(Fk+12(Ukn,l,Uk+1n,l)−Fk−12(Uk−1n,l,Ukn,l)))\mathbf{U}_k^{n,l+1} = \frac{\mathbf{U}_k^{n,l}}{1+\frac{\Delta\tau_k}{\Delta t}}+\frac{\frac{\Delta\tau_k}{\Delta t}}{1+\frac{\Delta\tau_k}{\Delta t}}\left(\frac{h_k^n}{h_k^{n,l+1}}\mathbf{U}_k^n-\frac{\Delta t}{h_k^{n,l+1}}\left(\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,l},\mathbf{U}_{k+1}^{n,l})-\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,l},\mathbf{U}_k^{n,l})\right)\right)

with hkn,l+1h_k^{n,l+1} denoting the current iterate / approximation to hkn+1h_k^{n+1}. In each iteration of the dual time stepping, this quantity is updated.

Note that this is another advantage of using dual time stepping to solve the implicit system compared to using for example Newton method – that we do not need to write hkn+1h_k^{n+1} in terms of data Un+1\mathbf{U}^{n+1} and differentiate through but that we can simply reuse the same formula for updating the cell widths as for standard explicit time stepping.

Numerical results

In this section we present various results using the mixed explicit implicit approach described in § 3 together with dual time stepping to solve the resulting implicit systems. We will first consider a single phase flow problem, where we discuss our choice of parameters in the dual time stepping. Afterwards, we will present tests involving nucleation and cavitation. Here, the focus is on verifying that the results produced with our new approach are physically meaningful and that the new approach is relatively fast.

All results for two phase flow problems are compared to the solution of the Riemann problem obtained with the Newton method using the tolerance εtol=10−9\varepsilon_{\mathrm{tol}}=10^{-9}. More precisely, since in some cases the standard Newton method failed to converge, we used the Newton-Armijo method as presented in Kelley [33]. The saturation pressure is calculated using the steam tables Ref. [58]. If not stated otherwise we used the exact solution of the Riemann problem at the phase boundary in our numerical calculations as Riemann solvers. In the two phase flow examples away from the phase boundary any Riemann solver can be used. Here we applied for the numerical solution of the two phase flow examples the HLL solver as presented in Toro[56]. In our first test, where the full compressible Euler equations are solved, we use an exact Riemann solver.

For the isothermal case we model the vapor phase as an ideal gas using the relation

pV=kT0mρV,m=2⋅1.0079+15.99946.02205⋅1026 kg,k=1.380658⋅10−23 JK−1,(20)p_V = \frac{kT_0}{m}\rho_V,\qquad m = \frac{2\cdot1.0079 + 15.9994}{6.02205\cdot10^{26}}\ \mathrm{kg},\qquad k = 1.380658\cdot10^{-23}\ \mathrm{J}\mathrm{K}^{-1}, \tag*{(20)}

where kk is the Boltzmann constant and mm the mass of a single water molecule. The parameter τ\tau in the kinetic relation (7) is given by

τ=12π(mkT0)3/2.\tau= \frac{1}{\sqrt{2\pi}}\left(\frac{m}{kT_0}\right)^{3/2}.

The liquid phase is described using the linear Tait EOS

pL=p0+K0(ρLρ0−p0).(21)p_L = p_0 + K_0\left(\frac{\rho_L}{\rho_0}-p_0\right). \tag*{(21)}

All quantities with a subscript zero are saturation quantities at the given temperature T0T_0 evaluated according to the steam tables in Ref. [58]. The EOS for the individual phases are then connected linearly with respect to the density and it is assured that the Maxwell condition holds.

Concerning the parameters in our dual time stepping approach, we use θk±1=0.9\theta_{k\pm1}=0.9 and θk=α\theta_k=\alpha for setting the local time step lengths on the small cell and its two neighbors, compare also algorithm 2 in Table 1. For the stopping criterium in the dual time stepping, we define the residuum on cell IiI_i as (with the division to be understand in a componentwise way)

Algorithm 1: Executing 1 time step for the explicit implicit scheme.
Input: Un\mathbf{U}^{n}, Δt\Delta t, α\alpha, hh
Step 1: Update all cells away from small cell using explicit time stepping:
(a) Based on Un\mathbf{U}^{n}, compute fluxes F\mathbf{F} using a standard Riemann solver.
(b) On cells IiI_i with i≤k−2i \le k-2 or i≥k+2i \ge k+2, update using
Uin+1=Uin−Δth(Fi+12(Uin,Ui+1n)−Fi−12(Ui−1n,Uin))\mathbf{U}_i^{n+1} = \mathbf{U}_i^n - \frac{\Delta t}{h}\left(\mathbf{F}_{i+\frac{1}{2}}(\mathbf{U}_i^n,\mathbf{U}_{i+1}^n)-\mathbf{F}_{i-\frac{1}{2}}(\mathbf{U}_{i-1}^n,\mathbf{U}_i^n)\right).
Save fluxes Fleft=Fk−32(Uk−2n,Uk−1n)\mathbf{F}_{\mathrm{left}}=\mathbf{F}_{k-\frac{3}{2}}(\mathbf{U}_{k-2}^n,\mathbf{U}_{k-1}^n) and Fright=Fk+32(Uk+1n,Uk+2n)\mathbf{F}_{\mathrm{right}}=\mathbf{F}_{k+\frac{3}{2}}(\mathbf{U}_{k+1}^n,\mathbf{U}_{k+2}^n).
Step 2: Compute the update on cells Ik−1I_{k-1}, IkI_k, Ik+1I_{k+1} using algorithm 2.
Output: Un+1\mathbf{U}^{n+1}
Algorithm 2: Compute update on cells Ik−1I_{k-1}, IkI_k, Ik+1I_{k+1} using dual time stepping.
Input: Uk−1n\mathbf{U}_{k-1}^n, Ukn\mathbf{U}_k^n, Uk+1n\mathbf{U}_{k+1}^n, Δt\Delta t, α\alpha, hh, Fleft\mathbf{F}_{\mathrm{left}}, Fright\mathbf{F}_{\mathrm{right}}, TOLTOL, lmax⁡l_{\max}, θk−1\theta_{k-1}, θk\theta_k, θk+1\theta_{k+1}.
Part 1: Compute approximations for Uk−1n+1\mathbf{U}_{k-1}^{n+1}, Ukn+1\mathbf{U}_k^{n+1}, Uk+1n+1\mathbf{U}_{k+1}^{n+1}.
Notation: Uin,l\mathbf{U}_i^{n,l}: iterate ll in dual time stepping loop for approximating Uin+1\mathbf{U}_i^{n+1}
Initialize Uin,0=Uin\mathbf{U}_i^{n,0}=\mathbf{U}_i^n for i=k−1,k,k+1i=k-1,k,k+1
Set local time steps: Δτi=θiΔt\Delta\tau_i=\theta_i\Delta t for i=k−1,k,k+1i=k-1,k,k+1
for l=0,…,lmax⁡l=0,\ldots,l_{\max} do
(a) Compute fluxes Fk−12(Uk−1n,l,Ukn,l)\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,l},\mathbf{U}_k^{n,l}) and Fk+12(Ukn,l,Uk+1n,l)\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,l},\mathbf{U}_{k+1}^{n,l}) using a Riemann solver with phase transition.
(b) Update
Uk−1n,l+1=Uk−1n,l+Δτk−1Δt(Uk−1n−Δth(Fk−12(Uk−1n,l,Ukn,l)−Fleft))1+Δτk−1Δt\mathbf{U}_{k-1}^{n,l+1}=\frac{\mathbf{U}_{k-1}^{n,l}+\frac{\Delta\tau_{k-1}}{\Delta t}\left(\mathbf{U}_{k-1}^n-\frac{\Delta t}{h}\left(\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,l},\mathbf{U}_k^{n,l})-\mathbf{F}_{\mathrm{left}}\right)\right)}{1+\frac{\Delta\tau_{k-1}}{\Delta t}}
Ukn,l+1=Ukn,l+ΔτkΔt(Ukn−Δtαh(Fk+12(Ukn,l,Uk+1n,l)−Fk−12(Uk−1n,l,Ukn,l)))1+ΔτkΔt\mathbf{U}_k^{n,l+1}=\frac{\mathbf{U}_k^{n,l}+\frac{\Delta\tau_k}{\Delta t}\left(\mathbf{U}_k^n-\frac{\Delta t}{\alpha h}\left(\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,l},\mathbf{U}_{k+1}^{n,l})-\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,l},\mathbf{U}_k^{n,l})\right)\right)}{1+\frac{\Delta\tau_k}{\Delta t}}
Uk+1n,l+1=Uk+1n,l+Δτk+1Δt(Uk+1n−Δth(Fright−Fk+12(Ukn,l,Uk+1n,l)))1+Δτk+1Δt\mathbf{U}_{k+1}^{n,l+1}=\frac{\mathbf{U}_{k+1}^{n,l}+\frac{\Delta\tau_{k+1}}{\Delta t}\left(\mathbf{U}_{k+1}^n-\frac{\Delta t}{h}\left(\mathbf{F}_{\mathrm{right}}-\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,l},\mathbf{U}_{k+1}^{n,l})\right)\right)}{1+\frac{\Delta\tau_{k+1}}{\Delta t}}
if Stopping criterium <TOL<TOL then
Uin,∗=Uin,l+1\mathbf{U}_i^{n,*}=\mathbf{U}_i^{n,l+1} for i=k−1,k,k+1i=k-1,k,k+1
Break \quad % leave for loop
end if
end for
Part 2: Compute Uk−1n+1\mathbf{U}_{k-1}^{n+1}, Ukn+1\mathbf{U}_k^{n+1}, Uk+1n+1\mathbf{U}_{k+1}^{n+1} based on Uk−1n,∗\mathbf{U}_{k-1}^{n,*}, Ukn,∗\mathbf{U}_k^{n,*}, Uk+1n,∗\mathbf{U}_{k+1}^{n,*}:
(a) Compute fluxes Fk−12(Uk−1n,∗,Ukn,∗)\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,*},\mathbf{U}_k^{n,*}) and Fk+12(Ukn,∗,Uk+1n,∗)\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,*},\mathbf{U}_{k+1}^{n,*}) using a Riemann solver with phase transition.
(b) Apply the conservative update formulae
Uk−1n+1=Uk−1n−Δth(Fk−12(Uk−1n,∗,Ukn,∗)−Fleft)\mathbf{U}_{k-1}^{n+1}=\mathbf{U}_{k-1}^n-\frac{\Delta t}{h}\left(\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,*},\mathbf{U}_k^{n,*})-\mathbf{F}_{\mathrm{left}}\right)
Ukn+1=Ukn−Δtαh(Fk+12(Ukn,∗,Uk+1n,∗)−Fk−12(Uk−1n,∗,Ukn,∗))\mathbf{U}_k^{n+1}=\mathbf{U}_k^n-\frac{\Delta t}{\alpha h}\left(\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,*},\mathbf{U}_{k+1}^{n,*})-\mathbf{F}_{k-\frac{1}{2}}(\mathbf{U}_{k-1}^{n,*},\mathbf{U}_k^{n,*})\right)
Uk+1n+1=Uk+1n−Δth(Fright−Fk+12(Ukn,∗,Uk+1n,∗))\mathbf{U}_{k+1}^{n+1}=\mathbf{U}_{k+1}^n-\frac{\Delta t}{h}\left(\mathbf{F}_{\mathrm{right}}-\mathbf{F}_{k+\frac{1}{2}}(\mathbf{U}_k^{n,*},\mathbf{U}_{k+1}^{n,*})\right)
Output: Uk−1n+1\mathbf{U}_{k-1}^{n+1}, Ukn+1\mathbf{U}_k^{n+1}, Uk+1n+1\mathbf{U}_{k+1}^{n+1}

Table 1. Algorithms 1 and 2 for implementing the mixed explicit implicit scheme using dual time stepping for mesh in Figure 5.

res⁡i=∥(1+ΔτiΔt)(Uin,l+1−Uin,l)Δτimax⁡(Uin,l,1)∥∞.\operatorname{res}_i=\left\|\frac{\left(1+\frac{\Delta\tau_i}{\Delta t}\right)\left(\mathbf{U}_i^{n,l+1}-\mathbf{U}_i^{n,l}\right)}{\Delta\tau_i\max\left(\mathbf{U}_i^{n,l},1\right)}\right\|_\infty.

Note the division by the time step length Δτi\Delta\tau_i of the local dual time stepping. As our updates are designed to take a time step of that length, it is important to scale that out by checking for steady state. We also divide by max⁡(Uin,l,1)\max(\mathbf{U}_i^{n,l},1) to account for large differences (in terms of absolute sizes) of density and momentum when comparing the residuals of cells that belong to different phases. Finally, we require as stopping criteria max⁡(resk−1,resk+1)<10−3\max(\mathrm{res}_{k-1},\mathrm{res}_{k+1})<10^{-3} and resk<10−1\mathrm{res}_k<10^{-1}.

We found that this works well in our numerical tests. These stopping tolerances seem very imprecise. But due to dividing by Δτi\Delta\tau_i, the residual goes up to 10810^8 or higher at initial iterations if α≪1\alpha\ll1. We also note that one needs to be careful to stay away from computing on numerical artefacts/round-off errors. For the nucleation test in § 4.3 below, we get Δτk=6⋅10−12\Delta\tau_k=6\cdot10^{-12} at initial iterations. Assuming that Ukn,l=O(1)\mathbf{U}_k^{n,l}=O(1), there are only few meaningful digits left in the double precision arithmetic.

Stationary Phase Boundary without Phase Transition

In our first test, we consider a single phase problem. The goal of this test is to examine how the choice of the parameters θi\theta_i, i=k−1,k,k+1i=k-1,k,k+1, influences the number of iterations in the dual time stepping. By means of Δτi=θiΔtref\Delta\tau_i = \theta_i \Delta t_{\mathrm{ref}}, these parameters control the local time step lengths in the dual time stepping, compare also algorithm 2 in Table 1.

We consider the full one-dimensional compressible Euler equations given by

(ρρuE)t+(ρuρu2+p(E+p)u)x=(000)\begin{pmatrix} \rho\\ \rho u \\ E \end{pmatrix}_t + \begin{pmatrix} \rho u \\ \rho u^2 + p \\ (E+p)u \end{pmatrix}_x = \begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}

on a fixed mesh. We solve the Lax shock tube test for ideal gas using γ=1.4\gamma= 1.4 given by the initial conditions

(ρ,u,p)(x,0)={(0.445,0.698,3.528),x<0,(0.5,0,0.571),x>0,(\rho,u,p)(x,0) = \begin{cases} (0.445, 0.698, 3.528), & x < 0, \\ (0.5, 0, 0.571), & x > 0, \end{cases}

on the domain [xL,xR]=[−5,5][x_L,x_R] = [-5,5] for the model mesh shown in Figure 5. We place the left boundary of the small cell IkI_k at x=0x = 0, i.e., xk−12=0x_{k-\frac{1}{2}} = 0. We define h=(xR−xL)/Nh = (x_R-x_L)/N with NN being the number of equidistant cells that we use in our computations. (This setup results in actually using the domain [−5,5+αh][-5,5+\alpha h] in our tests.) We run until time tend=1.0t_{\mathrm{end}} = 1.0 using CCFL=0.8C_{\mathrm{CFL}} = 0.8. In Table 2, we show the number of iterations needed in

θk±1\theta_{k\pm1}NNα=10−2\alpha= 10^{-2}α=10−4\alpha= 10^{-4}α=10−6\alpha= 10^{-6}
0.9N=100N = 100163557
N=200N = 200143251
N=400N = 400133047
0.1N=100N = 100485997
N=200N = 200385190
N=400N = 400294481
α\alphaN=100N = 10043943470*
N=200N = 20034734356*
N=400N = 40024624178*

Table 2. Lax shock tube: Average number of iterations in dual time stepping for θk=α\theta_k = \alpha and varying choices for θk±1\theta_{k\pm1}. (The results marked with * took too long to compute in a reasonable time.)

the dual time stepping, averaged over the running time [0,T][0,T], for different setups. Due to stability, we need to choose θk∈(0,α]\theta_k \in(0,\alpha]. We use the biggest possible time step θk=α\theta_k = \alpha here. For θk±1\theta_{k\pm1} there holds for stability reasons θk±1∈(0,1]\theta_{k\pm1} \in(0,1], i.e., there is some freedom of choice here. Comparing the results for θk±1=0.9\theta_{k\pm1} = 0.9 and θk±1=0.1\theta_{k\pm1} = 0.1, we observe that it is better to use bigger values for θk±1\theta_{k\pm1}. We made a similar observation in other tests.

To contrast, we also present results for choosing θk±1=α\theta_{k\pm1} = \alpha, corresponding to advancing all three cells Ik−1,Ik,Ik+1I_{k-1}, I_k, I_{k+1} simultaneously based on the allowed CFL number of cell IkI_k. Here, it is clearly visible that the number of iterations scales roughly with O(1α)O\left(\frac{1}{\alpha}\right). For α=10−5\alpha= 10^{-5}, we get 434 663, 343 526, and 241 731 average iterations for N=100N = 100, N=200N = 200, and N=400N = 400, respectively. Note that we do not observe the scaling with O(1α)\mathcal{O}\left(\frac{1}{\alpha}\right) for using proper local time stepping with different time step lengths, i.e., when setting θk±1=0.9\theta_{k\pm1} = 0.9 for example. We only observe a mild increase in the number of iterations. This is essential as the time-accurate local time stepping (when using explicit time stepping everywhere) naturally requires roughly O(1α)\mathcal{O}\left(\frac{1}{\alpha}\right) iterations for doing one big time step of length Δtref\Delta t_{\mathrm{ref}} on the small cell IkI_k, and this is exactly the behavior that we want to avoid.

Cavitation

Next we discuss the case of cavitation. Consider the initial data given in Table 3.

pL−p_L^{-}uL−u_L^{-}pL+p_L^{+}uL+u_L^{+}
Initial Data60000 Pa−4 ms-4\ \frac{\mathrm{m}}{\mathrm{s}}60000 Pa4 ms4\ \frac{\mathrm{m}}{\mathrm{s}}
Saturation ValuesT0T_0363.15 Kp0p_070182.360745 Pa

Table 3. Cavitation Test: Initial Data.

The following computation was performed with CCFL=0.5C_{CFL} = 0.5, h0=10−2 mh^0 = 10^{-2}\,\mathrm{m}, x∈[−2,2] mx \in[-2, 2]\,\mathrm{m}, and tend=5⋅10−4 st_{\mathrm{end}} = 5 \cdot10^{-4}\,\mathrm{s}. The time step is calculated according to the CFL-condition (12) and the phases are distinguished using the values given in Table 4.

p~\tilde{p}ρ~\tilde{\rho}pmin⁡p_{\min}ρmin⁡\rho_{\min}
70388.660656 Pa0.419977 kgm30.419977\ \frac{\mathrm{kg}}{\mathrm{m}^3}0 Pa965.289008 kgm3965.289008\ \frac{\mathrm{kg}}{\mathrm{m}^3}

Table 4. Maximum vapor pressure and corresponding quantities for the linear Tait EOS together with the ideal gas EOS at T0=363.15 KT_0 = 363.15\,\mathrm{K}.

To treat the cavitation case we apply the mixed explicit implicit time stepping described above (in combination with dual time stepping). We will also compare with using the fully explicit time-accurate local time stepping (LTS) as presented in [54] based on [45]. The results at the final time for the computed solution using the mixed explicit implicit approach together with the exact solution are given in Figure 7. For this test, the cell size of the vapor phase after its creation is hV=2.701184⋅10−5 mh_V = 2.701184 \cdot10^{-5}\,\mathrm{m} which leads to an initial α∼O(10−3)\alpha\sim\mathcal{O}(10^{-3}). The phase boundaries move at wleft/right=±4.007636 msw_{\mathrm{left/right}} = \pm4.007636\ \frac{\mathrm{m}}{\mathrm{s}} and thus the size of the liquid cell at time tendt_{\mathrm{end}} is (wright−wleft)⋅tend=4.007635⋅10−3 m(w_{\mathrm{right}} - w_{\mathrm{left}}) \cdot t_{\mathrm{end}} = 4.007635 \cdot10^{-3}\,\mathrm{m}. The values in the star region for the pressure are given in Table 5. We present exact solution values obtained solving the Riemann problem as presented in appendix A, the computed results using our new approach (implicit), as well as using explicit LTS. In Table 6, we present the corresponding solution data for the velocity in the star region. For both tables, the values produced by these two approaches show no significant differences.

Computed and exact solution and exact wave structure for the cavitation test

Figure 7. Cavitation Test: Computed (blue) and exact (red) solution as well as the exact wave structure of the solution showing the outgoing shock waves and the two phase boundaries in the middle of the fan. (Note that the two phase boundaries (shown in orange) are so close that they cannot be distinguished in the given picture and appear as one line.)

pL∗,−p_{L}^{*,-}pV∗p_{V}^{*}pL∗,+p_{L}^{*,+}
exact68483.741137 Pa68477.181783 Pa68483.741137 Pa
explicit68483.741813 Pa68477.181783 Pa68483.740209 Pa
implicit68483.740426 Pa68477.181783 Pa68483.740588 Pa

Table 5. Cavitation Test: Exact and computed solution (pressure).

uL∗,−u_L^{*,-}uV∗u_V^*uL∗,+u_L^{*,+}
exact−4.005940 ms-4.005940\ \frac{\mathrm{m}}{\mathrm{s}}0 ms0\ \frac{\mathrm{m}}{\mathrm{s}}4.005940 ms4.005940\ \frac{\mathrm{m}}{\mathrm{s}}
explicit−4.005940 ms-4.005940\ \frac{\mathrm{m}}{\mathrm{s}}−2.127421⋅10−10 ms-2.127421 \cdot10^{-10}\ \frac{\mathrm{m}}{\mathrm{s}}4.005940 ms4.005940\ \frac{\mathrm{m}}{\mathrm{s}}
implicit−4.005940 ms-4.005940\ \frac{\mathrm{m}}{\mathrm{s}}1.575386⋅10−10 ms1.575386 \cdot10^{-10}\ \frac{\mathrm{m}}{\mathrm{s}}4.005930 ms4.005930\ \frac{\mathrm{m}}{\mathrm{s}}

Table 6. Cavitation Test: Exact and computed solution (velocity).

We now compare the performance of the mixed explicit implicit scheme based on dual time stepping (DTS) with using a fully explicit LTS. In Table 7, we present the total number of local iterations performed during the complete computation with 166 large time steps. Overall, the explicit LTS needs roughly speaking a factor of 5 more iterations than the implicit approach does. This is a good speed-up considering that the size of the small cell at creation was only about a factor of O(10−3)O(10^{-3}) smaller than the other cells and grew pretty quickly. The different factor in terms of iterations needed is only partially reflected in the running times as the local time stepping only accounts for ∼30%\sim30\% of the running time in the implicit setting and for ∼60%\sim60\% in the explicit setting.

explicit LTSimplicit (DTS)
number of total local iterations1941355
computation time4.93s2.94s

Table 7. Cavitation Test: Comparison of computational costs.

Nucleation

The final example is a nucleation test case with the initial data as given in Table 8. This corresponds to Example 3 in Hantke et al. [23].

pV−p_V^-uV−u_V^-pV+p_V^+uV+u_V^+
Initial Data70000 Pa2.7 ms2.7\ \frac{\mathrm{m}}{\mathrm{s}}70000 Pa−2.7 ms-2.7\ \frac{\mathrm{m}}{\mathrm{s}}
T0T_0p0p_0
Saturation Values363.15 K70182.360745 Pa

Table 8. Nucleation Test: Initial Data.

The computation was performed with CCFL=0.5C_{CFL} = 0.5, h0=10−2 mh^0 = 10^{-2}\ \mathrm{m}, x∈[−2,2] mx \in[-2,2]\ \mathrm{m}, and tend=5⋅10−4 st_{\mathrm{end}} = 5 \cdot10^{-4}\ \mathrm{s}. The time step is calculated according to the CFL-condition (12). The phases are distinguished using the values given in Table 4.

The results for the mixed explicit implicit time stepping together with the exact solution are shown in Figure 8.

Nucleation Test: Computed and exact solution and exact wave structure

Figure 8. Nucleation Test: Computed (blue) and exact (red) solution as well as the exact wave structure of the solution showing the outgoing shock waves and the two phase boundaries in the middle of the fan. (Note that the two phase boundaries (shown in orange) are so close that they cannot be distinguished in the given picture and appear as one line.)

The values in the star region for the pressure are given in Table 9. We again present the exact solution as well as the solutions computed with the new explicit implicit scheme and with using explicit LTS. The corresponding values for the velocity in the star region are given in Table 10. Both methods show no significant differences for the computed values and are also in good agreement with the exact solution.

pV∗,−p_{\mathrm{V}}^{*,-}pL∗p_{\mathrm{L}}^{*}pV∗,+p_{\mathrm{V}}^{*,+}
exact70383.024449 Pa70383.115685 Pa70383.024449 Pa
explicit70382.992562 Pa70383.083927 Pa70382.992562 Pa
implicit70382.992468 Pa70383.072633 Pa70382.992468 Pa

Table 9. Nucleation Test: Exact and computed solution (pressure).

uV∗,−u_V^{*,-}uL∗u_L^*uV∗,+u_V^{*,+}
exact0.466005 ms0.466005\ \frac{\mathrm{m}}{\mathrm{s}}0 ms0\ \frac{\mathrm{m}}{\mathrm{s}}−0.466005 ms-0.466005\ \frac{\mathrm{m}}{\mathrm{s}}
explicit0.465933 ms0.465933\ \frac{\mathrm{m}}{\mathrm{s}}3.161887⋅10−12 ms3.161887 \cdot10^{-12}\ \frac{\mathrm{m}}{\mathrm{s}}−0.465933 ms-0.465933\ \frac{\mathrm{m}}{\mathrm{s}}
implicit0.465933 ms0.465933\ \frac{\mathrm{m}}{\mathrm{s}}1.2214509⋅10−10 ms1.2214509 \cdot10^{-10}\ \frac{\mathrm{m}}{\mathrm{s}}−0.465933 ms-0.465933\ \frac{\mathrm{m}}{\mathrm{s}}

Table 10. Nucleation Test: Exact and computed solution (velocity).

For this test, the cell size of the liquid phase after its creation is hL=4.429422⋅10−9 mh_{\mathrm{L}} = 4.429422 \cdot10^{-9}\ \mathrm{m} which leads to an initial α∼O(10−7)\alpha\sim O(10^{-7}). The values for the interface velocities are wleft/right=±0.000203 msw_{\mathrm{left/right}} = \pm0.000203\ \frac{\mathrm{m}}{\mathrm{s}} and thus the size of the liquid cell at time tendt_{\mathrm{end}} is (wright−wleft)⋅tend=2.03⋅10−7 m(w_{\mathrm{right}} - w_{\mathrm{left}}) \cdot t_{\mathrm{end}} = 2.03 \cdot10^{-7}\ \mathrm{m}.

In this setup, we expect bigger time differences between the implicit DTS and the explicit LTS approach than for cavitation as the run time should be dominated by the local iterations in the neighborhood of the small cell. Indeed, when comparing the total number of local iterations performed during the complete computation with 143 large time steps, we have roughly a factor of 20 more iterations for the explicit approach, compare the data in Table 11. This difference in iterations is also reflected in the running

explicits LTSimplicit (DTS)
number of total local iterations27’154’0161’367’460
computation time9811s509s

Table 11. Nucleation Test: Comparison of computational costs.

time. We now see roughly a factor of 20 there as well.

Conclusion

In this work we suggest a new numerical method to treat nucleation and cavitation or more generally two-phase flow problems with sharp interfaces that result in the existence of tiny cells. We treat the neighborhood of the tiny cells implicitly for stability while using an explicit time stepping scheme everywhere else to keep the cost low. Using flux bounding to couple the schemes as introduced in Ref. [41] results in the mixed explicit implicit scheme being conservative and stable. We suggest to use dual time stepping for solving the resulting implicit systems in the neighborhood of the tiny cells. Our numerical results, which include nucleation and cavitation tests, show an accurate and robust performance of the mixed scheme. In terms of running times we observed significant speed-ups compared to a fully explicit local time stepping approach. In the future, we plan to explore the speed-up options further by looking into better starting points for the dual time stepping (instead of simply using UnU^n) or Newton-like approaches. We also plan to extend the approach to two dimensions.

Acknowledgements

This work was initiated during a joint participation at the Hirschegg workshop of conservation laws. The authors like to thank Marsha Berger for the introduction to dual time stepping. F.T. is funded by the DFG SPP 2183 Eigenschaftsgeregelte Umformprozesse, project 424334423 and gratefully acknowledges the support by the research training group Energy, Entropy and Dissipative Dynamics (EDDy) of the DFG - project no. 320021702/GRK2326.

Data Availability Statement

No experimental data was produced. Data related to the numerical results is available upon reasonable request.

Solution at the Interface

In the following we want to discuss the solution at the phase boundary between the vapor and the liquid phases. Here we rely on the results presented in Refs. [54, 25]. The solution of the two phase Riemann problem consists of three waves, separating four constant states. In particular we search the values in the star region, i.e. ρV∗,pV∗,uV∗\rho_V^*, p_V^*, u_V^* in the vapor phase, ρL∗,pL∗,uL∗\rho_L^*, p_L^*, u_L^* in the liquid phase, and the velocity ww of the phase boundary or the mass flux zz. The pressure and the density inside each phase are not independent from each other due to the EOS given for the particular phase. Further we know that the pressures at the interface are uniquely linked using equation ⟦p⟧=−z2⟦v⟧\llbracket p \rrbracket= -z^2 \llbracket v \rrbracket. The mass flux is given by the kinetic relation (7)

z = \tau p_V \left\llbracket g + e^{kin} \right\rrbracket= \tau p_V \left\llbracket g_L - g_V + e_L^{kin} - e_V^{kin} \right\rrbracket.

Thus we have to solve the following system for (pV∗,pL∗)(p_V^*,p_L^*) to obtain the complete solution

0=G(pV∗,pL∗)=(⟦p⟧+z2⟦v⟧fV(pV∗,WV)+fL(pL∗,WL)+z⟦v⟧+Δu).(22)\mathbf{0} = \mathbf{G}(p_V^*,p_L^*) = \begin{pmatrix} \llbracket p \rrbracket+ z^2 \llbracket v \rrbracket\\ f_V(p_V^*,\mathbf{W}_V) + f_L(p_L^*,\mathbf{W}_L) + z\llbracket v \rrbracket+ \Delta u \end{pmatrix}. \tag*{(22)}

The quantities in the second component account for the classical outer waves, see Ref. [25]. For K∈{V,L}K \in\{V,L\} we have

fK(pK∗,WK)={−⟦p⟧⟦v⟧,pK∗>pK (shock),∫pKpK∗vK(ζ)aK(ζ) dζ,pK∗≤pK (rarefaction).f_K(p_K^*,\mathbf{W}_K) = \begin{cases} \sqrt{-\llbracket p \rrbracket\llbracket v \rrbracket}, & p_K^* > p_K\ \text{(shock)}, \\ \int_{p_K}^{p_K^*} \frac{v_K(\zeta)}{a_K(\zeta)}\,\mathrm{d}\zeta, & p_K^* \le p_K\ \text{(rarefaction)}. \end{cases}

The Jacobian is given by

DG(pV∗,pL∗)=⋯\mathbf{D}\mathbf{G}(p_V^*,p_L^*) = \cdots
(−1+2z∂z∂pV∗⟦v⟧+z2(vV∗aV∗)21+2z∂z∂pL∗⟦v⟧−z2(vL∗aL∗)2ddpV∗fV(pV∗,WV)+∂z∂pV∗⟦v⟧+z(vV∗aV∗)2ddpL∗fL(pL∗,WL)+∂z∂pL∗⟦v⟧−z(vL∗aL∗)2)(23)\begin{pmatrix} -1 + 2z\frac{\partial z}{\partial p_V^*}\llbracket v \rrbracket+ z^2\left(\frac{v_V^*}{a_V^*}\right)^2 & 1 + 2z\frac{\partial z}{\partial p_L^*}\llbracket v \rrbracket- z^2\left(\frac{v_L^*}{a_L^*}\right)^2 \\ \frac{\mathrm{d}}{\mathrm{d}p_V^*}f_V(p_V^*,\mathbf{W}_V) + \frac{\partial z}{\partial p_V^*}\llbracket v \rrbracket+ z\left(\frac{v_V^*}{a_V^*}\right)^2 & \frac{\mathrm{d}}{\mathrm{d}p_L^*}f_L(p_L^*,\mathbf{W}_L) + \frac{\partial z}{\partial p_L^*}\llbracket v \rrbracket- z\left(\frac{v_L^*}{a_L^*}\right)^2 \tag*{(23)} \end{pmatrix}

Once we have determined the pressures we can calculate the densities via the corresponding EOS, the mass flux zz via the kinetic relation, the velocities via the wave relations for the classical waves, and the velocity of the phase boundary using the definition of the mass flux z=−ρ(u−w)z=-\rho(u-w). Since we always align the computational grid with the phase boundary we have to use the corresponding flux when we apply (19). The flux at the phase boundary is determined using the jump conditions (4) and (5). These may be rewritten as

ρV∗(uV∗−w)=ρL∗(uL∗−w)=−z,\rho_V^*(u_V^*-w)=\rho_L^*(u_L^*-w)=-z,
−zuV∗+pV∗=−zuL∗+pL∗.-zu_V^*+p_V^*=-zu_L^*+p_L^*.

Thus we directly read off the flux across the phase boundary, i.e.

FPB=[−z−zu∗+p∗].(24)\mathbf{F}_{PB}=\begin{bmatrix}-z\\-zu^*+p^*\end{bmatrix}. \tag*{(24)}

Here one has the freedom to choose either the vapor or the liquid star state values.

So far we have discussed the case with phase transition. The case without phase transition is obtained using z=0z=0, which then implies ⟦p⟧=0\llbracket p\rrbracket=0 and ⟦u⟧=0\llbracket u\rrbracket=0. Thus we have to solve only a single nonlinear equation, see Ref. [25]. The flux is given by

FPB=[0p∗].(25)\mathbf{F}_{PB}=\begin{bmatrix}0\\p^*\end{bmatrix}. \tag*{(25)}

Further one immediately verifies that in this case the phase boundary is quite analogue to a contact discontinuity. Therefore we use in our numerical simulations, for the case without phase transition, the wave speed estimates for the HLLC solver as given in Refs. [4, 56]. Given the (left) vapor state and the (right) liquid state we proceed as follows

SL=uL+aL,S_L=u_L+a_L,
SV=uV−aV,(26)S_V=u_V-a_V, \tag*{(26)}
w=pL−pV+ρVuV(SV−uV)−ρLuL(SL−uL)ρV(SV−uV)−ρL(SL−uL),w=\frac{p_L-p_V+\rho_Vu_V(S_V-u_V)-\rho_Lu_L(S_L-u_L)}{\rho_V(S_V-u_V)-\rho_L(S_L-u_L)},
ρL∗=ρLSL−uLSL−w.\rho_L^*=\rho_L\frac{S_L-u_L}{S_L-w}.

Here SVS_V and SLS_L denote the velocities of the classical waves. The density is calculated according to the HLLC solver as presented in Refs. [55, 56]. The pressure p∗p^* may then be calculated using the liquid EOS. This procedure gives satisfactory results.

We use this simple calculation to choose proper initial pressure values for the Newton iteration in the case with phase transition. It is shown in Ref. [25] that the pressure in the star region for the case without phase transition correctly predicts the sign of the mass flux in the case with phase transition, i.e. whether we have evaporation or condensation.

Phase Creation

The case of phase creation is a challenging issue: First, we have to detect that a new phase must be created. Then, we have to deal with technical problems such as the creation of new cells that are typically very small, potential interactions of multiple phase boundaries, and other problems.

Cavitation

When we encounter a liquid/liquid Riemann problem we may observe cavitation, i.e., the creation of vapor. For the detailed analysis we again refer to Refs. [54, 25]. In view of the results given there the main outline for the numerics is as follows. We solve the single phase Riemann problem in the liquid phase. If there is no solution to this problem, in particular when the liquid pressure in the star region is smaller than the predefined minimum liquid pressure, p∗<pmin⁡p^* < p_{\min}, we have cavitation. In this case we store the position of the involved cells and perform an extra calculation. We summarize the performed steps:

  1. Solve the single phase Riemann problem without phase transition; if p∗<pmin⁡p^* < p_{\min} cavitation occurs.

  2. Solve the single phase Riemann problem with phase transition.

  3. From the solution we obtain pV∗p_V^*, zz, wleftw_{left} and wrightw_{right}.

  4. Create a vapor cell of size (wright−wleft)Δt(w_{right} - w_{left})\Delta t with the cell values ρV∗\rho_V^*, pV∗p_V^* and uV∗u_V^*.

  5. The fluxes at the phase boundaries are given by

FPB(left)=[z~−zuV∗+pV∗]andFPB(right)=[−z~−zuV∗+pV∗].(27)\mathbf{F}_{PB}^{(left)} = \begin{bmatrix} \tilde{z} \\ -z u_V^* + p_V^* \end{bmatrix} \quad\text{and}\quad \mathbf{F}_{PB}^{(right)} = \begin{bmatrix} -\tilde{z} \\ -z u_V^* + p_V^* \end{bmatrix}. \tag*{(27)}

In the next time step we then have two phase boundaries which are treated as discussed above.

Nucleation

The case of nucleation is treated analogous to the previous case of cavitation. When we encounter a vapor/vapor Riemann problem we may observe nucleation, i.e. the creation of liquid. The detailed analysis is presented in Refs. [54, 25]. In view of the results given there the main outline for the numerics is as follows. We solve the single phase Riemann problem in the vapor phase. If there is no solution to this problem, i.e. when the vapor pressure in the star region is greater than the predefined maximum vapor pressure, p∗>p~p^* > \tilde{p}, we have nucleation. In this case we store the position of the involved cells and perform an extra calculation. We summarize the performed steps:

  1. Solve the single phase Riemann problem without phase transition; if p∗>p~p^* > \tilde{p} nucleation occurs.

(ii) Solve the single phase Riemann problem with phase transition.

(iii) From the solution we obtain pL∗p_L^*, zz, wleftw_{left} and wrightw_{right}.

(iv) Create a liquid cell of size (wright−wleft)Δt(w_{right}-w_{left})\Delta t with the cell values ρL∗\rho_L^*, pL∗p_L^* and uL∗u_L^*.

(v) The fluxes at the phase boundaries are given by

FPB(left)=[−z~−zuL∗+pL∗]andFPB(right)=[z~−zuL∗+pL∗].(28)\mathbf{F}_{PB}^{(left)} = \begin{bmatrix} -\tilde{z} \\ -z u_L^* + p_L^* \end{bmatrix} \quad\text{and}\quad \mathbf{F}_{PB}^{(right)} = \begin{bmatrix} \tilde{z} \\ -z u_L^* + p_L^* \end{bmatrix}. \tag*{(28)}

Again, in the next time step we then have two phase boundaries which are treated as discussed above.

References

  1. [1]R. Abeyaratne and J. K. Knowles. Kinetic relations and the propagation of phase boundaries in solids. Archive for Rational Mechanics and Analysis, 114(2):119–154, 1991.
  2. [2]M. Ancellin, L. Brosset, and J.-M. Ghidaglia. Numerical simulation of wave impacts with interfacial phase change: An isothermal averaged model. European Journal of Mechanics - B/Fluids, 72:631–644, 2018.DOI
  3. [3]M. Baer and J. Nunziato. A two-phase mixture theory for the deflagration-to-detonation transition (ddt) in reactive granular materials. International Journal of Multiphase Flow, 12(6):861 – 889, 1986.DOI
  4. [4]P. Batten, N. Clarke, C. Lambert, and D. M. Causon. On the choice of wavespeeds for the HLLC Riemann solver. SIAM J. Sci. Comput., 18(6):1553–1570, 1997.DOI
  5. [5]D. Bedeaux and S. Kjelstrup. Irreversible thermodynamics—a tool to describe phase transitions far from global equilibrium. Chemical Engineering Science, 59(1):109 – 118, 2004.DOI
  6. [6]N. Bempedelis and Y. Ventikos. A sharp-interface model for grid-resolved cavitating flows. International Journal of Multiphase Flow, 149:103968, 2022.DOI
  7. [7]M. Berger and A. Giuliani. A state redistribution algorithm for finite volume schemes on cut cell meshes. J. Comput. Phys., 428:109820, 2021.DOI
  8. [8]P. Birken and A. Jameson. On nonlinear preconditioners in Newton-Krylov methods for unsteady flows. Int. J. Num. Meth. Fluids, 62:565–573, 2010.DOI
  9. [9]M. Bond and H. Struchtrup. Mean evaporation and condensation coefficients based on energy dependent condensation probability. Phys. Rev. E, 70:061605, Dec 2004.pubmed.ncbi.nlm.nih.gov/15697379
  10. [10]V. Boniou, T. Schmitt, and A. Vié. Comparison of interface capturing methods for the simulation of two-phase flow in a unified low-mach framework, 2021.arxiv.org/abs/2106.01864
  11. [11]L. Bureš and Y. Sato. Direct numerical simulation of evaporation and condensation with the geometric of method and a sharp-interface phase-change model. International Journal of Heat and Mass Transfer, 173:121233, 2021.DOI
  12. [13]C. M. Dafermos. Hyperbolic Conservation Laws in Continuum Physics, volume 325 of Grundlehren der mathematischen Wissenschaften. Springer Berlin Heidelberg, 2016.
  13. [14]W. Dreyer, F. Duderstadt, M. Hantke, and G. Warnecke. Bubbles in liquids with phase transition. Part 1. On phase change of a single vapor bubble in liquid water. Contin. Mech. Thermodyn., 24(4-6):461–483, 2012.DOI
  14. [15]W. Dreyer, J. Giesselmann, and C. Kraus. A compressible mixture model with phase transition. Physica D: Nonlinear Phenomena, 273-274:1–13, 2014.
  15. [16]M. Dumbser, U. Iben, and C.-D. Munz. Efficient implementation of high order unstructured weno schemes for cavitating flows. Computers & Fluids, 86(0):141 – 168, 2013.DOI
  16. [17]C. Engwer, S. May, A. Nüßing, and F. Streitbürger. A stabilized DG cut cell method for discretizing the linear transport equation. SIAM J. Sci. Comput., 42(6):A3677–A3703, 2020.arxiv.org/abs/1906.05642
  17. [18]H. Fan and M. Slemrod. Dynamic flows with liquid/vapor phase transitions. volume 1, pages 373 – 420. North-Holland, 2002.DOI
  18. [19]S. Fechter, C.-D. Munz, C. Rohde, and C. Zeiler. A sharp interface method for compressible liquid–vapor flow with phase transition and surface tension. Journal of Computational Physics, 336:347 – 374, 2017.arxiv.org/abs/1511.03612
  19. [20]P. Fu, T. Frachon, G. Kreiss, and S. Zahedi. High order discontinuous cut finite element methods for linear hyperbolic conservation laws with an interface. arXiv:2201.07018, 2022.arxiv.org/abs/2201.07018
  20. [21]P. Fu and G. Kreiss. High order cut discontinuous Galerkin methods for hyperbolic conservation laws in one space dimension. SIAM J. Sci. Comput., 43(4):A2404–A2424, 2021.arxiv.org/abs/2104.05446
  21. [22]A. Giuliani. A two-dimensional stabilized discontinuous Galerkin method on curvilinear embedded boundary grids. SIAM J. Sci. Comput., 44(1):A389–A415, 2022.arxiv.org/abs/2102.01857
  22. [23]M. Hantke, W. Dreyer, and G. Warnecke. Exact solutions to the Riemann problem for compressible isothermal Euler equations for two phase flows with and without phase transition. Quarterly of Applied Mathematics, 71:509 – 540, 2013.
  23. [24]M. Hantke, C. Matern, G. Warnecke, and H. Yaghi. A new method to discretize a model for isothermal flow with a multi-component equation of state. Journal of Computational and Applied Mathematics, page 114876, 2022.DOI
  24. [25]M. Hantke and F. Thein. A general existence result for isothermal two-phase flows with phase transition. Journal of Hyperbolic Differential Equations, 16(04):595–637, 2019.DOI
  25. [26]C. Helzel, M. Berger, and R. LeVeque. A high-resolution rotated grid method for conservation laws with embedded geometries. SIAM J. Sci. Comput., 26(3):785–809, 2005.DOI
  26. [27]C. Helzel and D. Kerkmann. An active flux method for cut cell grids. In R. Klöfkorn, E. Keilegavlen, A. Radu, and J. Fuhrmann, editors, Finite Volumes for Complex Applications IX - Methods, Theoretical Aspects, Examples, pages 507–515. Springer International Publishing, 2020.DOI
  27. [28]T. Hitz, J. Keim, C.-D. Munz, and C. Rohde. A parabolic relaxation model for the navier-stokes-korteweg equations. Journal of Computational Physics, 421:109714, 2020.DOI
  28. [29]A. Jameson. Time dependent calculations using multigrid, with applications to unsteady flows part airfoils and wings. In 10th AIAA Computational Fluid Dynamics 1991, Honolulu, HI, 1991. Paper AIAA 91-1596.
  29. [30]A. Jameson and S. Shankaran. An assessment of dual-time stepping, time spectral and artificial compressibility based numerical algorithms for unsteady flow with applications to flapping wings. In 19th AIAA Computational Fluid Dynamics 2009, San Antonio, TX, 2009. Paper AIAA 2009-4273.
  30. [31]S. Jöns and C.-D. Munz. Riemann solvers for phase transition in a compressible sharp-interface method, 2022.arxiv.org/abs/2207.02067
  31. [32]A. Kapila, R. Menikoff, J. Bdzil, S. Son, and D. Stewart. Two-phase modelling of DDT in granular materials: reduced equations. Physics of Fluids, 13:3002–3024, 2001.DOI
  32. [33]C. Kelley. Iterative Methods for Linear and Nonlinear Equations, volume 16 of Frontiers in Applied Mathematics. Society for industrial and Applied Mathematics, 1995.
  33. [34]R. Klein, K. R. Bates, and N. Nikiforakis. Well-balanced compressible cut-cell simulation of atmospheric flow. Philos. Trans. Roy. Soc. A, 367:4559–4575, 2009.DOI
  34. [35]L. D. Landau and E. M. Lifschitz. Lehrbuch der theoretischen Physik, Bd. VI Hydrodynamik. Akad.-Verl., Berlin, 5. edition, 1991.
  35. [36]P. LeFloch. Hyperbolic Systems of Conservation Laws: The Theory of Classical and Nonclassical Shock Waves. Lectures in Mathematics. Birkhäuser Verlag, 2002.DOI
  36. [37]T. Long, J. Cai, and S. Pan. A fully conservative sharp-interface method for compressible multiphase flows with phase change, 2021.
  37. [38]N. Loppi, F. Witherden, A. Jameson, and P. Vincent. Locally adaptive pseudo-time stepping for high-order flux reconstruction. Journal of Computational Physics, 399:108913, 2019.DOI
  38. [39]J. Magiera and C. Rohde. A molecular–continuum multiscale model for inviscid liquid–vapor flow with sharp interfaces. Journal of Computational Physics, 469:111551, 2022.DOI
  39. [40]S. May. Time-dependent conservation laws on cut cell meshes and the small cell problem. In R. Klöf̈korn, E. Keilegavlen, A. Radu, and J. Fuhrmann, editors, Finite Volumes for Complex Applications IX - Methods, Theoretical Aspects, Examples, pages 39–53. Springer International Publishing, 2020.DOI
  40. [41]S. May and M. J. Berger. An explicit implicit scheme for cut cells in embedded boundary meshes. J. Sci. Comput., 71:919–943, 2017.
  41. [42]S. May and F. Streitbürger. DoD stabilization for non-linear hyperbolic conservation laws on cut cell meshes in one dimension. Appl. Math. Comput., 419, 2022.
  42. [43]C. Merkle and C. Rohde. The sharp-interface approach for fluids with phase change: Riemann problems and ghost fluid techniques. ESAIM: M2AN, 41(6):1089–1123, 2007.DOI
  43. [44]I. Müller. Thermodynamics. Interaction of Mechanics and Mathematics Series. Pitman, 1985.
  44. [45]S. Müller and Y. Stiriba. Fully adaptive multiscale schemes for conservation laws employing locally varying time stepping. Journal of Scientific Computing, 30(3):493–531, 2007.DOI
  45. [46]S. Müller and A. Voss. The Riemann problem for the Euler equations with nonconvex and nonsmooth equation of state: Construction of wave curves. SIAM Journal on Scientific Computing, 28(2):651–681, 2006.DOI
  46. [47]J. Neusser, C. Rohde, and V. Schleper. Relaxation of the navier–stokes–korteweg equations for compressible two-phase flow with phase transition. International Journal for Numerical Methods in Fluids, 79(12):615–639, 2015.DOI
  47. [48]P. Pfeiffer, J. Eisener, H. Reese, M. Li, X. Ma, C. Sun, and C.-D. Ohl. Thermally assisted heterogeneous cavitation through gas supersaturation. Phys. Rev. Lett., 128:194501, May 2022.DOI
  48. [49]P. Pfeiffer, M. Shahrooz, M. Tortora, C. M. Casciola, R. Holman, R. Salomir, S. Meloni, and C.-D. Ohl. Heterogeneous cavitation from atomically smooth liquid–liquid interfaces. Nature Physics, Oct 2022.DOI
  49. [50]A. Rajkotwala, A. Panda, E. Peters, M. Baltussen, C. van der Geld, J. K. Kuerten, and J. Kuipers. A critical comparison of smooth and sharp interface methods for phase transition. International Journal of Multiphase Flow, 120:103093, 2019.DOI
  50. [51]E. Romenski, A. A. Belozerov, and I. M. Peshkov. Conservative formulation for compressible multiphase flows. Quarterly of Applied Mathematics, 74(1):113–136, dec 2016.DOI
  51. [52]R. Saurel and R. Abgrall. A multiphase Godunov method for compressible multifluid and multiphase flows. Journal of Computational Physics, 150(2):425 – 467, 1999.DOI
  52. [53]V. Schleper. A HLL-type Riemann solver for two-phase flow with surface forces and phase transitions. Applied Numerical Mathematics, 108:256 – 270, 2016.DOI
  53. [54]F. Thein. Results for Two Phase Flows with Phase Transition. PhD thesis, Otto-von-Guericke-Universität Magdeburg, 2018.
  54. [55]E. Toro, M. Spruce, and W. Speares. Restoration of the contact surface in the HLL-Riemann solver. Shock Waves, 4(1):25–34, 1994.DOI
  55. [56]E. F. Toro. Riemann Solvers and Numerical Methods for Fluid Dynamics. Springer Berlin Heidelberg, 2009.
  56. [57]A. Voß. Exact Riemann Solution for the Euler Equations with Nonconvex and Nonsmooth Equation of State. PhD thesis, RWTH Aachen, 2005.
  57. [58]W. Wagner and A. Kruse. Properties of water and steam: the industrial standard IAPWS-IF97 for the thermodynamic properties and supplementary equations for other properties : tables based on these equations. Springer-Verlag, 1998.
  58. [59]A. Zein. Numerical methods for multiphase mixture Conservation laws with phase transition. PhD thesis, Otto-von-Guericke Universität Magdeburg, 2010.DOI

Paper details

vlnc:W_t2mru7gx
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Mathematics

Not recorded for this paper

View statement
Looking for related papers…
Contents