Skip to content

Governing equations

Dimensional system

The velocity field u\boldsymbol{u} is determined by the Navier-Stokes equation subject to the Oberbeck-Boussinesq (OB) approximation such that density changes are related linearly to temperature changes and are negligible everywhere except the buoyancy term:

tu+(uu)=ρ01p+gαTe^g+ν2u. \partial _t \boldsymbol{u} + \boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = -\rho_0^{-1} \boldsymbol{\nabla} p + g\alpha T \mathbf{\hat{e}_g} + \nu \nabla^2 \boldsymbol{u} .

The pressure pp is determined to make the velocity field divergence-free (u=0\boldsymbol{\nabla}\cdot\boldsymbol{u}=0), consistent with the OB approximation. The nonlinear term (uu)=j(ujui)ei\boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = \partial_j(u_j u_i) \mathbf{e_i} is computed in conservative form to improve energy conservation properties. The gravitational axis e^g\mathbf{\hat{e}_g} can be specified in the input file bou.in using the variable gAxis. The temperature field TT satisfies an advection-diffusion equation:

tT+(uT)=κT2T. \partial_t T + \boldsymbol{\nabla} \cdot (\boldsymbol{u} T) = \kappa_T \nabla^2 T .

Parameters featured in the above equations are defined in the table below.

Parameter Definition
ρ0\rho_0 (Constant) Mean fluid density
gg Gravitational acceleration
α\alpha Thermal expansion coefficient
ν\nu Kinematic viscosity / momentum diffusivity
κT\kappa_T Thermal diffusivity

Dimensionless system

AFiD solves these equations in dimensionless form. This dimensionless system is obtained by scaling the variables by the following:

[x]=H,[T]=ΔT,[u]=UT=gαHΔT,[t]=H/UT,[p]=ρ0UT2. [\boldsymbol{x}] = H, \quad [T] = \Delta T, \quad [\boldsymbol{u}] = U_T = \sqrt{g\alpha H\Delta T}, \quad [t] = H/U_T, \quad [p] = \rho_0 U_T^2 .

Here, HH is the distance between the two walls of the domain, ΔT\Delta T is the temperature difference between the walls, and UTU_T is known as the free-fall velocity scale, obtained by assuming a leading-order balance between the buoyancy and inertial terms.

After rescaling, the equations read

tu+(uu)=p+Te^g+PrRaT2u, \partial_t \boldsymbol{u} + \boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = - \boldsymbol{\nabla} p + T \mathbf{\hat{e}_g} + \sqrt{\frac{Pr}{Ra_T}}\nabla^2 \boldsymbol{u} ,
tT+(uT)=1RaTPr2T. \partial_t T + \boldsymbol{\nabla} \cdot (\boldsymbol{u} T) = \frac{1}{\sqrt{Ra_T Pr}} \nabla^2 T .

The dimensionless velocity and temperature fields are therefore solely determined by the Rayleigh number RaTRa_T and the Prandtl number PrPr, which act as the control parameters of the system and are defined as

RaT=gαH3ΔTνκT,Pr=νκT. Ra_T = \frac{g\alpha H^3 \Delta T}{\nu \kappa_T}, \quad Pr = \frac{\nu}{\kappa_T} .

These parameters are prescribed by the user in the input file bou.in as the variables RAYT and PRAT. AFiD can also treat TT as a passive scalar if the variable active_T is set to 0 in the input file. In this case, the equations read the same as above, except that the buoyancy term Te^gT\mathbf{\hat{e}_g} is set to zero.

Salinity as a second scalar

AFiD-MuRPhFi also allows for the evolution of a second scalar field on a grid of finer resolution. This option can be enabled by setting MULTIRES and FLAGSAL equal to 1 in the input file. Using the refined grid is useful for scalars with low diffusivity, such as salinity, so we proceed by labelling this scalar CC for concentration. The second scalar satisfies an advection-diffusion equation, but with a different diffusivity κC\kappa_C:

tC+(uC)=κC2C. \partial_t C + \boldsymbol{\nabla} \cdot (\boldsymbol{u} C) = \kappa_C \nabla^2 C .

If CC is not a passive scalar, then it will also contribute towards the buoyancy of the system. For temperature and salinity, we can assume a linear equation of state such that the (dimensional) buoyancy term becomes g(αTβC)e^gg(\alpha T - \beta C)\mathbf{\hat{e}_g}, where β\beta is the haline contraction coefficient.

We now have two choices for the velocity scale used to non-dimensionalise the system, depending on whether the dominant contribution to the buoyancy is from temperature or salinity. The relevant scale can be prescribed in the input file by the variable FFscaleS.

If salinity is the dominant scalar in the buoyancy, we set FFscaleS = 1 and take the free-fall scale based on CC, that is [u]=UC=gβHΔC[\boldsymbol{u}] = U_C = \sqrt{g\beta H \Delta C}. Analogous to the case above, ΔC\Delta C is the difference in salinity between the walls. The dimensionless equations now read

