1 INTRODUCTION

Water is an important component of many general economic technologies and industrial productions. Water pollution is a global problem. The industry produces a huge amount of water-based liquid waste. These wastes contain toxic pollutants. Many industries do not have a proper system for monitoring and disposing of waste and dump it into nearby water bodies. The natural environment suffers from this, including people, animals, microorganisms, and vegetation. In addition to toxic substances, polluted water contains many pathogens of various infections [13], leading to up to 2 million deaths every year [4]. In order to overcome this situation, effective systems for water purification and quality control need to be created.

The creation of filtration structures consisting of multilevel purification systems can be used to solve the problem of water purification from pollution [57]. In this case, various methods and physical processes are used, including filters based on mechanical, thermal, chemical, and electromagnetic effects, as well as a hybrid approach that combines them.

This paper discusses the technology of electromagnetic filtration [811]. Such a purification mechanism consists of dividing the water flow into neutral, positively and negatively charged components. When the flow is exposed to magnetic and electric fields, the Lorentz force arises, which contributes to such a separation. Technically, the effect of the magnetic field is implemented by using strong permanent magnets or solenoids surrounding the pipeline. The electrical effect is realized by immersing the required number of electrodes into the pipeline. The purpose of electromagnetic filtration is the localization of charged particles or dissolved pollutant ions in the given area, from where the solution enriched with them can either be removed or retained for a long time, receiving purified water at the outlet of the system. At the same time, the quality of cleaning is controlled by regulating the strength of the electromagnetic effect. An additional advantage of this purification method is the possibility of effective regeneration of the purification system, as well as the extraction of useful substances suitable for recycling from impurities (for example, the extraction of rare earth and noble metals from sea water). The proposed filtering method is considered in this paper as part of the first model calculation (Problem 4.1).

In addition to the proposed electromagnetic method of purification, considered in this paper, heating and boiling water is an effective method to disinfect it. This process is an energy-intensive procedure, which requires the improvement of technical heating systems and the selection of the optimal parameters for their operation. Many works are devoted to the later problem, for example [1214]. The issues of energy efficiency of the heating system are especially acute in Asia, Africa, and Latin America.

From practice, the effect of scale formation when heating hard water containing a high concentration of various salts is well known. The formation of a solid sediment on the heating element leads to a drop in the energy efficiency of the system, and ultimately can lead to the failure of its functional units [14]. The issue of scale formation and removal is reflected in this study in the second model task (Problem 4.2).

Recently, purification technologies have been combined into closed cycles of water filtration and regeneration of the purification system [613]. Modeling such a cycle involves the sequential solution of problems of types 1 and 2.

2 MATHEMATICAL MODELS

To analyze the processes taking place during water purification, it is required to reflect the following processes: the fluid’s flow, including taking thermal effects into account, the evolution of the pollutant’s concentration with the reflection of convection-diffusion processes, and electrostatic effects. For this, a complex mathematical model was developed based on the method of splitting by physical processes, the computational algorithm and software implementation of which allows the activation and deactivation of physical processes depending on the task. We present the systems of equations used to analyze these processes.

2.1 Flow Model

To simulate the flow of a viscous incompressible fluid, a quasi-hydrodynamic (QHD) model is used [1519], which provides the possibility of stable computation even on fine meshes. We present a system of equations for describing the isothermal flow:

$$\frac{{\partial {\mathbf{u}}}}{{\partial t}} = \nabla \left[ {\frac{1}{{\operatorname{Re} }}(\nabla \otimes {\mathbf{u}} + {{{(\nabla \otimes {\mathbf{u}})}}^{{\text{T}}}}) + {\mathbf{w}} \otimes {\mathbf{u}} + {\mathbf{u}} \otimes {\mathbf{w}} - {\mathbf{u}} \otimes {\mathbf{u}} - p} \right],$$
(1)
$$\nabla (\nabla p) = \nabla \left[ {\frac{1}{\tau }{\mathbf{u}} - ({\mathbf{u}},\nabla ){\mathbf{u}}} \right],$$
(2)
$${\mathbf{w}} = \tau [({\mathbf{u}},\nabla ){\mathbf{u}} + \nabla p],$$
(3)

where \(\partial {\text{/}}\partial t\) is the time derivative, \(\operatorname{Re} = \rho {{u}_{0}}{{L}_{h}}{\text{/}}\eta \) is the Reynolds number, \(\nabla = {{\left\{ {\partial {\text{/}}\partial x,\partial {\text{/}}\partial y,\partial {\text{/}}\partial z} \right\}}^{{\text{T}}}}\) is the Hamilton operator, \({\mathbf{u}} = {{\{ {{u}_{x}},{{u}_{y}},{{u}_{z}}\} }^{{\text{T}}}}\) is the velocity vector, \(( \bullet \otimes \bullet )\) is the direct product of vectors, p is pressure, w is the regularizing correction, \(\tau \sim {\text{1/Re}}\) is the regularization parameter, ρ is the density, η is the dynamic viscosity coefficient, u0 is the characteristic flow velocity, and Lh is the characteristic linear size of the region (hydrodynamic diameter).

