## 1. Introduction

The development of superconducting magnet science and technology is dependent on higher magnetic field strength and better field quality. The high magnetic field is an exciting cutting-edge technology full of challenges and also essential for many significant discoveries in science and technology, so it is an eternal scientific goal for scientists and engineers. Combined with power-electronic devices and related software, the entire magnet system can be built into various scientific instruments and equipment, which can be found widely applied in scientific research and industry. Magnet technology plays a more and more important role in the progress of science and technology. The ultra-high magnetic field helps us understand the world much better and it is of great significance for the research into the origins of life and disease prevention. Electromagnetic field computation and optimization of natural complex magnet structures pose many challenging problems. The design of modern magnets no longer relies on simple analytical calculations because of the complex structure and harsh requirements. High-level numerical analysis technology has been widely studied and applied in the large-scale magnet system to decide the electromagnetic structure parameters. Since different problems have different properties, such as geometrical features, the field of application, function and material properties, there is no single method to handle all possible cases. Numerical analysis of the electromagnetic field distribution with respect to space and time can be done by solving the Maxwell’s equations numerically under predefined initial and boundary conditions combined with all kinds of mathematic optimal technologies.

In this chapter, basic magnet principles, methods of generating a magnetic field, magnetic field applications and numerical methods for the magnet structure design are briefly introduced and reviewed. In addition, the main numerical optimal technology is introduced.

## 2. Magnet classification

A magnet is a material or object which produces a magnet field. Magnets can be classified as permanent magnets and electromagnets. A permanent magnet is made of magnetic material blocks, has a simple structure and lower costs. However, the magnetic field strength produced by permanent magnets is weak. Electromagnets can operate under steady-state conditions or in a transient (pulse) mode and electromagnets can also be subdivided into resistance and superconducting magnet. A resistance magnet is usually solenoid wound by resistance conductors normally with cooper or aluminum wires and the magnetic field strength is also relatively weaker, but larger than the field generated by permanent magnet. The volume, however, is huge and the magnet system needs a cooling system to transfer the heat generated by the coils’ Joule heat. A superconducting magnet is wound by superconducting wires and there is almost no power dissipation due to the zero resistance characteristics of superconductors. The magnetic field strength generated by a superconducting magnet is strong, but limited by the critical parameters of the particular superconducting material. Scientists are trying to improve the performance of superconductors in order to construct superconducting magnets with high critical current density and low operating temperature.

## 3. Applied superconducting magnet

With the development of superconducting magnets and cryogenic technology, the magnetic field strength of superconducting magnet systems is increasing. A high magnetic field can provide technical support for scientific research, industrial production, medical imaging, electrical power, energy technology etc. Up to now, magnetic fields of about 23 T have been mainly based on low temperature superconductors (LTS), such as NbTi, Nb_{3}Sn, and/or Al_{3}Sn. Superconducting magnets with a magnetic field of 35 T are operated in superfluid helium combined with a high temperature superconductor operated at 4.2 K. Magnets with magnetic fields above 40 T are hybrid magnets, consisting of a conventional Bitter magnet and a LTS magnet. Superconducting magnets based on the second generation of YBCO high temperature superconductors may produce a 26.8-35 T magnetic field, while a magnetic field of up to 25 T is possible based on Bi2212 and Bi2223 superconducting magnets. Therefore, research on high magnetic field applications based on superconducting magnet technology has already reached a relatively mature stage.

### 3.1. Magnet in energy science

With the global growth of economics and an ever increasing population, energy requirements have been growing fast. Up to now, the available sources of energy around the world are nuclear fission, coal, petroleum, natural gas and various forms of renewable energy. Fusion energy has great potential to replace traditional energy in the future because it is clean and economical. The magnetic field is used to balance the plasma pressure and to confine the plasma. The main magnetic confinement devices are the tokomak, the stellarator and the magnetic mirror, as well as the levitated dipole experiment (LDX). Tokamak has become the most popular thermonuclear fusion device in all countries around the world since the Soviet Tokamak T-3 made a significant breakthrough on the limitation of plasma confined time. The magnetic field strength should be strong enough for the fusion energy to be converted to power and superconducting magnet technology is the best solution to achieve high field strength. The superconducting magnet system of Tokamak consists of Toroidal Field (TF) Coils, Poloidal Field (PF) Coils and Correction Coils (CC) (Peide Weng et al., 2006). There are several famous large devices including T-3, T-7 and T-15 in Russia, EAST in China, KSTAR in Korea, JT-60SC in Japan, and JET in UK which have been developed and ITER in France will be installed in the future. Fig. 1 illustrates the main technical parameters for the development of some fusion devices.

