In this paper, we present a numerical study of the three-dimensional behavior of a liquid metal flow in an insulating rectangular duct of narrow cross section past a localized magnetic field (i.e., a magnetic obstacle) produced by two parallel square magnets arranged externally on the walls of the duct. A series of simulations are conducted focused mainly on describing the interplay between inertial and magnetic forces in a wide range of interaction parameters ( $1.8<N<48$) by varying the Reynolds number while the Hartmann number is kept fixed (*Ha* = 75). The analyzed configuration coincides with that studied experimentally by Domínguez *et al.* [“Experimental and theoretical study of the dynamics of wakes generated by magnetic obstacles,” Magnetohydrodynamics **51**(2), 215–224 (2015)] and, as a first step, experimental data from local variables (streamwise velocity component) and global parameters (oscillation frequency and kinetic energy of the wake) are consistently replicated by the numerical model. Furthermore, to complement the flow phenomenology, the transition to different flow structures as the interaction parameter varies is explored. It is found that when the magnetic forces predominate over inertia, stationary vortex patterns with two, four, and six vortices appear while, unlike the hydrodynamic flow past a bluff body, the increase in inertial effects leads to a reduction in the number of vortices and eventually to their disappearance, reaching a state in which the magnetic obstacle becomes imperceptible to the flow. The existence of a critical value of the interaction parameter that maximizes the kinetic energy of the wake is confirmed numerically and corroborated from the experimental data.

## I. INTRODUCTION

Several technological applications, particularly in the metallurgical industry, rely on the use of steady magnetic fields to suppress unwanted motion and promote a more quiescent process. That is the case, for instance, of the cold crucible technique or the continuous casting of steel, where the application of a steady magnetic field allows the control of liquid metal-free surfaces.^{1,2} The stabilizing effect of a steady field involves, on the one hand, the damping of velocity fluctuations due to the dissipation of induced electric currents circulating in the liquid metal, so that kinetic energy is transformed into heat by Joule dissipation.^{3} On the other hand, electric currents circulating in boundary layers attached to walls with a normal component of the applied magnetic field give rise to a Lorentz force that promotes the braking of the fluid motion, what is known as Hartmann braking. Magnetic damping usually requires extensive magnetic fields that encompass the entire flow region.^{4} However, even strong fringing magnetic fields are able to damp turbulent thermal convection flows.^{5}

Steady magnetic fields can also be the source of unstable behavior. This may occur when heterogeneous electromagnetic conditions are present in the flow, promoting the creation of Lorentz forces able to produce a destabilizing effect on the flow by modifying the mean-flow velocity distribution. For instance, non-uniformities of the electrical conductivity of the walls may produce the formation of internal shear layers and lead to the emergence of flow instabilities when inertial effects are not negligible.^{6} Internal shear layers can also be created in liquid metal flows due to non-uniformities in the applied magnetic field, particularly when the magnetic source is confined in a small zone compared with the full flow region. In fact, induced currents in the liquid metal interact with the applied magnetic field, giving rise to a localized Lorentz force that, acting as a contactless obstacle, namely, a *magnetic obstacle*, brakes the fluid and creates vorticity.^{7,8} If inertial effects are sufficiently strong in rectilinear flows, the obstruction created by the magnetic obstacle can lead to unstable behavior, manifested in the appearance of vortex shedding and the formation of a time-dependent wake.^{7} However, when strong dissipation is also present, such as due to confining walls, the flow can be stabilized and the occurrence of vortex shedding is avoided.^{9} Under creeping flow conditions, in turn, a magnetic obstacle can create steady flow patterns that display structures not observed in the flow past solid obstacles.^{10,11} Another interesting situation results when the localized magnetic field performs an oscillatory motion in an initially quiescent liquid metal layer.^{12,13} This case has been recently explored, finding that transverse oscillations of a magnet create a sinusoidal time-dependent wake with a resonant excitation of the sinusoidal vortex shedding, which can be interesting for magnetic stirring purposes.^{14} Incidentally, the rich dynamic behavior presented in liquid metal flows in magnetic obstacles, as well as technological applications such as the Lorentz force velocimetry^{15–17} and the possibility of wall-heat transfer enhancement,^{18–22} have motivated several theoretical and experimental studies in the last two decades. In fact, in a novel application, a magnetic obstacle has been used as an effective source of temperature pulsations required for the implementation of the temperature correlation method in a liquid sodium flow measurement system.^{23}

The flow past bluff bodies, for instance, cylinders or spheres, is one of the most studied problems in fluid dynamics, and its phenomenology as the Reynolds number increases has been clearly established from experiments and numerical simulations.^{24,25} In contrast, the flow of a liquid metal past a magnetic obstacle displays a wider dynamic behavior since the presence of a magnetic field introduces an additional degree of freedom that requires an extra dimensionless parameter for its characterization. In physical terms, while the dynamics in the flow past bluff bodies is determined by the interplay of inertia and viscous forces, in the flow past a magnetic obstacle, the opposing Lorentz force adds an essential ingredient to the flow dynamics. This phenomenon can be described in terms of the Reynolds number, $Re=UL/\nu $, and the interaction parameter (or Stuart number), $N=\sigma Bm2L/\rho U$, where *U*, *B _{m}*, and

*L*are the characteristic velocity, magnetic field, and length scales, while

*ν*,

*ρ,*and

*σ*are the kinematic viscosity, mass density, and electrical conductivity of the liquid metal. The interaction parameter estimates the strength of magnetic forces compared with inertia and can be expressed in the form $N=Ha2/Re$, where