The system of equations (1)(3) is supplemented with the boundary and initial conditions necessary for modeling internal flows.

The inlet flow can be specified in terms of the known velocity distribution and pressure drop. In this study, we will mainly use the Poiseuille flow defined by the following relations obtained from the normalization condition at the center of the flow \({{\left. u \right|}_{{r = 0}}} = 1\):

$${\mathbf{u}}(r) = (1 - {{r}^{2}}{\text{/}}{{R}^{2}}){\mathbf{n}},\quad \partial p{\text{/}}\partial n = - 2{\text{/}}(\operatorname{Re} {{R}^{2}}),$$
(4)

where R is the radius of the inlet and n is the normal to the surface of the hole.

At the output, we will use the standard soft boundary conditions having the form

$$\partial {\mathbf{u}}{\text{/}}\partial n = 0,\quad p = 0.$$
(5)

There are various options for specifying boundary conditions in problems of the internal flow of an incompressible fluid; the main limiting situations are sticking and slipping. When modeling filtration processes on the scale of research and industrial installations, the no-slip conditions on the wall having the following form will be the most suitable:

$${\mathbf{u}} = {\mathbf{0}},\quad \partial p{\text{/}}\partial n = 0.$$
(6)

We consider the initial state to be the resting state of the environment:

$${\mathbf{u}} = {\mathbf{0}},\quad p = 0.5.$$
(7)

The recalculation to the dimensional variables of this model is based on the normalization of the input velocity per unit. From expression \(\operatorname{Re} = \rho {{u}_{0}}{{L}_{h}}{\text{/}}\eta \), it is clear that Lh, corresponding to the geometric parameter of the computational domain, and η and ρ, characterizing the medium, are free parameters. This fact, when fixing the Reynolds number, makes it possible to obtain an expression for calculating the characteristic flow velocity

$${\mathbf{\tilde {u}}} = {{u}_{0}}{\mathbf{u}} = \operatorname{Re} \eta {\mathbf{u}}{\text{/}}[{{\rho }_{0}}{{L}_{h}}],$$
(8)

where \({\mathbf{\tilde {u}}}\) is the velocity in dimensional units. The expression for recalculating pressure will take the following form (from the fact that \({{p}_{0}}{\text{/}}[{{\rho }_{0}}U_{0}^{2}] = 1\)):

$$\tilde {p} = {{p}_{0}}p = {{\operatorname{Re} }^{2}}{{\eta }^{2}}p{\text{/}}[{{\rho }_{0}}{{L}_{h}}^{2}],$$
(9)

where \(\tilde {p}\) is the pressure in dimensional units. Dimensional time is calculated using the expression

$$\tilde {t} = {{t}_{0}}t = \rho L_{h}^{2}t{\text{/}}[\operatorname{Re} \eta ].$$
(10)

Formulas (8)(10) contain expressions in dimensional units, but dimensionless parameters are used in the calculations.

2.2 Thermal Conductivity Model

If it is necessary to take into account the heat conduction effects within the considered QHD flow model, the system of equations (1)(3) is supplemented by the expression

$$\frac{{\partial T}}{{\partial t}} = \nabla \left[ {\frac{1}{{\operatorname{Re} \Pr }}\nabla T + ({\mathbf{w}} - {\mathbf{u}})T} \right],$$
(11)

where \(\Pr = \eta {{c}_{p}}{\text{/}}\kappa \) is the Prandtl number, cp is the specific heat capacity at constant pressure, and κ is the thermal conductivity coefficient.

Equations (1)(3) are supplemented by the terms

$${\mathbf{Gr}}T,\;\nabla {\mathbf{Gr}}T,\;{\text{and}}\; - {\kern 1pt} \tau {\mathbf{Gr}}T,$$
(12)

respectively, where \({\mathbf{Gr}} = {{{\text{\{ }}G{{r}_{x}},G{{r}_{y}},G{{r}_{z}}{\text{\} }}}^{{\text{T}}}}\). When taking into account the force of gravity acting along the OY axis, \({\mathbf{Gr}} = {{\{ 0,Gr,0\} }^{{\text{T}}}}\), where \(Gr = g{{\rho }^{2}}L_{h}^{3}\beta \Delta T{\text{/}}{{\eta }^{2}}\) is the Grashof number, g is the gravitational acceleration, β is the volumetric expansion coefficient of the medium, and ΔT is the characteristic temperature difference.

This model is also equipped with complementary ratios. The boundary conditions for thermal conductivity require reflecting the processes occurring at the inlets and outlets, as well as on the heating element (if any) and the walls of the tank.

At the inlet and outlet holes, we will assume

$$\partial T{\text{/}}\partial n = 0.$$
(13)