A magnetohydrodynamics (MHD) generator is an approach to coal-fired power generation with significant efficiency and lower emissions than the conventional coal-fired power plant. The MHD-steam combined cycle power plant could increase the efficiency up to 50-60%, which will result in a fuel saving of about 35%. Its applications could provide great potential in improving coal-fired electrical power production. Since the middle of the 1970s, MHD superconducting magnet development has been ongoing and a series of model saddle magnets have been designed, constructed, and tested (Luguang Yan, 1987).

With the commercialization of high temperature superconductors (HTS), various countries and high-tech companies have made great efforts to strengthen their investment in research on superconductivity, and HTS applications have developed rapidly from 1986. At present, HTS cables, current limiters, transformers, and electric motors have already entered the demonstration phase, while experimental prototypes for HTS magnetic energy storage systems have already appeared. Superconducting Magnetic Energy Storage (SMES) technology is needed to improve power quality by preventing and reducing the impact of short-duration power disturbances. In a SMES system, energy is stored within a superconducting magnet that is capable of releasing megawatts of power within a fraction of a cycle to avoid a sudden loss of line power. SMES has branched out from its original application of load leveling to improving power quality for utility, industrial, commercial and other applications. In recent years superconducting SMES systems equipped with HTS have been developed. A HTS magnet with solid nitrogen protection was developed and used for high power SMES in 2007 by IEECAS (Qiuliang Wang et al., 2008), and 1 MJ/0.5 MVA HTS SMES was developed and put into operation in a live power grid of 10 kV in late 2006 at a substation in the suburb of Beijing, China (Liye Xiao et al., 2008). The LTS magnet fabricated with compact structure for 2 MJ SMES consists of 4 parallel solenoids to obtain good electromagnetic compatibility for the special applications. The SMES are shown in Fig. 2 (Qiuliang Wang et al., 2010).

### 3.2. Ultra-high superconducting magnet in condensed physics

In order to develop a 25-30 T complete high magnetic field superconducting magnet with an HTS magnet system, NHMFL and Oxford Superconductivity Technology (OST) established a collaboration to develop a 5 T high temperature superconducting insert combined with a water-cooled magnet system. They achieved a central field of 25 T in August 2003 (H. W. Weijer et al., 2003). By using an YBCO HTS magnet as an insert coil in 2008, the total field was increased to 32.1 T, and a 35.4 T layer-wound YBCO magnet has subsequently been fabricated and tested. The German Institut für Technische Physik (ITEP) at the Karlsruhe Institute for Technology (KIT) (M. Beckenbach et al, 2005) used Bi2223 to successfully develop a 5 T insert coil, which operates under a 20 T background magnetic field. The development of this technology provided the technological basis for the development of a high field NMR system. The low temperature required to operate a 20 K HTS magnet can be obtained through a Gifford-McMahon (GM) refrigerator. Because the specific heat at 20 K increases about by two orders of magnitude compared with that at 4.2 K, HTS magnets have higher stability compared with LTS. The HTS magnets with fields of 3.25 T were developed and operated as insert coils in a 8-10 T/100 mm split-pair system in China (Yinming Dai et al., 2010), the configuration is shown in Fig. 3. The largest HTS magnet project in that laboratory is focused on developing a 1 GHz insert coil (W. Denis Markiewicz et al., 2006). Although the field threshold of Bi2223 and Bi2212 HTS tapes is over 30 T, operation with HTS tapes is limited due to the Lorentz forces. In order to obtain stable HTS magnets, the persistent current mode is used for HTS inserts, with the aim of obtaining field stability smaller than 10^{-8}/h and field uniformity below 10^{-9} in the region of Φ10 mm × 20 mm. The solenoid-type configuration has more advantages than the double pancake structure.

The 40 T hybrid magnet system will be designed and constructed at the High Magnet Field Laboratory, Chinese Academy of Sciences (HMFLCAS), and the construction of the hybrid magnet is planned to be completed in 2013. The hybrid magnet consists of a resistive insert providing 29 T and a superconducting coil providing 11 T on the axis over a 32 mm bore (W. G. Chen et al., 2010). The outsert with 580 mm room temperature bore consists of two sub-coils, the inner one (coil C) is a layer wound of Nb_{3}Sn conductor and the outer one (coil D) is a layer wound of NbTi conductor. Both conductors adopt a cable-in-conduit conductor and will be cooled by 4.5 K force-flowed supercritical helium. For the future upgrade, two Nb_{3}Sn sub-coils (coil A and coil B) will be inserted into the 11 T superconducting outsert coils and the maximum field in the superconducting magnet will be more than 14 T. Moreover, the resistive insert will be upgraded to 31 T and the total system central field will be above 45 T. Fig.4 shows the overall configuration and a cross-section of the outsert of the 40 T hybrid magnet system.