*Ha*is the Hartmann number, $Ha=BmL(\sigma /\rho \nu )1/2$, whose square estimates the magnitude of the magnetic forces compared to the viscous forces. While inertia along with viscous and magnetic forces mainly determine the flow dynamics, boundaries and geometrical factors play a fundamental role in defining the flow patterns. In the hydrodynamic case, the location of a solid obstacle can impact the flow in such a way that an increasing blockage ratio results in asymmetric and unstable flow due to lateral wall proximity effects.

^{26}In the magnetohydrodynamic (MHD) case, the size and location of the imposed magnetic field, usually provided by permanent magnets, have also a relevant influence on the flow. In analogy to the blockage ratio typically used for solid obstacles, the constrainment factor, defined as $\kappa =My/Ly$, relates the lateral size of the magnet exposed to the oncoming flow,

*M*, to the size of the duct in the transverse section,

_{y}*L*.

_{y}^{8,9}In fact, although the detailed magnetic field profile and shape of the magnet are not critical, the constrainment factor plays a fundamental role in determining the flow dynamics and the wake structure.

^{9}In a recent study, the blockage effect has been analyzed in electromagnetically generated electrolyte wakes in a narrow channel using traveling magnets of different size.

^{27}Although several experimental and theoretical studies have been accomplished in the past decades, the full picture of the flow past magnetic obstacles is still missing.

The structure of the wake of a magnetic obstacle was investigated by Votyakov *et al.*^{8} who conducted an experimental study and three-dimensional (3D) numerical simulations of the flow of a liquid metal through a localized magnetic field in a rectangular duct. They explored different flow regimes by varying *Re*, *N*, and *κ* and found stable patterns with no vortices, two vortices, and six vortices. The latter is a characteristic pattern not found in hydrodynamic flows. The authors identified that instead of a single bifurcation observed in the flow past a bluff body, the steady flow undergoes a first bifurcation that leads to the formation of a pair of vortices within the region of magnetic field (named inner magnetic vortices), while a second bifurcation originates a pair of attached vortices that are linked to the inner ones by connecting vortices.

In an extended study, Votyakov *et al.*^{9} investigated flow characteristics for different magnetic field configurations by varying the constrainment factor *κ*. They found that the flow displays different stationary recirculation patterns, namely, two magnetic vortices at small *κ*, a six-vortex ensemble at moderate *κ*, and no vortices at large *κ*. Therefore, the geometry of the duct and the magnetic field location can impact the blocking effect of the obstacle. In fact, it has been found that a high constrainment factor can lead to unstable vortex patterns and a fluctuating flow near the walls.^{19}

Using a similar device, Kolesnikov and Thess^{28} and Samsami *et al.*^{29} obtained experimental results on the flow patterns created by moving a permanent magnet underneath a channel containing a quiescent liquid metal layer with a free surface. The magnet was dragged with different constant velocities and, in the case of Samsami *et al.,*^{29} the range of Reynolds number explored varied from 125 to 2000. They observed a rich variety of flow patterns in the wake created by the moving magnet, for instance, the formation of vortices or their suppression, symmetry breakdown, vortex duplication, and vortex shedding. A quasi-two-dimensional (Q2D) behavior was found for large values of the interaction parameter. Furthermore, different instability mechanisms were identified as the Reynolds number and the interaction parameter were varied. In a later study, Prinz *et al.*^{30} carried out a numerical simulation of these experiments, being able to successfully reproduce some of the observed flow structures. The authors found that the process of vortex formation is accompanied by a decrease in the streamwise component of the Lorentz force compared to the time when the fluid is still quiescent. This work is one of the few in which numerical simulations were compared with experimental data. Within the context of Lorentz force velocimetry, in a recent experimental study, the flow produced by a non-conducting sphere dragged in a vertical liquid metal column interacted with the localized magnetic field of the permanent magnet, creating a weak reaction force on the magnet.^{31} The results demonstrated that the force sensor can detect the presence of a moving particle in a quiescent conducting liquid.

The observed flow patterns with a free surface can be modified when the fluid is confined by an upper wall since the formation of some structures is inhibited by friction. In fact, Votyakov *et al.*^{9} pointed out that the friction imposed by no-slip walls stabilizes the flow and can originate the delay of the critical Reynolds number for vortex shedding. In some cases, the increase in the wake stability could prevent the appearance of vortex shedding, in contrast with results found in two-dimensional simulations.^{7} However, using 3D simulations, Votyakov and Kassinos^{32} reported the appearance of vortex shedding with a wake that can be symmetric or anti-symmetric depending on initial and inlet flow conditions.

Kenjereš *et al.*^{33} found steady solutions for $100\u2264Re\u2264400$ and $N\u226411.5$ with no vortices, two vortices, and up to six vortices. They showed that even under laminar inflow conditions, by increasing the Reynolds number to *Re* = 900, vortex shedding appears and turbulent bursts are found in the magnetic wake region. Furthermore, the authors stress that turbulence was locally sustained in proximity to the edge of the magnetic wake. They identified areas of intermittent velocity downstream of the magnetic obstacle and confirmed the occurrence of vortex bursts caused by an elementary structure, with strong fluctuations of velocity in the laminar environment visualized as described by Cuypers *et al.*^{34} Kenjereš^{18} also studied the flow and heat transfer in a channel flow configuration with electrically and thermally insulated horizontal walls containing one, two, or three magnetic dipoles with a fixed value *Re* = 1000 in the range $0\u2264N\u226450$. The presence of anisotropic turbulence as well as countergradient diffusion of turbulent heat fluxes was detected. The author found that configurations with arrays of magnetic dipoles can produce complex flows, which are more suitable for heat transfer or mixing enhancement than a configuration with a single magnetic dipole. However, by analyzing the stationary flow regime at low Reynolds numbers as well as the transitional time-dependent regime at moderate Reynolds numbers, Tympel *et al.*^{35} showed that turbulence can be initiated in a laminar flow through the presence of a strong magnetic point dipole field, which was used as a simplified model of an extended magnetic obstacle. They explored different orientations of the dipole and determined that the spanwise orientation presents the most efficient generation of turbulence. In a recent study, Cho^{36} used a two-dimensional numerical simulation to explore the vortex patterns in the wake of a magnetic obstacle modeled as a Gaussian distribution. The author states that the vortex patterns in the wake of a magnetic obstacle are not solely determined by the external magnetic field profile.

