I. Introduction
Since recently, both nuclear magnetic resonance (NMR) and magnetic resonance imaging (MRI) technologies are gaining researchers’ interest for the design of new generation of multiphase flow meters (MPFMs) targeting biomedical and oil–gas industries. Compared to the existing deployed devices, they have the advantages to be noninvasive and totally safe over γ-ray-based meters [1]–[5], while accurately measuring the flow rate for a wide range of gas void fraction (GVF). In addition, they have the ability to determine the chemical composition of the fluid, which is not possible to achieve with other existing technologies. However, their field deployment still requires to overcome few challenges such as portability, real-time performance, and accuracy. Achieving high measurement accuracy requires to generate simultaneously a highly intense and homogenous static magnetic field () into the region of interest (ROI) of at least 600 mm length to adequately prepolarize the spins of atoms composing the process fluid when it flows at a velocity of up to 2 m/s. In addition, a substantial ROI volume is required to handle a representative quantity of the flowing process. An electromagnetic coil, with reasonable size, is also required to generate an ac magnetic field perpendicular to . Both the intensity and frequency of need to be adequately selected to ensure a uniform rotation of the protons’ spins; otherwise, significant measurement errors are induced. In [6], an NMR-based MPFM that uses two large pieces of square-shaped NdFeB permanent magnets diametrically opposing each other around the ROI to generate a relatively low static magnetic field (23–117 mT) was suggested. While this low magnetic field intensity leads a low Larmor frequency and consequently to inaccurate measurements, its weak inhomogeneity reduces substantially the SNR of the received coil signal. In addition, the device does not take into consideration the delay of magnetization of the nucleus in the flowing fluid. This was overcome in [7], in which another NMR-based MPFM was suggested, comprising an upstream premagnetization module to premagnetize the flowing process before it enters into the measurement section. This consists of long NdFeB magnet arrays and its distance to the premagnetization module is electronically adjustable in order to determine the water-cut value of the flowing fluid. While its high accuracy for GVF measurement that exceeds 95% as well as the safety of the device constitutes a breakthrough in MPF metering, its mechanical assembly is very bulky and heavy (around 1.15 T), which hinders its easy deployment in oil–gas fields. Few other similar devices were suggested with improvements of both the magnetic field intensity (of up to 1 T) and magnetic flux homogeneity but at the expense of excessive weight and high electric current as well [8]–[10]. In conclusion, in spite of knowledgeable potentials demonstrated by MR technology for MPFM metering, there is still room of improvement of this technology in terms of size, portability, and accuracy of measurement. This requires an improved design of all its components, including the magnets array. Miniaturizing NMR–MRI systems was tackled by several researchers using the concept of Halbach arrays; however, most of them mainly targeted other applications such as NMR spectrometry and offline sample analysis [11], [12], drug delivery [13], [14], electric motors and machines [15], [16], energy harvesting [17], and magnetic refrigeration [18]. Hence, in [11], an interesting portable MRI was designed using particle swarm optimization (PSO) optimization algorithm to generate a maximal field intensity of 0.5107 T within a measurement cross-sectional area of 6.2 mm2. While this size is too small to capture representing information of the actual multiphase flow, the apparatus itself cannot be adapted for oil–gas pipelines but is rather targeted for thin samples imaging. In addition, the design suggests the usage of an additional iron module that adds a significant weight to the apparatus. Another interesting recent work was disclosed in [12], where a stack of cylindrical magnets was designed and constructed to generate around 0.7 T for a total weight of 300 Kg. The usage of permanent magnets of weak remanence magnetic field intensity in addition to not use an optimization algorithm during the design process was the main reason for this weak performance. In [13], another portable Halbach magnetic array for drug targeting application was suggested using a customized optimization routine. The aim is to maximize the intensity of the driving force that moves the drug to a suitable organ position located at up to 50 mm depth. A similar apparatus was also suggested in [14]; nevertheless, both papers are limited to finite-element method (FEM) simulation and no prototype was constructed. In [16], a topology optimization of Halbach magnet arrays for a specific design goal using isoparametric projection is suggested. The technique takes into consideration the feasibility of manufacturing the magnets array and is claimed to optimally maximize the magnetic field within any target area, which is suitable for electric motor and machines design. However, it does not consider other important design goals such as homogeneity of the magnetic field, which is required for NMR applications. In summary, there is still a need to come up with an optimal design of a portable MRI–NMR device for multiphase flow metering. For instance, in addition to consider three-dimensional (3-D) FEM simulation to assess the performance of both and magnetic fields in all three directions, there is a need to consider simultaneously the design of the RF coil within the measurement area to ensure that both magnetic fields adequately cover the desired ROI volume for a moving fluid. In addition, there is a need to properly premagnetize the process fluid, in terms of both magnetic field intensity and homogeneity. This paper tackles simultaneously these areas by suggesting a solenoid coil surrounded by several stacks of relatively small permanent cuboid magnet elements, instead of long magnetic bars. It features lightweight without compromising the intensity and homogeneity of the magnetic field by diligently determining the pith distance between adjacent segments, as well as the shape, dimensions of magnet elements, and the transverse distance between them. Results of extensive 3-D simulation on a probe consisting of 12 Halbach arrays, each consisting of 12 cuboid permanent magnet elements of 20 × 20 × 40 mm size, indicate that an optimized static magnetic field distribution of 890 mT maximal intensity and 606 ppm homogeneity could be achieved within an area of 40 mm diameter and 606 mm length when the Halbach arrays are distant from each other by a distance of 10.90 mm. Further 3-D FEM simulations indicate that an optimized design of the coil of 6 cm diameter and 2000 turns can generate an ac magnetic field of 13 mT amplitude and 112 ppm homogeneity within a cylindrical measurement area of approximatively 12.5 mm diameter and 150 mm length. This is enough to handle fluids flowing at the speed of up to 2 m/s. To the best of our knowledge, these set of constraints were never tackled in any previous work. Experimental work on a constructed magnets array validates to some good extent the simulation results.