### 3.3. Magnet in NMR, MRI and MSS

Since the first Nuclear Magnetic Resonance (NMR) spectrometer magnet system was invented in 1950, NMR has been widely used in leading laboratories all over the world as an effective tool for materials research and it has become the most important analysis tool for modern biomedicine, chemistry and materials science. The use of a superconducting coil for the NMR system (instead of a resistive one) has the advantages of low energy consumption, compact coil structure, stable current and magnetic field, good field uniformity, and high magnetic field. Appropriate superconductors for high field application are now Nb_{3}Sn or the ternary compound (NbTa)_{3}Sn. HTS materials, such as YBCO and Bi2212, will be the main superconductors in the future. At present, the standard NMR magnet has an aperture of 52 mm and the magnetic field range is from 4.7 T to 23.5 T. The corresponding frequency is between 200 and 1000 MHz, and the stored energy ranges from 18 kJ to 26 MJ (Bernd Seeber, 1998). High field NMR systems need field stability better than 10^{-8}/h and a magnetic field uniformity of 2 × 10^{-10} in a 0.2 cm^{3} spherical volume. In 2010, the Bruker Corporation developed a 1000 MHz LTS NMR spectrometer, demonstrating that the LTS conductors NbTi and Nb_{3}Sn have reached their limit. A 400MHz NMR superconducting magnet system was designed, fabricated and tested at IEECAS (Qiuliang Wang et al. 2011). To meet the requirements of 400 MHz high magnetic field nuclear magnetic resonance, the superconducting magnets are fabricated with 17 coils with various diameters of superconducting wire to improve the performance and reduce the weight of the magnet. In order to reduce the liquid helium evaporation, a two-stage 4 K pulse tube refrigerator is employed. The superconducting magnet with available bore of Φ54 mm is shown in Fig.5.

Since 1980, magnetic resonance imaging system (MRI) magnet technology has made continuous progress in medical diagnosis. In the past 30 years, MRI has developed into one of the most important medical diagnosis tools. Due to the clear soft tissue imaging, MRI technology maintains its leading status in medical applications. The key issue in designing and constructing a MRI superconducting magnet is obtaining a highly uniform and stable magnetic field over an imaging volume. The trend in MRI development, therefore, is toward short length of coils, high magnetic field and a fully open, rather than tunnel-like, structure. The shortest coil length up to now is 1.25 m to reduce the patient's incarceration sickness and achieve lower helium consumption.

At present, the designs of open-style MRI systems use permanent (field range from 0.35 T to 0.5 T) or superconducting magnets. Magnets with fields below 0.7 T can use the combination of a superconducting coil and an iron yoke, which produces a highly uniform field. Standard clinical 1.5 T and 3 T MRI scanners have developed rapidly and now installed in many hospitals. The higher filed devices, may be 7 T MRI, will become the next generation clinical scanner and are supported by three big commercial companies (GE, Philips, and Siemens). The first 7 T whole body scanner with passive shielding was installed in 1999. The first actively shielding 7 T device was designed by Varian and Bruker will soon launch a similar one. The first 9.4 T, which is equivalent to 400MHz functional MRI, was manufactured in 2003 by Magnex Scientific Ltd, a company which was incorporated into Varian. An 11.75 T/900 mm superconducting magnet system is in the process of being fabricated in France; it will be used in neuroscience research in the Commissariat à l’Ènergie Atomique (CEA) in France. Since 2011, a 9.4 T superconducting magnet for metabolic imaging has been undergoing development in the Institute of Electrical Engineering, Chinese Academy of Sciences (IEECAS) (Qiuliang Wang et al. 2012). The magnet has a warm bore that is 800 mm in diameter and cryogenics with zero boil-off of liquid helium will be used for cooling the superconductors. The overall configuration and the field distribution over the DSV region are shown in Fig.6, respectively.

A magnetic surgery system (MSS) (Qiuliang Wang et al. 2007) is a unique medical device designed to deliver drugs and other therapies directly into deep brain tissues. This approach uses superconducting coils to manipulate a small permanent magnet pellet attached to a catheter through the brain tissues. The movement of the small pellet is controlled by a remote computer and displayed on a fluoroscopic imaging system. The magnets of the previous generations were composed of three pairs of orthogonal superconducting solenoid coils. The control strategies are complex because of the magnetic field distribution of solenoids. A novel type of spherical coils can generate linear gradient field over a large spherical volume. This type of modified spherical coils with a constant current distribution model is easy to fabricate in engineering. A prototype of this spherical magnet has already been constructed with copper conductors. According to the key research problems of MSS and the disadvantages of the current MSS, we present a novel type of superconducting magnets structure. The first domestic model MSS has also been constructed and a series of experiments have been performed to simulate the real operation situations on this basis.

