INTRODUCTION

The existing experience shows that to obtain a robust numerical procedure for complex applied problem it is not enough to focus only on the basic properties of numerical algorithms such as consistency, stability and convergence. It is also crucial to take into account specific physical properties of the studied phenomenon. It is known that the discrete counterparts of conservation laws should be satisfied in reliable numerical model. Conservative numerical schemes are constructed with finite volume method [1,2,3]. The use of nonconservative numerical algorithms can significantly reduce the accuracy of the simulations, in some cases incorrect results are obtained. Tikhonov and Samarskii constructed an example [1, 4,5,6,7], where a nonconservative difference scheme, having a second order of approximation to the smooth solutions, diverges in the case of a discontinuous solution of the differential equation.

Samarskii and Popov introduced the concept of completely conservative difference schemes [3]. For such schemes, the divergence and nondivergence forms of conservation laws and balances for individual types of energy are satisfied at the discrete level. Moreover, in a reliable discrete model, various forms of conservation laws can be transformed into each other using relations similar to those occurring in the differential case.

The completely conservative schemes were originally constructed for the equations of gas dynamics and magnetohydrodynamics, and then the corresponding approach was extended to other classes of problems in mathematical physics. In the paper [8], some specific features of design of completely conservative schemes for one-dimensional evolution problems with moving boundaries were considered. The divergence and nondivergence forms of conservative numerical scheme were constructed on moving and fixed grids for the multicomponent solution crystallisation problem. Just as in the differential case, the grid equations on moving and fixed grids are transformed into each other by a change of variables.

The paper [9] considers the Stefan problem in a cylindrical coordinate system in the axisymmetric case. The mathematical model is based on the Navier–Stokes equations in the stream function vorticity form, the equations of heat and mass transfer in the solid and liquid phases, and the conditions of thermodynamic equilibrium on the interface. The front-fixing method [10] is used to determine the interface position. The problem is solved in a coordinate system obtained by a change of variables of a special form. In this coordinate system, the interface position is fixed. The difference scheme is constructed in the new coordinate system on a fixed grid. Divergence and nondivergence forms of numerical scheme that approximate the respective forms of the original differential problem are obtained. The kinetic and internal energy conservation laws, as well as mass balances for the components, are satisfied at the discrete level. It was shown in [11] that in a difference scheme constructed with the front-fixing method one can perform a discrete analog of the coordinate system transformation and obtain an algebraically equivalent computational scheme on a moving grid consistent with the shape of the interface.

In the present paper, we continue studying the properties of the difference scheme proposed in [9, 11]. We prove that the discrete operator approximating the dissipative terms in the Navier–Stokes and heat transfer equations in the computational coordinate system is self-adjoint and negative definite. We show that the computational scheme obtained using the front-fixing method is conservative. Boundary conditions for the vortex ensuring the vorticity conservation law at the discrete level are considered. The results obtained below and in [9, 11] permit one to claim that the class of schemes constructed inherits the main properties of the original differential phase transition problem.

1. STATEMENT OF THE PROBLEM

The phase transition problem is considered under the following assumptions. The solid and liquid phases have the same densities \(\rho ^{\mathrm {s}}=\rho ^{\mathrm {lq}} \) and specific heat capacities \(c_{\mathrm {p}}^{\mathrm {s}} =c_{\mathrm {p}}^{\mathrm {lq}}\) but different thermal conductivity coefficients \(k^{\mathrm {s}}\) and \(k^{\mathrm {lq}} \), respectively. The liquid phase is a viscous incompressible fluid with kinematic viscosity \(\nu \). The liquid temperature field \( T(t, r, z)\) and velocity field \(\textbf {V}(t,r,z) \) are assumed to be axisymmetric. The modeling is carried out in the cylindrical coordinate system \(Orz\) in the domain \(\Omega (r,z)=[0,R]\times [0, Z]\). The subdomain \(\Omega ^{\mathrm {s}}(t,r,z)=\{(r,z)\!: r\in [0, R] \), \(z\in [0,\zeta (t, r)]\} \) contains the solid phase, and the liquid phase is located in the subdomain \(\Omega ^{\mathrm {lq}}(t,r,z)= \) \(\{(r,z)\!: r\in [0, R] \), \(z\in [\zeta (t, r), Z]\} \). Here \(z=\zeta (t, r) \) is the moving melt/solid interface.

The motion of the liquid is described by the Navier–Stokes equations in the stream function–vorticity variables. The velocity vector components \(\textbf {V}=(V^{r},0,V^{z}) \) are written as

$$ \begin {aligned} V^{r}&=\dfrac {1}{r}\dfrac {\partial \psi }{\partial z}, \\ V^z&=-\dfrac {1}{r}\dfrac {\partial \psi }{\partial r}, \end {aligned}$$
(1)

where \(\psi \) is the stream function. The vorticity \(\boldsymbol {\omega }=\mathrm {rot}\,\textbf {V}\) is defined as follows:

$$\begin {aligned} \boldsymbol {\omega }&=(0,\omega _{\boldsymbol {\varphi }},0), \\ \omega _{\boldsymbol {\varphi }}&=\partial _z{V^{r}}-\partial _r{V^{z}}, \end {aligned} $$

where \(\partial _r=\partial /\partial r \) and \(\partial _z=\partial /\partial z\). For convenience, we use \(\omega =-\omega _{\boldsymbol {\varphi }} /r\) as the unknown function in the equations of motion. The convective transport in the liquid is described by the vorticity transport equation

$$ \dfrac {\partial \omega }{\partial t}+\frac {1}{r}\mathcal {K}^{(r,z)}(\omega ,\psi )=\frac {1}{r}\mathcal {D}^{(r,z)}(r^2\omega )+\beta _T g\dfrac {1}{r}\frac {\partial T}{\partial r},$$

the equation relating the vorticity and the stream function

$$ -\omega =\frac {1}{r}\mathcal {D}^{(r,z)}(\psi ),$$

and the convective heat transfer equation

$$ \dfrac {\partial T}{\partial t}+\frac {1}{r}\mathcal {K}^{(r,z)}(T,\psi ) =\frac {1}{r}\mathcal {D}^{(r,z)}(T). $$

Here \(\beta _T\) is the thermal expansion coefficient, \(g\) is the free fall acceleration, and \( \mathcal {K}^{(r,z)}/r\) is an operator describing the convective transfer,

$$ \mathcal {K}^{(r,z)}(f,\psi )=\partial _r\mathcal {H}^r+{\partial _z}\mathcal {H}^z,\quad f=\omega , T, $$
(2)

where the components of the convective flux \(\mathcal {H}^{(r,z)}=(\mathcal {H}^{r},\mathcal {H}^{z}) \) have the form

$$\begin {aligned} \mathcal {H}^r(f)&=rV^r f=[{\partial _z}{\psi }]f, \\ \mathcal {H}^z(f)&=rV^z f=-[{\partial _r}{\psi }]f, \end {aligned}$$

\(\mathcal {D}^{(r,z)}/r \) is an elliptic operator describing dissipative processes in the vorticity transfer and convective heat transfer equations,

$$ \mathcal {D}^{(r,z)}(r^{\beta }f) ={\partial _r}\mathcal {W}^r+{\partial _z}\mathcal {W}^z,\quad f=\omega ,\psi , T, $$
(3)

the flux components \(\mathcal {W}^{(r,z)}=(\mathcal {W}^{r},\mathcal {W}^{z})\) are calculated as follows:

$$\begin {aligned} \mathcal {W}^{r}(r^{\beta }f)&=\varkappa {r}^{\alpha }{\partial _r}({r}^{\beta }f), \\ \mathcal {W}^{z}(r^{\beta }f)&=\varkappa {r}^{\alpha }{\partial _z}({r}^{\beta }f), \end {aligned}$$

and the values of the parameters \(\varkappa \), \(\alpha \), and \(\beta \) are given in Table 1.

Table 1. Dissipative flow parameters

The temperature distribution in the solid phase is described by the heat equation

$$ \dfrac {\partial T}{\partial t}=\frac {1}{r}\mathcal {D}^{(r,z)}(T). $$

On the interface, the temperature is equal to the melting temperature,

$$ T|_{z=\zeta (t,r)}=T_{\mathrm {ph}},$$

and the energy conservation law (the Stefan condition) is satisfied,

$$ \big [\;\!\!\!\big [(k\nabla T\cdot {\mathrm {\bf {N}}})\big ]\;\!\!\!\big ]=\lambda \rho v_{\boldsymbol {n}}. $$
(4)

Here \([\![q]\!]=q^{\mathrm {s}}-q^{\mathrm {lq}} \), \(\nabla =(\partial _r,\partial _z) \), \(\lambda \) is the latent heat of fusion, \( v_{\boldsymbol {n}}={v}_{\mathrm {ph}}(\mathrm {\bf {e}}_ {z}\cdot {\mathrm {\bf {N}}}) \), \(v_{\mathrm {ph}}=v_{\mathrm {ph}}(t,r)=d\zeta /dt \) is the phase boundary velocity, \(\mathrm {\bf {N}} \) is the unit normal to the interface directed into the liquid phase, and \( \mathrm {\bf {e}}_{z}\) is the unit vector in the direction of the \(z \)-axis.

The boundary conditions for temperature have the form

$$\begin {aligned} T|_{z=0}&=T_{\mathrm {bot}}(t,r), \\ T|_{z=Z}&=T_{\mathrm {top}}(t,r), \\ T|_{r=R}&=T_{\mathrm {wall}}(t,z). \end {aligned}$$

The symmetry conditions for the stream function and temperature on the ampoule axis are

$$ \psi =0, \quad \omega _{\boldsymbol {\varphi }}=0, \quad {\partial _r}{T}=0.$$

The boundary conditions for the stream function on the crystallization interface and the upper and lateral boundaries of the liquid phase are

$$ \psi =0, \quad {\partial _{\mathrm {n}}}{\psi }=0. $$

Here \(\partial _{\mathrm {n}} \) is the outward normal derivative on the corresponding boundary.

2. FRONT-FIXING METHOD

To handle the moving-boundary problem, we use the front-fixing method [10]. The physical domain \(\Omega (r,z) \) is mapped onto a computational domain \(S(\xi ,\eta ) \) so that the interface position in the new coordinate system is fixed and coincides with the coordinate line \(\eta =\mathrm {const} \).

2.1. Coordinate System Transformation

In this paper, we perform the coordinate system transformation such that the domains \(\Omega ^{\mathrm {s}}\) and \(\Omega ^{\mathrm {lq}} \) become the rectangles \(S^\mathrm {s} \) and \(S^{\mathrm {lq}} \) (Fig. 1), and the boundaries of the domains \({z}=0 \), \(z=\zeta (t,r)\), and \(z=Z \) become the stationary lines \(\eta =0 \), \(\eta =1\), and \(\eta =2 \), respectively. The relationship between the coordinate systems is given by