The allowable heat exchange on the wall of the investigated volume

$$\partial T{\text{/}}\partial n = \alpha (T - {{T}_{0}}),$$
(14)

where α is the heat transfer coefficient and T0 is the ambient temperature.

On the heating element, we need to take into account the temperature drop during the formation of salt sediments; for this we will use the expression

$$\partial T{\text{/}}\partial n = {{F}_{0}} + {{F}_{1}}({{C}_{{1k}}} - {{C}_{k}}){\text{/}}{{C}_{{1k}}},$$
(15)

where \({{F}_{0}}\) is the heat flow at maximum pollution, \({{F}_{0}} + {{F}_{1}}\) is the flow in the absence of pollution, and \({{C}_{{1k}}}\) is the maximum captured concentration of the pollutant.

As the initial state, we will consider

$$T = 0$$
(16)

in the entire region.

In the system under consideration, the characteristic of the substance is the Prandtl number. Note that the dimensional temperature conversion factor \({{T}_{0}}\) is free and is given directly. The recalculation is carried out in the obvious way:

$$\widetilde T = {{T}_{0}}T.$$
(17)

Thus, Eqs. (1)(3) and (11), as well as the boundary conditions (13)–(15) and initial conditions (16) and (17), will be used to describe the heat conduction model.

2.3 Model of the Concentration’s Evolution

When modeling the behavior of impurities contained in a liquid or gas flow, the concentrations of its components were introduced at the macroscopic level. To obtain their distribution and evolution in the studied area of the treatment system and take into account the convection-diffusion motion of the impurity components, the classical convection-diffusion equations, supplemented by QHD regularization, were used. These equations in dimensionless form have the following form:

$$\partial {{C}_{k}}{\text{/}}\partial t = \nabla \left[ {{{D}_{k}}\nabla {{C}_{k}} + ({\mathbf{w}} - {\mathbf{u}}){{C}_{k}}} \right].$$
(18)

Here \({{C}_{k}}\) is the concentration of particles (ions) of the k sort and \({{D}_{k}} = {{D}_{{0,k}}}{\text{/}}({{u}_{0}}{{L}_{h}})\) is the dimensionless particle diffusion coefficient.

The system of equations (18) consisting of \({{n}_{c}}\) (number of impurity components) equations is supplemented by the boundary and initial conditions corresponding to the problem.

At the inlet of the treatment tank, the boundary conditions of the concentration evolution model will be considered as given directly

$${{C}_{k}} = {{C}_{{0,k}}}{\text{/}}\sum\limits_k^{{{n}_{c}}} {{{C}_{{0,k}}}} $$
(19)

subject to equilibrium selection of \({{C}_{{0,k}}}\).

At the inlet and outlet holes, we will assume

$$\partial {{C}_{k}}{\text{/}}\partial n = 0.$$
(20)

The near-wall effects of sorption will be calculated using the expression

$$\partial {{C}_{k}}{\text{/}}\partial n = {{A}_{k}}({{C}_{k}} - C_{k}^{*})(1 - {{C}_{k}}{\text{/}}C_{k}^{{*{\kern 1pt} *}}),$$
(21)

where \(C_{k}^{*}\) is the equilibrium value of the particle concentration of the kth impurity component, \(C_{k}^{{*{\kern 1pt} *}}\) is the maximum concentration of the kth component held by the surface element of the sorbent granule, and \({{A}_{k}}\) is the intensity of particle capture of the kth component of the pollutant by the surface of the electric heating element (it may depend on the total number of vacancies on the surface of the granule, free from all nanoparticles of all types of pollutants).

We will carry out calculations from the zero initial conditions

$${{C}_{k}} = 0.$$
(22)

The concentration coefficients of the impurity components are set freely, similarly to the temperature coefficient with the recalculation formula

$${{\tilde {C}}_{k}} = {{C}_{{0,k}}}{{C}_{k}}.$$
(23)

In this case, the dimensionless diffusion coefficient by substituting the expression for \({{u}_{0}}\) is defined as

$${{D}_{k}} = \frac{{{{D}_{{0,k}}}}}{{{{u}_{0}}{{L}_{h}}}} = \frac{{{{D}_{{0,k}}}{{\rho }_{0}}}}{{\operatorname{Re} \eta }}.$$
(24)

2.4 Electrostatic Model

Modeling electromagnetic filters requires taking into account the Lorentz force in Eq. (18) by introducing the term

$$ - \nabla \left( {{{F}_{k}}{\mathbf{F}}{{C}_{k}}} \right),$$
(25)