tu+(uu)=p+(RρTC)e^g+ScRaC2u, \partial_t \boldsymbol{u} + \boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = - \boldsymbol{\nabla} p + (R_\rho T - C) \mathbf{\hat{e}_g} + \sqrt{\frac{Sc}{Ra_C}}\nabla^2 \boldsymbol{u} ,
tT+(uT)=1τRaCSc2T, \partial_t T + \boldsymbol{\nabla} \cdot (\boldsymbol{u} T) = \frac{1}{\tau\sqrt{Ra_C Sc}} \nabla^2 T ,
tC+(uC)=1RaCSc2C. \partial_t C + \boldsymbol{\nabla} \cdot (\boldsymbol{u} C) = \frac{1}{\sqrt{Ra_C Sc}} \nabla^2 C .

The solutal Rayleigh number RaCRa_C and Schmidt number ScSc can be defined in the input file through the variables RAYS and PRAS and are defined similarly to the thermal Rayleigh number and Prandtl number as

RaC=gβH3ΔCνκC,Sc=νκC. Ra_C = \frac{g\beta H^3 \Delta C}{\nu \kappa_C}, \quad Sc = \frac{\nu}{\kappa_C} .

Two new dimensionless parameters also appear in the above equations: the density ratio RρR_\rho and the diffusivity ratio τ\tau. These parameters are defined as follows and are uniquely determined by prescribing (RaTRa_T, PrPr, RaCRa_C, ScSc).

Rρ=αΔTβΔC=RaTScRaCPr,τ=κCκT=PrSc. R_\rho = \frac{\alpha \Delta T}{\beta \Delta C} = \frac{Ra_T Sc}{Ra_C Pr}, \quad \tau = \frac{\kappa_C}{\kappa_T} = \frac{Pr}{Sc} .

If temperature is the dominant scalar, we set FFscaleS = 0 and take the free-fall scale as UTU_T. In this case, the dimensionless equations take the form

tu+(uu)=p+(TRρ1C)e^g+PrRaT2u, \partial_t \boldsymbol{u} + \boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = - \boldsymbol{\nabla} p + (T - {R_\rho}^{-1} C) \mathbf{\hat{e}_g} + \sqrt{\frac{Pr}{Ra_T}}\nabla^2 \boldsymbol{u} ,
tT+(uT)=1RaTPr2T, \partial_t T + \boldsymbol{\nabla} \cdot (\boldsymbol{u} T) = \frac{1}{\sqrt{Ra_T Pr}} \nabla^2 T ,
tC+(uC)=τRaTPr2C. \partial_t C + \boldsymbol{\nabla} \cdot (\boldsymbol{u} C) = \frac{\tau}{\sqrt{Ra_T Pr}} \nabla^2 C .

As with the temperature field, we can treat CC as a passive scalar by setting active_S = 0 in the input file.

Phase-field method

The latest addition to AFiD-MuRPhFi is the implementation of a phase-field method to simulate melting or dissolving solid objects immersed in a fluid flow. This method evolves an indicator function ϕ\phi which takes the values 0/1 in the fluid/solid, approximating the fluid-solid interface by a finite, diffuse region. We follow the formulation of Hester et al (2020), appropriately scaled to match the dimensionless system detailed above.

To start with, we consider the case with no salinity effects for simplicity. The (dimensionless) equations for the evolution of the velocity and temperature gain additional term due to volume penalisation in the solid and latent heat respectively, and now take the form

tu+(uu)=p+Te^g+PrRaT(2uϕuη), \partial_t \boldsymbol{u} + \boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = - \boldsymbol{\nabla} p + T \mathbf{\hat{e}_g} + \sqrt{\frac{Pr}{Ra_T}}\left(\nabla^2 \boldsymbol{u} - \frac{\phi \boldsymbol{u}}{\eta}\right) ,
tT+(uT)=1RaTPr2T+Stϕ, \partial_t T + \boldsymbol{\nabla} \cdot (\boldsymbol{u} T) = \frac{1}{\sqrt{Ra_T Pr}} \nabla^2 T + \mathcal{S}\partial_t \phi ,

where η=(βε)2\eta = (\beta \varepsilon)^2 is the volume penalty coefficient for a dimensionless diffusive interface thickness ε\varepsilon and S=L/cpΔT\mathcal{S}=L/c_p\Delta T is the Stefan number. LL is the latent heat of solidification, and cpc_p is the specific heat capacity which, like the diffusivity of heat κT\kappa_T, is assumed to be equal in the solid and liquid phases. Following Hester et al (2020), we take β=1.51044385\beta=1.51044385 as the optimal coefficient for the smooth volume penalty term.

As an alternative to the volume penalty method, an extremely simple immersed boundary method is also implemented for imposing zero velocity in the solid. For this implementation, the the velocity is simply reset to zero where ϕ<0.5\phi<0.5. This restriction is imposed after the implicit step of the time-stepper but before the pressure correction to ensure that the velocity field remains divergence free at all times. The immersed boundary technique is activated when IBM is set to 1 in the input file, otherwise the volume penalty method is used.

In dimensional form, the evolution equation for the phase variable ϕ\phi is