$$ \begin {aligned} \tilde t&=t, \\ \xi &=r, \\ \eta &= \begin {cases} z/{l^{\mathrm {s}}},& z\in \big [0,\zeta (t,r)\big ] \\ 1+(z-\zeta )/{l^{\mathrm {lq}}},& z\in \big [\zeta (t,r),Z\big ], \end {cases} \end {aligned} $$
(5)

where \(l^{\mathrm {s}}=l^{\mathrm {s}}(t,\xi )=\zeta (t,\xi ) \) and \(l^{\mathrm {lq}}=l^{\mathrm {lq}}(t,\xi )={Z}-\zeta (t,\xi )\) are the thicknesses of the zones \(\mathrm \Omega ^{\mathrm {s}} \) and \(\mathrm \Omega ^{\mathrm {lq}} \), respectively. The Jacobian of the transformation (5) is \(J_m=\partial (\tilde t,\xi ,\eta )/\partial (t,r,z)=1/l^m\), \(m=\mathrm {s},\mathrm {lq}\).

Fig. 1.
figure 1

Coordinate system transformation.

Let us write the problem in the new coordinate system \((\tilde t,\xi ,\eta ) \). The partial derivatives of the unknown functions \(f=T,\omega ,\psi \) are transformed as follows:

$$\begin {aligned} \dfrac {\partial f}{\partial t}&=\dfrac {\partial f}{\partial \tilde t}+\dfrac {\partial \eta }{\partial t}\dfrac {\partial f}{\partial \eta }, \\ \dfrac {\partial f}{\partial r}&=\dfrac {\partial f}{\partial \xi }+\dfrac {\partial \eta }{\partial r}\dfrac {\partial f}{\partial \eta }, \\ \dfrac {\partial f}{\partial z}&=\dfrac {\partial \eta }{\partial z}\dfrac {\partial f}{\partial \eta }. \end {aligned}$$

To calculate the derivatives \(\partial \eta /\partial t \), \(\partial \eta /\partial r \), and \(\partial \eta /\partial z \), we use the inverse coordinate transformation

$$ \begin {aligned} t&=\tilde t, \\ r&=\xi , \\ z&= \begin {cases} \varphi ^{\mathrm {s}}(\tilde t,\xi ,\eta )= \mathrm Z_{1}+l^{\mathrm {s}}(\eta -1),&\eta \in [0,1] \\ \varphi ^{\mathrm {lq}}(\tilde t,\xi ,\eta )= \mathrm Z_{2}+l^{\mathrm {lq}}(\eta -2),&\eta \in [1,2]. \end {cases} \end {aligned}$$
(6)

The Jacobian of this transformation is \( J^{-1}_m=\partial (t,r,z)/\partial (\tilde t,\xi ,\eta )={l^m} \). One can readily show that the entries of the Jacobian matrix are calculated [12, 13] by the formulas

$$\begin {aligned} \dfrac {\partial \eta }{\partial t}&=-\frac {1}{J^{-1}_{m}}\dfrac {\partial z}{\partial \tilde t}=-\frac {1}{l^m}\dfrac {\partial \varphi ^{m}}{\partial \tilde t}, \\ \dfrac {\partial \eta }{\partial r}&=-\frac {1}{J^{-1}_{m}}\dfrac {\partial z}{\partial \tilde \xi }=-\frac {1}{l^m}\dfrac {\partial \varphi ^{m}}{\partial \xi }, \\ \dfrac {\partial \eta }{\partial z}&=\frac {1}{J^{-1}_{m}}\dfrac {\partial r}{\partial \xi }=\frac {1}{l^m}. \end {aligned}$$

For the time derivative, we obtain

$$ \dfrac {\partial f}{\partial t}=\dfrac {1}{\xi l^m}\bigg [\dfrac {\partial }{\partial \tilde t}(\xi l^mf)-\dfrac {\partial }{\partial \eta }(\xi \varphi ^m_{\tilde t}f)\bigg ]= \dfrac {1}{\xi l^m}\mathcal {T}^{(\xi ,\eta )}(f).$$

In what follows, for brevity we omit the tilde over \(t \) in \(\tilde t \) and the superscript \(m \) on the functions \(l^m \), \(\varphi ^m\), \(\varphi ^m_t=\partial \varphi ^m/\partial t \), and \(\varphi ^m_{\xi }=\partial \varphi ^m/\partial \xi \).

The formulas for calculating the fluid velocity (1) are transformed as follows:

$$ \begin {aligned} V^{r}&=\dfrac {1}{\xi l}\dfrac {\partial \psi }{\partial \eta }, \\ V^z&=-\dfrac {1}{\xi l}\bigg [l\dfrac {\partial \psi }{\partial \xi }- \varphi _\xi \dfrac {\partial \psi }{\partial \eta }\bigg ]. \end {aligned}$$
(7)

Then for the convective terms (2) we have

$$ \begin {aligned} \dfrac {1}{r}\mathcal {K}^{(r,z)}(f,\psi )&= \dfrac {1}{\xi l}\mathcal {K}^{(\xi ,\eta )}(f,\psi ), \\ \mathcal {K}^{(\xi ,\eta )}(f,\psi )&= {\partial _\xi }\mathcal {H}^{\xi }+{\partial _\eta }\mathcal {H}^{\eta }. \end {aligned}$$
(8)

In the computational domain, the components of the convective flux \(\mathcal {H}^{(\xi ,\eta )}=(\mathcal {H}^{\xi },\mathcal {H}^{\eta })\) have the form

$$ \begin {aligned} \mathcal {H}^{\xi }&=\xi l U^{\xi }f=[{\partial _\eta }\psi ]f, \\ \mathcal {H}^{\eta }&=\xi l U^{\eta } f=-[{\partial _\xi }{\psi }]f. \end {aligned}$$
(9)

Here the variables \( U^{\xi }\) and \(U^{\eta } \) are equal to the velocities of transfer of \(f \) along the corresponding coordinate directions and are calculated by the formulas

$$\begin {aligned} U^{\xi }&={\partial _\eta }\psi /(\xi l), \\ U^{\eta }&=-{\partial _\xi }\psi /(\xi l). \end {aligned} $$

It is important to note that the expressions (8) and (9) for the convective terms in the computational coordinate system \((\tilde t,\xi ,\eta )\) coincide with the corresponding operator in the physical domain \(\Omega ^{\mathrm {lq}}(t,r,z) \) up to the Jacobian.

The operator (3) is transformed as follows:

$$\begin {aligned} \dfrac {1}{r}\mathcal {D}^{(r,z)}(r^{\beta }f)&=\dfrac {1}{\xi l}\mathcal {D}^{(\xi ,\eta )}(\xi ^{\beta }f), \\ \mathcal {D}^{(\xi ,\eta )}(\xi ^{\beta }f)&={\partial _\xi }\mathcal {W}^{\xi }+{\partial _\eta }\mathcal {W}^{\eta }, \end {aligned}$$

where the components of the flux \(\mathcal {W}^{(\xi ,\eta )}=(\mathcal {W}^{\xi },\mathcal {W}^{\eta }) \) in the computational coordinate system have the form

$$ \mathcal {W}^\xi (\xi ^{\beta }f)=\varkappa \xi ^{\alpha }\big [L^{\xi \xi }{\partial _\xi } (\xi ^{\beta }f)+L^{\xi \eta }{\partial _\eta } (\xi ^{\beta }f)\big ],$$
(10)
$$ \mathcal {W}^\eta (\xi ^{\beta }f)=\varkappa \xi ^{\alpha }\big [L^{\eta \xi }{\partial _\xi } (\xi ^{\beta }f)+L^{\eta \eta }{\partial _\eta } (\xi ^{\beta }f)\big ].$$
(11)

The coefficients \(L^{\xi \xi } \), \(L^{\xi \eta }\), \(L^{\eta \xi } \), and \(L^{\eta \eta } \) are calculated by the formulas

$$\begin {aligned} L^{\xi \xi }&=l, \\ L^{\xi \eta }&=L^{\eta \xi }=-{\varphi }_{\xi }, \\ L^{\eta \eta }&=(1+{\varphi }^2_{\xi })/{l}. \end {aligned}$$

Thus, the Navier–Stokes equations in the computational coordinate system have the form

$$ \dfrac {1}{\xi l}\mathcal {T}^{(\xi ,\eta )}(\omega )+\frac {1}{\xi l}\mathcal {K}^{(\xi ,\eta )}(\omega ,\psi )=\frac {1}{\xi l}\mathcal {D}^{(\xi ,\eta )}(\xi ^2\omega )+\beta _T g\dfrac {1}{\xi l}\bigg [\dfrac {\partial }{\partial \xi }(\xi lT)-\dfrac {\partial }{\partial \eta }(\xi \varphi _\xi T)\bigg ],$$
(12)
$$ -\omega =\frac {1}{\xi l}\mathcal {D}^{(\xi ,\eta )}(\psi ).\qquad \qquad \;$$
(13)

For the heat equation, we obtain

$$ \dfrac {1}{\xi l}\mathcal {T}^{(\xi ,\eta )}(T)+\frac {1}{\xi l}\mathcal {K}^{(\xi ,\eta )}(T,\psi )=\frac {1}{\xi l}\mathcal {D}^{(\xi ,\eta )}(T).$$
(14)

It is assumed that the convective terms are identically zero in the solid phase.

The boundary and interface conditions are transformed in a similar way. For the Stefan condition (4), we have (see [9])

$$ \bigg [\!\!\bigg [k\biggl (L^{\eta \xi }\dfrac {\partial T}{\partial \xi }+ L^{\eta \eta }\dfrac {\partial T}{\partial \eta }\biggr )\bigg ]\!\!\bigg ]= \lambda \rho v_{\mathrm {ph}}.$$
(15)

Let us define the inner product of square integrable functions \(f \) and \(g \) in the domain \(S(\xi ,\eta ) \) as follows:

$$ (f,g)_{S}=\int _{S} f g\xi l \,dS.$$

Here and below \(dS=d\xi \,d\eta \).

2.2. Model Properties in the Computational Coordinate System

System (12)–(15) has the following properties.

Vorticity conservation law.

Let us write Eq. (13) relating the stream function and the vorticity in the fixed coordinate system,

$$ -\omega =\big [{\partial _\xi }(l V^z)-{\partial _\eta }(V^r+\varphi _{\xi }V^z)\big ]/(\xi l).$$
(16)

Here we have used the expression (7) for the fluid velocity and the equation \( l_{\xi }=\varphi _{\xi \eta }\). Applying the divergence theorem, from Eq. (16) we obtain the vorticity conservation law

$$ -\int _{S^{\mathrm {lq}}}\omega \xi l\,dS=\int _{S^{\mathrm {lq}}}\big [{\partial _\xi }(l V^z)-{\partial _\eta }(V^r+\varphi _{\xi }V^z)\big ]\,dS=\int _{1}^{2}(l V^z)|_{\xi =0} \,d\eta . $$
(17)

Kinetic energy conservation law.