### 3.4. Magnet in scientific instrument and industry

Initially, superconducting magnets were used as scientific instruments in laboratory. With the improvement of magnetic field strength and performance, superconducting magnet technology has been applied in many fields such as accelerators, industry and so on.

Accelerators are the most important tools for high energy physics research. The investment costs of the accelerator rings are determined by the ring size and the operating costs by the power consumption of the magnets. Superconducting magnets with high current density and lower costs were widely applied to accelerator fields. There are several large, famous accelerators equipped with superconducting magnets such as Tevatron at Fermilab, Hadron Elektron Ringanlage (HERA) at the Deutsches Elektronen-Synchroton (DESY) and the Large Hadron Collider (LHC) at the European Organization for Nuclear Research (CERN). The accelerator superconducting magnet system includes dipole magnets for particle deflection, quadrupoles for particle focusing and sextupole and octupole magnets for correction purposes. It is difficult to design and construct this magnet system because the field distribution is more complex and all magnets need a high effective current density to get the high field strength. In addition, the required high field quality, which means uniformity in the case of a dipole and exact gradient in the case of a quadrupole, and the required repeatability for the series of magnets operated in a high radiation environment are challenges in the design and construction of these magnets.

The Fermilab Tevatron Proton-Antiproton Collider (D. McGinnis. 2005) is the highest energy hadron collider in the world. The superconducting Tevatron dipole magnet has a magnetic length of 6.116 m and a radial mechanical aperture of 0.0381 m. The coil package is assembled with an upper coil and a lower coil each of which has an inner layer of 35 turns and an outer layer of 21 turns. The Rutherford-style cable is composed of 23 strands, 12 coated with ebanol and 11 with Stabrite. Each of these strands has 2050 NbTi filaments with the diameter of about 9 μm. The filament separation to diameter ratio is 0.35 and the ratio of copper to non-cooper is 1.8. The coil package is enclosed in a cylindrical cryostat inserted into a warm iron yoke.

The HERA (R. Meinke. 1991) installed at DESY consists of 650 superconducting main magnets (dipoles and quadrupoles) and approximately the same number of superconducting correcting elements (dipoles, quadrupoles and sextupoles). The system consists of two independent accelerators designed to store 30 GeV electrons and 820 GeV protons, respectively. These magnets formed a continuous cold string through the 6.3 km long HERA tunnel interrupted only by warm sections around the interaction regions. The superconducting dipoles with the central field of 4.68 T and the magnetic length of 8.824 m, and the superconducting quadrupoles with the central gradient field of 91.2 T/m and the magnetic length of 1.861 m are of the cold bore and cold yoke type.

The LHC (L. Rossi. 2003) is a gigantic scientific instrument near Geneva, where it spans the border between Switzerland and France about 100 m underground. It is a particle accelerator used by physicists to study the smallest known particles – the fundamental building blocks of all things. Most of its 27 km underground tunnel was filled with superconducting magnets, mainly 15 m long dipoles and 3 m long quadrupoles. The LHC magnets are operated at the field strength of 8.36 T at an operating temperature of 1.9 K, which is approaching the 11.45 T mark that is considered to be the upper limit for a niobium-titanium superconductor. In the LHC accelerator, the stronger the magnetic field is, the tighter the arc of the beam is in its 27 km tunnel. With stronger dipole magnets, an accelerator can push particles to much higher relativistic energies around the same-sized circular beam path.

The Superconducting Solenoid Magnet (SSM) is designed to provide a uniform 1.0 T axial field in a warm volume of 2.75 m diameter. It is the first superconducting magnet of this type built in China. The 0.7 mm diameter NbTi/Cu strands are formed into a Rutherford cable sized 1.26 mm 4.2 mm. The Rutherford cable is embedded in the center of a stabilizer made of high purity (99.998 %, RRR 500) aluminum with outer dimensions of 3.7 mm 20.0 mm. One layer of 0.075 mm thick Upilex-Glassfibre (glass fiber reinforced polyimide) film is used for turn-to-turn insulation of the coil winding. The superconducting magnet is indirectly cooled by a forced flow of two phase helium at an operating temperature of 4.5 K through cooling tubes wound on the outside surface of the support cylinder (B. Wang et al. 2005). The Superconducting IR Magnets (SIM) for the BEPC upgrade (BEPC-II) are installed completely inside the BES-III detector and operated in the detector solenoid field of 1.0 T. In BEPCII, a pair of superconducting quadrupole magnets (SCQ) (L. Wang et al. 2008) with high focusing strength is used, which will squeeze the β function at the interaction point and provide a strong and adjustable magnet field. Both of the two SCQs are inserted into the BESIII detector symmetrically with respect to the interaction to produce an axial steady magnetic field of 1.0~1.2 T over the tracking volume and to meet the requirements of particle momentum resolution to particle detectors. Fig.7 shows the components and fabrication at the site of the SCQ.