Domínguez *et al.*^{37} performed an experimental and numerical study where the wake dynamics behind a magnetic obstacle in a liquid metal duct flow was analyzed. Through ultrasonic doppler velocimeter (UDV) measurements, the stability and dynamics of the wake were explored and contrasted with a Q2D numerical model. It was found that for a given Hartmann number, the flow transits from a steady state to a time-dependent state as the Reynolds number increases, as occurs in the wake of a rigid obstacle. However, in sharp contrast with the hydrodynamic case, when the Reynolds number is increased further and inertia becomes dominant, the flow becomes steady again.

In the present contribution, we perform a numerical analysis of the experimental configuration analyzed by Domínguez *et al.*^{37} We use the experimental data of the former study to validate the developed 3D numerical code and consistently replicate the experimental observations, particularly the interplay between inertia and electromagnetic forces and how the magnetic obstacle becomes imperceptible when inertia overwhelmingly dominates the Lorentz force. Furthermore, different 3D flow patterns that cannot be discerned from the experiment are identified, focusing attention on the transition of the near and far wake structures as inertia increases.

## II. EXPERIMENTAL CONFIGURATION

We now briefly describe the experimental setup used by Domínguez *et al.*^{37} to analyze the flow of a liquid metal past a magnetic obstacle. It consists of a rectangular loop made of acrylic walls with a rectangular effective cross section of 1 × 8 cm^{2}, so that the aspect ratio of the duct is *α* = 8. It is formed by two long and two short legs with lengths of 85.8 and 40 cm, respectively. The working fluid was Galinstan eutectic alloy that is liquid at room temperature and has a kinematic viscosity of $\nu =3.3\xd710\u22127$ m^{2} s^{–1}, an electrical conductivity $\sigma =3.46\xd7106\Omega \u22121$ m^{–1}, and a mass density *ρ* = 6360 kg m^{–3}. The liquid metal was driven by an electromagnetic induction pump located on one of the long legs. The pump consisted of a motor that rotates two parallel disks where 24 permanent Neodymium magnets are radially mounted, so that the duct was between the disks. An ultrasonic doppler velocimeter (UDV) was used to measure the velocity of the liquid metal with a probe of 0.8 cm in diameter and a wave frequency of 4 MHz. This instrument allowed to determine one component of the velocity along the propagation line of the acoustic wave emerging from the emitter. The ultrasonic gauge was fixed at the downstream end of the region of analysis to detect the axial velocity along the axial coordinate (see Fig. 1). The magnetic obstacle was created with two identical Neodymium square magnets with a side length of $My=2.54$ cm and a thickness of 1.25 cm, placed on the outer side of the opposite vertical walls of the central part of one of the long legs and located 30 cm away from the upstream corner and 4 cm from the lower horizontal wall of the duct. With this magnet configuration, the maximum magnetic field obtained at the center of the duct was 0.23 T. For this configuration, the constrainment factor is $\kappa =0.31$.

## III. MATHEMATICAL MODEL

^{38}based on the electric potential. In dimensionless form, the system of governing equations for the liquid metal flow under an applied magnetic field is

**, pressure,**

*u**P*, electric current density,

**, applied magnetic field, $B0$, and electric potential, $\varphi $, have been normalized by**

*j**U*, $\rho U2,\u2009\sigma UBm$,

*B*, and

_{m}*UB*, where the characteristic velocity,

_{mL}*U*, is taken as the mean upstream flow velocity,

*B*represents the maximum magnetic field strength of the magnet, and the characteristic length,

_{m}*L*, is taken as the distance between the walls perpendicular to the applied magnetic field. The spatial coordinates (

*x*,

*y*,

*z*) are normalized by

*L*, and time

*t*is normalized by the inertial time,

*L*/

*U*. Given that the length of the duct is 86 times the distance between the walls perpendicular to the magnetic field, and it would imply a rather large computational cost, the characteristic length for numerical simulation purposes is taken as

*M*. Subsequently, the results are rescaled with the characteristic length

_{y}*L*. Equations (1)–(4) are the continuity equation, Navier–Stokes equation with the Lorentz force term, Ohm's law, and Poisson's equation for the electric potential that results from charge conservation. Additionally, the applied magnetic field $B0$ satisfies the magnetostatic equations $\u2207\xb7B0=0$ and $\u2207\xd7B0=0$, ensuring its solenoidal and irrotational character.