where \({{F}_{k}} = {{q}_{k}}{{\mu }_{{ek}}}{{E}_{0}}{\text{/}}{{u}_{0}}\) is the normalization coefficient of the Lorentz force, \({{q}_{k}}\) is the particle charge in relative units taking the sign into account, \({{\mu }_{{ek}}}\) is the particle mobility coefficient, \({{E}_{0}} = {{\varphi }_{0}}{\kern 1pt} /{\kern 1pt} {{L}_{h}}\) is the tension normalization constant, \({{\varphi }_{0}} = {{\max }_{k}}\left( {\left| {{{q}_{k}}{{C}_{{0,k}}}} \right|} \right)L_{h}^{2}{\text{/}}\varepsilon \) is the potential normalization constant, \({\mathbf{F}} = {\mathbf{E}} + {{B}_{0}}\left[ {{\mathbf{u}} \times {\mathbf{B}}{\text{/}}\left| {\mathbf{B}} \right|} \right]\) is the Lorentz force, E is the electric field strength, \({{B}_{0}} = {{u}_{0}}\left| B \right|{\text{/}}{{E}_{0}}\) is the normalization constant of the magnetic induction, ε is the permittivity of the medium, and B is the magnetic induction vector.

To determine the tension, we will use the potential statement

$$\nabla \left( {\nabla \varphi } \right) = - \sum\limits_k^{{{n}_{c}}} {\frac{{{{q}_{k}}{{C}_{{0,k}}}}}{{{{{\max }}_{k}}\left( {\left| {{{q}_{k}}{{C}_{{0,k}}}} \right|} \right)}}{{C}_{k}}} ,$$
(26)
$${\mathbf{E}} = - \nabla \varphi ,$$
(27)

where φ is the potential of the electric field.

The filtration processes studied in this paper are characterized by a magnetic Reynolds number much smaller than unity. This makes it possible to consider the magnetic field in the system as an external factor. Its evolution is not taken into account in this case, and it is initiated either by a permanent strong magnet or by a solenoid through which a large constant circular current flows.

The model equations are supplemented with the boundary and initial conditions. The expressions used in this study are have the following form:

—on electrically neutral boundaries

$$\partial \varphi {\text{/}}\partial n = 0;$$
(28)

—on the electrodes

$$\varphi = {{\varphi }_{k}},$$
(29)

where \({{\varphi }_{k}}\) is the constant value of the potential on the kth electrode.

Homogeneous conditions are used as the initial conditions. The formulas for recalculating the potential and electric field strength when normalized by the impurity concentration and charge have the form

$$\widetilde \varphi = {{\varphi }_{0}}\varphi = \frac{{{{{\max }}_{k}}\left( {\left| {{{q}_{k}}{{C}_{{0,k}}}} \right|} \right)L_{h}^{2}}}{\varepsilon }\varphi ,\quad \tilde {E} = {{E}_{0}}E = \frac{{{{{\max }}_{k}}\left( {\left| {{{q}_{k}}{{C}_{{0,k}}}} \right|} \right){{L}_{h}}}}{\varepsilon }E.$$
(30)

When substituting expressions (U) and (E) into the normalization constant of the Lorentz force, we obtain the expression

$${{F}_{k}} = \frac{{{{q}_{k}}{{\mu }_{{ek}}}{{\rho }_{0}}L_{h}^{2}}}{{\eta \varepsilon \operatorname{Re} }}{{\max }_{k}}\left( {\left| {{{q}_{k}}{{C}_{{0,k}}}} \right|} \right).$$
(31)

3 NUMERICAL METHODS

The numerical implementation of the equations of continuum mechanics selected for the solution is based on the methods of splitting them into physical processes and grid methods of finite volume [2023].

When approximating the spatial operators of these elliptic and parabolic equations of the macromodel, unstructured grids are used, which is determined by the complex real geometry of the simulated treatment systems. Thecells are used as the control volumes. All the sought values are averaged over the cell volume and are determined at its center, with the exception of the regularizing correction w in the QHD equations, which is defined on the faces. The time derivatives are approximated explicitly. This approach makes it possible to use adaptive unstructured grids and achieve a high degree of boundary approximation even for a geometrically complex area.

We consider these numerical methods in more detail. To do this, we introduce the grid parameters and notation using the example of rectangular elements shown in Fig. 1. Here Vi is the area in the two-dimensional and volume in the three-dimensional case of the current ith grid element, Pi is the point of the center of the current ith element, Pij is the point of center j adjacent to the ith element, lij is the distance between the centers of adjacent cells, nij is the unit direction vector from the center of the current element to the center of the neighboring one, Sij are the directed length in the two-dimensional case and the area in the three-dimensional case of the jth face of the ith element multiplied by the outer normal.

Fig. 1.
figure 1

Characteristic grid values for quadrilateral two-dimensional (left) and cubic three-dimensional (right) finite v-olumes.

Taking into account the introduced notation, the grid analog of Eqs. (1)(3) takes the form

