## 2 Materials and Methods
### Freezing Theories
#### 2.2.3 Composition Equation  
In the solidification and melting of pure substances, phase transitions occur at distinct melting temperatures \(T_{melt}\). In multicomponent mixtures, there exists a mushy solidification/melting zone between the lower solidus temperature and the higher liquidus temperature. When a multicomponent liquid solidifies, the solute diffuses from the solid phase to the liquid phase. This phenomenon can be quantified by the composition coefficient \(K_{i}\) of solute \(i\), which is described as the ratio of the solid phase mass fraction to liquid phase mass fraction at the interface [29; 30].  
The calculation formula of the solidus temperature of the multi-component mixture is as follows:  
\[T_{solidus}=T_{melt}+\sum_{solutes}m_{i}Y_{i}/K_{i} \tag{10}\]  
The calculation formula of liquidus temperature is as follows:  
\[T_{liquidus}=T_{melt}+\sum_{solutes}m_{i}Y_{i} \tag{11}\]  
In the formula, \(K_{i}\) is the composition coefficient of solute i, \(Y_{i}\) is the mass fraction of solute \(i\), and \(m_{i}\) is the slope of the liquidus.  
If the value of the mass fraction Yi exceeds the value of the eutectic mass fraction \(Y_{i}\), \(E_{it}\), it is truncated when calculating the liquidus and solidus temperatures. The calculation assumes that the last component of the mixture is a solvent and the other components are solutes.  
A negative slope \(m_{i}\) is input to the liquidus of component \(i\). If a positive slope \(m_{i}\) is input, Fluent will ignore this input, and use eutectic temperature and eutectic mass fraction to calculate the slope:  
\[m_{i}=\frac{T_{Eut}-T_{melt}}{Y_{i,Eut}} \tag{12}\]  
In multi-component mixtures, updating the liquid fraction by the conventional liquid fraction equation will lead to numerical errors and convergence difficulties. At this time, the following iterative equation is used to calculate the liquid fraction:  
\[\beta^{n+1}=\beta^{n}-\lambda\frac{a_{p}(T-T^{*})\Delta t}{\rho VL-a_{p} \Delta t\frac{\partial T}{\partial p}} \tag{13}\]  
In the equation, the superscript \(n\) represents the number of iterations, \(\lambda\) is the relaxation factor, the default is 0.9, and \(a_{p}\) is the element matrix coefficient; \(\Delta t\) is the time step, \(\rho\) is the current density; \(V\) is the volume of the mesh unit; \(T\) is the temperature of the current grid; and \(T^{*}\) is the interface temperature.  
The Lever method component separation model is selected for calculation. Assuming that the solute diffuses infinitely in the solid, the interface temperature calculation formula is as follows:  
\[T^{*}=T_{melt}+\sum_{i=0}^{N_{s}-1}m_{i}\bigg{[}\frac{Y_{i}}{K_{i}+\beta(1-K_{ i})}\bigg{]} \tag{14}\]  
In the equation, \(N_{s}\) is the number of components.  
The component transport equation is expressed as follows:  
\[\frac{\partial}{\partial t}(\rho Y_{i})+\
abla\cdot\Big{(}\rho\Big{[}\vec{ \vartheta}\overrightarrow{v}_{liq}Y_{i,liq}+(1-\beta)\overrightarrow{v}_{p} Y_{i,sol}\Big{]}\Big{)}=-\
abla\cdot\overrightarrow{l}_{i}+R_{i} \tag{15}\]  
In the equation, \(R_{i}\) is the reaction rate; expressed as follows:  
\[\overrightarrow{l}_{i}=-\rho\Big{[}\beta D_{i,m,liq}\
abla Y_{i,liq}+(1-\beta )D_{i,m,sol}Y_{i,sol}\Big{]} \tag{16}\]  
In the equation, \(\overrightarrow{v}_{liq}\) is the liquid velocity and \(\overrightarrow{v}_{p}\) is solid phase velocity (pull-out velocity). When the pull-out speed is not included in the calculation, the variable is 0. The liquid phase rate is calculated by the following formula:  
\[\overrightarrow{v}_{liq}=\frac{\Big{(}\overrightarrow{v}-\overrightarrow{v} _{p}(1-\beta)\Big{)}}{\beta} \tag{17}\]  
The mass fraction of the liquid phase (\(Y_{i,liq}\)) and solid phase (\(Y_{i,sol}\)) is related to the distribution coefficient \(K_{i}\):  
\[Y_{i,sol}=K_{i}Y_{i,liq} \tag{18}\]