Abstract
We develop and analyse the first second-order phase-field model to combine melting and dissolution in multi-component flows. This provides a simple and accurate way to simulate challenging phase-change problems in existing codes. Phase-field models simplify computation by describing separate regions using a smoothed phase field. The phase field eliminates the need for complicated discretizations that track the moving phase boundary. However, standard phase-field models are only first-order accurate. They often incur an error proportional to the thickness of the diffuse interface. We eliminate this dominant error by developing a general framework for asymptotic analysis of diffuse-interface methods in arbitrary geometries. With this framework, we can consistently unify previous second-order phase-field models of melting and dissolution and the volume-penalty method for fluid–solid interaction. We finally validate second-order convergence of our model in two comprehensive benchmark problems using the open-source spectral code Dedalus.
Keywords: phase-field model, second-order accuracy, multi-component flows
1. Introduction
Many scientific and industrial questions involve fluid flows coupled with phase changes; including sea-ice formation [1], semiconductor crystal manufacture [2], binary alloy solidification [3] and geophysical mantle dynamics [4]. Multi-phase interaction combines the challenges of nonlinear multi-component convection [5] and evolution of phase boundaries [6], creating entirely new effects. Quantifying this complexity demands appropriate mathematical tools.
Moving boundary problems are the standard method to model phase change phenomena. Separate partial differential equations (PDEs) exist in the liquid and solid regions and moving boundary conditions are applied at the interface (figure 1a). A dynamically shifting interface means that the boundary conditions form an essential (often nonlinear) part of the solution [7]. Moving boundaries present many challenges, complicating numerical algorithms [8] and mathematical proofs [9].
As a possible remedy, it is useful to recall that boundary conditions are a mathematical abstraction; they result from limiting cases of rapid transitions in material properties. There is a long history of reinterpreting discontinuous boundary conditions as smoothed phenomena. Where Gibbs treated capillarity with infinitesimal surfaces [10], van der Waals understood the importance of smoothness at phase boundaries [11]. Where Stefan treated solid–liquid phase boundaries as discontinuous [12], Cahn and Hilliard modelled phase separation as smoothed [3]. Readopting a physics-based viewpoint of boundary conditions allows new possible techniques for addressing complex multi-phase problems. As well as providing a firmer mathematical and physical foundation, smoothed models also simplify numerical implementations by removing the need to track the infinitesimal boundary.
This paper focuses on phase-field models, one of the foremost examples of this smoothed approach. Phase-field models represent distinct phases using a single smoothed phase field ϕ, illustrated in figure 1b [13,14]. The evolution of the phases is then determined by a single set of equations that apply over the entire domain. Many other methods also model phase changes, such as enthalpy methods [15,16], level set methods [17,18], diffuse-domain approaches [19,20] or some immersed-boundary methods [21]. Yet phase-field models stand out for combining several key benefits:
-
—
They are physically motivated, introduced by Fix [22] and Langer [23] to model free energy near phase boundaries (following from Hohenburg and Halperin’s model C [24]).
-
—
They generalize canonical models of phase separation, reducing to Allen–Cahn and Hele-Shaw flow (among others) in various asymptotic limits [25,26].
-
—
They are easily extensible to more general systems, including two-component alloys [27–30], convection [31,32] or multi-phase flows [20,33].
- —
-
—
They are mathematically rigorous, with well-posedness and convergence results [39,40].
-
—
They are simple to simulate as they avoid explicit tracking of the interface [22,41–49].
We emphasize this last point. The simulation of moving boundary problems requires specialized algorithms designed to track and apply boundary conditions at the interface. These algorithms can be difficult or impossible to implement in existing codes. For example, spectral methods are popular for their efficiency, but cannot easily handle non-trivial geometries or topologies. Phase-field models (and other diffuse-interface methods) alleviate these difficulties by removing boundary conditions from the problem formulation. By replacing boundary conditions with simple source terms, they can be implemented in general codes for little effort. More general effects can be modelled by changing source terms, as opposed to developing and integrating new algorithms into the codebase. Phase-field models extend the range of phenomena that existing codes can simulate, and accelerate the development of codes to study new scientific problems.
However, phase-field models possess one important drawback for simulation: they must resolve the diffuse interface. For small-scale simulations, this is feasible. But there is a vast disparity between the microscopic scale of the smoothed interface and the macroscopic scale of interest in most problems. This disparity is what makes discontinuous boundary conditions appropriate models in most circumstances. Throughout this paper, we denote this ratio, also known as the Cahn number [50,51], by ε
1.1 |
Feasible numerical values of ε are orders of magnitude larger than reality. Straightforward analysis implies a commensurate error with respect to the limiting boundary conditions.
The only way to perform accurate phase-field simulations with achievable values of ε is to accelerate the convergence of the model itself. This can be done through second-order asymptotic analysis in the limit ε → 0. While the first order is sufficient to determine the limiting behaviour, it is the second order that reveals the dominant error of the model. It is then possible to find optimal prescriptions that cancel the dominant error and boost convergence from to .
This strategy leads to various ‘quantitative’ (i.e. second order) phase-field models, beginning with a correction for arbitrary interface kinetics in pure materials [52,53], and since extended to unequal diffusivities [36,54], multiple components [29], and the combination thereof [55,56]. An introduction to this asymptotic procedure can be found in [57]. Despite much success, progress is difficult. Second-order asymptotic analysis has not yet ascertained a quantitative phase-field model of multi-component convection.1
This paper presents the first second-order phase-field model of buoyancy-forced convecting binary mixtures. The model, given in §2, builds on first-order models of multi-component convection [31], second-order models of pure melts [59], the diffuse-domain method for Robin boundary conditions [60], and the smooth volume-penalty method for no-slip boundary conditions [61]. We verify second-order convergence in §3 by developing a straightforward asymptotic procedure suitable for general equations and geometries in three dimensions. This procedure allows us to consistently analyse and unify previous second-order phase-field and diffuse-interface methods. We also implement this procedure in the symbolic computing language Mathematica. For brevity, we assume somewhat simplified thermodynamical properties in our model, such as uniform temperature diffusivity, negligible solute within the solid, and Boussinesq buoyancy. Each assumption could be relaxed and analysed using the framework of §3. We finally validate the improved convergence in two comprehensive benchmark problems implemented in the Dedalus numerical code [62] in §4.
2. Models of melting in binary mixtures
(a). Conventional moving boundary formulation
Melting in binary mixtures, such as ice in sea water, is often modelled as a moving boundary problem. We partition the domain into fluid Ω+ and solid Ω− regions, pose separate PDEs on each subdomain, and apply boundary conditions at the evolving interface ∂Ω (as in figure 1a).
In the fluid, the temperature T+ and dissolved solute concentration C satisfy advection–diffusion equations, and the fluid velocity u and pressure p satisfy incompressible Navier–Stokes equations with Boussinesq buoyancy forcing ,
2.1 |
where κ, μ and ν are the thermal, solutal and momentum diffusivity (each assumed constant), and g, ρ and ρ0 are the gravitational acceleration, the density of the fluid and a reference density. In the solid only the temperature T− is defined, which follows a diffusive equation,
2.2 |
We require several boundary conditions at the moving interface [7]. The Gibbs–Thompson relation relates departure of thermosolutal equilibrium (T + mC, where m is the liquidus slope) to a mean-curvature dependent surface energy, and kinetic undercooling proportional to the interfacial normal velocity v. The Stefan condition expresses heat conservation, equating latent heat L release with a discontinuity in temperature flux. The Robin concentration condition ensures total solute conservation. Zero velocity boundary conditions maintain mass conservation,
2.3 |
This model involves several idealizations, namely Boussinesq buoyancy forcing, constant diffusivities and densities that are phase, temperature, and concentration invariant, and a linear liquidus relation. We can include more general thermodynamic properties into our framework, but we continue with the current model as it captures many aspects of melting and dissolution in multi-component flows. Kinetic undercooling is only relevant for rapidly solidifying supercooled liquids so we set α = 0. Note that the neglect of density change during melting means the fluid velocity is equal to zero at the moving interface.
(b). Phase-field model
Phase-field models are an alternative approach that is physically motivated and simple to simulate. They represent distinct phases with a smoothed phase field ϕ. This field obeys an Allen–Cahn type equation which forces the phase to ϕ ≈ 1 in the solid and ϕ ≈ 0 in the fluid [31]. The interface is represented implicitly by the level set ϕ = 1/2. The new equations are
2.4 |
The new source terms of equation (2.4) can be understood heuristically. At leading order, the phase-field equation develops a tanh-like profile around the interface with thickness ε. Beyond this distance, the phase ϕ tends to its limiting values of zero in the fluid and one in the solid. In the fluid, equation (2.4) reproduces equation (2.1). In the solid, the advective and diffusive solute flux tend to zero (with δ ≪ 1 regularizing the concentration equation for numerical stability), and the velocity is damped by Darcy drag terms for porous media. At next order, thermosolutal forcing perturbs the interface to generate latent heat. For a clear derivation of a similar first-order model, see [31].
Our goal is to surpass this approximate understanding and demonstrate improved convergence of this optimized phase-field model to the original moving boundary formulation. We achieve this with an asymptotic analysis of equation (2.4) as the interface length-scale ε tends to zero. Some approaches focus on a variational derivation of phase-field equations [34–38]; however, we follow the view of [31], which states ‘phase-field equations are only quantitatively meaningful in the sharp-interface limit where they can be ultimately related to experiment’. While variational derivations are useful, it is asymptotic analysis, tested with numerical experiments, that best determines the accuracy of phase-field models. Proving these equations converge to the moving boundary formulation at in general geometries is nontrivial, but builds on second-order models of each individual boundary condition; a phase-field model which optimizes the mobility term for zero interface kinetics [59], a concentration equation similar to [31] and the diffuse domain method for Robin boundary conditions [60], and the smooth volume penalty method (which gives β = 1.51044385) [61].
3. Analysis of the phase-field model
In order to understand the phase-field model and demonstrate second-order accuracy, we use a multiple-scales matched-asymptotics framework, which we break into several modular steps:
-
(i)
Partition the solid Ω−, fluid Ω+ and size boundary ΔΩ regions (figure 1b).
-
(ii)
Adopt signed distance coordinates in the boundary region (§3a(i), figure 1c).
-
(iii)
Rescale normal coordinate and operators by ε near the interface (§3a(ii), figure 1b).
-
(iv)
Expand the variables in an asymptotic power series in ε in each region (§3a(iii)).
-
(v)
Connect regions with asymptotic matching conditions in the limit ε → 0 (§3a(iv)).
-
(vi)
Iterate to solve the zeroth-, first- and second-order problems (§3b–d).
This procedure follows our previous analysis of the volume-penalty method [61]. The philosophy of our approach is to determine the evolution of the phase-field model up to and including in each region. We show that the variables in the fluid and solid regions, as well as the location of the interface itself, evolve with only divergence from the moving boundary formulation. Errors of in the temperature and tangential velocity do occur in the boundary region ΔΩ. But this deviation is a necessary consequence of smoothly approximating discontinuous gradients across the interface, and is localized to the boundary region. We thereby derive a second-order accurate phase-field model. We now summarize the key components of this procedure.2
(a). Summary of asymptotic procedure
(i). (Signed-distance coordinate system)
We build a simple orthogonal coordinate system in the boundary region ΔΩ using the signed-distance function from the ϕ = 1/2 level set. The signed distance σ is the minimum distance of a point x to the interface. It follows that the point x must lie in the direction of the unit normal vector from the nearest point on the interface p, which we label with surface coordinates s,
3.1 |
The surface coordinates induce a tangent vector basis ti. Given orthogonal surface coordinates, we also derive the dual vector basis and a unique orthonormal tangent basis ,
3.2 |
We can then write the surface area measure dA = |t1||t2| ds1 ds2 and surface gradient ,
It is not difficult to show the normal is everywhere equal to the gradient of the signed distance. The gradient of the normal is therefore symmetric and diagonalizable. The eigenvectors are the principal directions of curvature (which must align with orthogonal surface coordinates), and the eigenvalues are the principal curvatures κi,
3.3 |
We use this orthonormal frame to describe all geometric quantities near the interface. We can then express the gradient using the surface and normal derivatives and the scale tensor J
3.4 |
It is straightforward to derive the remaining vector calculus operators from the gradient, which we list in appendix A. Finally, the Cartesian partial time derivative ∂t can be rewritten in a moving coordinate system using the signed-distance partial time derivative ,
3.5 |
(ii). (Rescaling interfacial coordinates)
We analyse the size ε interfacial region using the rescaled coordinate ξ and derivative ,
3.6 |
This rescales vector calculus operators (listed in appendix A) through scale factors of the gradient
3.7 |
(iii). (Variable expansions with formal power series)
After splitting the domain into the fluid Ω+, solid Ω− and interfacial ΔΩ regions, each variable f in each region (fluid f+, solid f− and interfacial f) is expressed as a power series in ε,
3.8 |
We do so for the temperature T, solute concentration C, fluid velocity , pressure p, phase field ϕ and interface velocity (which does not depend on ξ). We substitute these series into the hierarchy of equations generated by §3a(ii) to derive a system of equations at each order of ε. Solving each order requires a matching procedure between adjacent regions.
(iv). (Asymptotic matching)
To ensure agreement between different regions, we specify asymptotic matching boundary conditions. This subtle notion requires asymptotic agreement in intermediate zones ξ ∼ ε−1/2 in the limit that ε → 0. We can then let ξ approach infinity for the inner problem without encountering coordinate singularities (provided ), and let σ approach zero for the outer problem without entering the interfacial region. That is, for any variable f, we require
3.9 |
Each variable is already expressed as an asymptotic series. Each series term in the outer variables can be further expanded as a Taylor series about the interface at ϕ = 1/2 using the signed distance σ. The matching conditions at each order of ε then simplify to
3.10 |
Equipped with our multiple-scales matched-asymptotics procedure, we can now verify second-order convergence of our phase-field model in general smooth geometries.
(b). Zeroth order
At leading order, the phase-field equation reduces to the condition . We define the solid by , the liquid by , with the boundary region separating them.
Fluid problem—Noting that the phase is zero in the fluid, we recover the desired sharp interface equations for the remaining leading order variables,
For brevity, we approximate the buoyancy relationship as being linear in temperature and concentration, with proportionality constants B and −NB respectively. This simplification does not affect the convergence results. The solutions may also require external boundary conditions to complete the system.
Solid problem— Within the solid, we reproduce the diffusion equation for the temperature, and zero velocity in the solid. The divergence of the momentum equation reveals a Poisson equation for the pressure. The concentration equation depends sensitively on the decay of the phase to zero, but in the region 1 − ϕ ≪ δ the concentration forcing terms vanish, giving
Similarly, internal ice boundary conditions may be necessary.
Boundary problem—The boundary region is defined relative to the interface ϕ = 1/2. To hold true for all ε when expanded into its power series, this implies that
In this region, the phase-field equation balances the diffusion and reaction terms. The limiting boundary conditions ϕ0(ξ → +∞) = 0 and ϕ0(ξ → −∞) = 1 imply a tanh profile for ϕ0,
Matching the inner heat equation to the outer temperature requires T0 to be constant in ξ,
The identity simplifies the concentration equation. The limiting behaviour of the operator implies exponential growth of the kernel into the solid. This is unphysical, implying that the operand is zero. Matching to the outer variables requires a constant concentration,
The divergence constraint and matching to the solid implies zero normal velocity,
The tangential momentum equation balances diffusion with damping. The kernel is spanned by an unphysical solution that grows exponentially into the solid, and a physical solution that decays exponentially into the solid and is affine in the fluid. Calibrating β [61] allows linear (rather than affine) behaviour of in the fluid. Matching to the fluid implies u⊥0 is zero,
In summary, the zeroth-order asymptotics shows that the phase field has a tanh profile near the boundary, and that the leading order outer velocities satisfy no-slip boundary conditions. The next order problem reproduces the remaining boundary conditions.
(c). First order
The first-order perturbation of the phase-field equation away from the interface takes the form
At subsequent orders, the leading order operator pairs with the highest order . The forcing terms contain lower-order factors. As the first inhomogeneity is zero, all remaining forcing terms, and therefore all outer phase-field expansions , are zero.
Fluid problem—The remaining fluid equations are linear and homogeneous,
The external boundary conditions are satisfied by the zeroth-order outer solutions. The first-order corrections therefore have homogeneous external boundaries. They are only perturbed at the melting interface. We show this interfacial perturbation is zero at first order.
Solid problem—The solid equations are the same at first order,
Boundary problem—The differential operator of the first-order phase-field equation has a two-dimensional kernel spanned by and 6ϕ0(1 − ϕ0)(ξ + sinhξ) + sinhξ. The inhomogeneity must be orthogonal to the kernel, implying the Gibbs–Thomson condition,
Matching implies ϕ1 = 0. Integrating the temperature equation recovers energy conservation,
Solving the homogeneous concentration equation and matching gives the solute conservation condition,
The divergence condition when matched with the solid again implies zero normal velocity,
The tangential velocity is proportional to the physical solution . We choose β [61] to ensure linear behaviour in the fluid,
We finally use the normal momentum equation to show the pressure is constant at leading order
The first-order asymptotics have reproduced the Gibbs–Thomson condition with zero interface kinetics and the solute and energy conservation boundary conditions. Hence the phase-field equations will tend to the sharp interface equations in the limit. Calibrating β ensures the first-order outer fluid velocity satisfies homogeneous boundary conditions . We now solve the second-order asymptotics to show that the mobility coefficient ε(5/6)(L/κ) ensures homogeneous boundary conditions for the first-order outer temperature and concentration, and that the first-order interfacial velocity error is zero—allowing second-order convergence.
(d). Second order
Fluid problem—At second order, the fluid equations are sourced by the first-order errors,
Solid problem—The solid velocity is now non-zero from interior pressure and forces,
Boundary problem—The phase-field equation now has a more complex inhomogeneous term:
We again apply a solvability condition. The odd terms drop out, and integration shows and . The interfacial velocity term thus vanishes, giving a constraint between first-order concentration and temperature:
An explicit formula for ϕ2 (using variation of parameters) is non-trivial but it decays exponentially to zero in either direction. The temperature equation is then integrated. If initially , then matching prevents linear asymptotic behaviour of T2, implying v1 = 0,
The concentration equation is similarly integrated. The inhomogeneity is constant in ξ, and explicitly solvable. Using previous solutions and , we find C2,
The divergence equation implies the second-order normal velocity is now no longer zero,
The second-order tangential velocity can then be solved using variation of parameters
where c is a constant of integration that cancels the linear part of the solution into the fluid. The normal momentum equation can then be integrated to determine p1. Matching requires no constant term in the limiting behaviour of the pressure into the fluid,
The second-order asymptotic analysis shows that calibrating the mobility and damping parameters ensures homogeneous boundary conditions of the first-order outer solutions at the interface. Combined with homogeneous external boundary conditions and homogeneous linear evolution equations at first order, this implies that if the outer solutions are initialized correct to , then the fields and interfacial velocity will evolve accurate to over time. In reality, the chaotic nature of many fluid dynamics problems prevents convergence beyond the Lyapunov timescale of the flow, but at each point in time the system behaves correctly to within second-order accuracy.
4. Numerical validation of the model
We now validate the asymptotic arguments of §3 in two benchmark problems. In each problem, we calculate a numerical reference solution corresponding to the ‘sharp interface’ equations of §2a. We then show the optimal phase-field equations of §2b achieve convergence of to these reference solutions. Both the reference and phase-field problems are simulated using the flexible and efficient spectral code Dedalus [62].3 Dedalus is a general-purpose code that takes PDEs in plain text and automatically discretizes them using spectral series (including Fourier series, Chebyshev polynomials and other orthogonal polynomials). Linear terms in the equations are converted into sparse banded matrices and nonlinear terms are treated pseudospectrally. Included implicit–explicit timesteppers integrate the linear terms implicitly, and the nonlinear terms explicitly. Dedalus is written in the Python programming language to aid rapid development, and uses compiled libraries (including BLAS, LAPACK and MPI) to perform efficient parallelized simulations at scale.
(a). Melting and dissolution at a stagnation point
The first benchmark problem examines warm liquid with dissolved solute flowing towards a melting interface at a stagnation point (similar to §5 of [63] and 5.6 of [61]). We compare the sharp interface and phase-field approximations to this problem, as illustrated in figure 2. The symmetries of the system allow us to significantly simplify equation (2.1), revealing a steady travelling wave similarity solution for the moving boundary and phase-field formulations. We do this by transforming to a frame moving leftward at the steady interface melting speed −v. We solve the system as a nonlinear boundary value problem in Dedalus.
Sharp interface model—We solve a diffusion equation for the solid temperature T−, advection–diffusion equations for the liquid temperature T+ and solute concentration C and a nonlinear third-order equation for the horizontal fluid velocity u,
4.2 |
Phase-field model—The phase field instead implicitly models the interfacial boundary conditions through various equation terms, which reduce equation (2.4) to
4.3 |
We now only require the Dirichlet outer boundary conditions of before to solve the problem
4.4 |
and
4.5 |
Requiring ϕ(0) = 1/2 is necessary to fix the problem in the moving frame to determine v.
Results—We solve each problem as a nonlinear boundary value problem in Dedalus. We discretize each variable on the solid (−1 < x < 0) and fluid (0 < x < 1) domains using Chebyshev polynomials. Newton–Kantorovich iteration then converges on a solution with a tolerance of 10−12 (see [64, appendix C]). We reproduce example phase field and reference snapshots in figure 2 for ε = 0.05, κ = μ = ν = 1/10 and D = m = L = γ = 1, using 64 grid points for each subdomain. We set δ = 2 × 10−5 to regularize the solute equation within the solid. The disagreement (though small) is visible by eye for the temperature, concentration and normal velocity.
We then perform a quantitative analysis of convergence in figure 3. We test seven logarithmically spaced values of ε from 10−1 to 10−3, for the previous control parameters, and using 256 grid points in each subdomain. We quantify the difference between the reference and phase-field solutions with the L1 and L∞ error norms of each variable (u, T+, T−, C, v) as a function of ε. We find clear convergence in the L1 error norm of each field variable, as well as for the L∞ error norm of the u, C and v variables. The L1 convergence demonstrates the quantitative accuracy of the phase-field model. The reason for the apparently restricted L∞ convergence of the temperature fields is the jump in temperature gradient of the reference solution at the interface. The smooth phase-field model cannot follow this kink leading to an disagreement that is localized to the boundary. Tangential velocities also suffer from this reduced continuity in general.
(b). Double diffusive melting
In our second benchmark, we examine buoyancy driven flow of warm liquid with dissolved solute underneath a melting solid layer. This problem develops non-trivial geometries from the evolution of the flow. To simulate the reference formulation in Dedalus, we use an evolving coordinate system that maps the fluid and solid regions to a stationary rectangular domain. This transformation allows an efficient spectral discretization using Dedalus, and is used in similar spectral solvers [65]. We repeat this remapping for the phase-field formulation as it concentrates resolution near the ϕ = 1/2 level set. This allows us to efficiently and accurately simulate much smaller ε. By comparing the phase-field simulation to the reference problem as we decrease ε, we demonstrate second-order accuracy of the model.
Sharp differential equations—The full domain exists between 0 < z < 2 and 0 < x < 4. It is partitioned by the interface at height z = h(t, x). Above the interface, we solve the heat equation for the solid temperature field T− with diffusivity κ. Below the interface, we solve incompressible Boussinesq hydrodynamics (using a first-order formulation in terms of velocity u, vorticity q and augmented pressure ), with advection and diffusion of temperature T+ and solute concentration C,
4.6 |
where ν, κ and μ are the momentum, temperature and solute diffusivity. This first-order reformulation is required in the Dedalus solver, and has the added benefit of simplifying the mathematical details of the coordinate transformation. We set the buoyancy parameter B = 1.
Boundary conditions—At the top, we specify conservative temperature boundary conditions. At the bottom, we specify no-slip boundaries with no-flux temperature and solute conditions. The zeroth mode for the vertical velocity is replaced by a choice of pressure gauge,
At the interface z = h(t, x), we have a Gibbs–Thomson boundary condition, matching temperature boundary conditions, energy and solute conservation boundary conditions and zero velocity boundary conditions required for mass conservation,
4.7 |
Initial conditions—We initialize the problem with h(0, x) = 1 and zero velocity and pressure, and a decreasing concentration profile with height. We apply a large perturbation to the linearly decreasing temperature field to initiate convection,
and
Phase-field equations—The phase-field equations are a similar reformulation of equation (2.4):
4.8 |
We use the optimal damping prescription β = 1.51044385 [61] and choose δ = 10−4. We specify the same insulating no-slip boundary conditions at z = 0 and z = 2. The boundary conditions at z = h(t, x) require continuity of each field and its derivatives. We initialize using the same initial conditions as for the remapped simulation, plus the initial conditions for the phase field
Remapped coordinates—To solve the melting problem, we remap our evolving domain in Cartesian space to a fixed rectangular domain with the new coordinates τ, ξ and ζ±,
for which we plot equally spaced level set contours in figure 4. The differential geometry of the new coordinates is presented in appendix B. We solve the phase-field equations on the remapped domains of the reference problem to concentrate resolution near the phase-field interface and speed up comparison of quantities between simulations.
Model and numerical parameters—We simulate these equations using model parameter values from table 1. We simulate the reference equations using 64 Chebyshev polynomials in the vertical direction and 128 Fourier modes in the periodic horizontal direction. After determining the reference solution, we discretize the phase-field equations on the same evolving domain of the reference simulation for several values of ε. To interpolate the reference geometries into the phase-field simulations between the saved time and grid points, we use third-order interpolating splines. The phase-field simulations discretize the vertical ζ basis using three compound Chebyshev bases , with resolutions of 32, 64 and 32 modes, respectively. This greatly reduces the simulation cost. We use a time step size of Δt = 10−3, 5 × 10−4, 2.5 × 10−4, 2 × 10−4, 5 × 10−5 for decreasing choice of ε, and integrate in time using a second-order multistep semi-implicit backwards difference formula (SBDF2).
Table 1.
ν | κ | μ | γ | L | m | N | ε |
---|---|---|---|---|---|---|---|
10−2 | 10−2 | 10−2 | 10−2 | 1 | 0.2 | 0 |
Results—A time series of the temperature and concentration fields of the reference solution is given in figure 5, which illustrates a rising buoyant plume from the initial temperature anomaly in the fluid. The warm solute-laden liquid melts the interface in the middle more rapidly than the ambient liquid at the sides, causing a trough to develop.
In figure 6, we plot several error metrics of the phase-field simulations. In the first two columns, we plot the spatial error normalized by the L1 error for the liquid temperature T+, solute concentration C, Cartesian velocity components ux and uz, and true pressure . We plot these normalized spatial errors for the smoothest (ε = 10−2) and sharpest () phase-field simulations at the final time t = 10. These plots reveal a consistent spatial error profile between simulations. To understand the amplitude of the spatial error, we plot the L1 and L∞ error norms of each variable as a function of ε in the third and fourth columns of figure 6. We see clear second-order convergence of all variables in L1 norm. We note that the structure of the boundary layer of the tangential velocity and temperature affects the L∞ norm. The phase-field model causes a kink in the temperature and tangential velocity near the interface, which leads to an O(ε) error of these variables in the interfacial region. However, this error is localized to the boundary, and does not propagate outward. (This trend is difficult to notice in the temperature plot as the error within the fluid still dominates the boundary error for the moderate choices of ε chosen.) We therefore achieve second-order convergence in the fluid and solid regions due to our optimal calibration of the phase-field model parameters.
5. Conclusion
In this paper, we provide a general framework for analysing the convergence of phase-field models. We use this procedure to develop a second-order phase-field model of melting and dissolution in multi-component flows. This is a concrete advancement that showcases second-order accurate approximations of many common boundary conditions; no-slip Dirichlet boundaries, Neumann boundaries, Robin boundaries and Stefan boundaries. We also verify these prescriptions in two thorough benchmark problems with accurate reference solutions. By developing a framework to validate this model, we now possess the machinery required to create second-order accurate extensions to more general thermodynamic properties. We can also consider yet higher-order analyses of this and other models. An automated approach of Richardson sequence extrapolation could also be considered to generate higher-order accurate models, as was done by the authors for the volume-penalty method [61]. To be clear, phase-field models are not necessarily the most appropriate choice for any problem. Remapping was also shown to be an effective strategy for sufficiently simple geometries in §4b. However, our second-order phase-field model is simple to implement, is more accurate than standard phase-field models, and is applicable in much more challenging geometries than remapping approaches.
Supplementary Material
Acknowledgements
We acknowledge PRACE for awarding us access to Marconi HPC at CINECA, Italy, and The University of Sydney for access to the Artemis HPC.
Appendix A. Signed-distance coordinates
The signed distance σ of the point x is the minimum distance to the surface. Labelling surface points p and unit normals with orthogonal surface coordinates s, we have
This gives a tangent vector basis ti, dual basis and orthonormal tangent basis :
These give the surface gradient , area measure dA = |t1||t2| ds1 ds2 and surface divergence,
The normal is everywhere equal to the gradient of the signed distance, and therefore its gradient is symmetric and diagonalizable. The eigenvectors are the principal directions of curvature (which align with orthogonal surface coordinates), and the eigenvalues are the principal curvatures κi,
We express the gradient using the orthonormal frame and the scale tensor J
The determinant |J| relates mean curvature , Gaussian curvature |K | and volume measure dV,
We define the adjugate tensors and ,
We also define the cross product with the unit normal, which admits simple identities,
We next find the gradient of the basis vectors, and define Ricci rotation coefficients,
These relations allow us to calculate all relevant vector calculus operators,
Rescaling—Rescaling the normal coordinate by ξ = σ/ε gives the following operators:
Appendix B. Differential geometry of remapped coordinates
We solve §4b by remapping to a fixed rectangular domain with coordinates τ, ξ and ζ±,
where η is the interface height in the new coordinates. We now develop the differential geometry required to write equations (2.1) and (2.4) in the new coordinates. We give explicit formulae for the ζ+ remapping. The ζ− remapping is analogous and straightforward to derive. We use a tangent vector basis derived from the Jacobian of our transformation and its inverse ,
The tangent vector components are the rows of the spatial component of the inverse Jacobian . We use Einstein notation to sum over the spatial indices i = 1, 2. These tangent vectors induce dual vectors which satisfy , with components from the column vectors of the spatial component of the Jacobian. We record the length of the vectors using the metric, with co/contravariant components gij = ei · ej, gij = Ωi · Ωj,
These give ‘Jacobian’ determinants of . The completely antisymmetric tensor can be transformed from Cartesian coordinates,
where [ij] is the antisymmetric symbol. We project the gradient to the tangent basis with the covariant derivative . We measure spatial variation of the basis with the connection coefficients . For the tangent basis, the connection coefficients take a particularly simple and symmetric form
We note the connection coefficients for the dual vectors are related to those for the tangent basis by . The partial time derivative ∂t changes as defined in zeroth row of the Jacobian, and the basis vectors also evolve in time,
These geometric quantities allow us to calculate all the relevant vector calculus quantities,
The normal vector at the interface is proportional to the ζ dual vector. This gives us the normal gradient and normal velocity at the interface,
We finally write the interfacial curvature as . This completes the relations used to simulate the sharp interface and phase-field equations in remapped geometries.
Footnotes
Shortly before submission, we became aware of the work [58]. In it, Subhedar et al. perform second-order analysis of a phase-field model combining melting and advection. Our work is more general as we also account for dissolution, give a more comprehensive analytical treatment, and use more challenging computational benchmarks.
We also provide a Mathematica script that automates each step of this analysis at github.com/ericwhester/phase-field-code.
The full simulation code, saved data and analysis scripts are freely available at github.com/ericwhester/phase-field-code.
Data accessibility
The Dedalus code is free and open-source and available at http://dedalus-project.org/. All simulation code, data and analysis scripts and plots are available at https://github.com/ericwhester/phase-field-code. The Mathematica asymptotics script is also available at that link.
Authors' contributions
E.W.H. project conception and design, writing, mathematics (asymptotics and remapping), simulation code, data analysis and visualization; L.-A.C. project design and conception; B.F. project design and conception, phase-field expertise; K.J.B. domain remapping simulation expertise, Dedalus code; G.M.V. mathematics of signed distance coordinates, Dedalus code. All authors provided critical revision of the manuscript, approve the final version of the paper and agree to be held accountable for the work.
Competing interests
We declare that we have no competing interests.
Funding
E.W.H. acknowledges support from The University of Sydney Phillip Hofflin International Research Travel Scholarship, Postgraduate Research Support Scheme and William and Catherine McIlrath Scholarship. L.-A.C. acknowledges support from the European Union’s Horizon 2020 research and innovation programme under Marie Skłodowska-Curie grant agreement no. MIMOP 793450.
Reference
- 1.Epstein M, Cheung FB. 1983. Complex freezing-melting interfaces in fluid flow. Annu. Rev. Fluid Mech. 15, 293–319. ( 10.1146/annurev.fl.15.010183.001453) [DOI] [Google Scholar]
- 2.Glicksman ME, Coriell SR, McFadden GB. 1986. Interaction of flows with the crystal–melt interface. Annu. Rev. Fluid Mech. 18, 307–335. ( 10.1146/annurev.fl.18.010186.001515) [DOI] [Google Scholar]
- 3.Cahn JW, Hilliard JE. 1958. Free energy of a nonuniform system. I. Interfacial free energy. J. Chem. Phys. 28, 258–267. ( 10.1063/1.1744102) [DOI] [Google Scholar]
- 4.Huppert HE. 2002. Geological fluid mechanics. In Perspectives in fluid dynamics: a collective introduction to current research (ed. GK Batchelor). Cambridge, UK: Cambridge University Press.
- 5.Turner JS. 1985. Multicomponent convection. Annu. Rev. Fluid Mech. 17, 11–44. ( 10.1146/annurev.fl.17.010185.000303) [DOI] [Google Scholar]
- 6.Knobloch E, Krechetnikov R. 2015. Problems on time-varying domains: formulation, dynamics, and challenges. Acta Appl. Math. 137, 123–157. ( 10.1007/s10440-014-9993-x) [DOI] [Google Scholar]
- 7.Worster MG. 2002. Solidification of fluids. In Perspectives in fluid dynamics: a collective introduction to current research (ed. GK Batchelor). Cambridge, UK: Cambridge University Press.
- 8.Donea J, Huerta A, Ponthot JP, Rodríguez-Ferran A. 2004. Arbitrary Lagrangian–Eulerian methods. In Encyclopedia of computational mechanics. Atlanta, GA: American Cancer Society.
- 9.Hadžić M, Shkoller S. 2017. Well-posedness for the classical Stefan problem and the zero surface tension limit. Arch. Ration. Mech. Anal. 223, 213–264. ( 10.1007/s00205-016-1041-8) [DOI] [Google Scholar]
- 10.Gibbs JW. 1878. On the equilibrium of heterogeneous substances. Am. J. Sci. s3-16, 441–458. ( 10.2475/ajs.s3-16.96.441) [DOI] [Google Scholar]
- 11.van der Waals JD. 1979. The thermodynamic theory of capillarity under the hypothesis of a continuous variation of density. J. Stat. Phys. 20, 200–244. ( 10.1007/BF01011514) [DOI] [Google Scholar]
- 12.Stefan J. 1891. Ueber Die Theorie Der Eisbildung, Insbesondere Über Die Eisbildung Im Polarmeere. Annalen der Physik 278, 269–286. ( 10.1002/andp.18912780206) [DOI] [Google Scholar]
- 13.Boettinger WJ, Warren JA, Beckermann C, Karma A. 2002. Phase-field simulation of solidification. Annu. Rev. Mater. Res. 32, 163–194. ( 10.1146/annurev.matsci.32.101901.155803) [DOI] [Google Scholar]
- 14.Steinbach I. 2009. Phase-field models in materials science. Modell. Simul. Mater. Sci. Eng. 17, 073001 ( 10.1088/0965-0393/17/7/073001) [DOI] [Google Scholar]
- 15.Voller VR, Swaminathan CR, Thomas BG. 1990. Fixed grid techniques for phase change problems: a review. Int. J. Numer. Methods Eng. 30, 875–898. ( 10.1002/nme.1620300419) [DOI] [Google Scholar]
- 16.Ulvrová M, Labrosse S, Coltice N, Råback P, Tackley PJ. 2012. Numerical modelling of convection interacting with a melting and solidification front: application to the thermal evolution of the basal magma ocean. Phys. Earth Planet. Inter. 206–207, 51–66. ( 10.1016/j.pepi.2012.06.008) [DOI] [Google Scholar]
- 17.Osher S, Fedkiw RP. 2001. Level set methods: an overview and some recent results. J. Comput. Phys. 169, 463–502. ( 10.1006/jcph.2000.6636) [DOI] [Google Scholar]
- 18.Chen S, Merriman B, Osher S, Smereka P. 1997. A simple level set method for solving Stefan problems. J. Comput. Phys. 135, 8–29. ( 10.1006/jcph.1997.5721) [DOI] [Google Scholar]
- 19.Li X, Lowengrub J, Ratz A, Voigt A. 2009. Solving PDEs in complex geometries: a diffuse domain approach. Commun. Math. Sci. 7, 81–107. ( 10.4310/CMS.2009.v7.n1.a4) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Aland S, Lowengrub J, Voigt A. 2010. Two-phase flow in complex geometries: a diffuse domain approach. Comput. Model. Eng. Sci.: CMES 57, 77–106. [PMC free article] [PubMed] [Google Scholar]
- 21.Mac Huang J, Shelley MJ, Stein DB. 2020 A stable and accurate scheme for solving the Stefan problem coupled with natural convection using the immersed boundary smooth extension method. (http://arxiv.org/abs/2006.04736. [physics])
- 22.Fix GJ. 1982. Phase field methods for free boundary problems.
- 23.Langer JS. 1986 doi: 10.1142/9789814415309_0005. Models of pattern formation in first-order phase transitions. In Directions in condensed matter physics (eds G Grinstein, G Mazenko), pp. 165–186. Singapore: World Scientific. ( ) [DOI]
- 24.Hohenberg PC, Halperin BI. 1977. Theory of dynamic critical phenomena. Rev. Mod. Phys. 49, 435–479. ( 10.1103/RevModPhys.49.435) [DOI] [Google Scholar]
- 25.Caginalp G. 1989. Stefan and Hele-Shaw type models as asymptotic limits of the phase-field equations. Phys. Rev. A 39, 5887–5896. ( 10.1103/PhysRevA.39.5887) [DOI] [PubMed] [Google Scholar]
- 26.Caginalp G, Chen X. 1998. Convergence of the phase field model to its sharp interface limits. Eur. J. Appl. Math. 9, 417–445. ( 10.1017/S0956792598003520) [DOI] [Google Scholar]
- 27.Wheeler AA, Boettinger WJ, McFadden GB. 1992. Phase-field model for isothermal phase transitions in binary alloys. Phys. Rev. A 45, 7424–7439. ( 10.1103/PhysRevA.45.7424) [DOI] [PubMed] [Google Scholar]
- 28.Bi Z, Sekerka RF. 1998. Phase field model of solidification of a binary alloy. Physica A 261, 12 ( 10.1016/S0378-4371(98)00364-1) [DOI] [Google Scholar]
- 29.Karma A. 2001. Phase-field formulation for quantitative modeling of alloy solidification. Phys. Rev. Lett. 87, 115701 ( 10.1103/physrevlett.87.115701) [DOI] [PubMed] [Google Scholar]
- 30.Ramirez JC, Beckermann C, Karma A, Diepers HJ. 2004. Phase-field modeling of binary alloy solidification with coupled heat and solute diffusion. Phys. Rev. E 69, 051607 ( 10.1103/PhysRevE.69.051607) [DOI] [PubMed] [Google Scholar]
- 31.Beckermann C, Diepers HJ, Steinbach I, Karma A, Tong X. 1999. Modeling melt convection in phase-field simulations of solidification. J. Comput. Phys. 154, 468–496. ( 10.1006/jcph.1999.6323) [DOI] [Google Scholar]
- 32.Anderson DM, McFadden GB, Wheeler AA. 2000. A phase-field model of solidification with convection. Physica D 135, 175–194. ( 10.1016/S0167-2789(99)00109-8) [DOI] [Google Scholar]
- 33.Mokbel D, Abels H, Aland S. 2018. A phase-field model for fluid–structure interaction. J. Comput. Phys. 372, 823–840. ( 10.1016/j.jcp.2018.06.063) [DOI] [Google Scholar]
- 34.Penrose O, Fife PC. 1990. Thermodynamically consistent models of phase-field type for the kinetic of phase transitions. Physica D 43, 44–62. ( 10.1016/0167-2789(90)90015-H) [DOI] [Google Scholar]
- 35.Wang SL, Sekerka RF, Wheeler AA, Murray BT, Coriell SR, Braun RJ, McFadden GB. 1993. Thermodynamically-consistent phase-field models for solidification. Physica D 69, 189–200. ( 10.1016/0167-2789(93)90189-8) [DOI] [Google Scholar]
- 36.McFadden GB, Wheeler AA, Anderson DM. 2000. Thin interface asymptotics for an energy/entropy approach to phase-field models with unequal conductivities. Physica D 144, 154–168. ( 10.1016/S0167-2789(00)00064-6) [DOI] [Google Scholar]
- 37.Ohno M, Takaki T, Shibuta Y. 2016. Variational formulation and numerical accuracy of a quantitative phase-field model for binary alloy solidification with two-sided diffusion. Phys. Rev. E 93, 012802 ( 10.1103/PhysRevE.93.012802) [DOI] [PubMed] [Google Scholar]
- 38.Bollada P, Jimack P, Mullis A. 2017. Bracket formalism applied to phase field models of alloy solidification. Comput. Mater. Sci. 126, 426–437. ( 10.1016/j.commatsci.2016.09.036) [DOI] [Google Scholar]
- 39.Caginalp G. 1986. An analysis of a phase field model of a free boundary. Arch. Ration. Mech. Anal. 92, 205–245. ( 10.1007/BF00254827) [DOI] [Google Scholar]
- 40.Caginalp G, Fife P. 1988. Dynamics of layered interfaces arising from phase boundaries. SIAM J. Appl. Math. 48, 506–518. ( 10.1137/0148029) [DOI] [Google Scholar]
- 41.Lin JT. 1988. The numerical analysis of a phase field model in moving boundary problems. SIAM J. Numer. Anal. 25, 1015–1031. ( 10.1137/0725058) [DOI] [Google Scholar]
- 42.Wheeler AA, Murray BT, Schaefer RJ. 1993. Computation of dendrites using a phase field model. Physica D 66, 243–262. ( 10.1016/0167-2789(93)90242-S) [DOI] [Google Scholar]
- 43.Fabbri M, Voller VR. 1997. The phase-field method in the sharp-interface limit: a comparison between model potentials. J. Comput. Phys. 130, 256–265. ( 10.1006/jcph.1996.5585) [DOI] [Google Scholar]
- 44.Tong X, Beckermann C, Karma A, Li Q. 2001. Phase-field simulations of dendritic crystal growth in a forced flow. Phys. Rev. E 63, 061601 ( 10.1103/PhysRevE.63.061601) [DOI] [PubMed] [Google Scholar]
- 45.Lu Y, Beckermann C, Ramirez J. 2005. Three-dimensional phase-field simulations of the effect of convection on free dendritic growth. J. Cryst. Growth 280, 320–334. ( 10.1016/j.jcrysgro.2005.03.063) [DOI] [Google Scholar]
- 46.Jokisaari AM, Voorhees PW, Guyer JE, Warren J, Heinonen OG. 2017. Benchmark problems for numerical implementations of phase field models. Comput. Mater. Sci. 126, 139–151. ( 10.1016/j.commatsci.2016.09.022) [DOI] [Google Scholar]
- 47.Favier B, Purseed J, Duchemin L. 2019. Rayleigh–Bénard convection with a melting boundary. J. Fluid Mech. 858, 437–473. ( 10.1017/jfm.2018.773) [DOI] [Google Scholar]
- 48.Purseed J, Favier B, Duchemin L, Hester EW. 2020. Bistability in Rayleigh–Benard convection with a melting boundary. Phys. Rev. Fluids 5, 023501 ( 10.1103/PhysRevFluids.5.023501) [DOI] [Google Scholar]
- 49.Couston LA, Hester E, Favier B, Taylor JR, Holland PR, Jenkins A. 2020 Topography generation by melting and freezing in a turbulent shear flow. (http://arxiv.org/abs/2004.09879. [physics])
- 50.Magaletti F, Picano F, Chinappi M, Marino L, Casciola CM. 2013. The sharp-interface limit of the Cahn–Hilliard/Navier–Stokes model for binary fluids. J. Fluid Mech. 714, 95–126. ( 10.1017/jfm.2012.461) [DOI] [Google Scholar]
- 51.Soligo G, Roccon A, Soldati A. 2019. Breakage, coalescence and size distribution of surfactant-laden droplets in turbulent flow. J. Fluid Mech. 881, 244–282. ( 10.1017/jfm.2019.772) [DOI] [Google Scholar]
- 52.Karma A, Rappel WJ. 1996. Phase-field method for computationally efficient modeling of solidification with arbitrary interface kinetics. Phys. Rev. E 53, R3017–R3020. ( 10.1103/PhysRevE.53.R3017) [DOI] [PubMed] [Google Scholar]
- 53.Karma A, Rappel WJ. 1998. Quantitative phase-field modeling of dendritic growth in two and three dimensions. Phys. Rev. E 57, 4323–4349. ( 10.1103/PhysRevE.57.4323) [DOI] [Google Scholar]
- 54.Almgren RF. 1999. Second-order phase field asymptotics for unequal conductivities. SIAM J. Appl. Math. 59, 2086–2107. ( 10.1137/S0036139997330027) [DOI] [Google Scholar]
- 55.Garcke H, Stinner B. 2006. Second order phase field asymptotics for multi-component systems. Interfaces Free Boundaries 8, 131–157. ( 10.4171/IFB/138) [DOI] [Google Scholar]
- 56.Ohno M, Matsuura K. 2009. Quantitative phase-field modeling for dilute alloy solidification involving diffusion in the solid. Phys. Rev. E 79, 031603 ( 10.1103/PhysRevE.79.031603) [DOI] [PubMed] [Google Scholar]
- 57.Fife PC. 1988. Dynamics of internal layers and diffusive interfaces. Number 53 in CBMS-NSF Regional Conference Series in Applied Mathematics. Philadelphia, PA: Society for Industrial and Applied Mathematics.
- 58.Subhedar A, Galenko PK, Varnik F. 2020. Diffuse interface models of solidification with convection: the choice of a finite interface thickness. Eur. Phys. J. Spec. Top. 229, 447–452. ( 10.1140/epjst/e2019-900099-5) [DOI] [Google Scholar]
- 59.Chen X, Caginalp G, Eck C. 2006. A rapidly converging phase field model. Discrete Continuous Dyn. Syst. 15, 1017–1034. ( 10.3934/dcds.2006.15.1017) [DOI] [Google Scholar]
- 60.Kockelkoren J, Levine H, Rappel WJ. 2003. Computational approach for modeling intra- and extracellular dynamics. Phys. Rev. E 68, 037702 ( 10.1103/PhysRevE.68.037702) [DOI] [PubMed] [Google Scholar]
- 61.Hester EW, Vasil GM, Burns KJ. 2019 Improving convergence of volume penalized fluid-solid interactions. (http://arxiv.org/abs/1903.11914. [math])
- 62.Burns KJ, Vasil GM, Oishi JS, Lecoanet D, Brown BP. 2020. Dedalus: a flexible framework for numerical simulations with spectral methods. Phys. Rev. Res. 2, 023068 ( 10.1103/PhysRevResearch.2.023068) [DOI] [Google Scholar]
- 63.Le Bars M, Worster MG. 2006. Interfacial conditions between a pure fluid and a porous medium: implications for binary alloy solidification. J. Fluid Mech. 550, 149–173. ( 10.1017/S0022112005007998) [DOI] [Google Scholar]
- 64.Boyd JP. 2001. Chebyshev and Fourier spectral methods, 2nd revised edn New York, NY: Dover Publications. [Google Scholar]
- 65.Subich CJ, Lamb KG, Stastna M. 2013. Simulation of the Navier–Stokes equations in three dimensions with a spectral collocation method. Int. J. Numer. Methods Fluids 73, 103–129. ( 10.1002/fld.3788) [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The Dedalus code is free and open-source and available at http://dedalus-project.org/. All simulation code, data and analysis scripts and plots are available at https://github.com/ericwhester/phase-field-code. The Mathematica asymptotics script is also available at that link.