Ferrofluids to improve field homogeneity in permanent magnet assemblies

A novel principle of passive magnetic field shimming for permanent magnet assemblies is introduced, based on defined amounts of a ferrofluid suspension contained in a microliter volume plastic container that is accurately positioned within the magnet bore. The ferrofluid volume acts as a micromagnet that compensates in-homogeneities in the magnetic field profile. A proof of principle is shown for a permanent magnet assembly, derived from a Halbach design, with two additional movable rings of magnets. These rings result in an average magnetic field strength of 1.06 T inside the bore, 19 % higher than the Halbach alone. Two options for field shimming with ferrofluids are shown: changing the material volume or choosing a ferrofluid with different saturation magnetization value. With the tested simple single-cube ferrofluid implementation the field homogeneity is improved from 86 ppm to 8 ppm over a sampling length of 5.5 mm. Better homogeneity is expected with more sophisticated ferrofluid arrangements. The complete assembly has a size of 5 × 5 × 4.2 cm 3 and a weight of 332 g. The demonstrated concept is particularly attractive for mobile magnetic resonance systems, as it does not require electrical power during operation.


Introduction
Mobile and compact magnetic resonance systems have gained significant interest over the last decade, enabling a large variety of applications in different sub-fields of chemistry and biology [1][2][3][4][5][6][7][8][9][10]. These miniaturized instruments are based on permanent magnet technology, and many of them involve a Halbach dipole magnet, a configuration introduced by Klaus Halbach in the 1980 ′ s [11]. The idea behind a Halbach ring arrangement of magnets is that it enhances the magnetic field in the bore of the configuration, which can be up to 2 T [12], while the stray field is kept minimal. When such a configuration is set up with magnets with their longest dimension parallel to the bore, a quite homogeneous field can be achieved over a substantial distance along the bore. This is beneficial for compact systems that enable magnetic resonance measurements in flow, where a solenoid is wound around a liquid sample tube that runs through the bore [13,14]. Reported Halbach magnets have lengths ranging from 5 to 70 cm, with reported spatial field homogeneity values in the range of 20-2000 ppm [15][16][17][18][19]. This is not homogeneous enough for NMR spectroscopy based on chemical shifts, for which a homogeneity of the order of 0.1 ppm or better is desired [13,20] but it can be sufficient for other applications that employ magnetic resonance principles, such as flow measurements [21] or relaxometry [22].
An interesting way to improve the homogeneity of Halbach configurations is by combining multiple magnet rings ("MANDHaLa's"). The ring distance can be adjusted to improve the field homogeneity [23][24][25][26], with the handicap that the gap between the rings results in a lower overall field strength. The latter can be accommodated by a configuration of nested magnet rings, which are known from their applications in heat pumps or refrigerators [27,28], as a means of pumping cell medium in a microfluidic system (this concept uses a rotating nested Halbach ring [29]) and in MRI (Magnetic Resonance Imaging) [30]. A related setup for magnetic resonance applications is the "Shim-a-ring" system, which consists of a ring magnet with a concentric ferromagnetic shim [31]. Based on these ideas, we present a "dumbbell-Halbach" permanent magnet configuration that combines the high magnetic field arising from a pseudo-Halbach configuration, and additional displaceable magnetic rings around it, giving the possibility to mechanically shim the field in the bore. As a bonus the rings give an increase in the magnetic field in the bore of the Halbach. Fig. 1 shows a schematic view and a photograph of the magnet assembly.
The common way to achieve better magnetic field homogeneity is with the aid of electric shimming units [32], where an arbitrary shimming field is superposed out of spatial harmonics generated by multiple shim coils [33,34]. Shimming units come in many different shapes, but for compact magnetic resonance systems, planar electric shimming elements like biplanar coils are well-known for establishing good field homogeneity [35][36][37][38][39][40]. A drawback of this approach is that the current through the circuits has to be maintained during magnetic resonance experiments, which adds to the power consumption of the instrument and, since shimming currents can be substantial, may lead to heat dissipation in the bore of the magnet, changing the magnetic field strength. A clear benefit of electric shimming is that it is flexible, meaning that the field homogeneity can be tuned to compensate for changes that a sample (container) may induce in the field.
Here we introduce an alternative, passive concept of magnetic field shimming with expected high potential for the small-scale magnets used in mobile magnetic resonance systems. The principle is based on the idea that confined small amounts of ferrofluids can generate localized relatively low magnetic fields that can be applied to compensate the field variations of a permanent magnet design. The concept has similarities to the conventional way of passive shimming that applies small pieces of ferromagnetic or paramagnetic metals inserted in specific positions of the magnet assembly [41][42][43] or, instead of metal parts, magnetic ink deposited by an inkjet printer [44]. The narrow bores of mobile magnets severely complicate precise manipulation and positioning of metal pieces, a problem we propose to solve by introducing microfluidic containers with ferrofluids of a specific saturation magnetization confined in microcavities or microchannels. A ferrofluid is a colloidal liquid composed of ferromagnetic or ferrimagnetic nanoparticles suspended in an organic solvent or water. The magnetic particles are usually coated with a surfactant to inhibit aggregation. Ferrofluids have been synthesized first by Papell in 1963 [45] and nowadays cover a broad spectrum of applications [46] ranging from electromechanical systems [47,48], sensors [49] and robotics [50], to drug delivery [51,52] and sample treatment of cell suspensions [53]. Noteworthy is the research done on ferrofluids in microfluidic systems [54], including particle separation [55], emulsification [56], and the use of ferrofluid droplets as pistons for microfluidic pumping [57,58] or valving [59], to name a few. This microfluidic work is of particular interest to our study, because chip fabrication technology offers the advantage of creating ferrofluidic containers with microliter volumes, or smaller.
In this article we present experimental data for the dumbbell-Halbach permanent magnet system with and without ferrofluidic shimming, complemented with magnetic field calculations that are valuable for describing the scalability of the system. To the best of our knowledge, there is no previous detailed study of ferrofluids as a means to shim magnetic field homogeneity, although the idea has been mentioned as a method for fine shimming of a MRI system to measure the anomalous magnetic moment of muons, work presented in a conference poster by Sasaki et al. in 2019 [60]. Furthermore, ferrofluidic shimming of MRI magnets has been proposed in two patents, without experimental proof [61,62].
Taking the dumbbell-Halbach configuration as the platform for optimization, computational modelling of microfluidic elements filled with ferrofluids inserted in this system is performed to obtain an idea about the range of magnetic fields that can be obtained. To demonstrate the feasibility of the concept, 3D printed microfluidic containers with different volumes of ferrofluids, and ferrofluids with different magnetization levels, have been positioned in the magnet assembly and the resulting magnetic field distribution over its bore has been measured with a Hall probe.