ε^56LcpκTtϕΓ2ϕ=1ε^2ϕ(1ϕ)(Γ(12ϕ)+ε^(TTm)). \hat{\varepsilon} \frac{5}{6} \frac{L}{c_p\kappa_T} \partial_t \phi - \Gamma \nabla^2 \phi = -\frac{1}{\hat{\varepsilon}^2} \phi (1-\phi)(\Gamma (1-2\phi) + \hat{\varepsilon} (T-T_m)) .

Here ε^=Hε\hat{\varepsilon}=H\varepsilon is the dimensional interface thickness, TmT_m is the equilibrium melting temperature, and Γ\Gamma is the coefficient arising from the Gibbs-Thomson relationship linking the interface temperature to the curvature KK of the interface:

TTm=ΓK=γTmρsLK. T - T_m = \Gamma K = \frac{\gamma T_m}{\rho_s L} K.

γ\gamma is the surface energy and ρs\rho_s is the density of the solid.

We now non-dimensionalise the phase-field equation using the same scales as before. This results in the evolution equation

tϕ=D2ϕDε2ϕ(1ϕ)(12ϕ+A(TTm)), \partial_t \phi = D \nabla^2 \phi - \frac{D}{\varepsilon^2} \phi (1 - \phi) (1 - 2\phi + A(T - T_m)) ,

where the dimensionless coefficients are given by

D=65εκUTHcpΓLH,A=εHΔTΓ. D = \frac{6}{5\varepsilon} \frac{\kappa}{U_T H} \frac{c_p \Gamma}{LH}, \quad A = \frac{\varepsilon H \Delta T}{\Gamma} .

Note that we can typically set ε=1/nxr\varepsilon=1/n_x^r to be the mean refined grid spacing. Furthermore, DD can be written as D=1.2(PeTSA)1D=1.2 (Pe_T \mathcal{S} A)^{-1}, so choosing AA also determines DD. In this case, we can write down the dimensionless phase-field equation in terms of the physical parameters and a single model parameter AA:

ϕt=65PeTSA{2ϕ1ε2ϕ(1ϕ)[12ϕ+A(TTm)]}. \frac{\partial\phi}{\partial t} = \frac{6}{5 Pe_T \mathcal{S} A} \left\{ \nabla^2 \phi - \frac{1}{\varepsilon^2} \phi (1 - \phi) \left[1 - 2\phi + A(T - T_m)\right]\right\}.

In the absence of temperature variations, ϕ\phi has a steady state solution of

ϕ=12(1+tanh(xxi2ε)), \phi = \frac{1}{2}\left(1 + \tanh \left(\frac{x-x_i}{2\varepsilon}\right)\right) ,

where xix_i is the position of the fluid-solid interface.

When running phase-field simulations, the Stefan number S\mathcal{S} and the parameter AA must be specified in the input file as the variables pf_S and pf_A respectively. The dimensionless melting temperature must also be set as the variable pf_Tm.

Double-diffusive melting

Following Hester et al (2020), we can also simulate the ablation of ice in salt water. In this case, the velocity of the ice-water boundary depends on the gradients of both temperature and salinity at the interface. In our non-dimensionalization (using the free-fall velocity scale for temperature), the full collection of equations reads as follows:

tu+(uu)=p+(TRρ1C)e^g+PrRaT2u, \partial_t \boldsymbol{u} + \boldsymbol{\nabla} \cdot (\boldsymbol{u} \boldsymbol{u}) = - \boldsymbol{\nabla} p + (T - {R_\rho}^{-1} C) \mathbf{\hat{e}_g} + \sqrt{\frac{Pr}{Ra_T}}\nabla^2 \boldsymbol{u} ,
tT+(uT)=1RaTPr2T+Stϕ, \partial_t T + \boldsymbol{\nabla} \cdot (\boldsymbol{u} T) = \frac{1}{\sqrt{Ra_T Pr}} \nabla^2 T + \mathcal{S} \partial_t \phi ,
tC+(uC)=τRaTPr(2CϕC1ϕ+δ)+Ctϕ1ϕ+δ, \partial_t C + \boldsymbol{\nabla} \cdot (\boldsymbol{u} C) = \frac{\tau}{\sqrt{Ra_T Pr}} \left(\nabla^2 C - \frac{\boldsymbol{\nabla} \phi \cdot \boldsymbol{\nabla} C}{1 - \phi + \delta}\right) + \frac{C\partial_t \phi}{1 - \phi + \delta},
tϕ=D2ϕDε2ϕ(1ϕ)(12ϕ+A(TTm+ΛC)). \partial_t \phi = D \nabla^2 \phi - \frac{D}{\varepsilon^2} \phi (1 - \phi) (1 - 2\phi + A(T - T_m +\Lambda C)) .

Two new dimensionless parameters have appeared in the equations. δ1\delta \ll 1 is a small parameter that is solely present to stabilise the terms on the right hand side of the salinity equation. In the phase-field equation, we obtain a new physical parameter defined as

Λ=λΔCΔT, \Lambda = \frac{\lambda \Delta C}{\Delta T} ,

where ΔC\Delta C and ΔT\Delta T are the previously used scales for salinity and temperature, and λ\lambda is the liquidus slope. This refects how the presence of salinity at the ice-water interface lowers the local melting temperature.