Keywords

MSC (2010)

1 Introduction

The manufacturing process of ingot casting is widespread in the nuclear industry. High quality ingots are expected to forge a nuclear vessel reactor for instance. Understanding the solidification process and the solute redistribution is of paramount importance. This process can namely lead to a potential segregation of alloys (chemical heterogeneities) that are likely to alter the mechanical properties of the materials. A numerical segregation model has been introduced in a previous work [6] in code_saturne, the open-source and general-purpose Computational Fluid Dynamic (CFD) software [7] developed at EDF R &D. This work relies on a cell-centered colocated Finite Volume (FV) scheme and a fractional step algorithm for the velocity/pressure coupling. In this paper, we adapt the same segregation model to the Compatible Discrete Operator (CDO) framework [3, 4, 8] with a fully coupled velocity/pressure algorithm. We compare on an academic test case this new approach to the existing one in code_saturne and to the one inside SOLID®  [1], a commercial software dedicated to this kind of simulation. SOLID® relies on a staggered FV scheme along with a fractional step algorithm for the velocity/pressure coupling.

2 Segregation Model

Segregation involves multi-scale and multi-physics phenomena in a solid and liquid phase (cf. [9] for a review). A trade-off between the accuracy of a model and its complexity has to be found. In this work, we focus on the simulation of the macro-segregation phenomenon of a binary alloy induced by the thermo-solutal convection. Second-order phenomena such as solid grain movement, solidification shrinkage or deformation of the solid network are ignored. The model implemented in code_saturne relies on the seminal works of Benon and Incropera [2] and that of Voller and Prakash [11]. For a given variable y, the associated mixture average variable is denoted by \(y_m := g_ly_l + (1-g_l)y_s\) where \(g_l\) is the average liquid fraction on a representative elementary volume and \(y_l\) (resp. \(y_s\)) is the average variable in the liquid (resp. solid) phase. The model at stake considers the conservation laws for the mixture. The mixture is always assumed to be at the thermodynamic equilibrium. No motion in the solid phase is assumed. The micro-segregation is modelled through a closure law named the lever rule. Starting from the Navier–Stokes equations for an incompressible flow and for a Newtonian and laminar fluid under the Boussinesq approximation, a drag force is added in the momentum Eq. (1) following the Kozeny–Carman model [5]. The incompressibility constraint (2) states the mass conservation. The solidification process is namely seen as an evolutive porous media where the porosity decreases when the solid portion increases. The conservation of the energy (3) is solved using the temperature \(T_m\) as main unknown and a source term is added to take into account the phase change. Since one assumes a thermodynamic equilibrium, \(T_m=T_s=T_l\). The mass density \(\rho \), the dynamic viscosity \(\mu \), the thermal (resp. solutal) conductivity \(\lambda _T\) (\(\lambda _C\)), the specific heat capacity \(c_p\), the latent heat L, the thermal (resp. solutal) coefficient of expansion \(\beta _T\) (resp. \(\beta _C\)) are all assumed to be constant. Let \(\varOmega \) be the computational domain. One considers homogeneous Dirichlet boundary conditions for the velocity and a zero-mean constraint for the pressure. Dirichlet and homogeneous Neumann boundary conditions are set on the temperature while a no-flux boundary condition is enforced for the solute concentration \(C_m\). Initially, the fluid is at rest and \(\forall \underline{x}\in \varOmega \), \(T_m(\underline{x},0) = T_{0}\), \(C_m(\underline{x}, 0) = C_0\). With all these assumptions, choices of modeling and settings, we end up with the following system to solve: Find \((\underline{U}_m, p, T_m, C_m)\in \underline{H}^1_0(\varOmega ) \times L^2_0(\varOmega ) \times H^1(\varOmega ) \times H^1(\varOmega )\) s.t.