$$\begin{gathered} {{{{\mathbf{\hat {u}}}}}^{i}} = {{{\mathbf{u}}}^{i}} + \frac{{{{\tau }_{{{\text{time}}}}}}}{{{{V}^{i}}}}\sum\limits_{j = 1}^m {\left[ {\frac{1}{{\operatorname{Re} }}\left\{ {\frac{{{{{\mathbf{n}}}^{{ij}}}}}{{{{l}^{{ij}}}}} \otimes ({{{\mathbf{u}}}^{{ij}}} - {{{\mathbf{u}}}^{i}}) + ({{{\mathbf{u}}}^{{ij}}} - {{{\mathbf{u}}}^{i}}) \otimes \frac{{{{{\mathbf{n}}}^{{ij}}}}}{{{{l}^{{ij}}}}}} \right\} \cdot {{{\mathbf{S}}}^{{ij}}}} \right.} \\ \left. {^{{^{{^{{}}}}}} + \;\{ {{{\mathbf{w}}}^{{ij}}} \otimes {{{{\mathbf{\bar {u}}}}}^{{ij}}} + {{{{\mathbf{\bar {u}}}}}^{{ij}}} \otimes {{{\mathbf{w}}}^{{ij}}}\} \cdot {{{\mathbf{S}}}^{{ij}}} - \{ {{{{\mathbf{\bar {u}}}}}^{{ij}}} \otimes {{{{\mathbf{\bar {u}}}}}^{{ij}}}\} \cdot {{{\mathbf{S}}}^{{ij}}} - {{{\bar {p}}}^{{ij}}}{{{\mathbf{S}}}^{{ij}}}} \right], \\ \end{gathered} $$
(32)
$${{\hat {p}}^{i}} = \left[ {\sum\limits_{j = 1}^m {\left( {{{p}^{{ij}}}\frac{{{{{\mathbf{n}}}^{{ij}}}}}{{{{l}^{{ij}}}}} - \frac{1}{\tau }{{{{\mathbf{\bar {u}}}}}^{{ij}}} + ({{{{\mathbf{\bar {u}}}}}^{{ij}}},{{{\mathbf{n}}}^{{ij}}})\frac{{{{{\mathbf{u}}}^{{ij}}} - {{{\mathbf{u}}}^{i}}}}{{{{l}^{{ij}}}}},{{{\mathbf{S}}}^{{ij}}}} \right)} } \right]{{\left[ {\sum\limits_{j = 1}^m {\frac{{({{{\mathbf{n}}}^{{ij}}},{{{\mathbf{S}}}^{{ij}}})}}{{{{l}^{{ij}}}}}} } \right]}^{{ - 1}}},$$
(33)
$${{{\mathbf{w}}}^{{ij}}} = \tau \left[ {({{{{\mathbf{\bar {u}}}}}^{{ij}}},{{{\mathbf{n}}}^{{ij}}})\frac{{{{{\mathbf{u}}}^{{ij}}} - {{{\mathbf{u}}}^{i}}}}{{{{l}^{{ij}}}}} + \frac{{{{p}^{{ij}}} - {{p}^{i}}}}{{{{l}^{{ij}}}}}{{{\mathbf{n}}}^{{ij}}}} \right],$$
(34)

where \({{{\mathbf{\hat {u}}}}^{i}}\) is the grid analog of the velocity in element i at the next time step, ui is an analog of the velocity in the selected element at the current time step, τtime is the time step, \({{{\mathbf{\bar {u}}}}^{{ij}}} = 0.5({{{\mathbf{u}}}^{{ij}}} + {{{\mathbf{u}}}^{i}})\) is the interpolation of the velocity to the center of the face of the grid element, uij is the grid analog of the velocity in the neighboring element, m is the number of elements adjacent to the selected element (in the case of a triangular mesh, it is 3; a square mesh, 4; and a cubic mesh, 6); \({{\bar {p}}^{{ij}}} = 0.5({{p}^{{ij}}} + {{p}^{i}})\) is the interpolation of the pressure on the center of the face of the grid element, \({{\hat {p}}^{i}}\) is the grid analog of the pressure in the center of the selected cell, pij is an analog of the pressure in the neighboring cell, and wij is the grid analog of the regularizing correction.

Grid analogs (1)–(3) are complemented in a natural way by the corresponding boundary conditions (4)–(6). The calculation starts from the initial conditions (7). In this case, the calculation of one time step of the velocity implies the sequential calculation of expressions (32)–(34), which is performed up to the establishment of a stationary flow regime. Note that within the velocity time step, the pressure is recalculated once. This makes it possible to significantly speed up the calculation, in which the flow is established in terms of velocity and pressure together.

The equations of the heat conduction model (1)–(3) and (11) will take the following difference form:

$${{\hat {T}}^{i}} = {{T}^{i}} + \frac{{{{\tau }_{{{\text{time}}}}}}}{{{{V}^{i}}}}\sum\limits_{j = 1}^m {\left( {\frac{1}{{\operatorname{Re} \Pr }}\frac{{({{T}^{{ij}}} - {{T}^{i}})}}{{{{l}^{{ij}}}}}{{{\mathbf{n}}}^{{ij}}} + {{{\bar {T}}}^{{ij}}}({{{\mathbf{w}}}^{{ij}}} - {{{{\mathbf{\bar {u}}}}}^{{ij}}}),{\text{ }}{{{\mathbf{S}}}^{{ij}}}} \right)} ,$$
(35)