Dumbbell-Halbach assembly
The basis of the magnet design ( Fig. 1.a) is a pseudo-Halbach arrangement consisting of 8 square bar permanent magnets with dimensions d × d × 5.7d, where d is the inner dimension of the bore and equal to the edge dimension of the magnets. The approximate field strength in the bore of the dumbbell-Halbach will be 1 T. Around this configuration are 2 movable shimming rings, each consisting of 16 cubic permanent magnets. The size of the magnets is scalable, but in this study, we chose for a cubic magnet edge size of 7 mm, with the aim of keeping the complete system within the volume of a cube with a 5 cm edge. The liquid sample of interest is contained in a capillary tube (shown in Fig. 1.a) that runs through the centre of the bore of the magnet. Typically this sample would be of the order of 4 to 8 Â µl, assuming a tube diameter of 1 mm and a sample length along the bore of 5 to 10 mm. Fig. 1.a shows the x-y-z coordinate system that is used for reference throughout this manuscript. The reasons for chosing the orientation of the poles of the different permanent magnets as shown in this figure will be discussed below.
The magnets are assembled in a CNC machined aluminium magnet holder. To minimize the effect of a potential temperature drift on the magnetic field, we apply Sm2Co17(H26) permanent magnets (Schallenkammer Magnetsysteme GmbH, Kürnach, Germany) with a temperature coefficient of -0.035 %/ • C. These magnets are listed to have a saturation magnetization (remanent magnetization) B s of 1.02-1.05 T. The total size of the dumbbell-configuration including aluminium holder is 50 × 50 × 42 mm 3 , it has a weight of 332 g. A photograph of the assembled magnet system is shown in Fig. 1.b.

Magnetic field calculations
To study the magnetic field profile and find ways to improve the field homogeneity, we simulate the pseudo-Halbach magnet configuration in combination with mechanical shimming rings and inserted ferrofluidic microvolumes. For the numerical simulations we use the CADES simulation software described by Delinchant et al. [63,64]. Magnetic interactions are modelled with the MacMMems tool [65,66], which uses the Coulombian equivalent charge approach to generate a semi-analytic model:

Magnetic field mapping
A Hall sensor (Teslameter 3002/Transverse Probe T3-1,4-5,0-70, sensitive area 0.1 mm × 0.1 mm, 3 μT resolution; Projekt Elektronik GmbH, Berlin, Germany) in combination with a motorized linear stage (Thorlabs, DDSM50/M) is used to measure the field along the bore of the magnet configuration. The sensor is in a fixed horizontal position and only the magnet is moved in an exact horizontal direction. This ensures that field-variations caused by the setup have no influence on the measurement. During measurements, the complete setup is held in a temperature stable environment (furnace: RS Biotech Galaxy 170 CO2 Incubator; temperature 38.0 ± 0.5 • C; this was the set temperature of the incubator, which is normally used for biological specimens, and not chosen for a specific reason). Measurements are done with and without ferrofluidic elements inserted in the bore of the magnet assembly.

Ferrofluidic elements
The microfluidic components which will contain the ferrofluids have been 3D-printed (Frosted Detail Plastic, Shapeways). They consist of a plastic strip with a width of 6 mm and a length of 50 mm, to make it fit in the bore of the dumbbell-Halbach system. The strip at its center has a cubic cavity, of which the edge length is varied between 0.6 mm and 1.0 mm, whereas the plastic thickness on top and bottom side of the cavity is kept constant, at 0.2 mm. The chip is filled by hand with a pipette with one of the different types of ferrofluid (see below), during which the ferrofluid is kept in place by a small magnet positioned under the chip. A lid glued on top of the chip ensures that the ferrofluid stays within the container when exposed to a magnetic field. A series of five oil-based ferrofluids was purchased from Ferrotec GmbH, namely EMG nrs. 900, 901, 905, 909 and 911, with saturation magnetization values of 99, 66, 44, 22 and 11 mT, respectively. We experimentally confirmed these saturation magnetization values within an error of 4%, using a VSM Model 10 Mark II from Microsense. It was furthermore verified that with an external field of 1 T, which is the field strength of the dumbbell-Halbach, all the different ferrofluids reach their saturation magnetization (See Supplementary Information Fig. S-1).

Mechanical shimming
To achieve an optimised magnetic field homogeneity in the bore of the proposed dumbbell-Halbach configuration, first the magnetic field in the pseudo-Halbach is simulated following the calculational procedure explained above. The magnetic field direction of highest interest is that in the z-direction (see Fig. 1.a), which field component we will call B 0 . The orientation of magnetization of each bar magnet is chosen in such a way, that B 0 in the bore is as homogeneous as possible. For the pseudo-Halbach configuration the field homogeneity over a sample length s along the bore is found to be ca. 1760 ppm (see Supplementary Information Fig. S-2).
The homogeneity is captured in a metric Hom defined as follows: where B mean is the z-component of the mean magnetic field in the bore, and B z (x) the z-component of the field at a position x along the sample direction, averaged over the sample length s and related to the mean field.
The residual inhomogeneity in the field can be compensated by a mechanical shimming approach using the two movable magnet rings. Either ring consists of 16 cubic magnets each with an edge length of d, which can be slid over the pseudo-Halbach magnet. For practical assembly reasons, the magnets are kept 1/7d apart and at 2/7d away from the pseudo-Halbach. In the design shown in Fig. 1.b, d was chosen 7 mm, which implies that the distance between the magnets in the ring is 1 mm. The gaps between them, and their gaps with the Pseudo-Halbach, are filled with aluminium. In a first computational optimization step, the orientations of the magnets in the rings were varied to obtain the lowest possible inhomogeneity of the magnetic field B 0 in the bore of the magnet assembly. The resulting optimal configuration is shown in Fig. 1. a, where the arrows indicate the magnetization direction of each of the individual permanent magnets (details of the optimization procedure are given in the Supplementary Information Figs. S-3 and S-4). The final magnetic field profile of the dumbbell-Halbach configuration with a distance between the rings of 8/7d has a B 0 homogeneity of 297 ppm over a length d, which is an improvement by a factor of 6 compared to the pseudo-Halbach design without rings. The B 0 field in the centre reaches 1.0782 B s , which is an increase by ca. 19% compared to the situation without the rings (for details see Supplementary Information  Fig. S-5).