$$\begin{aligned}&\begin{aligned}&\partial _t(\rho \underline{U}_m) + {{\,\textrm{div}\,}}(\underline{U}_m\otimes \rho \underline{U}_m) - \underline{{{\,\textrm{div}\,}}}\,\mu {{\,\mathrm{\underline{\underline{\textrm{grad}}}}\,}}(\underline{U}_m) + \dfrac{\mu }{K(g_l)}\underline{U}_m + {{\,\mathrm{\underline{grad}}\,}}(p)\\&= \rho \underline{g}\left( 1 - \beta _T(T_m - T_{m,0} ) + \beta _C(C_l - C_{l,0})\right) , \end{aligned} \end{aligned}$$
(1)
$$\begin{aligned}&{{\,\textrm{div}\,}}(\underline{U}_m) = 0,\end{aligned}$$
(2)
$$\begin{aligned}&c_p\left( \partial _t(\rho T_m) + {{\,\textrm{div}\,}}(\rho \underline{U}_m T_m)\right) - {{\,\textrm{div}\,}}\lambda _T{{\,\mathrm{\underline{grad}}\,}}(T_m) = -\rho L \partial _t(g_l(T_m,C_m)) + S_{th}, \end{aligned}$$
(3)
$$\begin{aligned}&\partial _t (\rho C_m) + {{\,\textrm{div}\,}}(\dfrac{1}{g_l + k_p(1 - g_l)}\,C_m\cdot \rho \underline{U}_m) - {{\,\textrm{div}\,}}\lambda _C{{\,\mathrm{\underline{grad}}\,}}(C_m) = 0, \end{aligned}$$
(4)

with \(k_p\) the partition coefficient and \(\underline{g}\) the gravity vector. \(K(g_l) := \alpha \frac{g_l^3}{(1 - g_l)^2}\) where \(\alpha \) is a scaling factor depending on the material. The function \(g_l(T_m, C_m)\) is simplified by assuming a linearized liquidus slope (\(m_l\)) and the lever rule \(C_s = k_p C_l\); see Fig. 1 for an example of phase diagram considered in the case of a binary alloy. From the definition of a mixture variable and the lever rule, one gets: \(C_l = \frac{1}{g_l + k_p(1 - g_l)}C_m\).

Fig. 1
figure 1

Example of phase diagram in the case of a binary alloy

3 Numerical Scheme

The CDO framework [4] is used for the discretization of the system of equations described in Sect. 2. The discretization of the Navier–Stokes equations relies on the CDO face-based scheme as defined in [3, 8]. The degrees of freedom (DoFs) for the velocity are the component-wise mean-values over faces and cells, the mean-values over cells for the pressure. As proved in [8], an inf-sup property holds and we thus do not need any stabilization technique. The fully-coupled velocity-pressure coupling results in a saddle-point problem. DoFs for the temperature and solute concentration are also defined as the mean-value over faces and cells. All the algebraic systems to solve are reduced to only the face DoFs thanks to a static condensation technique. In all conservation equations (momentum, energy, solute), the time discretization relies on an implicit Euler time scheme and the advection scheme is centered for the momentum equation and is an upwind scheme for the other equations. Variable properties such as the liquid fraction \(g_l\) or the solute concentration in the liquid phase \(C_l\) are defined in each cell. The main algorithm to solve the new state of the system at time \(t^{n+1} := t^{n} + \varDelta t\) from the state at time \(t^{n}\) is described in Algorithm 1.

figure a

4 Numerical Results

We compare three approaches: (1) the code_saturne CDO approach presented in Sect. 3, (2) the colocated FV approach of code_saturne [7] referred as code_saturne FV in the following and (3) the staggered FV approach of the 2D commercial software SOLID®  [10].

In code_saturne FV, the spatial discretization is centered without slope test for the advection, a two-point flux approximation is used for the diffusion operator and the Rhie and Chow filter is employed to prevent checker-board issues as all variables are co-located at the cell centers. A SIMPLEC algorithm is employed with a constant time step. An Euler implicit time scheme is used with up to 10 inner iterations to converge over the Navier–Stokes and thermo-solutal system of equations.