The MICE coupling magnet (D. Li et al. 2005) consists of a single 285 mm long superconducting solenoid coil developed by the Harbin Institute of Technology. The superconducting coil is wound on a 6061 aluminum mandrel that is fitted into a cryostat vacuum vessel. The inner radius of the coil is 750 mm and its thickness is 110 mm at room temperature. The coil assembly is comprised of the coil with electrical insulation and epoxy, and the coil case is made of 6061-T6-Al, including the mandrel, end plates, banding, and cover plate. The length of the coil case is 329 mm. The coupling solenoid will be powered by a single 300 A/020 V power supply connected to the magnet through a single pair of leads that are designed to carry a maximum current of 250 A. It is cooled by liquid helium flow through cooling tubes embedded in the coil cover plate by two 1.5 W cryocoolers.

The super-ferric dipole prototype of the Super Fragment Separator (Super-FRS) has a width of 2200 mm, a central length of 2020 mm and a height of 725 mm, respectively. The Collector Ring (CR) magnet has been built by the Facility for Antiproton and Ion Research (FAIR) China Group (FCG), including IMPCAS, IPPCAS, and IEECAS, in cooperation with the GSI Helmholtz Center for Heavy Ion Research (GSI) (Hanno Lei brock et al. 2010). IEECAS is contributing to the design of the coils, IPPCAS is responsible for the fabrication of the superconducting coils and cryostat and IMPCAS is responsible for the testing of the whole system, the magnetic field optimization and the development of the 50 ton laminated iron yoke. The dipole magnet has a homogeneous region 380 mm in width and 140 mm in height, while the homogeneity reaches ±3 × 10^{-4}. The passive air slot and chamfered removable end poles guarantee that the magnetic field distribution is homogeneous at both low and high field levels. The Super-FRS superconducting dipole is a super-ferric superconducting magnet with a warm iron yoke which is laminated due to magnetic field ramping and the H type yoke is made of laminated electrical steel 0.5 mm in thickness, which was stamped and glued to blocks, and machined to the 15 degree angle sector shape. The superconducting coils were wound from multi-filamentary NbTi wires with a higher than usual the ratio of copper to non-copper and are operated at liquid helium temperature. The coils are positioned in the helium cryostat with a multi-layer insulation structure. The total weight of the magnet is more than 52 tons. The magnetic field measurements indicate that the field homogeneity is about ±2 × 10^{-4} at different magnetic field levels (0.16 T - 1.6 T), which is better than the design requirements. The cryostat at the test facility in IPPCAS and prototype dipole at the test facility of IMPCAS are shown in Fig. 8.

For the requirements of microwave devices, a conduction-cooled magnet has been fabricated for the microwave experiments used in Gyrotron. A magnet system with a center field of 1.39 T and warm bore of 100 mm has been designed and fabricated (Qiuliang Wang et al. 2007). The electromagnetic structure of the magnet is designed on the basis of the hybrid genetic optimal method. The length of homogeneous region of the superconducting magnet is adjustable from 200 mm to 250 mm. Also the superconducting magnet can generate multi-homogeneous regions with the length of 200, 250 and 320 mm. The homogeneity of the magnetic field is about 0.5% with a constant homogenous length and 1.0% for adjusting homogenous length. All of the homogeneous regions start at the same point and the field decays to 1/15-1/20 from the front point of a homogeneous region to 200 mm. The superconducting magnet is cooled by one GM refrigerator with cooling power of 1.5 W at 4 K. The configuration of the superconducting magnet with superconducting coils and copper coils is illustrated in Fig.9 (a). The homogeneous region length of 320 mm with maximum center field of 1.3T is generated by main coils 1, 2 and compensating coils 3 and 5. In order to extend the magnetic field decay from 200 mm to 300 mm, we need to use the normal copper coils. Therefore, the homogeneous region length of 320mm with a field of 1.3 T is generated by the main and compensating coils of 1, 2, 3, 5, 6 and 7 for superconducting coils and 8, 9 and 10 for copper coils. The homogeneous region length of 250 mm with the field of 4 T, and the magnetic field decay can be adjustable through the main and compensating coils of 1, 2, 3, 5, 6 and 7. The magnetic field decay can be controlled through the adding cathode compensation coils of 6 and 7, and the coils are connected to an assisting power supply to adjust the operating current. The total superconducting coil set-up should have five high temperature superconducting current leads. The copper adjustment coils 8, 9, and 10 are used to change the operating current to correct the magnetic field distribution in the homogeneous region. The main field distributions are illustrated in Fig.9 (b). For the requirements of IEECAS customers, superconducting magnets with all kinds of magnetic field distribution are fabricated.