The convective terms in the vorticity transport equation (12) do not contribute to the kinetic energy balance [14]; i.e.,

$$ \biggl (\dfrac {\mathcal {K}^{(\xi ,\eta )}(\omega ,\psi )}{\xi l},\psi \biggr )_{\!S^{\mathrm {lq}}}= \int _{S^{\mathrm {lq}}}\mathcal {K}^{(\xi ,\eta )}(\omega ,\psi )\psi \,dS=0.$$
(18)

Internal energy conservation law.

The heat conservation law is satisfied in the considered system. Here for the convective terms in the heat equations (14) we have

$$ \begin {aligned} \biggl (\dfrac {\mathcal {K}^{(\xi ,\eta )}(T,\psi )}{\xi l},1\biggr )_{\!S^{\mathrm {lq}}}&=0,\\ \biggl (\dfrac {\mathcal {K}^{(\xi ,\eta )}(T,\psi )}{\xi l},T\biggr )_{\!S^{\mathrm {lq}}}&=0. \end {aligned}$$
(19)

Properties of the elliptic operator.

The operator \(\dfrac {\mathcal {D}^{(\xi ,\eta )}(f)}{\xi l} \), \(f=\xi ^2\omega ,\psi ,T \), is self-adjoint and negative definite in the function space \( D(S^{\prime })=\{f\in C^2(S^{\prime }): f|_{\partial S^{\prime }}=0\} \).

Let us show that the operator is self-adjoint. We use the fact that the functions \(f \) and \(g \) vanish on the boundary of the domain; integrating twice, we obtain

$$ \begin {aligned} \biggl (\dfrac {\mathcal {D}^{(\xi ,\eta )}(f)}{\xi l},g\biggr )_{\!S^{\prime }}&=\int _{S^{\prime }}\big [{\partial _\xi }(\varkappa \xi ^{\alpha } L^{\xi \xi }{\partial _\xi f}+\varkappa \xi ^{\alpha }L^{\xi \eta }{\partial _\eta f})+{\partial _\eta }(\varkappa \xi ^{\alpha } L^{\eta \eta }{\partial _\eta f}+\varkappa \xi ^{\alpha }L^{\eta \xi }{\partial _\xi f})\big ]g\,dS \\ &=\int _{S^{\prime }}\big [{\partial _\xi }(\varkappa \xi ^{\alpha } L^{\xi \xi }{\partial _\xi g}+\varkappa \xi ^{\alpha }L^{\eta \xi }{\partial _\eta g})+{\partial _\eta }(\varkappa \xi ^{\alpha } L^{\eta \eta }{\partial _\eta g}+\varkappa \xi ^{\alpha }L^{\xi \eta }{\partial _\xi g})\big ]f\,dS \\ &=\biggl (f,\dfrac {\mathcal {D}^{(\xi ,\eta )}(g)}{\xi l}\biggr )_{\!S^{\prime }}\!. \end {aligned}$$
(20)

The operator is self-adjoint because \(L^{\xi \eta }=L^{\eta \xi } \).

Let us show the negative definiteness of the operator,

$$ \begin {aligned} \biggl (\dfrac {\mathcal {D}^{(\xi ,\eta )}(f)}{\xi l},f\biggr )_{S^{\prime }}&= \int _{S^{\prime }}\mathcal {D}^{(\xi ,\eta )}(f) f \,dS \\ &=-\int _{S^{\prime }}\big [\varkappa \xi ^{\alpha } L^{\xi \xi }({\partial _\xi f})^2+2\varkappa \xi ^{\alpha }L^{\xi \eta }{\partial _\xi f}{\partial _\eta f}+\varkappa \xi ^{\alpha }L^{\eta \eta }({\partial _\eta f})^2\big ]\,dS. \end {aligned}$$
(21)

By the Sylvester criterion, the integrand is a positive definite quadratic form, and so the operator \(\dfrac {\mathcal {D}^{(\xi ,\eta )}(f)}{\xi l}\) is negative definite.

We will construct a numerical method for solving the problem in such a way that discrete counterparts of properties (17)–(21) are satisfied at the discrete level.

3. DIFFERENCE PROBLEM

3.1. Grid and Grid Functions

In the computational domain \(S(\xi ,\eta )\), we introduce the rectangular grid \(\omega ^{(\xi ,\eta )}_{h}=\omega ^{\xi }_{h}\times \omega ^{\eta }_{h}\),

$$\begin {aligned} \omega ^{\xi }_{h}&=\{\xi _i,\; i={0,\dots ,\mathrm {M}},\; \xi _0=0,\; \xi _\mathrm {M}=R\}, \\ \omega ^{\eta }_{h}&=\{\eta _j,\; j={0,\dots ,\mathrm {N}},\; \eta _0=0, \eta _{j^*}=1,\; \eta _\mathrm {N}=2\} \end {aligned}$$

so that the crystallization front is located at the grid points with coordinates \((\xi _i,\eta _{j^*}) \), \(i={0,\dots ,\mathrm {M}} \); the grid increments are

$$\begin {aligned} h^{\xi }_{i+1/2}&=\xi _{i+1}-\xi _{i}, \\ h^{\eta }_{j+1/2}&={\eta _{j+1}-\eta _{j}}. \end {aligned}$$

We also introduce the flux nodes

$$\begin {aligned} \xi _{i+1/2}&=(\xi _{i+1}+\xi _i)/2, \\ \eta _{j+1/2}&=(\eta _{j+1}+\eta _j)/2. \end {aligned}$$

We split the computational domain \(S(\xi ,\eta ) \) into the rectangular control volumes

$$ {S}^{(\xi ,\eta )}_{i j}=[\xi _{i-1/2},\xi _{i+1/2}]\times [\eta _{j-1/2},\eta _{j+1/2}] $$

with boundaries \(\partial S^{(\xi ,\eta )}_{i+1/2, j}\), \(\partial S^{(\xi ,\eta )}_{i, j-1/2}\), \(\partial S^{(\xi ,\eta )}_{i-1/2, j}\), and \(\partial S^{(\xi ,\eta )}_{i, j+1/2}\); the lengths of the boundaries of the cell \({S}^{(\xi ,\eta )}_{i j}\) are equal to

$$\begin {aligned} \hbar ^{\xi }_i&=0.5(h^{\xi }_{i+1/2}+h^{\xi }_{i-1/2}),\\ \hbar ^{\eta }_j&=0.5(h^{\eta }_{j+1/2}+h^{\eta }_{j-1/2}), \end {aligned}$$

and its area is \( dS^{(\xi ,\eta )}_{ij}=\hbar ^{\xi }_i\hbar ^{\eta }_j \). We also consider the cells \(S^{(\xi ,\eta )}_{i+1/2\,j+1/2}\) centered at the points \((\xi _{i+1/2},\eta _{j+1/2})\) (Fig. 2). The time grid is \(\omega _{\tau }=\{t_0=0 \), \(t_{k+1}=t_k+\tau \), \(k=0,1,\ldots \} \), where \(\tau \) is the time step.

Fig. 2.
figure 2

Grid and grid functions.

The grid functions \(f_{ij}^k=f(t_k,\xi _i,\eta _j) \), \(f=T,\psi ,\omega \), are related to the grid nodes. Let us extend these functions inside the computational cells, \(f(t_k,\xi ,\eta )=f_{ij}^k \) for \((\xi ,\eta )\in S^{(\xi ,\eta )}_{ i j}\). The lengths of the phases \(l_{ij+1/2} \) are set at the midpoints of the horizontal boundaries of the cells \(S^{(\xi ,\eta )}_{i j} \). The length of the phase at the center of the cell is calculated using the linear interpolation

$$ l_{ij}=(l_{ij+1/2}h^\eta _{j+1/2}+l_{ij-1/2}h^\eta _{j-1/2})/(2\hbar _{j}^{\eta }).$$

Thus, \(l_{ij}=l^{\mathrm {s}}_i \) in the solid phase, \(l_{ij}=l^{\mathrm {lq}}_i \) in the liquid phase, and

$$ l_{ij^*}=(l^{\mathrm {lq}}_{i}h^\eta _{j^*+1/2}+l^{\mathrm {s}}_{i}h^\eta _{j^*-1/2})/(2\hbar _{j^*}^{\eta })$$

on the crystallization front. The physical parameters of the domains \(\varkappa \) and the metric coefficients \(L^{\xi \xi }\), \(L^{\xi \eta } \), and \(L^{\eta \eta } \) are defined at the centers of the cells \({S} ^{(\xi ,\eta )}_{{i+1/2}\,{j+1/2}}\) (see Fig. 2).

The nodes of the grid \(\omega _h^{(\xi ,\eta )} \) belonging to the liquid phase are denoted by \(\omega _{\mathrm {lq}}^{(\xi ,\eta )}\). Let us introduce the set \( (\overline {I_\gamma }\times \overline {J_\gamma }) \), \(\gamma = h, \mathrm {lq} \), of grid points indices \(\omega ^{(\xi ,\eta )}_{\gamma }\) and the set \(({I_\gamma }\times {J_\gamma } )\) of interior grid points indices \(\omega ^{(\xi ,\eta )}_{\gamma }\). We define the inner product for grid functions defined at the centers of the cells \(S^{(\xi ,\eta )}_{i j} \) as follows:

$$ (f,g)_\gamma =\sum _{(i,j)\in (\overline {I}_{\gamma }\times \overline {J}_\gamma )} f_{ij} g_{ij}\xi _i l_{ij} \,dS^{(\xi ,\eta )}_{ij},\quad \gamma =h, \mathrm {lq}.$$
(22)

We also use local grid notation [2] (see Fig. 2). The finite-difference operators are introduced in the following way. For the spatial derivatives in the direction of the \(\xi \)-axis, we have

$$\begin {aligned} f_{\mathsf {P},\xi }&=(f_{\mathsf {E}}-f_{\mathsf {P}})/h^{\xi }_{\mathsf {e}}, \\ f_{\mathsf {P},\bar {\xi }}&=f_{\mathsf {W},\xi }; \end {aligned} $$

the finite-difference approximations to the spatial derivatives in the direction of the \(\eta \)-axis are

$$\begin {aligned} f_{\mathsf {P},\eta }&=(f_{\mathsf {N}}-f_{\mathsf {P}})/h^{\eta }_{\mathsf {n}}, \\ f_{\mathsf {P},\bar {\eta }}&=f_{\mathsf {S},\eta }, \\ f_{\mathsf {P},\widetilde {\eta }}&=(f_{\mathsf {n}}-f_{\mathsf {P}})/(0.5h^{\eta }_{\mathsf {n}}), \\ f_{\mathsf {P},\overline {\widetilde {\eta }}}&=f_{\mathsf {S},\widetilde {\eta }}. \end {aligned}$$

The finite-difference derivative with respect to time will be denoted by \(f_t=(\widehat f_{\mathsf {P}}-f_{\mathsf {P}})/\tau \), where \(\widehat f_{\mathsf {P}}=f(t_k+\tau ,\xi _\mathsf {P},\eta _\mathsf {P}) \).