The saddle-point problems arising from the CDO discretization are solved using a generalized conjugate residual (GCR) with a symmetric Gauss-Seidel block preconditioning. SOLID® computations rely on an upwind advection scheme with a PISO-like velocity-pressure coupling. code_saturne CDO and FV approaches use the same solidification/segregation model which presents some simplifications with respect to the SOLID® model where the momentum equation is formulated over the liquid phase instead of the mixture and the energy equation is expressed in enthalpy. Computations were performed with code_saturne 8.0.

4.1 Case Description

We adapted the Voller and Prakash’s benchmark [11] to a segregation problem for a binary alloy (non-dimensionalized properties are listed in Table 1). The geometry is a 2D squared cavity of unit measure with wall boundary conditions. A cold wall condition (\(T_m = T_{\text {cold}}\)) is applied on the left, and a hot wall (\(T_m = T_{\text {hot}}\)) on the right. Adiabatic conditions are imposed on the upper and lower parts of the domain. The domain is initially at rest at \(T_m=T_0\) and \(C_m=C_0\). The simulation ends at 750 s. A uniform Cartesian mesh (\(\varDelta x = \varDelta y = 1/100\)) is used.

Table 1 Test problem data for the adapted Voller and Prakash benchmark. The lower part corresponds to values specific to the simplified phase diagram

4.2 Results

Three criteria are used to compare the code_saturne CDO, code_saturne FV and SOLID® approaches:

  1. 1.

    integral quantities as the solidification rate \(S_R\) and the segregation index \(S_I\) (knowing that \(C_0=1\))

    $$\begin{aligned} S_R := \frac{1}{V_{\text {tot}}}\,\sum _{i\in N_{\text {cells}}}\left( 1-g_{l,i}\right) V_i, \qquad S_I := \sqrt{\frac{1}{V_{\text {tot}}}\,\sum _{i\in N_{\text {cells}}}\left( C_{m,i}-1\right) ^{2}V_i}, \end{aligned}$$

    where \(V_{\text {tot}}=\sum _{i\in N_{\text {cells}}}V_i\) with \(V_i\) the volume of cell i,

  2. 2.

    snapshots at the final time of the velocity, temperature and liquid fraction,

  3. 3.

    profiles at three different heights \(y=\left( 0.25,0.5,0.75\right) \) in the domain.

Fig. 2
figure 2

Time evolution of integral quantities

Results. The integral quantities are displayed on Fig. 2 and are similar between the code_saturne CDO and FV computations. The snapshots on Fig. 3 display the fields at the final time of the simulation for the liquid fraction, the temperature and the velocity magnitude. One observes a good visual agreement of the results.

Fig. 3
figure 3

Snapshots at the final simulation time

At the final time of the simulation, we plot the profiles of the values of liquid fractions (Fig. 4), of temperatures and velocity magnitudes (Fig. 5) with a comparison to SOLID® simulation results when available. One observes a good agreement of the computed profiles with respect to the SOLID® reference. Some discrepancies of code_saturne CDO and code_saturne FV approaches with respect to SOLID® are likely related to the distinct models used in these solvers.

Fig. 4
figure 4

Liquid volume fraction profiles at different heights

Fig. 5
figure 5

Profiles at different heights

Analysis. We obtained similar results between code_saturne CDO and code_saturne FV. SOLID® results present some differences as the system of equations is a bit different. Regarding the performances, the choice of the time step was driven by an upstream analysis that compared the error on the maximum velocity with respect to reference values associated to a SOLID® computation on a refined mesh. Values for the time step are 0.001 s for code_saturne FV approach, 1.0 s for code_saturne CDO and 0.01 s for SOLID®. code_saturne CDO appeared as more robust, keeping a good quality of results for large time steps and allowed for faster computations: the CDO computation took 40 min while the FV approach took around 40 h to run. Discrepancies between code_saturne and SOLID® approaches are linked to the difference of model and especially the way to handle the eutectic state. The non-linearity induced by this eutectic state will be the object of further investigations.