## 4. Structure and function of magnets

The desired magnetic field produced by superconducting coils and the shape of field is predetermined by the users and its special application. The magnetic field distribution depends on the size and shape of coils and final system structure. The common shapes of superconducting coils are solenoid, saddle coils, race-track coils, toroid coils, baseball coils and yin-yang coils for different applications.

### 4.1. Configuration of solenoid magnet

The most efficient and economic coil is the solenoid structure, and normal solenoids are symmetric consisting of a single solenoid or several coaxial solenoids based on the field distribution and homogeneity demands. The solenoid coil is wound layer by layer with round or rectangular cross-section wires on a cylindrical bobbin. The basic parameters for a solenoid are inner radius *r*_{inner}, router radius *r*_{outer}, the length *L* and the current density *J*. The current density *J = NI*_{op}*/*[*L(r*_{outer}*-r*_{inner)}], where the number of windings and operating current are *N* and *I*_{op}, respectively. The conductor current density is higher due to the electrical insulation and the eventual mechanical reinforcement. By these parameters, the magnetic field can be calculated by the popular equation (Martin N. Wilson. 1983). By this method, in theory, we can design all symmetric field distribution magnet system.

### 4.2. Racetrack and saddle-shaped magnet

The racetrack-shaped coil has two linear segments and two semicircular arc segments. The saddle coil has two linear segments and six small circular segments. The coil structure of racetrack-shaped and saddle coils are shown in Fig. 10. The racetrack-shaped magnet may be used in electrical machinery, magnetic levitation trains, dipole or multipole magnets for an accelerator, wiggler and undulator magnets, large-scale MHD magnets, space detector magnets and in space astronaut radiation shield and accelerator detector magnets, such as the ATLAS magnet at CERN. Sometimes, accelerator magnets, electrical machinery magnets and MHD magnets employ saddle shaped coils. Transverse magnetic field distribution can be produced by combining with the saddle coils and change the current direction. Saddle coils are also used to correcting the magnetic field distribution for magnetic resonance magnets and magnetohydrodynamics.

### 4.3. Structure of other complicated magnet

Baseball coils and yin-yang coils is used to confine the plasma as magnetic mirror. The baseball coils with U-shaped structure produce a magnetic field magnitude increasing in every direction outwards from the plasma and the structure is more economic than the same mirror field produced by a pair of solenoid. A yin-yang magnet consists of two orthogonal baseball coils which generally produce a deeper magnetic well than a single baseball coils and also use fewer conductors. The magnet structure of a magnetic mirror is even more complex, as for the stellarator shown in Fig.11 (a). The magnet current distribution forms a yin-yang structure. Force-free magnets are ones in which the current density *J* is parallel to the field *H* everywhere, i.e. *J* =* H*, where is a scale function called the force-free function or factor. The Lorentz force f is therefore equal to zero since f = μJ H = 0. However, from the virtual work theorem of mechanics, it can be verified that it is impossible to be force-free everywhere in a finite electromagnetic system without magnetic coupling with other systems (Yanfang Bi & Luguang Yan. 1983). Furthermore, it is also unnecessary to construct a fully force-free magnet, as shown in Fig.11 (b), since the solid coil itself could withstand certain forces. So we need practically to develop some quasi-force-free magnets in which J and H are approximately parallel, so that although the Lorentz forces are not zero, they are reduced significantly. With the development of accelerator magnet technology in recent years, the so-called snake-shaped dipole magnet, shown in Fig.11(c), has been proposed, which can deliver good magnetic field uniformity. This kind of magnet can be used in accelerators for particle focusing.

## 5. Numerical methods for magnet design

Due to the complex structure of electromagnetic devices and the compact design requirements, the design of modern magnets no longer relies on simple analytical calculations. Usually, the designers employ complex high-level numerical analysis technology to decide the electromagnetic structure parameters. With the geometry, the material distribution and the driven sources given, the numerical analysis of the electromagnetic field distribution with respect to space and time can be conducted by solving the Maxwell's equations numerically under predefined initial and boundary conditions. During the design of magnet devices, the designer should propose a configuration satisfying the functional needs as far as possible. The inverse problem is: given the magnetic field distribution in space and time, one must find the geometric parameters and the material distribution, as well as the field source (K. Huang & X. Zhao. 2005). Magnet design is such an electromagnetic field inverse problem. Its task is to find the field source (current distribution or permanent magnet material distribution) on the basis of a given magnetic field spatial distribution. The inverse problem has two different aspects: the design optimization itself and the parameter identification. (Ye Bai et al. 2006; W. Zhang, H. He & A. P. Len. 2005).

The deterministic method is doing the search gradually during the iterative process according to the search direction determined by each step of the iteration, so that the objective function value of the current step iterative solution is certain to be smaller than the preceding values. Different deterministic methods have different search directions, such as the “steepest decent”, the “conjugating gradient method”, the “Quasi-Newton law” (Chunzhong Wang, Q. Wang & Q. Zhang. 2010), the "Levenberg-Marquard algorithm", etc. The deterministic method depends on the neighborhood characteristics of the current search position to determine the next step search position (with partial linearization in a non-linear problem). Therefore it is local optimization and the efficiency of seeking for the local optimal solution is very high, but it does not have global optimization capability in a multi-extreme value problem. Another shortcoming of the deterministic method is that it is necessary to know the first- or second-order partial derivative of the objective function and it usually requires the objective function to not be too complex and to have an analytic expression, which increases the computing time and cost. On the other hand, the ill-posed inverse problem is often inherited with an optimization problem. Therefore, the regularization processing should be added to each iteration step of the deterministic method, as otherwise big errors will occur, and the iteration may not work.

In order to avoid the limits of the deterministic method, the stochastic method (Monte Carlo) is suggested (N. Metropolis & S. M. Ulam. 1949). The Monte Carlo method works in such a way that each iteration step is determined by a random number. The traditional Monte Carlo method carries on a completely stochastic blind search, assuming that all possible solutions have equal probability. In contrast, the modern Monte Carlo methods, such as the well-known simulated annealing method (S. C. Kirkpatrick, D. Gelatt & M. P. Vecchi. 1983), the genetic algorithm (Qiuliang Wang et al. 2009), the evolutionary algorithm (ant colony algorithm and particle swarm optimization), the taboo search method, and the neural network and other stochastic algorithms, carry on the random search in a more instructive way, giving the different possible solutions with different probabilities. The merits of the Monte Carlo method are: it is universally serviceable and no target problems need to be differentiated as to whether they are linear or non-linear, ill-posed or well-posed. A problem can be processed by the Monte Carlo method, even if its operator is very complex and cannot be expressed with an analytical formula. Besides, the method has a strong optimization capability in all situations. Its shortcoming is that the calculation time is usually very large, growing inordinately with the order of the problem, while the convergence rate is very slow.

In order to combine the respective merits of the above algorithms, many researchers have been striving to work for the unification of these methods. In order to reduce the computing time, a new kind of optimizing strategy has emerged in recent years – the unification of the response surface model and the stochastic optimized algorithm (J. H. Holland. 1992; C.W. Trowbridge. 1991). This method firstly separates the space of the target variable for a series of sampling points and then applies the numerical calculus method to compute the value of the objective function on these sampling points; with these values, it uses a response model to reconstruct the objective function and then the optimization computation is carried out using the optimizing algorithm on the restructured objective function. Because it is only necessary to calculate the value of the electromagnetic field objective function on the sampling points, the algorithm efficiency is enhanced greatly. Sometimes in the optimization design of an electromagnetic installation, unifying the Moving Least Squares method with the simulated annealing method has very good results (Chao Wang et al. 2006). The convergence rate of these algorithms, however, still cannot satisfy the requirements for computing complex large-scale systems, for example, three-dimensional calculations, transient processes or coupled systems, at present. In magnet design, a combination of the deterministic and the stochastic algorithms has been adopted.

## 6. Design example of high homogeneous magnet

A high homogeneous magnet system is the most important and expensive component in an MRI or NMR system. A superconducting magnet with the distribution of coils in single layer, two layers and even more layers is the best solution to achieve the high magnetic field strength and homogeneity requirements. The challenge for designing a MRI magnet system is to search the positions and sizes of coils to meet the field strength and homogeneity over the interesting volume and stray field limitation.

### 6.1. Mathematical model for a hybrid optimization algorithm

The parameters of the system, including length, inner and outer radius of feasible region of coils, radius of DSV region and the axial and radial radius of 5 Gauss stray field line, are predetermined by designer based on the actual applications. Fig. 12 illustrates an example for the design of a symmetric solenoid magnet system. The required parameters of the feasible rectangular region for arrange coils are inner and outer radius (r_{min}, r_{max}) and the length (L), the interesting imaging volume is commonly sphere and the stray field is limited to smaller than 5 Gauss outside the scope of an ellipse. A hybrid optimization algorithm by combination of Linear Programming (LP) and Nonlinear Programming (NLP) was developed by IEECAS. This approach is very flexible and efficient for designing any symmetric and asymmetric solenoid magnet system with any filed distribution over any shape volume.

Firstly, the feasible rectangular region can be meshed as 2-D continuous elements with N_{r} elements for radial direction and N_{z} elements for axial direction, and each element served as an ideal current loop. The surface of the sphere and the ellipse for homogenous filed and stray field limitation were evenly divided into N_{d} and N_{s} parts along the elevator from 0 to π, respectively. The field distribution at all target points including N_{d} and N_{s} points produced by all ideal current loops with unit current amplitude calculated, and the unit current field contribution matrices A_{d} and A_{s} were formed. A LP algorithm was built up with the objective functions totaling the volume of superconducting wires, the field distributions at all target points and the maximum current aptitude for all current elements were constrained. The LP mathematical model is formulated as following:

Minimum:

Subject to:

The current map with sparse nonzero clusters were calculated by first LP stage, the positions of nonzero clusters can be discretized into several solenoids with the size of inner radius (r_{inner}), outer radius (r_{outer}), and the z position of two ends (z_{left}, z_{right}). Secondly, a NLP algorithm was built up, and the objective function and constraints of the algorithm are similar to the LP stage, and added current margin constraint into the algorithm which based on the maximum magnetic field within the superconducting coils and the relationship of critical current and magnetic field. The NLP mathematical model is formulated as following:

Minimum:

Subject to:

here, the Ncoils is the number of discretized solenoids, V_{i} is the volume of the i^{th} solenoid, B_{zdsv}, B_{zstray} and B_{rstray} are the magnetic field on DSV region and stray field ellipse region, respectively. η is the current margin, B_{0} is the target field over the DSV and H is the homogeneity level for design.

Many cases were studied by this hybrid algorithm, and the results show the method is flexible and efficient for the first LP stage which took about 5 minutes and the second NLP stage which took about 30 minutes, respectively. The resultant coil distributions were simple and easy to fabricate.

### 6.2. Design cases

#### 6.2.1. 1.5 T actively shielded symmetric solenoid MRI

The actively shielded symmetric MRI system with the length of 1.15 m, the central magnetic field of 1.5 T and the field quality of 10 ppm over 500 mm DSV and the radial inner and outer radius of 0.40m and 0.80 m, the stray field of 5 Gauss outside the scope of an ellipse with axial radius of 5 m and radial radius of 4 m, and the current margin of 0.8. The N_{r}, N_{z}, N_{d}, and N_{s} were set as 40, 40, 51 and 51, respectively. The current map by LP and the final actual coils sizes and positions are shown in Fig. 13. The coils distribution with two layers, the inner layer with four pairs of positive and one pair of negative current direction coils for producing the required magnetic strength and the homogeneity. The outer layer with a pair of negative current direction coils for reduces the stray field strength. The homogeneities and stray field distributions are shown in Fig. 14. The coils parameters are shown in Table I. The operating current density and actual current margin are 148 MA/m^{2} and 0.7546, the maximum magnetic field and hoop stress are 5.43 T and 145.16 MPa, respectively.

#### 6.2.2. 1.0 T open biplanar MRI

The unshielded open biplanar MRI system has a central field strength of 1.0 T, inner and outer radius of 0.0 and 0.90m, lower and upper z positions for two ends of 0.40m and 0.45 m, and field quality of 15ppm over 450 mm DSV.

The N_{r}, N_{z}, N_{d}, and N_{s} were set as the same as the design of 1.5 T actively shielded MRI system. A quarter model current map for the LP stage and the coils distribution are shown in Fig. 15. The coils distributions with single layer have six coils, the largest coils with maximum field of 5.26 T are the outermost coils with positive current direction. The coils parameters are shown in Table II. The operating current density and actual current margin are 150 MA/m^{2} and 0.74, the hoop stress is 128.2 MPa, respectively.

## 7. Conclusion

In this chapter we described the basic physical concepts of magnet design and the classification of magnet, then illustrated the magnet applications in the field of energy science, condensed physics, medical devices, scientific instruments and industry. Electromagnetic design is very important for the design of a magnet system with optimal coils distribution. Numerical methods are the best solution to designing complex field distribution magnet systems. A hybrid optimization algorithm combined with linear programming and nonlinear programming was presented and studied.