Fig. 2.
Numerical simulation of field homogeneity (black curve, left axis) and the corresponding ring distance (blue curve, right axis) as a function of the sample length s normalized to the magnet edge dimension d. The closer the rings are positioned, the better the field homogeneity, although below s/d = 0.5 no substantial improvement in homogeneity can be obtained.
The distance between the rings may be adjusted to reach an optimal field homogeneity for a sample length (length along the bore) of choice. Fig. 2 shows the simulated optimal ring distance (blue) and corresponding achievable homogeneity (black) as a function of sample length s normalized to the magnet edge dimension d. For example, for a sample length of 0.5d the optimum ring distance is 0.97d which results in a B 0 homogeneity of 8 ppm. The shimming rings are most effective in improving field homogeneity for small sample lengths: to double the sample length from 0.5d to d, the ring distance must be increased to 1.04d, with the result that the homogeneity deteriorates by more than a factor of 10 and becomes 104 ppm. Note that the presented simulation results do not depend on the size of the magnetization of the chosen magnets, because homogeneity is normalized to the magnetic field, furthermore the sample length for which the field has a specific homogeneity, scales with d.
The dumbbell-Halbach configuration is assembled, and field profiles are measured in the centre of the magnet bore along a horizontal line, as described in the Methods section. In a first set of measurements the B 0 profiles are measured for three different sample sizes, and the resulting homogeneity values are compared with simulated values in Table 1 (the measured profiles are shown in the Supplementary Information Figs. S-6 to S-8). The mismatch between experiment and simulation can be explained by misalignment of the Hall-probe from the exact central bore line. Namely, in our simulations of homogeneity only the B z component and its variation over the central line through the bore of the magnet configuration has been considered. In the experimental situation, the probe picks up the average field strength over a certain area, and therewith also captures the field variation in B 0 (i.e., B z ) in the off-axis directions x and y.

Ferrofluidic shimming
In the following experiments, the microfluidic containers, filled with ferrofluid, are placed on the top and the bottom side of the inside of the bore of the dumbbell-Halbach. In the horizontal direction along the bore, the cubic ferrofluid volume was aligned with the minimum in the measured unshimmed B 0 field profile. A schematic drawing of the magnet configuration with the inserts is shown in Fig. 3 (a photograph of one of the 3D printed strips is shown in Supporting Information, Fig S-9).
In a first series of experiments, for strips filled with 5 different ferrofluids, with saturation magnetizations ranging from 11 mT to 99 mT, the magnetic field profile is measured with the Hall probe similar as before, and the results are compared with numerical simulations. For these experiments, the distance between the mechanical shimming rings is adjusted to have the maxima in the B 0 profile at -3.8 mm and + 3.8 mm from the centre of the bore. This is obviously not the optimized configuration of the dumbbell-Halbach, but it turns out to be close to the optimum configuration for a sample length of 10 mm (see Table 1, to be compared with the unshimmed result in Fig. 4 below). By this choice we aim for a situation (derived from computer simulations) for which the field minimum is expected to be compensated with the 44 mT ferrofluid (the sample with the third highest saturation value of the series of five), and we use this as an illustrative example of the potential of ferrofluidic shimming with different values of the ferrofluid saturation magnetization. Also, for illustrative purposes, the numerically simulated and the experimentally determined field values are normalized to the field at a location 4 mm from the centre of the bore, leading to the results shown in Fig. 4.a. The figure shows how the ferrofluids can be used to shim the field profile, and logically, increasing the saturation magnetization of the ferrofluid sample results in a higher additional magnetic field. The Table 1 Comparison of simulated and measured homogeneity values. For each sample length the rings have been adjusted to reach the best possible homogeneity. The measurement accuracy of the used Hall-probe is 3 ppm.   simulated profiles do not match exactly with the measurements. This may be due to a slight difference between the magnetic moment taken in the simulations and the actual material properties, but it can also be caused by imperfect filling of the 1 mm 3 cubes with the ferrofluid suspension, which is not accurate when done by hand, and/or a size variation in 3D printing (for example, assuming 50 μm size variation on a cube with sides of 1 mm would give a variation in volume in the order of the deviations that we observe). The resulting field homogeneity values, both for the measurements and the simulations, calculated over a sample length of 11 mm (which is the complete range plotted in Fig. 4.a) are shown in Fig. 4.b, which shows that the ppm values as a function of ferrofluid saturation field can be reasonably well fitted with a parabolic function. The overall improvement obtained in homogeneity is about a factor of 4. The profile observed for the best shimming result, the red line in Fig. 4.a, gives a hint to how an even better homogeneity can be achieved, namely adding 2 extra small volumes of low saturation field ferrofluid at ca. -1.5 mm and + 1.5 mm from the centre would likely compensate the valleys in the red field profile. However, this also lifts the maximum at x = 0 in the red curve, implying that optimization is not trivial and may require an iterative approach.
In a second series of experiments, we tested different cubic container sizes, with edge dimensions ranging from 0.6 mm to 1.0 mm and filled with the ferrofluid with a saturation magnetization of 44 mT. For demonstration purposes we tuned the shimming rings to have the field maxima at -2.5 mm and + 2.5 mm from the centre. This configuration ensures that a B 0 field variation is obtained that can be minimized with an ferrofluid cube with an edge length of 0.7 mm in combination with the chosen 44 mT ferrofluid, information that is derived from our computer simulations. The results are shown in Fig. 5.a, in which the simulated and measured values (using the Hall probe) are normalized with respect to the field at location of 3.25 mm from the centre, to have a clearer presentation of how the field profile develops. The homogeneity values derived from these data are collected in Fig. 5.b and show an improvement of about a factor of 10 from the unshimmed to the shimmed situation.
Although agreement between measurements and simulations for the two investigated options for ferrofluidic shimming is reasonable, a note of caution should be made here. We have simulated the ferrofluidic elements as if they were tiny permanent magnets, which works out reasonably well because the magnetic field in the bore of the magnet is mainly oriented in the z direction. Therefore, it is safe to assume fully saturated magnetization of the ferrofluid in the same direction as this main magnetic field, and field components in other directions can be neglected. For a more realistic and accurate numerical simulation, it is recommended to use more advanced simulation models which include the detailed response of the ferrofluid to the magnetic field vector distribution throughout the bore of the magnet. We consider this out of the scope of this paper where our aim was to show proof of principle of ferrofluidic shimming of the magnetic field in a mobile magnet.