In the system of equations (1)–(4), it is assumed that the magnetic Reynolds number, $Rm=\mu 0\sigma UL$, where *μ*_{0} is the permeability of vacuum ( $\mu 0=4\pi \xd710\u22127$ H/m), is much smaller than unity so that the magnetic field induced by the currents circulating in the liquid metal is negligible in comparison with the applied magnetic field.^{39} Taking as reference the experimental values, $\sigma =3.46\xd7106\Omega \u22121m\u22121$, *L* = 0.01 m, and *U* = 0.1 m/s, where the latter corresponds to the largest average velocity experimentally explored,^{37} the magnetic Reynolds number becomes $Rm=4.3\xd710\u22123$.

The set of Eqs. (1)–(4) was solved with our own FORTRAN numerical code based on the finite volume method in a 3D structured Cartesian staggered grid for the spatial domain.^{40} The SIMPLEC algorithm was employed to handle the pressure–velocity coupling. Time integration was performed using the first-order Euler scheme. The central scheme was employed for convective terms, and centered differences were used to discretize diffusive terms. In order to comply with the experimental conditions, a uniform flow was imposed at the inlet of the duct, while homogeneous Neumann-type boundary conditions on the velocity components were imposed to attain fully developed conditions at the outlet of the duct, whereas a no-slip condition was imposed at all solid walls. As the duct walls are electric insulators, the normal component of the induced current was set to zero at all walls, which implies that the normal gradient of the electric potential is zero at the walls, i.e., $\u2202\varphi \u2202n=0$. As an initial condition, the fluid was considered to be at rest. The computations were performed using a coarse mesh of $1.9\xd7106$ control volumes (CVs) and a finer mesh of $2.5\xd7106$ CVs, guided by the best concordance of numerical results with the publicly available experimental data. Although no substantial changes were found when testing both meshes, the finer grid was chosen to ensure greater accuracy of the numerical results. Most of the computations were performed using a streamwise grid size of $\Delta x=0.14$, meanwhile the grid sizes in the cross section were $\Delta y=0.03$ and $\Delta z=0.005$. In turn, the time step was chosen as $\Delta t=10\u22123$. The maximum magnetic field strength of the component *B _{z}* of the applied magnetic field measured at the mid-plane of the duct when two magnets are superposed with a separating distance of 31 mm was $Bm=0.185$ T and the experimental 3D distribution of the applied magnetic field was numerically reproduced using analytic expressions provided in the book by Furlani.

^{41}Simulations were performed on a node of the local Ehecatl cluster at IER-UNAM using 50 central processing units.

## IV. RESULTS

We first perform a numerical study aimed to reproduce the experimental results presented by Domínguez *et al.*,^{37} which serve as a validation for our numerical model. Furthermore, the flow patterns in the near and far wake of the magnetic obstacle are analyzed.

### A. Experimental comparison

The numerical simulations of the MHD flow are performed considering the same conditions as the experiment reported by Domínguez *et al.*^{37} We have to clarify that the characteristic length scale used in the present study differs from that used by Domínguez *et al.*,^{37} where the hydraulic diameter was used as a length scale in the Reynolds number while the separation between the Hartmann walls (those normal to the main component of the magnetic field) was used to define the Hartmann number. In contrast, in the present numerical study the separation between the Hartmann walls was used consistently as a characteristic length scale for both Reynolds and Hartmann numbers, as well as for the normalization of the coordinates. Due to this fact, the values of the Reynolds number reported in the previous study^{37} have been rescaled to be consistent with the characteristic length used in the present numerical simulation. In dimensionless units, the duct has the following size: $86\xd78\xd71$. The origin of the coordinate system is located at the mid-plane in the center of the magnets where the maximum magnetic field strength is found. The Hartmann number was fixed at *Ha* = 75, and the range of variation of the experimental Reynolds number was $600<Re<3149$; therefore, in the experiment, the interaction parameter varied in the range $1.8<N<9.4$.

Figure 2 shows a map of the streamwise velocity component, *u*, in the *x*–*t* space, for the vertical position *y* = 12.7 mm. This kind of map is provided by the UDV technique. Figure 2(a) corresponds to the experimental results reported by Domínguez *et al.*^{37} obtained with UDV for *Re* = 1600 and *Ha* = 75 (*N* = 3.5). In turn, Fig. 2(b) corresponds to the full 3D numerical simulation for the same Reynolds and Hartmann numbers. In both figures, a zoom is provided for a better comparison between numerical and experimental results. The braking of the flow can be observed from the experimental results. In fact, the streamwise velocity just upstream the magnetic obstacle (located at *x* = 0) is reduced (red-purple vertical strip at −50 mm $<x<0$ mm) while it increases downstream in the region 0 mm $<x<150$ mm. The inclined red and purple parallel strips in the region *x* > 170 mm indicate the transit of a periodic perturbation in time for a fixed point in space or in space for a snapshot. As noticed in Domínguez *et al.*,^{37} this velocity pattern is consistent with vortex shedding with an approximate characteristic time of the order of 1 s. However, the numerical results show that the streamwise velocity is reduced just after the magnetic obstacle (red-purple vertical strip at 0 mm $<x<50$ mm), then it increases in the region 50 mm $<x<215$ mm. The inclined red and purple parallel strips in the region *x* > 215 mm indicate in a more marked way the appearance of a periodic perturbation, as observed in the experimental case.