where \({{\hat {T}}^{i}}\) and Ti are the temperature in the current i cell at the next and current time steps, Tij is the temperature in the adjacent cell, and \({{\bar {T}}^{{ij}}} = 0.5({{T}^{{ij}}} + {{T}^{i}})\) is the temperature interpolation to the edge of the grid element.

The difference analogs of additives (12) for expressions (32)–(34) take the form

$${\mathbf{Gr}}{{T}^{i}},\;\left[ {\sum\limits_{j = 1}^m {{{{\bar {T}}}^{{ij}}}} \left( {{\mathbf{Gr}},{{{\mathbf{S}}}^{{ij}}}} \right)} \right]{{\left[ {\sum\limits_{j = 1}^m {\frac{{({{{\mathbf{n}}}^{{ij}}},{{{\mathbf{S}}}^{{ij}}})}}{{{{l}^{{ij}}}}}} } \right]}^{{ - 1}}}\;{\text{and}}\; - {\kern 1pt} \tau {\mathbf{Gr}}{{T}^{i}}.$$
(36)

The distribution of the pollutant’s components will be calculated using difference analogs of the convection-diffusion equations (18)

$$\hat {C}_{k}^{i} = C_{k}^{i} + \frac{{{{\tau }_{{{\text{time}}}}}}}{{{{V}^{i}}}}\sum\limits_{j = 1}^m {\left( {{{D}_{k}}\frac{{C_{k}^{{ij}} - C_{k}^{i}}}{{{{l}^{{ij}}}}}{{{\mathbf{n}}}^{{ij}}} + \bar {C}_{k}^{{ij}}\left( {{{{\mathbf{w}}}^{{ij}}} - {{{{\mathbf{\bar {u}}}}}^{{ij}}}} \right),{{{\mathbf{S}}}^{{ij}}}} \right)} ,$$
(37)

where \(\hat {C}_{k}^{i}\) and \(C_{k}^{i}\) are the concentration of the kth impurity component in the current cell i at the next and current time steps, \(C_{k}^{{ij}}\) is the concentration of the kth component in an adjacent cell, and \({{\bar {C}}^{{ij}}} = 0.5({{C}^{{ij}}} + {{C}^{i}})\) is the interpolation of the concentration of the kth component to the face of the grid element.

The concentration evolution is calculated component-by-component using expression (37), taking into account the boundary conditions (19)–(21), initial conditions (22) and (23), and expression (24) when modeling the sorption filtration. When conducting a numerical experiment on the problems of electromagnetic cleaning, the set of equations is supplemented with an electrostatics model.

The electrostatic model (26) and (27) in the difference form will have the following form:

$${{\hat {\varphi }}^{i}} = \left[ {{{V}^{i}}\sum\limits_{k = 1}^p {\frac{{{{q}_{k}}{{C}_{{k0}}}}}{{{{{\max }}_{k}}(\left| {{{q}_{k}}{{C}_{{k0}}}} \right|)}}C_{k}^{i}} + \sum\limits_{j = 1}^m {\frac{{{{\varphi }^{{ij}}}}}{{{{l}^{{ij}}}}}({{{\mathbf{n}}}^{{ij}}},{{{\mathbf{S}}}^{{ij}}})} } \right]{{\left[ {\sum\limits_{j = 1}^m {\frac{{({{{\mathbf{n}}}^{{ij}}},{{{\mathbf{S}}}^{{ij}}})}}{{{{l}^{{ij}}}}}} } \right]}^{{ - 1}}},$$
(38)
$${{{\mathbf{\hat {E}}}}^{i}} = - \frac{1}{{{{V}^{i}}}}\sum\limits_{j = 1}^m {{{{\bar {\varphi }}}^{{ij}}}{{{\mathbf{S}}}^{{ij}}}} ,$$
(39)

where \({{\hat {\varphi }}^{i}}\) and \({{{\mathbf{\hat {E}}}}^{i}}\) are the values of the potential and electric field strength at the next iteration in cell i, \({{\varphi }^{i}}\) and \({{\varphi }^{{ij}}}\) are the potential value in the current i cell and adjacent j cell, and \({{\bar {\varphi }}^{{ij}}} = 0.5({{\varphi }^{{ij}}} + {{\varphi }^{i}})\) is the interpolation of the potential on the edge of the element.

The Lorentz force will be defined on the faces of the grid elements as

$${{{\mathbf{F}}}^{{ij}}} = {{{\mathbf{\bar {E}}}}^{{ij}}} + {{B}_{0}}[{{{\mathbf{\bar {u}}}}^{{ij}}} \times {{{\mathbf{B}}}^{{ij}}}],$$
(40)