3.2. Finite-Difference Scheme

The conservative numerical scheme is constructed using the finite volume method. We integrate Eqs. (12)–(14) over the cell \(S^{(\xi ,\eta )}_{\mathsf {P}} \). At the regular grid points, for the evolution equations (12), (14) we obtain

$$ \int _{S^{(\xi ,\eta )}_\mathsf {P}}\mathcal {T}^{(\xi ,\eta )}(f)\,dS+\int _{S^{(\xi ,\eta )}_\mathsf {P}}\mathcal {K}^{(\xi ,\eta )}(f,\psi )\,dS -\int _{S^{(\xi ,\eta )}_\mathsf {P}}\mathcal {D}^{(\xi ,\eta )}(\xi ^{\beta }f)\,dS=0.$$
(23)

(The approximation to the gravitational body force in the vorticity transport equation is constructed in a standard way.)

First, we construct approximations to the second and third integrals in Eq. (23). Using the Gauss divergence theorem, we obtain

$$ \int _{S^{(\xi ,\eta )}_\mathsf {P}}\mathcal {K}^{(\xi ,\eta )}(f,\psi )\,dS\approx \mathcal {K}_h^{(\xi ,\eta )}(f,\psi )\hbar ^{\xi }\hbar ^{\eta }=\int _{\partial S^{(\xi ,\eta )}}[\mathcal {H}^{\xi }N^{\xi }+\mathcal {H}^{\eta }N^{\eta }]\,d\gamma ,$$
(24)
$$ \int _{S^{(\xi ,\eta )}_\mathsf {P}}\mathcal {D}^{(\xi ,\eta )}(\xi ^{\beta }f)\,dS\approx \mathcal {D}_{h}^{(\xi ,\eta )}(\xi ^{\beta }f)\hbar ^{\xi }\hbar ^{\eta }=\int _{\partial S^{(\xi ,\eta )}}[\mathcal {W}^{\xi }N^{\xi }+\mathcal {W}^{\eta }N^{\eta }]\,d\gamma . $$
(25)

Here \(N^{\xi }\) and \(N^{\eta } \) are the the components of outward normal vector to the boundary of the cell \(S^{(\xi ,\eta )}_\mathsf {P} \).

The process of constructing approximations to the operators \(\mathcal {K}^{(\xi ,\eta )} \) and \(\mathcal {D}^{(\xi ,\eta )} \) reduces to calculating the values of the corresponding fluxes at the centers of the cell \(S^{(\xi ,\eta )}_{\mathsf {P}} \) boundaries. Here one needs to calculate the values of grid functions as well as their derivatives at the nodes where they are not defined. The corresponding values can be reinterpolated in various ways; however, preference should be given to approximations ensuring that the discrete counterparts of properties (17)–(21) of the differential problem (12)–(15) are satisfied. Later on, when choosing interpolation formulas, we will rely on this principle.

3.2.1. Approximation to the convective terms

For the convective terms, we have

$$ \int _{\partial S^{(\xi ,\eta )}}[\mathcal {H}^{\xi }N^{\xi }+\mathcal {H}^{\eta }N^{\eta }]\,d\gamma = \int _{\partial S^{(\xi ,\eta )}_\mathsf {e}}\mathcal {H}^{\xi }\,d\eta - \int _{\partial S^{(\xi ,\eta )}_\mathsf {w}}\mathcal {H}^{\xi }\,d\eta + \int _{\partial S^{(\xi ,\eta )}_\mathsf {n}}\mathcal {H}^{\eta }\,d\xi - \int _{\partial S^{(\xi ,\eta )}_\mathsf {s}}\mathcal {H}^{\eta }\,d\xi .$$

It follows that the expression (24) can be represented as

$$ \mathcal {K}_h^{(\xi ,\eta )}(f,\psi )\hbar ^{\xi }\hbar ^{\eta }=(\mathcal {H}^\xi _{\mathsf e}-\mathcal {H}^\xi _{\mathsf w})\hbar ^{\eta }+ (\mathcal {H}^\eta _{\mathsf {n}}-\mathcal {H}^\eta _{\mathsf {s}})\hbar ^{\xi }. $$

The convective flux at the cell boundary centers is approximated in the vorticity transfer equation (12) as follows:

$$\begin {aligned} \mathcal {H}^\xi _{\mathsf {e}}&= 0.5\Big [\psi _{\mathsf {E},\overset {\circ }\eta }\,\omega _{\mathsf {E}}+\psi _{\mathsf {P},\overset {\circ }\eta }\,\omega _{\mathsf {P}}\Big ],\\ \mathcal {H}^\eta _{\mathsf {n}}&= 0.5\Big [\psi _{\mathsf {N},\overset {\circ }\xi }\,\omega _{\mathsf {N}}+\psi _{\mathsf {P},\overset {\circ }\xi }\,\omega _{\mathsf {P}}\Big ]. \end {aligned} $$

The fluxes through the “western” and “southern” boundaries are calculated in a similar way. Thus, the approximation to the convective terms in the Navier–Stokes equations has the form

$$ \mathcal {K}^{(\xi ,\eta )}_h(\omega ,\psi )= \Big (\psi _{\mathsf {P},\overset {\circ }\eta }\omega _{\mathsf {P}}\Big )_{\overset {\circ }\xi }- \Big (\psi _{\mathsf {P},\overset {\circ }\xi }\omega _{\mathsf {P}}\Big )_{\overset {\circ }\eta }.$$
(26)

The expression (26) coincides with the relation proposed by Arakawa [14] to approximate the convective terms in the Navier–Stokes equation in the Cartesian coordinate system. The following assertion was proved in [14].

Assertion 1.

The convective terms written in the form (26) do not contribute to the kinetic energy balance; i.e.,

$$ \biggl (\dfrac {\mathcal {K}_h^{(\xi ,\eta )}(\omega ,\psi )}{\xi l},\psi \biggr )_{\!\mathrm {lq}}=0. $$

The convective flux components at the cell boundary centers are calculated in the heat equation (14) as follows:

$$\begin {aligned} \mathcal {H}^\xi _{\mathsf {e}}(T)&=\psi _{\mathsf {e},\overset {\circ }\eta }T_{\mathsf {e}}, \\ \mathcal {H}^\eta _{\mathsf {n}}(T)&=\psi _{\mathsf {n}, \overset {\circ }\xi }T_{\mathsf {n}}, \end {aligned}$$

and the convective terms are written as

$$ \mathcal {K}^{(\xi ,\eta )}_h(T,\psi )= \Big (\psi _{\mathsf {e},\overset {\circ }\eta }T_{\mathsf {e}}\Big )_{\tilde \xi }- \Big (\psi _{\mathsf {n},\overset {\circ }\xi }T_{\mathsf {n}}\Big )_{\tilde \eta }. $$
(27)

The expression (27) was also proposed in [14] for approximating the convective terms in the heat equation in the Cartesian coordinate system. One more assertion was proved there.

Assertion 2.

The convective terms written in the form (27) do not affect the heat balance and the mean squared temperature over the domain; i.e.,

$$\begin {aligned} \biggl (\dfrac {\mathcal {K}_h^{(\xi ,\eta )}(T,\psi )}{\xi l},1\biggr )_{\!\mathrm {lq}}&=0,\\ \biggl (\dfrac {\mathcal {K}_h^{(\xi ,\eta )}(T,\psi )}{\xi l},T\biggr )_{\!\mathrm {lq}}&=0. \end {aligned} $$

Thus, using the expressions (26) and (27) for approximating the convective terms in the vorticity and heat transfer equations permits one to construct an computational scheme conserving the total kinetic energy of the fluid.

3.2.2. Approximation to the elliptic operator

For the operator \(\mathcal {D}^{(\xi ,\eta )} \) in (25), we obtain

$$ \mathcal {D}_h^{(\xi ,\eta )}(\xi ^{\beta }f)\hbar ^{\xi }\hbar ^{\eta }=(\mathcal {W}^\xi _{\mathsf e}-\mathcal {W}^\xi _{\mathsf w})\hbar ^{\eta }+ (\mathcal {W}^\eta _{\mathsf {n}}-\mathcal {W}^\eta _{\mathsf {s}})\hbar ^{\xi }.$$
(28)

Let us approximate the fluxes in the expression (28) on the boundary of the cell \(S^{(\xi ,\eta )}_{\mathsf {P}} \). To be definite, consider the “eastern” boundary,

$$ \mathcal {W}^\xi _{\mathsf e}\hbar ^{\eta }=\int _{\partial {S}^{(\xi ,\eta )}_\mathsf {e}}\mathcal {W}^\xi (\xi ^{\beta }f)\,d\eta = \int _{\partial {S}^{(\xi ,\eta )}_\mathsf {e}}\big [\mathcal {L}^{\xi \xi }{\partial _\xi }(\xi ^{\beta }f)+ \mathcal {L}^{\xi \eta }{\partial _\eta }(\xi ^{\beta }f)\big ]\,d\eta .$$
(29)

Here \(\mathcal {L}^{\xi \xi }=\xi ^{\alpha }\varkappa L^{\xi \xi }\), \(\mathcal {L}^{\xi \eta }=\xi ^{\alpha }\varkappa L^{\xi \eta } \), \(\mathcal { L}^{\eta \eta }=\xi ^{\alpha }\varkappa {L}^{\eta \eta }\), and \(\mathcal { L}^{\eta \xi }=\xi ^{\alpha }\varkappa {L}^{\eta \xi } \). For the integrals over the cell boundary in (29), we have

$$ \begin {aligned} \int _{\partial S^{(\xi ,\eta )}_\mathsf {e}}\mathcal {L}^{\xi \xi }{\partial _\xi }(\xi ^{\beta }f)\,d\eta &{}\approx \mathcal {L}^{\xi \xi }_{\mathsf e}(\xi ^{\beta }f)_\xi \hbar ^{\eta }, \\ \int _{\partial S^{(\xi ,\eta )}_\mathsf {e}}\mathcal {L}^{\xi \eta }{\partial _\eta }(\xi ^{\beta }f)\,d\eta &{}\approx 0.5\big [h^\eta _\mathsf {n}{\mathcal {L}^{\xi \eta }_{\mathsf {n}\mathsf e}}(\xi ^{\beta }f)_{\mathsf e,\eta }+h^\eta _\mathsf {s}{\mathcal {L}^{\xi \eta }_{\mathsf {s}\mathsf e}}(\xi ^{\beta }f)_{\mathsf e,\bar {\eta }}\big ]. \end {aligned}$$
(30)

We use the following interpolation formulas to calculate the metric coefficients and finite-difference derivatives at the center of the boundary \(\partial S^{(\xi ,\eta )}_\mathsf {e} \):