We now analyze the local time-variation of the streamwise velocity component, *u*, in three cases, where the strength of the magnetic field is kept constant (*Ha* = 75), while the flow rate is varied so that the Reynolds number takes the values *Re* = 708, 1574, and 2834, and therefore, *N* = 8, 3.6, and 2, respectively. Figure 3 shows the time series of the *u*-component for a monitoring point on the mid-plane (*z* = 0) of the duct downstream of the magnetic obstacle at $(x,y)=(40,1.27)$, which is located at the edge of the magnet upward from the symmetry axis, where fluctuations of velocity are significant. In the three cases, colored lines correspond to numerical results (blue color for *N* = 8, green color for *N* = 3.6, and salmon color for *N* = 2), while the experimental smoothed data reported by Domínguez *et al.*^{37} is taken in their raw form and plotted in black to be compared with numerical results. The superposition of results on Fig. 3 show that the numerical simulation reproduces the same order of magnitude of the experimental streamwise velocity, as well as the increase in the average value with the Reynolds number.

*τ*, thus, $A$ quantifies the deviation of the

*u*velocity component from its mean. In addition, the parameter $L2$, defined as

*τ*. This parameter is related to the kinetic energy of the vortices in the wake,

^{37}and to calculate it from experimental data, a velocity time series was obtained over a time interval of 200 s. In Fig. 4(a), the normalized value of $L2$, denoted by $L2\u0302$, is plotted as a function of the Reynolds number, keeping the Hartmann number fixed. For experimental data, normalization was done by using the maximum smoothed experimental value, while for numerical simulation results, normalization was performed with respect to the maximum numerical value. Numerical results (in red) and experimental results (in blue) are calculated at the same position as in Fig. 3, while lines are interpolations to better observe the trends.

In the experiment, it was determined that there is a critical Reynolds number ( $Rec\u2248600)$, where the first bifurcation that leads to a time-dependent wake occurs, so that for $Re<Rec,\u2009L2\u0302$ is approximately zero. We observe that, as the Reynolds number grows, the energy of the perturbations in the wake increases to reach a maximum determined by the Hartmann number. As *Re* increases further, the energy decreases monotonically up to the maximum Reynolds number explored. This seems to indicate that oscillations in the wake are present in the flow only in a finite range of Reynolds numbers and that, once the maximum value of $L2\u0302$ is reached, they tend to diminish as *Re* grows. The energy of the perturbations varies depending on the interaction of Lorentz, viscous, and inertial forces. At small Reynolds numbers ( $\u2272600$), the wake exhibits low kinetic energy due to the predominance of Lorentz forces, which brake the fluid and promote a rather steady vortex flow. In fact, as it will be shown from numerical results in Sec. IV B, at *Re* = 393 a steady pattern of six vortices is found [Fig. 6(f)]. For higher values of *Re*, even though vortex patterns may be present, the wake displays a time-dependent behavior. For instance, at $Re\u22481181$ ( $N\u22484.8$), a pattern of two vortices is observed [see Fig. 6(h)], while the wake presents a clear oscillating behavior [see Fig. 8(b)]. As *Re* grows, inertia compete with Lorentz forces and the parameter $L2\u0302$ increases, indicating a transition to a wake flow with greater fluid oscillations, reaching a maximum around *Re* = 1968 (*N* = 2.9). As *Re* increases further, the Lorentz forces are overwhelmed by inertia, leading to reduced streamwise velocity oscillations and consequently to decreasing values of the $L2\u0302$ parameter.

Additionally, the frequency of the velocity time series was calculated via fast Fourier transform (FFT). Figure 4(b) shows both the frequency obtained numerically and experimentally as a function of *Re*, where linear regression trend lines are also presented. In both cases, the value of the correlation coefficient, *R*^{2}, is larger than 0.95, indicating a strong correlation. It can be observed that the frequency of the streamwise velocity in the fixed point varies in the range $0.2\u22121.4$ Hz as the *Re* number increases. Numerical results show a good overall agreement with the experimental data, with the best comparison being found for *Re* < 1574, where the relative error is less than 10%. As the Reynolds number increases, the separation between numerical and experimental results becomes more pronounced, which is attributed to the limitations of the numerical code.

We now examine the 3D flow structures obtained numerically in the same configuration as that studied experimentally (with *Ha* = 75), but extending the Reynolds number range to $118\u2264Re\u22643149$. We first focus the attention at the near wake and explore the transition of the vortex patterns as the balance between inertia and magnetic force is changed. We then look at the development of the far wake as inertia increases. Furthermore, the local and global friction coefficients are calculated.

### B. Flow structures in the near wake

Before analyzing the 3D patterns, we look at the velocity profiles in the vicinity of the magnetic obstacle. Figure 5 shows the instant profiles of the streamwise velocity component, *u*, at the mid-plane *z* = 0, for different Reynolds numbers, namely, *Re* = 196, 1181, and 1574. In Fig. 5(a), the M-shaped profiles of *u* as a function of the spanwise coordinate *y* at a fixed axial position (*x* = 0) manifest the effect of the strong magnetic force in the central region of the duct flow. As expected, the lowest velocity is found for the smallest Reynolds number (*Re* = 196), while as *Re* increases, inertial forces become more relevant and the braking effect caused by the magnetic obstacle becomes weaker. As a result of mass conservation, the fluid surrounds the magnetic obstacle and reaches higher velocities in regions where the Lorentz force is negligible. Figure 5(b) shows the profile of *u* as a function of the streamwise coordinate, *x*, at the centerline *y* = 0. A drastic reduction of the velocity is observed when encountering the magnetic obstacle (centered at the origin) and even negative values of the velocity are found, indicating a reverse flow and, therefore, recirculations. Further downstream, the velocity increases again in a smooth way for the lowest Reynolds number (*Re* = 196) when the Lorentz force dominate. For larger Reynolds numbers the streamwise velocity oscillates as a result of flow instability and vortex shedding. Notice that the highest amplitude of oscillation occurs at different *x* locations for *Re* = 1181 and 1574.

