Additive Manufacturing of Hard Magnetic Passive Shims to Increase Field Homogeneity of a Halbach Magnet

Obtaining a highly homogeneous magnetic field is desired for field‐controlled applications. For example, the resolution of magnetic analysis methods can be improved by generating a stronger and more homogeneous field over the region of interest (ROI). A set of 3D‐printed passive shims is fabricated using additive manufacturing to improve the magnetic field homogeneity of a Halbach magnet assembly. The feedstock is a custom acrylonitrile butadiene styrene (ABS)‐hard magnet composite filament filled with 60% wt. isotropic NdFeB. Additionally, a method for investigating the remanence is developed and validated. The result reveals a good agreement between the new method and existing measurement techniques for the remanence of permanent magnets. It is also shown that the additive manufacturing procedure has negligible effects on the magnetic properties. Performing a parametric study over a rectangular ROI, an optimized shim configuration is achieved. In the optimized and 3D‐printed configuration, the average norm of the magnetic flux density, Bnorm, is increased by 13% and, more importantly, a 43% increase in the magnetic uniformity is obtained. These results highlight the great potential of freeform manufacturing, namely, additive manufacturing, to tailor the properties of magnet structures.


Introduction
The concept of generating a unidirectional magnetic field using vector addition of magnets was first demonstrated by Mallinson. [1] Later, Halbach utilized this principle to generate multipole magnets, [2] which are vital components in linear particle accelerators, [3,4] free electron lasers, [5] nuclear magnetic resonance, [6] portable magnetic resonance imaging, [7] electrical synchronous motors, [8] Halbach-array permanent magnet (PM) motors, [9] direct drive generators, [10] actuators, [11][12][13] high-gradient magnetic filtration in mineral oil purification, [14] and many other applications. Halbach arrays can be exploited to focus or defocus spinbearing particles and splitting or merging their beams, and to generate variable magnetic fields for Neutron reflectometry. [15] Nuclear magnetic resonance (NMR) and magnetic resonance imaging (MRI), magnetometers, neutron interferometers, magnetic traps, and particle counters are a few of many examples where a uniform magnetic field is required. The resolution of magnetic analysis methods can be improved by generating a stronger and more homogeneous field over the region of interest (ROI). There are cases where the resulting magnetic field of a permanent or electromagnetic system is not homogeneous enough. [16,17] Shimming is the most commonly employed technique to decrease field inhomogeneities of magnetic systems. For permanent magnets, two shimming methods are generally used: 1) passive shimming, which corrects the magnetic field by ferromagnetic materials placed in specific locations along the magnet [18][19][20] and 2) active shimming, which adopts electromagnets with specialized coils to generate correction fields. [21,22] Several optimized permanent magnetic designs that generate a homogeneous magnetic field have been reported. [23][24][25][26] Such magnetic designs can be obtained using numerical optimization methods. For instance, inverse magnetic field computation based on the finite elements method (FEM) was used to optimize the magnetization of a defined structure. [27,28] In other studies, shape optimization improved existing designs for better performance, [29] parameter variation simulations were employed to find an optimal layout of predefined magnetic structures, [30,31] and topology optimization was applied to optimize the magnetic structure based on an objective function and the system boundary conditions. [32][33][34] There is also machine-learning-based studies to design structures of permanent magnets. [35] Through topology optimization, complicated magnetic field shapes can be created as well, but this freedom-of-design often introduces technical challenges when it comes to the manufacturing of such optimized structures, [36] and often, time and cost intensive production processes are required. This important obstacle can be eradicated by employing additive manufacturing (AM) techniques.
From a materials standpoint, there has been an increased demand for hard magnets NdFeB type, in recent years. [15] Significant improvements in the properties of rare-earth-based high-flux PMs have revolutionized the manufacturing of efficient and portable electrical devices; [37,38] however, current industrial scale production methods, such as injection molding, compression molding, and powder sintering, are very limited in terms of design and size flexibility of the resulting permanent magnets made from hard magnet materials. Additionally, a considerable amount of the magnetic material is wasted during the manufacturing processes. [39] AM is a single-step, affordable, and almost waste-free technique for manufacturing models, prototypes, and end-user products with a minimum amount of material and time. Recently, it has been shown that fused filament fabrication (FFF) AM or material extrusion (MEX) AM [40] can be used to print polymerbonded magnets with complex structures. [28,33,[41][42][43][44][45] MEX technology works by heating up cylindrical thermoplastic filaments above the softening point. A moving extruder presses the malleable thermoplastic through a nozzle and builds the part through a layer-by-layer deposition of the material, to manufacture complex and highly customized assemblies. [46] One of the key benefits of AM processes, in the field of magnetic materials, is their ability to print magnets in a near net-shape configuration using computeraided design (CAD) models without any tooling. [47,48] Hence, MEX enables creating the required geometry for a Halbach array, without the loss of valuable magnetic materials. MEX can 3D print the required parts individually or build the complete geometry that can be sliced later. Additionally, it is technologically advantageous to print bonded permanent magnets to reduce eddy current losses [47,49] and provide the necessary mechanical properties for motors where high frequency is needed.
In this study, we manufactured a passive hard magnet shim for a simple Halbach array using MEX with magnetic filaments to improve the field uniformity in an ROI at the center plane. We report the complete design, characterization, and manufacturing methods.
A Halbach assembly is typically a long cylinder made of a magnetic material with a bore along the centerline where there is a high magnetic field. The Halbach cylinder can be characterized by the internal (r in ) and external radiuses (r ex ) as well as the length (L). The magnetic material around the bore is magnetized such that the angle of magnetization, η, at any point at an angle, θ, see Figure 1a, from the vertical axis is given by [50] η ¼ 2θ (1) This arrangement results in a uniform field within the bore in the vertical direction with minimum stray field outside the cylinder.
It is well known that the flux density inside the bore of an infinitely long Halbach cylinder with a continuous angle rotation, as shown in Figure 1a, is [50] B ¼ B r ln r ex r in (2) where B r is the remanent flux density of the magnetic material. Practical Halbach arrays are simplifications of the continuous one, with examples of such simplifications shown in Figure 1. The simpler the configuration and fewer magnet blocks used, the less homogeneous the field in the bore becomes. However, the production costs decrease significantly for simpler structures. Our aim is to study the possibility of correcting a magnetic field in the very simple Halbach shown in Figure 1e via passive shimming. Due to the reduced field homogeneity, discretizing the theoretical Halbach setup into a small simple four block configuration lets us show a proof of concept for such a shimming approach.

Magnetic Filament Fabrication
The polymer-magnetic composite comprised acrylonitrile butadiene styrene (ABS) pellets (Terluran GP-22, Styrolution, Frankfurt, Germany) as the matrix material and isotropic NdFeB magnet powder (Ningbo Newland International Trade Co., Ltd, Ningbo, China) as the hard magnetic additive. The magnet powder particles were dense flakes. Acetone (≥99.5%, HiPerSolv CHROMANORM for HPLC, VWR Chemicals BDH) was used as a solvent for the ABS pellets and they were dissolved using intermittent stirring at a specific material-tosolvent ratio of 10:9. Once the polymer was fully dissolved into a viscous solution, the isotropic NdFeB flakes with no premagnetization (which passed through a sieve with openings of 210 μm; the particle size analysis using a Beckman Coulter LS 13-320 is shown in Table 1) were slowly added, while the solution was stirred until reaching a 60% wt. ratio, equivalent to a www.advancedsciencenews.com www.aem-journal.com 16.4% volumetric ratio, of the magnetic powder to polymer. The mixture was then poured into aluminum trays and placed in a dehydrator and heated to 80°C to evaporate the solvent. After 12 h the samples were removed from the tray and cut into pieces that were small enough to be poured into a filament extruder (Noztek Touch, Noztek Ltd., UK). The Noztek Touch receives the raw material through a feed hole at the top of the piping, pulls it down with an auger, and extrudes filaments for MEX. For this work, filaments were extruded through a 3 mm nozzle, resulting in filaments with a diameter of 2.76 AE 0.03 mm. Finally, the filament was spooled and stored in a filament dryer (Wanhao Box 2 Filament Dryer; Wanhao 3D Printer, China) before being used to print parts.

SEM Characterization and Light Microscopy
A Zeiss EVO MA 10 scanning electron microscope (SEM) (Carl Zeiss, Germany) was used to characterize the NdFeB flakes as well as the printed and extruded parts. The NdFeB flakes were mixed with ethanol, and a few droplets of the mixture were dripped over a carbon tape and characterized with SEM ( Figure 2a,b). Figure 2c shows the extruded filament. Also, a cross section was characterized after being carbon-coated to improve the conductivity and reduce the charging to achieve better imaging ( Figure 2d). Also, micrographs of cross sections of filament pieces and the surface of a 3D-printed part are presented  www.advancedsciencenews.com www.aem-journal.com in Figure 2e,f, respectively. Optical micrographs were acquired using an upright optical microscope (Meiji Techno, Microscope Central, USA) with a 15Â magnification lens and were subsequently analyzed using the DeltaPix Insight 3.2.5 (DeltaPix, Denmark) microscope software.

AM with the Magnetic Filaments
AM was carried out using a MEX 3D printer (ZMorph VX desktop, Zmorph S.A., Poland) with a direct drive single extrusion assembly. The direct extrusion printhead uses a puller just above the extruder to push the filament directly into the nozzle.
The filaments manufactured in this work were brittle due to the permanent magnet content. A direct drive system is more reliable as the puller is mounted just above the extruder and is closer compared to Bowden extruders. The direct drive puller can easily push filament through the nozzle, resulting in fewer extrusionrelated issues as well as having better retraction control. The filaments were stored in a dryer at 80°C for at least 3 h before and during AM to avoid moisture absorption and the resulting softening that might disturb the printing process. It also has the advantage of preheating the material which further facilitates the extrusion. After optimizing the geometry by means of numerical modeling in COMSOL Multiphysics, the 3D CAD files of the parts were generated using Autodesk Inventor (Autodesk, Inc.; USA). The slicer setting and AM parameters are presented in Table 2.
As a rule of thumb, the nozzle size of the 3D printer should be at least three times the size of the largest particle diameter for good extrusion; however, it was experienced that by adjusting specific parameters such as the flow multiplier and temperature, the printing could be conducted successfully with a nozzle of 0.4 mm diameter (1.9 times the largest particle) to increase the printing resolution.
As custom filaments were adopted for these experiments, calibration methods were required to define the optimum AM parameters. Given the variation in the diameter of the fabricated filaments (2.76 AE 0.03 mm) when compared to the commercially available ones (2.85 mm), the flow multiplier factor was found by comparing the amount of extruded material from a specific command with a standard value. At the same time, the extruder temperature was adjusted so that the material extrusion is facilitated, at the same time the oozing effect is minimized after the extrusion. Given the difference between the specific heat capacity of magnetic particles and that of the polymeric matrix, oozing can impose extra challenges in the printing process. The shimming parts were printed at 248°C, and the remaining printing parameters are given in Table 2.

Vibrating Sample Magnetometry
The magnetic properties of the powders and additive manufactured parts were characterized using a vibrating sample magnetometer (VSM 7407, Lake Shore Cryotronics, Inc., USA). The magnetization (M) of the NdFeB powder and a piece of a printed shim as a function of magnetic field (H) at room temperature are presented in Figure 3a. For the magnetic particles and printed sample, remanences, M r , of 0.885 T and 0.135 T and a coercivities, μ 0 H c , of 1.08 T and 1.04 T were measured, respectively.
As the measured magnetization of the composite filaments is exclusively due to the magnetic particles present within it, the mass fractions of fillers can be obtained by comparing the remanence of pure powders and a manufactured part. This gives a mass fraction of 57.2 wt% equivalent to 15.29 vol%. This is in good agreement with density measurements which give 58.75 wt% and 15.83 vol% of NdFeB particle by using a modulated balance (METTLER TOLED, Mettler-Toledo, LLC, USA) at room temperature. Both these values are close to the nominal 60 wt% of NdFeB material in the ABS. Figure 3b shows the same data normalized to the magnetization data normalized to the volume fraction of magnetic material. This shows that the remanence is linear in the volume fraction, and also that there is no interaction between particles affecting the magnetization. There are negligible differences in coercivity, showing that there  www.advancedsciencenews.com www.aem-journal.com were no synthesis-or manufacturing-related changes in the magnetic properties. When measuring magnetic properties using open flux loop systems, such as a VSM, it is important to correct the recorded data for magnetostatic demagnetization in order to remove the influence of the sample shape. [51] The internal magnetic field, H, can be expressed in terms of the externally applied field H appl as where M is the magnetization and N is the demagnetization factor. The data for raw powders and bonded magnet filament have been corrected for demagnetization by assuming a value of 1/3. [44] In addition to characterization, the VSM electromagnet was also used to magnetize the 3D-printed parts. For this purpose, parts were positioned and magnetized parallel to the desired direction at room temperature with a magnetic field strength of μ 0 H appl ¼ 1.85 T.

Hall Scanning
A room-temperature 3D Hall scanner was used to characterize the magnetic field from the magnet assemblies ( Figure 6b).

A 3-axis Hall-probe (3MTS, SENIS) was mounted in an xyz-stage,
where it can be moved to scan a maximum volume of 28 mm in each direction. The three components of B are recorded in each position, along with the norm, B norm . The sensor has a measurement range of AE3 T. There is a tradeoff between having a higher resolution, by scanning the area in smaller steps, and measurement time. Initially, step sizes in the range 0.05-1 mm were tested. The smaller the step size, the higher the resolution becomes, but also the longer the measurement takes. Analyzing the data from the different step sizes showed that using steps of below 0.25 mm in each direction did not change the standard deviation of magnetic field in the ROI. Thus, a step size of 0.25 mm was used throughout the current study. In addition, the standard deviation of individual measurements in the experiment is shown in Figure S2, Supporting Information.

Numerical Modeling of Halbach and Shimming
In this work, the finite element framework COMSOL Multiphysics was used to model the setup. As illustrated in Figure 4, a Halbach assembly is modeled, using four cubic block magnets with a magnetic remanence (B r ) of 1.44 T based on the table value of the nominal grade of N52, and size of www.advancedsciencenews.com www.aem-journal.com 20 Â 20 Â 20 mm 3 . Later, the data from the model were compared with the experimental result, to find the actual B r of the block magnets, as discussed in more detail in Section 3.3. The computational domain of the model consisting of the Halbach assembly and shimming inside an assumed spherical environment with a radius of 100 mm is shown in Figure 4a. Accordingly, the domain is made of four mesh categories, namely, the sphere, block magnets, shims, and the middle bore. A tetrahedral mesh grid with a range from 0.125 to 8 mm in element size with a refinement concerning the centering edge and in total 176 433 domain elements, 12 190 boundary elements, and 930 edge elements has been generated. The quoted numbers of mesh elements are derived from this study.
To find a permanent magnetic design with shimming elements that generates a homogeneous magnetic field in a defined ROI, we implemented a simplified method with a nonhomogeneous magnetic field. The ROI inhomogeneity is defined by the distribution of magnetic flux density (B) in the discretized area and its standard deviation within the ROI. The ROI is defined as a rectangular area with a length of 4 and 8 mm in the minor and major axes of the designed setup, respectively. To be compatible with the hall scanner probe, as the sensor has some offset from probe edges, there should be a 4 and 2 mm offset considered from the borders of scanning area. The numerical model's main output was the predicted magnetic field over a discretized area with specific steps of 0.25 mm over the ROI resulting in 561 points (33 Â 17). Starting from that design, a parametric study was performed on the scale factor of the minor axis to find the optimal configuration.
The modeled magnetic field in the ROI was output over a uniform grid of 0.25 mm spacing, resulting in 561 points (33 Â 17) corresponding to experimental measurements made using the hall scanner (see Figure 4g).
In general, with finer mesh, one can more accurately capture the geometry contours and there are more "data points" to generate an accurate displacement, but that results in increased time and size of calculations. So, a mesh independence study has been performed to determine the effect of mesh density on the results and to choose the optimal value as presented in Figure S1, Supporting Information, where the fine mesh has been chosen.

Experimental Setup
The initial simple Halbach setup was designed, and the four magnets were placed in a 3D printed PLA frame with the desired www.advancedsciencenews.com www.aem-journal.com orientations as shown in Figure 5a,b. By implementing the numerical simulation as described, the magnetic flux density norm (B) distribution along the opening window can be visualized for a specific B r of the block magnet, as illustrated in Figure 5c. Clearly, the field along the major axis is less uniform while it has more uniformity along the minor axis. To follow the goal of this study, which is increasing the uniformity of B norm in the ROI, the window was limited to the ROI as shown in Figure 5d, where the influence of major and minor axis is clearer.

Determining the Remanence of the Block Magnets
One of the important properties of the material affecting the Halbach performance is the B r of the magnet blocks.
Measuring this for large blocks can be a challenge, as most experimental equipment is designed for smaller samples. Using a Brockhaus HG200 hystograph, the remanence of a single block was measured to be 1.47 T. However, the magnetic forces involved were significant and great care had to be taken when removing the magnet block from the hystograph. Generally, a shortcoming of field measurement by a hall probe is locating the exact positioning of the probe relative to the sample. This uncertainty stems from two sources: first, there is an offset between the exact position of the hall sensor inside the probe; and second, the exact starting position of the probe relative to the magnets is hard to determine accurately. To overcome these issues, the four magnet blocks were placed in the Halbach frame, and their positions were measured accurately using a nonmagnetic digital caliper. In this arrangement, both these challenges may be overcome because there is a saddle point in the magnetic field in the middle. The magnetic field is predominantly along the x-axis, with smaller components along the yand z-axes. The exact saddle point was found by finding the maximum value of the norm of the magnetic field B norm along the z-direction, and the minimum values along the xand y-directions (major and minor axis). (follow Figure 5b for axis guidance).
All experiments presented in the following figures were performed in triplicate independently. In Figure S2, Supporting Information, the standard deviation comes from two different sources: first, from measurement of each point, which is a result of the probe sensitivity and field measurement, and second, from different independent experiments. The standard deviation for each data point is negligible in comparison to the absolute values. To avoid confusion, this has not been reported in the following graphs. In Figure 6a, the left plot shows a representative experimental result for B norm distribution in the Halbach setup, and the other three graphs show the B norm distribution from the numerical modeling result, assuming different values for the remanence. By modeling eight cases and comparing the average B norm in the discretized area, the actual B r can be calculated through interpolation. By interpolation, we obtained a value of 1.487 T-1.4% higher than measured value in the hystograph-which shows a small difference, indicating the precision of the methods. This validates the proposed method for determining the remanence. Figure 6d,e shows B norm plotted for the centerline and for a mean in the direction normal to the plotting direction. For example, in Figure 6c, the mean is taken along the major axis for each point along the minor axis, illustrating the correspondence between the experiment and model.

Shim Geometry Optimization
Given the B r value of the magnets (1.487 T), shims were designed to be placed in the free space between the block magnets in order to improve the uniformity of the field in the ROI. To achieve an optimized configuration of the shimming, various techniques such as topology optimization, machine learning, or parametric study can be employed. However, the scope of this article is the development of a proof-of-concept 3D printable shims with hard magnetic-bonded filament. Thus, a parametric study was adopted to determine the properties of such shims. For this purpose, a cube with a cylindrical hole in the z direction was designed. Considering the diagonal axis (Figure 5a), the object can be divided into four pieces which can be magnetized in the desired directions afterward. As the ROI is a rectangle, the parametric study was performed on the width of the ellipse as the cross section of the cylindrical hole. An initial value for the remanence of the shims was found from the VSM data on a sample taken from a printed part from the same batch. The modeling data are visualized in Figure 7. The magnetic field in the centered surface of the hole and ROI is illustrated in Figure 7a,b, respectively. In Figure 7b, discretized data points were extracted and imported to the same postprocessor for the hall scanner to acquire better comparability. By increasing the hole width, which results in less magnetic material in the shims, the average B norm decreases as shown in Figure 7c. However, considering the distribution of B norm , it is shown that the standard deviation of B norm along the ROI is minimized when the scale factor is 0.5 (Figure 7d).

Applying the Shimming
Applying the optimal scale factor of 0.5 (based on the above modeling), a set of shims was additively manufactured, magnetized in the VSM magnet, and placed into the position as shown in Figure 8a. In order to measure an accurate value of the remanence of actual shims, the outlined method (a comparison-based iterative residual magnetization method) was used. The field inside the Halbach, including the shims, was measured using the Hall probe (similar to the arrangement shown in Figure 6b). This data were compared to numerical modeling results, where the remanence of the block magnets was fixed to the value of 1.478 T, as found, and the remanence of the shim parts was varied. From iteration a value of B shim = 117 mT was found, as shown in Figure 8c. Fitting the B r distribution along the minor and major axis in experiment and modeling results revealed some edge effect which potentially stem from the close proximity of the printed parts. The calculated remanence value of the assembly of printed parts, 117 mT, is lower than that found in the VSM measurement, 135 mT. The VSM measurement was performed on a part printed from the same batch as the printed shim parts. However, due to the manufacturing process, there may be variations in the homogeneity along the filament used for printing, which could explain the deviation. In Figure 8d, e, the central lines are not fully symmetric. This may be a result www.advancedsciencenews.com www.aem-journal.com of a variation in the remanence of the printed parts, or a slight misplacement of these. In Figure 6d,e, the data are fully symmetric, indicating that the permanent magnet block creates a symmetric field, and that the slight asymmetry is due to the printed parts.
It is worth noting that by repeating the shape optimization process with the correct remanence of the shims, the scale factor of 0.5 was still found to result in the most homogeneous field.
In Figure S3a, Supporting Information, it is shown that for a specific geometry, there is a relation between the block magnet remanence and shimming remanence for a desired average magnetic flux density of an ROI; however, by considering a fixed remanence for the shims there is an optimum configuration to achieve the uniformity in the field (see Figure S3b, Supporting Information.

Effect of Shimming
Finally, by comparing the Halbach setup with and without the shims in Figure 9, it was found that the proposed shims come at the cost of a small nonuniformity in the minor axis. However, it has significantly improved flattening the B norm curve in the major axis and in other words has increased the magnetic uniformity in the major axis. In addition to the increased average B norm by 13%, which is a side product of using hard magnetic shimming, the standard deviation of the magnetic field in the ROI has decreased by 43% which indicates a significant increase in the uniformity of the field.
The NdFeB material used in this study was isotropic, meaning that it can be magnetized in any direction. Employing anisotropic magnet powder would make a significantly larger remanence in the shims possible. It would, however, require magnetic orientation of the material during printing. At present, this is not possible in the printer used for this work, but it is an area of ongoing research. [15] It should be considered that the shape optimization of the shims was only performed on an initial simple design idea by a parametric study of the scale factor. There certainly remains room for improvement through employing more advanced optimization approaches, including topology optimization or machine learning. www.advancedsciencenews.com www.aem-journal.com