$$\begin {gathered} \mathcal {L}^{\xi \xi }_{\mathsf {e}}= [h^{\eta }_\mathsf {n}{\mathcal {L}^{\xi \xi }_{\mathsf {n}\mathsf e}}+h^{\eta }_\mathsf {s}{\mathcal {L}^{\xi \xi }_{\mathsf {s}\mathsf e}}]/(2\hbar ^{\eta }),\\[.5em] \begin {aligned} (\xi ^{\beta }f)_{\mathsf e,\eta }&=0.5\big [(\xi ^{\beta }f)_{\mathsf {P},\eta }+(\xi ^{\beta }f)_{\mathsf {E},\eta }\big ], \\ (\xi ^{\beta }f)_{\mathsf e,\bar \eta }&=0.5\big [(\xi ^{\beta }f)_{\mathsf {P},\bar \eta }+(\xi ^{\beta }f)_{\mathsf {E},\bar \eta }\big ]. \end {aligned} \end {gathered}$$

The flux through the “northern” boundary \( \partial S^{(\xi ,\eta )}_{\mathsf {n}}\) is calculated using the formula

$$ \mathcal {W}_{\mathsf {n}}^\eta \hbar ^{\xi }=\int _{\partial S^{(\xi ,\eta )}_\mathsf {n}}\mathcal {W}^\eta (\xi ^{\beta }f)\,d\xi \approx {\mathcal {L}^{\eta \eta }_{\mathsf {n}}}(\xi ^{\beta }f)_\eta \hbar ^{\xi }+0.5\big [h^{\xi }_{\mathsf {e}}{\mathcal { L}^{\eta \xi }_{\mathsf {n}\mathsf e}}(\xi ^{\beta }f)_{\mathsf {n},\xi }+h^{\xi }_{\mathsf w}{\mathcal {L}^{\eta \xi }_{\mathsf {n}\mathsf w}}(\xi ^{\beta }f)_{\mathsf {n},\bar {\xi }}\big ], $$

and at the center of the boundary we have

$$\begin {gathered} {\mathcal {L}^{\eta \eta }_{\mathsf {n}}}=[{h^{\xi }_\mathsf {e}}{\mathcal {L}^{\eta \eta }_{\mathsf {n}\mathsf e}}+h^{\xi }_\mathsf {w}{\mathcal { L}^{\eta \eta }_{\mathsf {n}\mathsf {w}}}]/(2\hbar ^{\xi }),\\[.5em] \begin {aligned} (\xi ^{\beta }f)_{\mathsf {n},\xi }&= 0.5\big [(\xi ^{\beta }f)_{\mathsf {P},\xi }+(\xi ^{\beta }f)_{\mathsf {N},\xi }\big ], \\ (\xi ^{\beta }f)_{\mathsf {n},\bar \xi }&=0.5\big [(\xi ^{\beta }f)_{\mathsf {P},\bar \xi }+ (\xi ^{\beta }f)_{\mathsf {N},\bar \xi }\big ]. \end {aligned} \end {gathered}$$

The expressions for the fluxes through the “western” and “southern” boundaries can be calculated in a similar way.

Consider the grid function space

$$ D_h(\omega ^{(\xi ,\eta )}_\gamma )=\big \{f_{ij}, (i,j)\in (\overline {I}_\gamma {\times }\overline {J}_\gamma ): f_{ij}=0,\; (i,j)\in (\overline {I}_\gamma {\times }\overline {J}_\gamma )\setminus ({I}_\gamma {\times }{J}_\gamma ) \big \}.$$

We will prove the following assertions.

Assertion 3.

For grid functions in the space \( D_h(\omega ^{(\xi ,\eta )}_\gamma ) \), the discrete operator \( \mathcal {D}_h^{(\xi ,\eta )}(f_{ij})/(\xi _i l_{ij}) \) is negative definite with respect to the grid inner product (22),

$$ \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},f\biggr )_{\!\gamma }<0,\quad \gamma =h, \mathrm {lq}. $$
(31)

Proof. We write the left-hand side of inequality (31) in the form

$$ \begin {aligned} \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},f\biggr )_{\!\gamma }&= \sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}(\mathcal {W}^\xi _{i+j/2}-\mathcal {W}^\xi _{i-j/2})f_{ij}\hbar _{j}^{\eta } \\ &\qquad \qquad \qquad \qquad {}+ \sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}(\mathcal {W}^\eta _{ij+1/2}-\mathcal {W}^\eta _{ij-1/2})f_{ij}\hbar _{i}^{\xi }. \end {aligned}$$
(32)

Consider the first sum on the right-hand side in (32). Let us transform the terms containing the coefficient \(\mathcal {L}^{\xi \xi }\) in it. Let us represent these terms as the half-sum of backward and forward finite-difference derivatives in the direction of \(\xi \),

$$ \begin {aligned} &{}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} [\mathcal {L}^{\xi \xi }_{i+j/2}f_\xi -\mathcal {L}^{\xi \xi }_{i-j/2}f_{\bar \xi }] f_{ij}\hbar _{j}^{\eta } \\ &\qquad \qquad \qquad \qquad \qquad {}=\frac {1}{2}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} \big [h^{\xi }_{i-1/2}(\mathcal {L}^{\xi \xi }_{i+j/2}f_{\xi })_{\bar {\xi }}+ h^{\xi }_{i+1/2}(\mathcal {L}^{\xi \xi }_{i-j/2}f_{\bar \xi })_{{\xi }}\big ]f_{ij}\hbar _{j}^{\eta }. \end {aligned}$$
(33)

On the right-hand side in Eq. (33), we use the summation by parts formula [15, p. 46] over the index \(i \). Taking into account the conditions on the boundary of the domain, we have

$$ \begin {aligned} &{}\frac {1}{2}\sum _{j\in {J}_{\gamma }}\sum _{i\in {I}_\gamma }\big [h^{\xi }_{i-1/2}(\mathcal {L}^{\xi \xi }_{i+j/2}f_{\xi })_{\bar {\xi }}+h^{\xi }_{i+1/2}(\mathcal {L}^{\xi \xi }_{i-j/2}f_{\bar \xi })_{{\xi }}\big ]f_{ij}\hbar _{j}^{\eta } \\ &\qquad \qquad \qquad \qquad \qquad {}=-\frac {1}{2}\sum _{j\in {J}_{\gamma }}\sum _{i\in {I}_\gamma }\big [h^{\xi }_{i+1/2}\mathcal {L}^{\xi \xi }_{i+j/2}(f_{\xi })^2+h^{\xi }_{i-1/2}\mathcal {L}^{\xi \xi }_{i-j/2}(f_{\bar \xi })^2\big ]\hbar _{j}^{\eta }. \end {aligned}$$
(34)

Let us write the terms containing mixed derivatives in the form

$$ \begin {aligned} \mathcal {S}_1&{}=\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i+j/2+1/2}f_{\eta })_{\bar {\xi }}f_{ij} \\ &\qquad \qquad {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i-j/2+1/2}f_{\eta })_{\xi }f_{ij}m \\ &\qquad \qquad \qquad \qquad {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\xi \eta }_{i+j/2-1/2}f_{\bar \eta })_{\bar {\xi }}f_{ij} \\ &\qquad \qquad \qquad \qquad \qquad \qquad {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\xi \eta }_{i-j/2-1/2}f_{\bar \eta })_{\xi }f_{ij}. \end {aligned} $$
(35)

Let us apply the summation by parts formula over the index \(i \) to the first term in (35),

$$ \frac {1}{4}\sum _{j\in {J}_{\gamma }} \sum _{i\in {I}_\gamma }h^{\xi }_{i-1/2}h^{\eta }_{j+1/2} (\mathcal {L}^{\xi \eta }_{i+j/2+1/2}f_{\eta })_{\bar {\xi }}f_{ij}= -\frac {1}{4}\sum _{j\in {J}_{\gamma }}\sum _{i\in {I}_\gamma } h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}\mathcal {L}^{\xi \eta }_{i+j/2+1/2} f_{\xi }f_\eta .$$

We transform the second, third, and fourth terms in (35) in a similar way to obtain

$$ \begin {aligned} \mathcal {S}_1&=-\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}[h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}\mathcal {L}^{\xi \eta }_{i+j/2+1/2} f_{\xi }f_{\eta }+h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}\mathcal {L}^{\xi \eta }_{i-j/2+1/2} f_{\bar \xi }{f_{\eta }}] \\ &\qquad \qquad {}-\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} [h^{\xi }_{i-1/2}h^{\eta }_{j-1/2}\mathcal {L}^{\xi \eta }_{i-j/2-1/2} f_{\bar \xi }{{f_{\bar \eta }}}+h^{\xi }_{i+1/2}h^{\eta }_{j-1/2} \mathcal {L}^{\xi \eta }_{i+j/2-1/2}f_{\xi }{f_{\bar \eta }}]. \end {aligned} $$
(36)

Consider the second sum on the right-hand side in the expression (32). For the terms containing the coefficient \(\mathcal {L}^{\eta \eta } \), we have

$$ \begin {aligned} &{}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} [\mathcal {L}^{\eta \eta }_{ij+1/2}f_\eta -\mathcal {L}^{\eta \eta }_{ij-1/2}f_{\bar \eta }] f_{ij}\hbar _{i}^{\xi } \\ &\qquad \qquad \qquad \qquad \qquad {}=-\dfrac {1}{2}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}\big [h^{\eta }_{j+1/2}\mathcal {L}^{\eta \eta }_{ij+1/2}(f_{\eta })^2+ h^{\eta }_{j-1/2}\mathcal {L}^{\eta \eta }_{ij-1/2}(f_{\bar \eta })^2\big ]\hbar _{i}^{\xi }. \end {aligned}$$
(37)

We write the terms containing the mixed derivatives in the form

$$ \begin {aligned} \mathcal {S}_2=&{}-\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} [h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}\mathcal {L}^{\eta \xi }_{i+j/2+1/2} f_{\xi }f_{\eta }+h^{\xi }_{i+1/2}h^{\eta }_{j-1/2}\mathcal {L}^{\eta \xi }_{i+j/2-1/2}f_{\xi }{f_{\bar \eta }}] \\ &{}-\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} [h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}\mathcal {L}^{\eta \xi }_{i-j/2+1/2} f_{\bar \xi }{f_{\eta }}+h^{\xi }_{i-1/2}h^{\eta }_{j-1/2} \mathcal {L}^{\eta \xi }_{i-j/2-1/2}f_{\bar \xi }{{f_{\bar \eta }}}]. \end {aligned} $$
(38)

Since \(\mathcal {L}^{\xi \eta }=\mathcal {L}^{\eta \xi } \), it follows that the expression (38) coincides with (36); i.e., \(\mathcal {S}_1=\mathcal {S}_2 \).

Replacing the fluxes on the right-hand side in (32) by their representations (34) and (36)–(38), we obtain