Let us now look at the transition of the vortex patterns in the near wake of the magnetic obstacle as the Reynolds number increases for a fixed Hartmann number or, equivalently, as the interaction parameter decreases. Figure 6 shows, in the first column, the isometric views of the three-dimensional path of the induced electric current and, in the second column, the streamlines colored according to the magnitude of the streamwise velocity, calculated numerically for *Ha* = 75 and different Reynolds numbers, namely, *Re* = 118 (*N* = 47.7), *Re* = 236 (*N* = 23.8), *Re* = 393 (*N* = 14.3), *Re* = 1181 (*N* = 4.8), and *Re* = 2125 (*N* = 2.7). The paths of the induced electric currents undergo changes as inertial forces intensify, particularly, they reveal that the closing of the loops is fully three-dimensional, involving boundary layers attached to the walls.^{9} In all cases, a single electric current loop can be identified upstream the magnetic obstacle, while two smaller current loops are discerned downstream, although more intricate and extended patterns are observed for *N* = 47.7, 23.8, and 14.3. However, for *N* = 4.8 and 2.7, compact current loops are found. Since the induced electric currents determine the magnetic forces by the interaction with the applied non-uniform magnetic field, it may be expected that the three-dimensional Lorentz force distribution is also complex.

The flow patterns shown on the right column of Fig. 6 result from the interplay of Lorentz forces, viscous forces, and inertia. For the lowest Reynolds number (*Re* = 118, *N* = 47.7) magnetic forces predominate and two vortices, that resemble the attached vortices behind a cylinder for low *Re*, are formed [see Fig. 6(b)]. As *Re* increases (*Re* = 236, *N* = 23.8), a second pair of vortices of smaller size appears downstream, forming a four-vortex pattern. When inertia increases even more so that *Re* = 393 (*N* = 14.3), the six-vortex pattern is obtained, as shown in Fig. 6(f). This complex flow pattern was first reported by Votyakov *et al.*^{8} with magnets of rectangular shape, while in the present case it was obtained with square magnets. The vortices of the upstream pair are named inner magnetic vortices, and are mostly located inside the “shadow” of the magnets; in turn, the furthest downstream pair external to the obstacle is composed of the attached vortices, while the pair in between corresponds to the connecting vortices.^{8} The patterns of Figs. 6(b), 6(d), and 6(f) correspond to steady flows. By increasing *Re* even further, time-dependent flows arise, for instance, for *Re* = 1181, *N* = 4.8, a pattern of two vortices is recovered [see Fig. 6(h)], while for an even larger increase in *Re* (*Re* = 2125, *N* = 2.7), vortices disappear, giving rise to a smoothly oscillating laminar wake, as observed in Fig. 6(j).

*et al.*,

^{8,9}is characteristic of the flow past a magnetic obstacle. The case analyzed here corresponds to

*Re*= 393 and

*N*= 14.3 [see Figs. 6(e) and 6(f)]. Figures 7(a) and 7(b) show projections of the electric current paths in planes transverse to the main component of the magnetic field, namely, the mid-plane,

*z*= 0, and the plane

*z*= 0.49, close to the upper wall, respectively. The red square denotes the footprint of the permanent magnets. At the mid-plane, the current shows a more uniform pattern of compact upstream and downstream loops so that, in the zone covered by the magnets, the current is reinforced flowing in the negative

*y*-direction, transverse to the main flow. In turn, in the upper plane, more intricate and extended current loops are observed, which partly manifest the closure of the three-dimensional loops near the wall. Also, more intense currents are found in the central region. The result of the interaction of the electric current distribution with the non-uniform magnetic field is shown in Figs. 7(c) and 7(d), where the Lorentz force field is displayed in the mid- and near-wall planes. While in the mid-plane the force points mainly in the negative

*x*-direction opposing the fluid motion, near the wall the complexity of the current loops causes the force to oppose the flow in the central region and reverses its direction near the side edges of the magnet, reinforcing the flow. Although the main components of the force act on the

*x*–

*y*planes, components outside these planes may also contribute to conform the flow pattern. Figures 7(e) and 7(f) show the instantaneous streamlines in the mid- and near-wall planes described above. The stationary pattern of six vortices is observed in both planes although some differences are clearly noted. A more compact pattern is found in the mid-plane while near the wall, where the no-slip condition and proximity to the magnet contribute more strongly to flow braking, the flow pattern broadens. In fact, a stagnation point appears upstream the magnetic region, whereas connecting and attached vortices are elongated in the streamwise direction. In Fig. 7(g), the

*z*-component of the vorticity in the mid-plane

*z*= 0 is displayed. It can be observed that the vorticity created due to the presence of the magnetic obstacle is transported in the streamwise direction giving rise to two elongated positive and negative vorticity regions that extend from the magnetic zone to the near wake. The vorticity generated by the shear motion all along the side walls is also distinguished. With the aim of complementing the flow description, Fig. 7(h) shows the

*Q*-criterion

^{42}for vortex identification applied to the six-vortex flow pattern. For an incompressible flow, the parameter

*Q*is defined as

*Q*> 0 identifies regions where the rotation rate dominates over the strain rate, which is characteristic of vortices. Figure 7(h) corresponds to a small

*Q*-value, i.e.,

*Q*= 0.004, which allows the six vortices of the pattern to be identified, along with additional weak vortical structures.

### C. Flow structures in the far wake

