## 2 Mathematical Model of the Process
### Hydrodynamic Submodel  
The distributions of Joule heat and Lorentz forces allow us to calculate in the hydrodynamic submodel the target criterion related to the homogenization of the processed bath--the average flow velocity. In the submodel, a steady simulation was carried out, determining the above-mentioned value at the moment of the stabilization of the process in the furnace.  
The steady state for an incompressible fluid and laminar flow is described by the following equation:  
\[\rho\
abla(\textbf{v}\textbf{v})=-\
abla p+\mu\
abla^{2}\textbf{v}+\rho\textbf {g}+\textbf{f}_{\rm LF}+\textbf{f}_{buo} \tag{6}\]  
Figure 3: Domain of EM submodel with boundary conditions.  
where \(\rho\) is the fluid density, \(\mathbf{v}\) is the velocity, \(p\) is the pressure, \(\mu\) is the dynamic viscosity, \(\mathbf{g}\) is the gravitational acceleration vector, and \(\mathbf{f}_{buo}\) is the buoyancy force.  
As can be seen, the equation assumes constant fluid density while natural convection is implemented via the Boussinesq model:  
\[\mathbf{f}_{buo}=-\rho_{0}\beta(T-T_{0})\mathbf{g} \tag{7}\]  
where \(T\) is the temperature, \(\rho_{0}\) is the density at the reference temperature \(T_{0}\), and \(\beta\) is the thermal expansion coefficient.  
To determine temperature distribution and heat transfer within the furnace, the following energy equation is solved:  
\[\rho c\mathbf{v}\cdot\
abla T=\
abla\cdot(k\
abla T)+q_{\mathrm{H}} \tag{8}\]  
where \(k\) is the thermal conductivity and \(c\) is the specific heat capacity. Figure 4 shows the geometry of the HD submodel based on the basic furnace. Convective heat transfer was applied to the external walls of the domain, with the heat transfer coefficient (\(h_{\mathrm{ext}}\)) of \(25\,\mathrm{W}/\mathrm{m}^{2}\)-K and the ambient temperature (\(T_{\mathrm{ext}}\)) of \(21.85\,\mathrm{\SIUnitSymbolCelsius}\). Heat transfer was defined using the following formula:  
\[\dot{Q}=h(T_{ext}-T) \tag{9}\]  
where \(h\) is the heat transfer coefficient and \(T_{\mathrm{ext}}\) is the external ambient temperature.  
On the upper surface of the slag, the mixed heat exchange condition was implemented, incorporating both convection and radiation. The parameters for this condition were the heat transfer coefficient of \(25\,\mathrm{W}/\mathrm{m}^{2}\)-K, the ambient temperature of \(21.85\,\mathrm{\SIUnitSymbolCelsius}\), and an external emissivity of \(0.8\). Mixed heat transfer was defined using equation [28]:  
\[\dot{Q}=h(T_{ext}-T)+\epsilon\sigma(T_{ext}^{4}-T^{4}) \tag{10}\]  
where \(\epsilon\) is the emissivity of the slag surface and \(\sigma\) is the Stefan-Boltzmann constant. For the free surface of the slag, no friction was assumed:  
\[\frac{\partial v_{||}}{\partial\mathbf{n}}=0 \tag{11}\]  
where \(v_{||}\) is the velocity component parallel to the wall and \(\mathbf{n}\) is the vector normal to the wall.  
Figure 4: Domain of HD submodel with boundary conditions.  
Geometry for hydrodynamic submodel generated in Ansys SpaceClaim 22R2 software [29]. Mesh was generated in Ansys Fluent Meshing 22R2 software [30]. Hydrodynamic calculations were carried out based on the Ansys Fluent 22R2 [28]. Data obtained from calculations performed in GetDP were interpolated onto the mesh for the hydrodynamic model. Data on the value of the Lorentz force and Joule heat were added to the model using Fluent User Defined Functions.