$$\begin {aligned} \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},f\biggr )_{\!\gamma }=&{}-\frac {1}{4}\!\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} \!\!\!\!\!h^{\xi }_{i+1/2}h^{\eta }_{j+1/2} \big [\mathcal {L}^{\xi \xi }_{i+j/2+1/2} (f_{\xi })^2+2\mathcal {L}^{\xi \eta }_{i+j/2+1/2}f_{\xi }f_{\eta }+\mathcal {L}^{\eta \eta }_{i+j/2+1/2}(f_{\eta })^2\big ] \\ &{}-\frac {1}{4}\!\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j+1/2} \big [\mathcal {L}^{\xi \xi }_{i-j/2+1/2}(f_{\bar {\xi }})^2+2\mathcal {L}^{\eta \xi }_{i-j/2+1/2}f_{\bar \xi }f_{\eta }+\mathcal {L}^{\eta \eta }_{i-j/2+1/2}(f_{\eta })^2\big ] \\ &{}-\frac {1}{4}\!\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j-1/2} \big [\mathcal {L}^{\xi \xi }_{i+j/2-1/2}(f_{\xi })^2+2\mathcal {L}^{\xi \eta }_{i+j/2-1/2}f_{\xi }f_{\bar \eta }+\mathcal {L}^{\eta \eta }_{i+j/2+1/2}(f_{\bar \eta })^2\big ] \\ &{}-\frac {1}{4}\!\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j-1/2} \big [\mathcal {L}^{\xi \xi }_{i-j/2-1/2}(f_{\bar \xi })^2+2\mathcal {L}^{\xi \eta }_{i-j/2-1/2}f_{\bar \xi }f_{\bar \eta }+\mathcal {L}^{\eta \eta }_{i-j/2-1/2}(f_{\bar \eta })^2\big ]. \end {aligned} $$

By the Sylvester criterion, the quadratic forms in the summands are positive definite,

$$ \mathcal {L}^{\xi \xi }_{pq}=l_{pq}>0,\quad \mathcal {L}^{\xi \xi }_{pq}\mathcal {L}^{\eta \eta }_{pq} -(\mathcal {L}^{\xi \eta }_{pq})^2= 1>0,\quad p=i\pm 1/2,\quad q=j\pm 1/2;$$

hence

$$ \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},f\biggr )_{\!\gamma }<0,\quad \gamma =h,\mathrm {lq}. $$

The proof of the assertion is complete.

Assertion 4.

For grid functions in the space \( D_h(\omega ^{(\xi ,\eta )}_\gamma ) \), the discrete operator \( \mathcal {D}_h^{(\xi ,\eta )}(f_{ij})/(\xi _il_{ij}) \) is self-adjoint with respect to the grid inner product (22),

$$ \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},g\biggr )_{\!\gamma }=\biggl (f,\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(g)}{\xi l}\biggr )_{\!\gamma },\quad \gamma =h,\mathrm {lq}. $$
(39)

Proof. Let us write the left-hand side of (39) as follows:

$$ \begin {aligned} \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},g\biggr )_{\gamma }&=\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}\mathcal {D}_h^{(\xi ,\eta )}(f_{ij})g_{ij}\hbar _i^{\xi }\hbar _j^{\eta } \\ &=\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}(\mathcal {W}^\xi _{i+j/2}-\mathcal {W}^\xi _{i-j/2})g_{ij}\hbar _{j}^{\eta }+ \sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}(\mathcal {W}^\eta _{ij+1/2}-\mathcal {W}^\eta _{ij-1/2})g_{ij}\hbar _{i}^{\xi }. \end {aligned} $$
(40)

Consider the first sum on the right-hand side in (40) and transform the terms containing the coefficient \(\mathcal {L}^{\xi \xi }\). To this end, we use the summation by parts formula over the index \(i\) twice to obtain

$$ \begin {aligned} \sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^\xi _{i-1/2} (\mathcal {L}^{\xi \xi }_{i+j/2}f_\xi )_{\bar {\xi }}g_{ij}\hbar _{j}^{\eta }&= -\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^\xi _{i+1/2}\mathcal {L}^{\xi \xi }_{i+j/2} f_\xi g_\xi \hbar _{j}^{\eta } \\ &{}=\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^\xi _{i-1/2}(\mathcal {L}^{\xi \xi }_{i+j/2}g_\xi )_{\bar {\xi }}f_{ij}\hbar _{j}^{\eta }. \end {aligned}$$
(41)

Successively applying the summation by parts formula over the indices \(i\) and \(j \), we write the terms containing mixed derivatives in the form

$$ \begin {aligned} &{}\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i+j/2+1/2}f_{\eta })_{\bar {\xi }}g_{ij}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i-j/2+1/2}f_{\eta })_{\xi }g_{ij} \\ &\enspace {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\xi \eta }_{i+j/2-1/2}f_{\bar \eta })_{\bar {\xi }}g_{ij}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\xi \eta }_{i-j/2-1/2}f_{\bar \eta })_{\xi }g_{ij} \\ &=\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\xi \eta }_{i+j/2+1/2}g_{\xi })_{\bar {\eta }}f_{ij}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\xi \eta }_{i-j/2+1/2}g_{\bar \xi })_{\bar \eta }f_{ij} \\ &\enspace {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i+j/2-1/2}g_{\xi })_{{\eta }}f_{ij}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i-j/2-1/2}g_{\bar \xi })_{\eta }f_{ij}. \end {aligned}$$
(42)

Here we have used the fact that

$$\begin {aligned} &{}\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\xi \eta }_{i+j/2+1/2}f_{\eta })_{\bar {\xi }}g_{ij} \\ &\qquad \qquad \qquad \qquad \qquad {}=-\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}\mathcal {L}^{\xi \eta }_{i+j/2+1/2}f_\eta g_{\xi } \\ &\qquad \qquad \qquad \qquad \qquad {} =\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times } {J}_\gamma )}h^{\xi }_{i+1/2}h^{\eta }_{j-1/2} (\mathcal {L}^{\xi \eta }_{i+j/2+1/2}g_{\xi })_{\bar {\eta }}f_{ij}; \end {aligned}$$

the remaining terms on the left-hand side in (42) can be transformed in a similar way.

Consider the second sum on the right-hand side in (40). For the terms containing the coefficient \(\mathcal {L}^{\eta \eta } \), we obtain

$$ \sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^\eta _{j-1/2}(\mathcal {L}^{\eta \eta }_{j+1/2}f_\eta )_{\bar {\eta }}g_{ij}\hbar _{i}^{\xi }=\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )}h^\eta _{j-1/2}(\mathcal {L}^{\eta \eta }_{ij+1/2}g_\eta )_{\bar {\eta }}f_{ij}\hbar _{i}^{\xi }.$$
(43)

By analogy with (42), we write

$$ \begin {aligned} &{}\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i+1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\eta \xi }_{i+j/2+1/2}f_{\xi })_{\bar {\eta }}g_{ij}+ \frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\eta \xi }_{i+j/2-1/2}f_{\xi })_{\eta }g_{ij} \\ &\enspace {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i-1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\eta \xi }_{i-j/2+1/2}f_{\bar \xi })_{\bar {\eta }}g_{ij}+ \frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\eta \xi }_{i-j/2-1/2}f_{\bar \xi })_{\eta }g_{ij} \\ &{}=\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i-1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\eta \xi }_{i+j/2+1/2}g_{\eta })_{\bar {\xi }}f_{ij}+ \frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i-1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\eta \xi }_{i+j/2-1/2}g_{\bar \eta })_{\bar \xi }f_{ij} \\ &\enspace {}+\frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i+1/2}h^{\eta }_{j+1/2}(\mathcal {L}^{\eta \xi }_{i-j/2+1/2}g_{\eta })_{{\xi }}f_{ij}+ \frac {1}{4}\sum _{(i,j)\in ({I}_\gamma {\times }{J}_\gamma )} h^{\xi }_{i+1/2}h^{\eta }_{j-1/2}(\mathcal {L}^{\eta \xi }_{i-j/2-1/2}g_{\bar \eta })_{\xi }f_{ij}. \end {aligned}$$
(44)

Let us substitute the right-hand sides of the expressions (41)–(44) into the right-hand side of Eq. (40). Since \(\mathcal {L}^{\xi \eta }=\mathcal {L}^{\eta \xi }\), we have

$$ \biggl (\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(f)}{\xi l},g\biggr )_{\!\gamma }= \biggl (f,\dfrac {\mathcal {D}_h^{(\xi ,\eta )}(g)}{\xi l}\biggr )_{\!\gamma },\quad \gamma =h,\mathrm {lq}.$$

The proof of the assertion is complete.

There are other ways to reinterpolate the desired functions into stream points. The corresponding difference expressions can have the same order of approximation as the operators (26)–(28). However, the numerical models constructed on their basis will not have properties similar to those of the original differential problem. The following approximation to the operator \(\mathcal {D}^{(\xi ,\eta )} \) was proposed in [16]:

$$\begin {gathered} \widetilde {\mathcal {D}}_h^{(\xi ,\eta )}(\xi ^{\beta }f)\hbar ^{\xi }\hbar ^{\eta }= (\widetilde {\mathcal {W}}^\xi _{\mathsf {e}}-\widetilde {\mathcal {W}}^\xi _{\mathsf {w}})\hbar ^{\eta }+ (\widetilde {\mathcal {W}}^\eta _{\mathsf {n}}-\widetilde {\mathcal {W}}^\eta _{\mathsf {s}})\hbar ^{\xi }, \\[.5em] \begin {aligned} \widetilde {\mathcal {W}}_{\mathsf {e}}^\xi &= {\mathcal {L}^{\xi \xi }_{\mathsf {e}}}(\xi ^{\beta }f)_\xi + {\mathcal {L}^{\xi \eta }_{\mathsf {e}}}\big [(\xi ^{\beta }f)_{\mathsf {n}\mathsf e}-(\xi ^{\beta }f)_{\mathsf {s}\mathsf {e}}\big ]/\hbar ^{\eta },\\[.3em] \widetilde {\mathcal {W}}_{\mathsf {n}}^\eta &={\mathcal {L}^{\eta \eta }_{\mathsf {n}}}(\xi ^{\beta }f)_\eta +{\mathcal {L}^{\eta \xi }_{\mathsf {n}}}\big [(\xi ^{\beta }f)_{\mathsf {n}\mathsf e}-(\xi ^{\beta }f)_{\mathsf {n}\mathsf {w}}\big ]/\hbar ^{\xi }. \end {aligned} \end {gathered} $$

One can readily show that the discrete operator \(\widetilde {\mathcal {D}}_h^{(\xi ,\eta )}(f_{ij})/(\xi _i l_{ij}) \) is not self-adjoint with respect to the grid inner product (22). Moreover, the expressions used in the paper [16] for approximating the convective terms do not ensure the validity of the difference counterparts of the kinetic energy, mass, and heat conservation laws.

3.2.3. Approximation to the time derivative

For the operator \(\mathcal {T}^{(\xi ,\eta )}(f) \), we obtain