We now analyze time-dependent flow patterns in a broader spatial perspective that includes the far wake, as the Reynolds number varies for a fixed Hartmann number. Figure 8 shows the instant streamtracers in a region which includes from the magnetic obstacle to the outlet of the duct 50 units downstream, for four different Reynolds numbers, *Re* = 196, 1181, 2124, and 3149, corresponding to *N* = 28.7, 4.8, 2.7, and 1.8, respectively, since *Ha* = 75. Through these patterns, it is possible to explore the flow evolution as the inertia increases, while the strength of the Lorentz force remains constant. Figure 8(a) displays a steady flow corresponding to *Re* = 196 (*N* = 28.7). Although it cannot be discerned at this scale, a four-vortex pattern is obtained in the near wake, while the streamtracers display straight trajectories in the far wake. In this case, magnetic forces clearly dominate over inertia. As the Reynolds number increases to *Re* = 1181 (*N* = 4.8) [Fig. 8(b)] a pattern of two vortices is found and oscillations are observed in the far wake. By increasing the Reynolds number to *Re* = 2125 [*N* = 2.7, Fig. 8(c)], no vortices are observed and the oscillations of the streamtracers start in the near wake with a higher amplitude. Although inertia dominates, Lorentz forces are still relevant and promote higher disturbances in the flow. However, for *Re* = 3149 [*N* = 1.8, Fig. 8(d)], the amplitude of oscillations decreases and the flow seems to return to a less perturbed state. In this case, the inertia overwhelms the magnetic forces and disturbances tend to disappear.

Additional information on the evolution of the magnetic obstacle wake is shown in Fig. 9, where the magnitude of the streamwise, *u*, and the spanwise, *v*, velocity components for different values of *Re* and *N* (for *Ha* = 75), are presented in the central plane *z* = 0. Figure 9(a) displays a symmetrical behavior of the streamwise component for *Re* = 393 and *N* = 14.3, where magnetic forces are dominant and no oscillations appear in the wake. The streamwise velocity is reduced to a minimum in the center of the duct (the magnetic field region), which is a manifestation of the deceleration of velocity due to the magnetic braking effect caused by the Lorentz force produced in the central part of the domain. To comply with mass conservation, fluid jets with high velocity are formed at the lateral edges of the magnetic obstacle. However, the spanwise velocity is zero everywhere except in the region of the magnetic obstacle, see Fig. 9(b). For *Re* = 1181 [*N* = 4.8, see Figs. 9(c) and 9(d)], intermittent regions for the velocity components appear downstream around *x* > 5, showing the appearance of disturbances in the wake. When *Re* = 2125 (*N* = 2.7) marked spatial oscillations in the streamwise velocity, as well as in the spanwise component, are observed [see Figs. 9(e) and 9(f)]. Note that for this value of *Re*, the parameter $L2\u0302$ is near its maximum, indicating the highest kinetic energy in the wake. Finally, when the Reynolds number reaches *Re* = 3149 (*N* = 1.8) and inertia dominates the flow, wake oscillations are reduced and disturbances become weaker [see Figs. 9(g) and 9(h)].

To complement the physical understanding of the flow behavior described above it is helpful to remind that the Lorentz force acts on the bulk of the flow, so that its intensity, that in turn depends on the strength of the applied magnetic field, determines the “rigidity” or “stiffness” of the magnetic obstacle. Therefore, by modulating the strength of the applied magnetic field, the flow that passes through the obstacle can be modified. When the stiffness is high enough and the Lorentz force dominates, the flow surrounds the obstacle and a stagnant or recirculating zone is formed inside the region where the magnetic field is strong. However, the stiffness of the obstacle can be overcome if inertia is strong enough, and eventually the magnetic obstacle can become imperceptible to the flow. This is precisely what the previous results show. Finally, it is the interplay between inertia and magnetic force that determines the flow patterns and the wake structure.

To properly assess previous flow patterns, it is important to remember that the aspect ratio of the analyzed duct is high (*α* = 8) so that the duct is narrow in the *z*-direction, while the constrainment factor is $\kappa \u22481/3$, hence the magnetic field covers a substantial part of the flow. It has been reported that when the constrainment factor is larger, the flow near the walls tends to be more fluctuating and the vortex patterns become unstable, a phenomenon that can be attributed to shear stresses.^{19} This suggests that friction plays a significant role in the formation of the wake. In fact, Votyakov *et al.*^{9} pointed out that the friction imposed by no-slip walls stabilizes the flow and can originate the delay of the critical Reynolds number for vortex shedding. In some cases, the increase in the wake stability could prevent the appearance of vortex shedding, in contrast with results found from 2D simulations.^{7} In hydrodynamic flows, the increase in the blockage ratio of bluff bodies may lead to a delay in the onset of vortex shedding^{43} or even suppress it when the size of the obstacle in the flow direction increases.^{44}

^{45,46}and, in the case of localized magnetic fields, have been explored for heat transfer enhancement purposes.

^{20,22}This can be done through the skin friction coefficient, as proposed by Zhang and Huang,

^{20}which is defined as

*τ*is the dimensional shear stress at the wall. Figure 10(a) shows the local skin friction coefficient obtained along the axial

_{w}*x*-direction at the center of the lateral wall, (

*y*,

*z*) = (−4, 0), for different Reynolds number in the range $551<Re<3149$ and

*Ha*= 75, so that $N=10.2,5.7,4.8,1.8$. Note that for $Re\u22641181$,

*f*increases noticeably in the region where the localized magnetic field is more intense since the magnetic force predominates causing strong velocity gradients that intensify the shear stress at the wall. When