where \({{\bar {E}}^{{ij}}} = 0.5({{E}^{{ij}}} + {{E}^{i}})\) is the interpolation of the tension on the face of the grid element and Bij is the vector of magnetic induction on the edge of the cell.

The discrete analog of addition (25) to expression (37) takes the form

$$ - \frac{{{{\tau }_{{{\text{time}}}}}}}{{{{V}^{i}}}}{{F}_{k}}\sum\limits_{j = 1}^m {\left( {\bar {C}_{k}^{{ij}}{{{\mathbf{F}}}^{{ij}}},{{{\mathbf{S}}}^{{ij}}}} \right)} .$$
(41)

Expressions (38) and (39) are sequentially calculated for each time step when calculating the concentration once up to the desired time value, taking into account the boundary conditions (28) and (29), as well as formulas (30) and (31).

The software implementation of the proposed computational algorithm is based on the C++ programming language using template- and object-oriented approaches [24]. To ensure parallelism, the OpenMP [25] and OpenMPI [26] libraries were used using geometric parallelism based on partitioning the computational grid into domains.

As part of the verification of the developed numerical methods, the QHD flow model was studied by the method of refining grids using the example of solving the problem of establishing the Poiseuille flow. The obtained solution was compared with the calculated data of the Ansys Fluent package and confirmed the correctness of the developed QHD code. Other similar comparisons in the case of the complex geometry of the computational domain were published in [27].

To test the computer implementation of the algorithm for solving equations of the convection-diffusion type, we considered the problem of the transfer of an admixture distributed over a Gaussian function in a square domain with a known analytical solution [28]. The results obtained on a detailed spatial grid coincided with the analytical solution with the accuracy determined by the order of approximation of the numerical scheme. Fig. 2

Fig. 2.
figure 2

The geometry of the filtration tank during electromagnetic cleaning.

Validation of the developed numerical approach was somewhat difficult due to the lack of publications containing detailed experimental data. The most convenient work in this respect was [29], which studied a full-scale experiment for a seawater desalination process by the electromagnetic method. Based on the data of [29], with the help of the developed software package, it was possible to repeat the effect of desalination described in the article.

4 PROBLEMS OF PURIFICATION OF AN AQUATIC ENVIRONMENT

4.1. The Problem of Electromagnetic Purification of an Aquatic Environment

Filtration with the help of electromagnetic influence turned out to be interesting when considering the problems of cleaning an aquatic environment. In practical terms, its advantage lies in the simplicity of the design and maintenance of the installation, as well as the wide range and easy adjustment of cleaning modes. In scientific terms, a wide field still remains for research related to the geometric features of the existing and future treatment systems; i.e., there is demand for improving the accuracy of the projected computational studies.

For the computational experiment, a grid containing 131 296 triangular prisms was used. The flow characteristics (velocities and pressure) presented in Figs. 3–6 were obtained by the numerical calculation of the grid equations (32)(34) for a Reynolds number of 100.

Fig. 3.
figure 3

Pressure distribution in the central section.

Fig. 4.
figure 4

Distribution of longitudinal velocity in the central section.

Fig. 5.
figure 5

Distribution of transverse velocity in the central section.

Fig. 6.
figure 6

Stream lines, general view.

The concentration’s evolution was modelled in accordance with expressions (37)–(41) for a single-component pollutant with parameters \({{D}_{k}}\) = 1.0, \({{\varphi }_{0}}\) = 1.0, \({{B}_{0}}\) = 3.0, and \({{F}_{k}}\) = 1.0. Figures 7 and 8 show the stationary distribution of the pollutant in the study area.

Fig. 7.
figure 7

Distribution of impurity concentration in the central section.

Fig. 8.
figure 8

Impurity concentration distribution, general view.

The computational experiment carried out makes it possible to establish the degree of liquid purification by the electromagnetic method, which was about 5% when using the parameters from the condition [27]. The degree of purification of the medium was calculated by integrating the impurity concentration at the inlet and right outlet. As a result, the following values were obtained: at the input, 1.0, and on the right exit, 9.450832e-001, from which we obtain 0.0549168 ~ 5%.

By varying these parameters, it is possible to achieve the magnetic field strength that is optimal in terms of the energy efficiency of the treatment system. The required degree of purification can be achieved not only by increasing the magnetic field strength but also by connecting the presented tanks in series.

4.2. The Problem of the Contamination of a Fuel Element

With a long period of operation of the electric heating element in hard water, its efficiency drops significantly. This is primarily due to the formation of scale obtained from the pumped solution, due to the drop in the solubility of the salts with an increase in the temperature of the medium. The decrease in the efficiency of the electric heating element leads to an increase in energy consumption, and in the extreme case to the failure of the element. To prevent such situations and establish operation-regeneration cycles, it is necessary to be able to simulate the scale formation process [30].