$$ \int _{S^{(\xi ,\eta )}_\mathsf {P}}\mathcal {T}^{(\xi ,\eta )}(f)\,d\xi \,d\eta \approx \mathcal {T}_{h}^{(\xi ,\eta )}(f)\hbar ^{\xi }\hbar ^{\eta }={\partial _t}(l_{\mathsf {P}}f_{\mathsf {P}} )\xi _\mathsf {P}\hbar ^{\xi }\hbar ^{\eta }- \big [(\varphi _t f)_{\mathsf {n}}-(\varphi _t f)_{\mathsf {s}}\big ]\xi _\mathsf {P}\hbar ^{\xi }. $$
(45)

Here \((\varphi _t f)_{\mathsf {n}}=\varphi _{\mathsf {n},t}f_{\mathsf {n}}\) and \((\varphi _t f)_{\mathsf {s}}=\varphi _{\mathsf {s},t}f_{\mathsf {s}} \). The values of the function \(f \) at the centers of the horizontal faces of the cell are calculated by the formulas \(f_{\mathsf {n}}=(f_{\mathsf {P}}+f_{\mathsf {N}})/2 \) and \(f_{\mathsf {s}}=(f_{\mathsf {P}}+f_{\mathsf {S}})/2\). Let us integrate (45) over the interval \([t_k,t_{k+1}] \) and divide the resulting expression by the step \(\tau \) and the cell area \(dS^{(\xi ,\eta )}_{\mathsf {P}}\),

$$ \frac {1}{\xi _\mathsf {P}}\mathcal {T}^{(\xi ,\eta )}_{h,\tau }(f)=(l_{\mathsf {P}}f_{\mathsf {P}} )_t- \big [(\varphi _t\widehat f)_{\mathsf {n}}-(\varphi _t\widehat f)_{\mathsf {s}}\big ]/{\hbar ^{\eta }}. $$
(46)

The approximation (46) contains the nonlinear term \(\widehat {l_{\mathsf {P}}f_{\mathsf {P}}}\); for convenience, we write this approximation in nondivergence form,

$$ \frac {1}{\xi _\mathsf {P}}\mathcal {T}^{(\xi ,\eta )}_{h,\tau }(f)=(l_{\mathsf {P}}f_{\mathsf {P}} )_t- \big [(\varphi _t\widehat f)_{\tilde \eta }h^{\eta }_{\mathsf {n}}+(\varphi _t\widehat f)_{\tilde {\bar {\eta }}}h^{\eta }_\mathsf {s}\big ]/(2{\hbar ^{\eta }}). $$

We use the discrete counterpart of Leibniz product rule [15, p. 51],

$$\begin {aligned} (l_{\mathsf {P}}f_{\mathsf {P}})_t=l_{\mathsf {P},t}\widehat {f}_\mathsf {P}+l_{\mathsf {P}}f_{\mathsf {P},t}&{}=[l_{\mathsf {n},t}h^{\eta }_\mathsf {n}+l_{\mathsf {s},t}h^{\eta }_\mathsf {s}]/(2\hbar ^{\eta })\widehat {f}_{\mathsf {P}}+[l_{\mathsf {n}}h^{\eta }_\mathsf {n}+l_{\mathsf {s}}h^{\eta }_\mathsf {s}]/(2\hbar ^{\eta }){f}_{\mathsf {P},t}, \\[.5em] \big [(\varphi _t\widehat f)_{\tilde \eta }h^{\eta }_{\mathsf {n}}+(\varphi _t\widehat f)_{\tilde {\bar {\eta }}}h^{\eta }_\mathsf {s}\big ]/(2{\hbar ^{\eta }})&{}= \big [(\varphi _{t\tilde \eta }\widehat {f}_{\mathsf {P}}+ \varphi _{t,\mathsf {n}}\widehat {f}_{\tilde {\eta }})h^{\eta }_{\mathsf {n}}+ (\varphi _{t\tilde {\bar \eta }}\widehat {f}_{\mathsf {P}}+ \varphi _{t,\mathsf {s}}\widehat {f}_{\tilde {\bar \eta }})h^{\eta }_{\mathsf {s}}\big ]/(2{\hbar ^{\eta }}). \end {aligned}$$

Since \(l_{\mathsf {n},t}=\varphi _{t\tilde \eta }\) and \(l_{\mathsf {s},t}=\varphi _{t\bar {\tilde \eta }}\), the nondivergence form of time derivative is

$$ \frac {1}{\xi _\mathsf {P}}\mathcal {T}^{(\xi ,\eta )}_{h,\tau }(f)= l_{\mathsf {P}}f_{\mathsf {P},t}- [\varphi _{t,\mathsf {n}}\widehat {f}_{\tilde {\eta }}h^{\eta }_{\mathsf {n}}+ \varphi _{t,\mathsf {s}}\widehat {f}_{\tilde {\bar {\eta }}}h^{\eta }_{\mathsf {s}}]/(2\hbar ^{\eta }).$$
(47)

3.2.4. Approximation to the equation relating the values of the stream function and vorticity

The approximation to Eq. (13) at the interior points of the domain has the form

$$ -\omega _{\mathsf {P}} l_{\mathsf {P}}\xi _{\mathsf {P}} \,dS^{(\xi ,\eta )}_{\mathsf {P}}=\mathcal {D}_h^{(\xi ,\eta )}(\psi )\,dS^{(\xi ,\eta )}_{\mathsf {P}}.$$
(48)

The boundary conditions for the vorticity are constructed as follows: Eq. (13) is integrated over the boundary cells taking into account the no-slip conditions. To be definite, consider a cell on the vertical boundary of the domain. We obtain

$$ -\omega _{\mathsf {P}} r_{\mathsf {P}}l_{\mathsf {P}} \dfrac {h^{\xi }_{\mathsf {w}}}{2}\hbar ^{\eta }=\big [\mathcal {W}_{\mathsf {P}}^\xi (\psi )-\mathcal {W}_{\mathsf {w}}^\xi (\psi )\big ]\hbar ^{\eta }+\big [ \mathcal {W}_{\mathsf {n}}^\eta (\psi )-\mathcal {W}_{\mathsf {s}}^\eta (\psi )\big ]\dfrac {h^{\xi }_{\mathsf {w}}}{2}. $$

Due to the no-slip condition at the boundary of the liquid phase, we have \( \psi =0\), \(\mathcal {W}_{\mathsf {P}}^\xi (\psi )=0\), and \(\psi _{\mathsf {P},\xi }=\psi _{\mathsf {N},\xi } =\psi _{\mathsf {S},\xi }=0 \), and hence

$$ -\omega _{\mathsf {P}} r_{\mathsf {P}}l^{\mathrm {lq}} \dfrac {h^{\xi }_{\mathsf {w}}}{2}\hbar ^{\eta }=\dfrac {\mathcal L^{\xi \xi }_{\mathsf {n}\mathsf {w}}h^{\eta }_{\mathsf {n}}+\mathcal L^{\xi \xi }_{\mathsf {s}\mathsf {w}}h^{\eta }_{\mathsf {s}}}{2 h^{\xi }_{\mathsf {w}}}\psi _{\mathsf {W}}-\dfrac {\mathcal {L}^{\xi \eta }_{\mathsf {n}\mathsf {w}}}{2}\psi _{\mathsf {N}\mathsf {W}}+\dfrac {\mathcal {L}^{\xi \eta }_{\mathsf {s}\mathsf {w}}}{2}\psi _{\mathsf {S}\mathsf {W}}.$$
(49)

In the Cartesian coordinate system, \(\mathcal L^{\xi \xi }=1\), \(\mathcal L^{\xi \eta }=\mathcal L^{\eta \xi }=0\), and condition (49) is transformed into the well-known Thom’s condition [17]. The equations for the vorticity on the other parts of the liquid phase boundary can be approximated in a similar way.

Assertion 5.

Let the grid function \( \omega _{ij}\) satisfy Eq. (48). Then the discrete counterpart of the vorticity conservation law is satisfied in the form

$$ -\sum _{(i,j)\in (\overline {I}_{\mathrm {lq}}\times \overline {J}_{\mathrm {lq}})}\omega _{ij}l_{ij}\xi _i\,dS^{(\xi ,\eta )}_{ij}= \sum _{j\in \overline {J}_{\mathrm {lq}}}(V^{z}l)_{1/2 j}\hbar _{j}^{\eta }. $$

Proof. It follows from Eq. (48) that

$$ \begin {aligned} -\sum _{(i,j)\in (\overline {I}_{\mathrm {lq}}{\times }\overline {J}_{\mathrm {lq}})}\omega _{ij}l_{ij}\xi _i\,dS^{(\xi ,\eta )}_{ij}&= \sum _{(i,j)\in ({I}_{\mathrm {lq}}{\times }{J}_{\mathrm {lq}})}\big [(\mathcal {W}^\xi _{i+j/2}-\mathcal {W}^\xi _{i-j/2})\hbar _{j}^{\eta }+ (\mathcal {W}^\eta _{ij+1/2}-\mathcal {W}^\eta _{ij-1/2})\hbar _{i}^{\xi }\big ] \\[.5em] &\qquad \qquad {}-\sum _{j\in {J}_{\mathrm {lq}}}[\omega _{0j}l_{0j}\xi _0\,dS^{(\xi ,\eta )}_{0j}+\omega _{Nj}l_{Nj}\xi _N\,dS^{(\xi ,\eta )}_{Nj}] \\[.5em] &\qquad \qquad \qquad \qquad {}-\sum _{i\in {I}_{\mathrm {lq}}}[\omega _{ij^{*}}l_{0j^*+0}\xi _i\,dS^{(\xi ,\eta )}_{ij^{*}}+\omega _{iM}l_{iM}\xi _i\,dS^{(\xi ,\eta )}_{iM}]. \end {aligned}$$
(50)

The sum of fluxes through the faces of the interior grid cells can be reduced to the following sum over the boundary control volumes:

$$ \begin {aligned} &{}\sum _{(i,j)\in ({I}_{\mathrm {lq}}{\times }{J}_{\mathrm {lq}})}\big [(\mathcal {W}^\xi _{i+j/2}-\mathcal {W}^\xi _{i-j/2})\hbar _{j}^{\eta }+ (\mathcal {W}^\eta _{ij+1/2}-\mathcal {W}^\eta _{ij-1/2})\hbar _{i}^{\xi }\big ] \\[.5em] &\qquad \qquad \qquad \qquad \qquad \qquad {}=\sum _{j\in {J}_{\mathrm {lq}}}[\mathcal {W}^\xi _{N-j/2}-\mathcal {W}^\xi _{j/2}]\hbar _{j}^{\eta }+\sum _{i\in {I}_{\mathrm {lq}}}[\mathcal {W}^\eta _{iM-1/2}-\mathcal {W}^\eta _{ij^*+1/2}]\hbar _{i}^{\xi }. \end {aligned}$$
(51)

Substituting (50) into (51), we obtain