Conclusions
The assembly of a miniaturized pseudo-Halbach magnet design (size: 50 × 50 × 42 mm 3 , weight: 332 g) has been demonstrated for which the homogeneity along the bore can be tuned with two surrounding shimming rings of permanent magnets. We also have demonstrated proof-ofprinciple for a promising and innovative way of improving the field homogeneity of a permanent magnet system. The method consists in the implementation of either a different volume of a fixed ferrofluid, or a fixed volume of ferrofluids of different saturation magnetization, in a microcontainer that is inserted into the bore of the magnet. An advantage of this method compared to the commonly used electric shimming is that it is passive, i.e., no power input is required for its operation, which makes it especially attractive for mobile applications. With a single volume of ferrofluids, the field homogeneity of the dumbbell-Halbach has been improved by a factor 10, from 86 to 8 ppm over a bore length of 5.5 mm. In future studies, further improvement of the shimming result may be obtained by implementing microfluidic chips with multiple microchambers filled with ferrofluid, where the saturation magnetization of each could additionally be tuned to the desired value, aided by magnetic field simulations. In case there is enough space in the magnet bore for multiple elements, or when the elements are kept very thin by a method like polymer film lamination [67], they could be stacked and, in that way, create even more versatility for shimming the magnet, potentially reaching a level suitable for NMR spectroscopy.
The measurements for the two different options of implementing microfluidic elements with ferrofluids show that the method is feasible for shimming magnetic field inhomogeneities in a small permanent magnet assembly. For optimized magnetic field shimming by ferrofluids, finding the most effective microfluidic network can be carried out by optimizing the volume distribution of one chosen type of ferrofluid over the chip, or by optimizing the position of fixed volumes of ferrofluids of different saturation magnetization on the chip, or by a combination of these two methods. For a practical implementation, combining Topology Optimization with Additive Manufacturing (3D printing) routines seems to be ideal [68][69][70][71], and some illustrative examples of the combination of these two techniques for permanent magnet designs at different scales have been published recently [72][73][74][75][76]. Finally, we also see an opportunity for active shimming, because ferrofluid suspensions or plugs can be pumped through a microfluidic channel network to desired locations within the magnet bore to compensate for magnetic field inhomogeneities. To this end, the magnetic field should be mapped during the microfluidic actuation, or the nuclear magnetic resonance of a sample could be measured at the position of interest. This will be the The ferrofluid can be used to shim the field, increasing the volume results in a higher additional field, giving an overshoot for the largest volume. The best choice for this ferrofluid is a box with a side of 0.7 mm. (b) Field homogeneity calculated over a length of 5.5 mm from the data in (a), which is the distance between the two field maxima in (a). topic of a future study.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.