We will consider the electric heating element whose geometry is shown in Fig. 9. The characteristic dimensions of the region, indicated in Fig. 9, are as follows: L1 = 4.5, L2 = 0.5, L3 = 3.5, R1 = 0.5, and R2 = 3.0. The electric heating element is a cylindrical tube with a radius of 0.1 and overall dimensions of 1.5 × 2.0 × 0.2 in X, Y, and Z, respectively.

Fig. 9.
figure 9

Geometry of the third model problem.

Note that the effect of various boundary conditions for the heat equation at the free outlet is considered in detail in [31]. Of all the options considered, the homogeneous Neumann conditions are the simplest to implement and are applicable in the absence of a reverse flow on the outlet surface.

The computational experiment will be carried out in three stages. As part of the first stage, we calculate the stationary distributions of velocities, pressure, and temperature in the region. At the second stage, we will carry out a model calculation of scale formation from hard water in accordance with the chemical reaction formula

$${\text{Ca(HC}}{{{\text{O}}}_{3}}{{)}_{2}} = {\text{CaC}}{{{\text{O}}}_{3}}{\kern 1pt} \downarrow + \;{\text{C}}{{{\text{O}}}_{2}} + {{{\text{H}}}_{{\text{2}}}}{\text{O}}.$$

The third stage will consist of cleaning the heating element from scale by pumping a hydrochloric acid solution with the reaction formula

$${\text{CaC}}{{{\text{O}}}_{3}} + 2{\text{HCl}} = {\text{CaC}}{{{\text{l}}}_{{\text{2}}}} + {\text{C}}{{{\text{O}}}_{2}} + {{{\text{H}}}_{{\text{2}}}}{\text{O}}{\text{.}}$$

A series of computational experiments was carried out on a tetrahedral mesh consisting of 140 634 elements. Stationary distributions of the flow parameters obtained by calculating expressions (32)–(36) with parameters \(\operatorname{Re} = 700\), \({\text{Pe}} = 10\), and \({\text{Gr}} = 0\) are presented in Figs. 10–12.

Fig. 10.
figure 10

Velocity module: general view (top left), section Y = 0.5 (top right), section Z = 0 (bottom center).

Fig. 11.
figure 11

Pressure in section Z = 0.

Fig. 12.
figure 12

Temperature in section Z = 0.

We consider the results of modeling the flow of hard water saturated with Ca(HCO3)2 with the diffusion coefficient D = 0.005 for both CO2 and Ca(HCO3)2 volumetric quantities, calculated through expressions (37). The initial impurity distribution was assumed to be zero. The distribution of Ca(HCO3)2 is shown at the point in time t = 50 in Fig. 13. The concentration of the CaCO3 precipitate on the heating element is shown in Fig. 14; and the temperature distribution in the cross section Z = 0, in Fig. 15. To calculate the sediment’s concentration on the heating element, an equation similar to (21) was used, with the source depending on the temperature and Ca(HCO3)2. The drop in the heat release at the boundary was obtained in accordance with expression (15). A comparison of Figs. 12 and 15 shows a significant drop in temperature in the studied area.

Fig. 13.
figure 13

Distribution of Ca(HCO3)2, general view (left) and in section Z = 0 (right).

Fig. 14. 
figure 14

CaCO3 concentration distribution on the surface of the heating element.

Fig. 15.
figure 15

Temperature distribution in the section Z = 0.

Subsequent pumping of the hydrochloric acid solution for t = 50 allowed us to restore the functionality of the heating element and get rid of most of the sediment. The results of this computational experiment are shown in Figs. 16 and 17.

Fig. 16.
figure 16

CaCO3 concentration distribution on the surface of the heating element after regeneration of device.

Fig. 17.
figure 17

Temperature distribution in section Z = 0 after device regeneration.

As part of the numerical calculation, the temperature distributions in the studied volume were obtained and the decrease in the efficiency of the electric heating element during the formation of scale, as well as its subsequent cleaning and restoration of functionality, was reflected. The ability to study geometries that are close to real ones makes it possible to select flow regimes by varying the Reynolds number and optimize the geometry of the heating system.

5 CONCLUSIONS

In this study, the technology of water purification using electromagnetic filtration and the problem of descaling and descaling are considered. For the theoretical analysis, a complex mathematical model and a numerical technique based on the control volume method and an explicit computational algorithm have been developed. The technique is implemented in the form of a set of calculation and auxiliary programs and is tested on the calculations of the characteristics of the physical processes taking place in technological tanks intended for cleaning or softening the aquatic environment. As shown by the numerical experiments, the developed numerical approach and its software implementation make it possible to effectively solve the problems of cleaning an aquatic environment in various technical conditions, taking into account the actual geometry and parameters of the treatment system. The results of the study can be used for practical application in optimizing the designs and operating modes of heat exchangers for water treatment.