$$ \begin {aligned} &{}-\!\!\!\sum _{(i,j)\in (\overline {I}_{\mathrm {lq}}{\times }\overline {J}_{\mathrm {lq}})} \!\!\!\!\!\!\!\!\omega _{ij}l_{ij}\xi _i\,dS^{(\xi ,\eta )}_{ij} \\[.5em] &\qquad {}= -\!\!\sum _{j\in {J}_{\mathrm {lq}}}[\omega _{0j}l_{0j}\xi _0\,dS^{(\xi ,\eta )}_{0j}+ \mathcal {W}^\xi _{j/2}\hbar _{j}^{\eta }]-\!\!\sum _{j\in {J}_{\mathrm {lq}}} [\omega _{Nj}l_{Nj}\xi _N\,dS^{(\xi ,\eta )}_{Nj}-\mathcal {W}^\xi _{N-j/2}\hbar _j^\eta ] \\[.5em] &\qquad \qquad {}-\sum _{i\in {I}_{\mathrm {lq}}}[\omega _{ij^{*}}l_{ij^*+0}\xi _i\,dS^{(\xi ,\eta )}_{ij^{*}}+\mathcal {W}^\eta _{ij^*+1/2}\hbar _{i}^{\xi }]- \sum _{i\in {I}_{\mathrm {lq}}}[\omega _{iM}l_{iM}\xi _i\,dS^{(\xi ,\eta )}_{iM}-\mathcal {W}^\eta _{iM-1/2}\hbar _i^{\xi }]. \end {aligned}$$
(52)

The vorticity on the axis is \(\omega _{0j}=0\), and owing to the boundary conditions (49), the second, third, and fourth sums on the right-hand side in (52) are zero as well. Then

$$ {}-\sum _{(i,j)\in (\overline {I}_{\mathrm {lq}}{\times }\overline {J}_{\omega })}\omega _{ij}l_{ij}\xi _i\,dS^{(\xi ,\eta )}_{ij}= \sum _{j\in \overline {J}_{\mathrm {lq}}}-\mathcal {W}^\xi _{1/2j}\hbar _{j}^{\eta }. $$

Comparing the expression (7) for the velocity \(V^z \) and the relation (10) for the flux \(\mathcal {W}^\xi \), we obtain \(V^z l=-\mathcal {W}^\xi (\psi )\) and hence

$$ {}-\sum _{(i,j)\in (\overline {I}_{\mathrm {lq}}{\times }\overline {J}_{\mathrm {lq}})} \omega _{ij}l_{ij}\xi _i\,dS^{(\xi ,\eta )}_{ij}= \sum _{j\in \overline {J}_{\mathrm {lq}}}(V^{z}l)_{1/2 j}\hbar _{j}^{\eta }.$$

The proof of the assertion is complete.

Fig. 3.
figure 3

Cell on the crystallization interface.

In Eqs. (12) and (13), we replace the differential operators by their finite-difference approximations (26)–(28) and (47). Thus, the implicit finite-difference scheme for the Navier–Stokes equations has the form

$$\begin {aligned} {\mathcal {T}^{(\xi ,\eta )}_{h,\tau }(\omega )}\,dS^{(\xi ,\eta )}_{\mathsf {P}}+{\mathcal {K}^{(\xi ,\eta )}_{h}(\widehat \omega ,\widehat \psi )}\,dS^{(\xi ,\eta )}_{\mathsf {P}}&={\mathcal {D}^{(\xi ,\eta )}_{h}(\widehat {\omega })}\,dS^{(\xi ,\eta )}_{\mathsf {P}} -{\mathcal {F}_{h}^{(\xi ,\eta )}(T)}\,dS^{(\xi ,\eta )}_{\mathsf {P}}, \\ {}-\widehat \omega \bar {l}_\mathsf {P} {\xi _\mathsf {P}} \,dS^{(\xi ,\eta )}_{\mathsf {P}}&={\mathcal {D}^{(\xi ,\eta )}_{h}(\widehat {\psi })}\,dS^{(\xi ,\eta )}_{\mathsf {P}}. \end {aligned} $$

The stream function and vorticity in the boundary conditions (49) are also referred to the upper time level.

3.2.5. Approximation to the Stefan condition

To approximate the Stefan condition (15), we integrate the heat equation (14) over the cell \(S^{(\xi ,\eta )}_{\mathsf {P}}\) containing the interface. We divide the integration domain into two subdomains, \(S^{(\xi ,\eta )+}_{\mathsf {P}}\) located in the liquid and \(S^{(\xi ,\eta ) -}_ {\mathsf {P}}\) lying in the solid phase (Fig. 3). The approximation of \(\mathcal {T}^{(\xi ,\eta )}(T) \) on the interface is given by (45), where \(l_\mathsf {n}\), \(\varphi _{t,\mathsf {n}}\) and \(l_\mathsf {s} \), \(\varphi _{t,\mathsf {s}} \) refer to the liquid and solid phases, respectively. Integrating the convective terms over the domain \(S^{(\xi ,\eta )+}_{\mathsf {P}}\), we obtain

$$ \mathcal {K}_h^{(\xi ,\eta )}(f,\psi )\hbar ^{\xi }\dfrac {h^{\eta }_{\mathsf {n}}}{2}=\big [\mathcal {H}^{\xi }_{\mathsf {e}}(T)-\mathcal {H}^\xi _{\mathsf {w}}(T) \big ]\dfrac {h^{\eta }_{\mathsf {n}}}{2}+\big [\mathcal {H}^\eta _{\mathsf {n}}(T)-\mathcal {H}^\eta _{\mathsf {P}}(T) \big ]\hbar ^{\xi }.$$

To calculate \( \mathcal {H}^\xi _{\mathsf {w}}(T)\) and \(\mathcal {H}^\xi _{\mathsf {e}}(T)\) we use the expressions \( \mathcal {H}^\xi _{\mathsf {w}}(T)=\psi _{\mathsf {w},\eta } T_{\mathsf {w}} \) and \(\mathcal {H}^\xi _{\mathsf {e}}(T)=\psi _{\mathsf {e},\eta } T_{\mathsf {e}} \) with the component \(\mathcal {H}^\eta _{\mathsf {P}}(T)=0\) because \(\psi _{\mathsf {P},\overset {\circ }\xi }=0\). After integrating the dissipative terms over the domains \(S^{(\xi ,\eta )+}_{\mathsf {P}} \) and \(S^{(\xi ,\eta )-}_{\mathsf {P}}\) , we have

$$ \mathcal {D}_h^{(\xi ,\eta )+}(T)\hbar ^{\xi }\dfrac {h^{\eta }_{\mathsf {n}}}{2}\approx \int _{S^{(\xi ,\eta )+}_\mathsf {P}}\mathcal {D}^{(\xi ,\eta )}(T)d\Omega =[\mathcal {W}^\xi _{\mathsf {e}^{+}}- \mathcal {W}^\xi _{\mathsf {w}^{+}}]\dfrac {h^{\eta }_{\mathsf {n}}}{2}+[\mathcal {W}^\eta _{\mathsf {n}}-{\mathcal {W}^\eta _{\mathsf {P}^{+}}}]\hbar ^\xi , $$
(53)
$$ \mathcal {D}_h^{(\xi ,\eta )-}(T)\hbar ^{\xi }\dfrac {h^{\eta }_{\mathsf {s}}}{2}\approx \int _{S^{(\xi ,\eta )-}_\mathsf {P}}\mathcal {D}^{(\xi ,\eta )}(T)d\Omega =[\mathcal {W}^\xi _{\mathsf {e}^-}- \mathcal {W}^\xi _{\mathsf {w}^-}]\dfrac {h^{\eta }_{\mathsf {s}}}{2}+ [{\mathcal {W}^\eta _{\mathsf {P}^-}}-\mathcal {W}^\eta _{\mathsf {s}}]\hbar ^{\xi }. $$
(54)

Here the variables with indices \(\mathsf {P}^{+} \), \(\mathsf {e}^{+} \), and \(\mathsf {w}^{+} \) belong to \(S^{(\xi ,\eta )+}_{\mathsf {P}}\), and those with indices \(\mathsf {P}^- \), \(\mathsf {e}^- \), and \(\mathsf {w}^- \) lie in \(S^{(\xi ,\eta )-}_{\mathsf {P}}\). Summing (53) and (54), we obtain the approximation

$$ \mathcal {D}_h^{(\xi ,\eta )}(T)\hbar ^{\xi }\hbar ^{\eta }=[\mathcal {W}^\xi _{\mathsf {e}}- \mathcal {W}^\xi _{\mathsf {w}}]\hbar ^{\eta }+[\mathcal {W}^\eta _{\mathsf {n}}- {\mathcal {W}^\eta _{\mathsf {s}}}]\hbar ^\xi +[{\mathcal {W}^\eta _{\mathsf {P}^-}}-{\mathcal {W}^\eta _{\mathsf {P}^{+}}}]\hbar ^{\xi }.$$

It follows from the Stefan condition (15) that

$$ {\mathcal {W}^\eta _{\mathsf {P}^-}}-{\mathcal {W}^\eta _{\mathsf {P}^{+}}}=\lambda \rho \xi _{\mathsf {P}} {v}_{\mathrm {ph}}.$$

Thus, the approximation to the dissipative terms (28) is supplemented on the interface by a term describing the heat release/absorption.

At the interior points of the grid, the implicit difference scheme for the heat equations has the form

$$ {\mathcal {T}^{(\xi ,\eta )}_{h,\tau }(T)}\,dS^{(\xi ,\eta )}_{\mathsf {P}}+{\mathcal {K}^{(\xi ,\eta )}_{h}(\widehat \psi ,\widehat T)}\,dS^{(\xi ,\eta )}_{\mathsf {P}}={\mathcal {D}^{(\xi ,\eta )}_{h}(\widehat {T})}\,dS^{(\xi ,\eta )}_{\mathsf {P}}.$$

Since the approximations to the conditions on the interface and the boundaries of the domains are consistent with the approximations to the corresponding equations at the interior grid nodes, it follows that the internal energy conservation law is satisfied at the difference level. It follows from the discrete counterpart of the conservation law for the square of the unknown variable that the temperature throughout the entire calculation is bounded at any grid point. This excludes the possibility of nonlinear computational instability [14, 18] in the calculation.

CONCLUSIONS

The conservative finite volume scheme for the two-phase Stefan problem in cylindrical coordinate system is constructed. The discrete counterparts of conservation laws for vorticity and kinetic and internal energy are satisfied in the numerical model. It is shown that the discrete operator that approximates the dissipative terms in the Navier–Stokes and heat transfer equations is self-adjoint and negative definite. Applying coordinate system transformation to the considered numerical scheme, one obtains a conservative finite-difference model for the Stefan problem on moving grid (see [11]). Thus, the proposed numerical model inherits generic properties of the original differential problem both in the computational and in the physical coordinate system. It is important to note that considered numerical algorithm can naturally be generalized to simulate the multicomponent solution crystallisation process.