_{c}*Re*= 3149, inertia overcomes Lorentz forces so that the increase in

*f*in the region of the obstacle is not observed, while further downstream the skin friction coefficient oscillates. As evident, friction plays a pivotal role in this study due to the flow confinement in the narrow duct that restricts fluid movement. Figure 10(b) shows the global skin friction coefficient, $fc\xaf$, as a function of the Reynolds number, obtained by space- and time-averaging of the local friction coefficient in the plane

_{c}*x*–

*z*at the lateral wall (

*y*= −4) over a duration of 200 time units. The decreasing trend of $fc\xaf$ manifests the predominance of inertia over magnetic forces as

*Re*grows.

## V. CONCLUDING REMARKS

In this study, we have carried out a full 3D numerical simulation to analyze the flow of liquid metal through an insulating duct containing a localized magnetic field, i.e., a magnetic obstacle. The main objective of the work was to explore the interplay between inertia and Lorentz forces created by the fluid motion past the localized field. As a first step, we performed a numerical analysis of a realistic liquid metal MHD duct flow using experimental data from a study conducted by Domínguez *et al.*,^{37} where the flow of Galinstan in a high aspect ratio duct past a magnetic obstacle was explored. The experimental conditions were replicated in numerical simulations of the time-dependent MHD flow within a duct with a constrainment factor of $\kappa \u22481/3$.

To validate the developed code, numerical results were compared to experimental data within the Reynolds number range $600\u2264Re\u22643149$, while maintaining a constant magnetic field strength, so that the Hartmann number remained fixed (*Ha* = 75). Therefore, the interaction parameter varied in the range $1.8\u2264N\u22649.4$. The simulation exhibited good agreement with the experimental data, as demonstrated by the comparison of time series of the streamwise velocity component, as well as oscillation frequencies of this component. In addition, the parameter $L2\u0302$, which provides information on the kinetic energy of the wake and was obtained from experimental data as a function of the Reynolds number by Domínguez *et al.*,^{37} was reproduced numerically with good agreement. It was found that this parameter reaches a maximum approximately when *Re* = 1968 (*N* = 2.9). In these conditions, the maximum oscillation of the wake is observed. As *Re* grows, fluid oscillations in the wake are reduced, manifesting the dominance of inertia over Lorentz forces.

Taking into account that the error of the experimental measurements was of approximately 8%, the relative error between the numerical and experimental data is around 10.5%. This error decreases to around 4% for large values of *N*, but as *N* decreases, the relative error increases up to a maximum of around 17%. Thus, it can be concluded that the developed numerical code adequately simulates the experimental results within the specified parameter range.

The second objective of this work was to explore the three-dimensional characteristics of the flow through numerical simulations, aiming to gain a deeper understanding of flow features that cannot be easily obtained experimentally. The simulations performed in the extended range $118\u2264Re\u22643149$, revealed that, as the Reynolds number increases with a constant Hartmann number, flow patterns transit from a steady to a time-dependent behavior, tending to recover the steadiness for sufficiently large *Re*. The flow evolved from a steady two-vortex pattern for the smaller Reynolds number explored (*Re* = 118) to steady patterns with four and six vortices, recovering again two vortices with a time-dependent wake as *Re* increases, and, eventually, vortex-free flow patterns are obtained for sufficiently high *Re*. The three-dimensional paths of the induced electric current that complement the vortex patterns illustrate the complexity of the magnetic force that brakes the oncoming flow and shapes the observed flow structures. In general, consistency with results reported in previous investigations is found.

The numerical results presented in this work mainly contribute to the understanding of the interplay between inertia and Lorentz forces in the duct flow of a liquid metal through a localized magnetic field. Unlike the wake created in the flow past a solid obstacle, in the flow past a magnetic obstacle, an increase in the Reynolds number for a fixed magnetic field strength does not lead to a more disordered and eventually turbulent flow; instead, a steady-state flow tends to be recovered. This seems to be a characteristic feature of this kind of flow.

## ACKNOWLEDGMENTS

The authors acknowledge CONACYT-SENER-Sustentabilidad Energética under Project No. 272063. A. Figueroa acknowledges the Investigadoras e Investigadores por México program from CONAHCYT and Cátedras Marcos Moshinsky. V. Solano-Olivares acknowledges a Ph.D. grant from CONAHCYT (No. 730585).

## AUTHOR DECLARATIONS

### Conflict of Interest

The authors have no conflicts to disclose.

### Author Contributions

**V. Solano-Olivares:** Formal analysis (equal); Investigation (equal); Methodology (lead); Software (lead); Validation (lead); Writing – original draft (lead); Writing – review & editing (equal). **S. Cuevas:** Conceptualization (equal); Funding acquisition (equal); Investigation (equal); Methodology (equal); Software (supporting); Supervision (equal); Writing – review & editing (equal). **A. Figueroa:** Conceptualization (equal); Funding acquisition (equal); Investigation (equal); Methodology (equal); Software (supporting); Supervision (equal); Writing – review & editing (equal). **D. R. Domínguez-Lozoya:** Conceptualization (equal); Investigation (equal); Methodology (equal); Validation (equal); Writing – review & editing (equal).

## DATA AVAILABILITY

The data that support the findings of this study are available from the corresponding author upon reasonable request.

## REFERENCES

*An Introduction to Magnetohydrodynamics*

*Flow around Circular Cylinders. Vol. 1: Fundamentals*

*Magnetofuiddynamics in Channels and Containers*

*Permanent Magnet and Electromechanical Devices: Materials, Analysis, and Applications*