Reporting Status or Progress

Download Report

Transcript Reporting Status or Progress

RADIA –
a CPU-Efficient 3D Magnetostatics
Computer Code
O. Chubar, P. Elleaume, J. Chavanne (ESRF, France)
Topics





Motivation
Previous Codes
Approach: Volume (/ Magnetization) Integrals
Examples: Undulators, Accelerator Magnets,
Inverse Problems
Possible Evolution
Motivation
H(r)
SR
e-
 Computation of stationary Magnetic Field produced by
Permanent Magnets, Coils and Iron Blocks in 3D space
 Optimized for the design of Insertion Devices
(Undulators and Wigglers) for SR Sources, as well as
Accelerator Magnets
Computer Codes Using Similar Approach
 Solving 3D Magnetostatics Problems
via Volume (/ Magnetization) Integrals
–
GFUN (Trowbridge et. al., Rutherford Laboratory, 1970s)
–
B3D (P.Elleaume, J.Chavanne, ESRF, 1989-95)
–
RADIA (O.Chubar, P.Elleaume, J.Chavanne, ESRF, 1996-…)
3D Magnetostatics
Magnetic Field created by Uniformly Magnetized Volumes
Poisson equation for
scalar magnetic potential:
Solution through volume
and surface integrals:
Magnetic field created by
uniformly magnetized volume:
B  0,
B  0 H  M ,
H   ,
   M ,
 (r ) 
1
M
1

d
V

4 
r  r
4
V
H (r ) 
1
4
M nS
S r  r dS ,
( r   r ) M
1

d
V

3

4
r  r
V
(r   r ) M n S 
S r  r 3 dS ,
Si M  con st:
H ( r )  Q( r ) M ,
Q(r ) 
1
4

S
(r  r)  n S 
dS ;
3
r  r
(a  b)c  a(bc)
3D Magnetostatics
Uniformly Magnetized Polyhedron
Nf
Magnetic field:
H QM
Q   Ts1 (Fs  k )Ts ,
s 1
f x ( xs s , as s , bs s , zs )  f x ( xs s 1 , as s , bs s , zs )



,
f y ( xs s , as s , bs s , zs )  f y ( xs s 1 , as s , bs s , zs )



s 1
 f z ( xs s , as s , bs s , zs )  f z ( xs s 1 , as s , bs s , zs )   ( xs s , xs s 1 , as s , bs s , zs )
as s  ( ys s 1  ys s ) ( xs s 1  xs s ) ,
1
Fs 
4
Ns
bs s  ys s  as s xs s ,
 xs s 
y   T
 ss s
 zs 
~x
 ~x
s Ns 1
n y 2 (nzs  1) 1  nzs  nxs n y (nzs  1) 1  nxs 
 ~xs s  x0 
s
s

 ~y  y  ; T    n n (n  1) 1 n 2 (n  1) 1  n

n
xs
zs
zs
ys  ,
 s s 0  s  xs ys zs

 ~zs s  z0 
nxs
n ys
nzs 


~
~
, y
y
s1
s Ns 1
s1
( ~xs s , ~ys s , ~zs s ) , s=1,2,…,Ns , - coord. of vertex points of the face s
ns - external normal to the face s
Nf - number of faces
(x0,y0,z0) – coord. of observation point
3D Magnetostatics
Space Transformations and Symmetries
 Space Transformations
-5
H(r, TV )  TH (T1r,V )
20
0
5
15
10
0
0
10
15
10
5
-5
-5
20
V
TV
20
10

0
10
0
-10
 Symmetries (multiplicity m > 1)
m 1
m 1
10
V
TV
5
H tot (r)   H(r, TiV )   Ti H(Ti r,V )
i 0
i 0
0 Z
5
2.5
0
X- 2.5
- 5
-
5
-
10
T2V
T3V
10
5
0
Y
-
5
-
10
Treatment of Symmetries reduces memory requirements and speeds up computation
0
5
3D Magnetostatics
Relaxation
 Interaction Matrix and Material Relations
Hi - total field strength in the center of object i
Hex i - external field the center of the object i
Mk - magnetization in the object k
Qik - component of the Interaction Matrix
(being itself a 3 x 3 matrix)
fi(H) - magnetization vs. field strength law for
the material of the object i
N
Hi   Qik M k  H ex i ,
k 1
M i  f i (Hi ),
i  1,2,..., N ,
 Relaxation Scheme
i 1
~
H exi , p  H exi   Q ik M k , p 
k 1
Hi, p
N
Q
k  i 1
ik 
M k , p 1 ,
~
 [E  Q ii χ i (H i , p 1 )]1 (H exi , p  Q iiM r i ),
M i , p  fi (H i , p ),
This scheme is robust:
no “relaxation parameter” required (!)
 i (H) - local susceptibility tensor for the material
Mr i
of the object i
- remnantg magnetization in the object i
for nonlinear isotropic material:
[ f i (| H |) | H |] E, | H | 0,
χ i (H)  
| H | 0,
 f i(0) E,
3D Magnetostatics
RADIA Implementation: C++

Main Classes
3D Graphics
Field Source
Relaxation
Space Transf.
Permanent
Coils
Backgr. Field
Container
“Rec. Mag.”
Relaxable
Extr. Polygon
Material
Polyhedron
Nonlin. Isotr.
Linear Unisotr.
“Rec. Current” “Arc. Current” “Filament Cur.”

General Methods for Field Sources
–
–



computation of Magnetic Field Strength, Vector Potential, Field Integral, Energy, Force, Torque
subdivision (segmentation)
RADIA is interfaced to:
- Mathematica (Wolfram Research)
- IGOR Pro (Wavemetrics)
Exists on Windows, Linux, Mac OS platforms
Available for download from ESRF and SOLEIL Web sites (Insertion Devices pages)
RADIA Examples
APPLE-II PPM Undulator
Circular/Elliptical Polarization
Tilted Linear Polarization
(parallel displacement of 2 magnet arrays)
(anti-parallel displacement of 2 magnet arrays)
Gap: 17 mm
0.4
0.4
Bz
0.2
B
[T]
0.2
Bx
0
0
0.2
-
0.2
-
0.4
-
0.4
0
20
40
60
s [mm]
80
Bz
0
Bx
20
40
60
s [mm]
80
Peak Field vs Shift bw Magnet Arrays
B
0.7
[T]
0.6
Bz
Bx
Magnet Dimensions: 40 mm x 20 mm
0.5
Mr = 1.1 T
0.4
0.3
0.2
0.1
0
0.5
A
1
B
1.5
2
C
2.5
3
D
Invented by Sh.Sasaki et. al.
RADIA Examples
Hybrid Undulator U20 (SOLEIL)
The integral field Ibz for differents gaps
20
IBz (G.cm)
15
10
5
0
-5
5,5
7
8
9
10
11
12
13
14
15
16
17
18
19
-10
-15
-20
Gap (mm)
Optimization by C.Benabderrahmane
RADIA / SRW Examples
Hybrid Wiggler
3T Hybrid Wiggler
Magnetic design by J.Chavanne, ESRF
Magnetic Field and
Electron Trajectory
Spectrum vs
Phot. Energy
at diff. obs. points
Magnets are designed
using RADIA
SR computations are done
using SRW
Spectral Fux per
Unit Surface
vs Horizontal and
Vertical Positions
RADIA Examples
Electromagnet Elliptical Undulator HU640 (SOLEIL)
Pure coil structure (no iron parts)
Consumed electrical power: ~100 kW
Vertical and Horizontal Magnetic Fields
Magnetic design by O.Marcouille
RADIA Examples
Electromagnet Elliptical Undulator HU256 (SOLEIL-BINP)
The Structure (A.Dael - P.Vobly)
Magnetic Fields at Max. Currents (Radia)
Iz max= 180 A, Ix max= 250 A
Calculated Spectra at Maximal Currents
Specifications:
Circular Polar.: 1 min < 10 eV
Linear Hor. Polar.: 1 min < 10 eV
Linear Vert. Polar.: 1 min < 20 eV
Aperture: 0.7 mr x 0.7 mr
RADIA Examples: Fast-Switching Elliptical Undulator for XMCD
Preliminary Design, derived from ESRF EMPHU
Original design by J.Chavanne
General Parameters
u  65 mm; Lu  1.6 m
Min. gap: 16 mm
Kx1 max Kz1 max  1.5
Coils
Imax < 300 A
Conductor cross-section: 7 x 7 mm2
Number of Layers: 8
Yoke
Pole transv. size: 40 mm
Pole longit. size: 12 mm
Material: iron (laminated )
Permanent Magnets
RADIA model with reduced
number of periods
(coil layer changes are
not taken into account)
On-Axis Magnetic Field
Block dimensions: 30 x 17 x 15 mm3
Transv. distance bw blocks: ~ 5 mm
Material: Sm2Co17
Magnetic Field “Roll-Off”
RADIA Examples
Accelerator Magnets
Edge Field (vs longitudinal position)
Transverse Field
1.6
A
0.55
1.4
low excitation
1.2
tesla
tesla
1
0.8
0.54
0.6
0.4
0.2
0.53
0
-300
-200
-100
-30
0
100
-20
-10
200
mm
10
20
30
10
20
30
1.51
high excitation
tesla
A: dipole
MAX-II B: quadrupole with integrated
Magnets
sextupole component
1.5
1.49
1.48
1.47
simulations by L-J.Lindgren
-30
-20
-10
0
mm
0.3
1.2
1
0.8
0.6
0.2
0.4
0.2
tesla
tesla
B
0
1.52
mm
-80
0.1
-60
-40
-20
0
-0.2 0
20
-0.4
-0.6
-0.8
0
-600
-500
-400
-300
-200
mm
-100
0
100
-1
mm
Discrepancy between Radia simulations and measurements: < 1% (peak field)
40
60
RADIA Examples
Accelerator Magnets: SOLEIL Dipoles
Central Field vs Longitudinal Position
Edge Field vs Longitudinal Position
1.72
B [T]
B [T]
1.5
1.7
1.25
1.68
1
0.75
1.66
0.5
1.64
0.25
0
0
100
200
300
400
500
y [mm]
400
450
500
550
600
650
700
750
y [mm]
Radia Examples
Comparison with a commercial FEM Code
Chamfer Optimization of ESRF Quadrupole
simulation by J.Chavanne
FLUX3D
RADIA
200 000 Tetrahedrons
200 MB of Memory
3 Hours of CPU
1500 Polyhedrons
200 MB of Memory
1 Hour of CPU
Radia Examples
Radia vs commercial FEM Code FLUX3D
 Hybrid Wiggler Simulation Comparison
Case A: Solution for 1% accuracy in peak field
Case B: Solution for 10 G-cm abs. accuracy in on-axis field integral
CPU time
Number of 3D elements
Memory required
Accuracy of the field
inside magnet blocks
A
B
A
B
A
B
RADIA
FLUX3D
10 s
100 s
400
980
7 MB
27 MB
poor*
200 s

~15 000

11 MB
?
same as in the air
* accuracy is high only in centers of 3D elements
Radia Examples / Inverse Problems
Sorting and Shimming Insertion Device Magnets
Goals: Find optimal distribution of individual magnets (or magnet displacements) which would allow
to compensate existing magnet imperfections and to reach required ID magnetic field characteristics
Evaluation:
Ordered Magnet
Sequence(s)
12345678
54817263
Magnetic Measurements Data
Undulator
on Individual Magnets (/ Modules) Magnetic Field
«Decoded» & Partly Assembled Undulator
(/ Field Integrals)
Undulator
Structure
1 3
5
7
6
Fitness
Field Integral
deviation from zero
RADIA
8
Weights
Electron Trajectory
Straightness
Radiation Phase Error
5 4 8 1
7 2 6 3
2 4
Characteristics
/ Fitness Terms
Integrated Multipoles
Mathematical Model
/ Total Field Calc. Method
...
Genetic
Algorithms
ID Magnet Sorting was pioneered
by A.Cox and B.Youngman (1985)
ID Magnet Shimming was pioneered
at ESRF and ELETTRA (199x)
Possible Variation Operators for Permutations (i.e. for Sorting):
Mutation : - e.g. swap magnets at two randomly chosen positions Crossover : - e.g. «order 1» -
[12345678]
[35681274]
[54817263]
[???4567?]
[54617283]
[81245673]
Shim Signatures of In-Vacuum Hybrid Undulator U20
RADIA Model for Central Part
(A-, B- Modules and Poles)
Variation of On-Axis Field
due to 25 m displacement of
A-, B-, E-Modules and Poles
RADIA Model for Extremities
(E- Modules)
Variation of Field Integrals
due to 25 m displacement of
A-, B-, E-Modules and Poles
“Spectral” Shimming of In-Vacuum Hybrid Undulator U20
On-Axis Single-Electron Spectra Before and After Shimming (10 m from source)
Evolution of 11th Harmonic
of Single-Electron Spectrum
RMS Radiation Phase Error after Shimming ~2.6
On-Axis Spectrum Taking into account
E-Beam Emittance and Energy Spread
x = 3.7 nm; sE/E = 10-3
APPLE-II Undulator HU80-PLEIADES:
Evolution of Electron Trajectory and Field Integrals
(Min. Gap, Zero Phase)
Horizontal Trajectory
(Periodic Mode)
Horizontal Trajectory
(Quasi-Periodic Mode)
Q.-P. Mode realized by 11 mm displacement of some
longitudinally-polarized magnets.
Horizontal First Field Integral
Vertical First Field Integral
RADIA “ToDo” List
 Short-Term Tasks
- Simplifying definition of 3D geometries, by importing files from CAD
/ 3D meshing software (R. Carr)
- Releasing RADIA for Python
- Compiling and testing 64-bit versions for Windows and Linux
- Updating all existing versions for Windows, Linux and Mac OS
- Updating RADIA distribution pages at SOLEIL web site
 Longer-Term Tasks
- Further improving relaxation procedure (cases of many sub-volumes, non-linear mater.)
- Implementing coils / conductors with polygonal cross-section
- Addressing inverse problems of 3D magnetostatics
(software for magnet sorting and shimming was the first step in this direction)
- Implementing solvers of time-dependent direct problems (e.g. Eddy currents)
- Supporting other similar direct problems of electrodynamics (e.g. electrostatics,
potential current flow)
- Fast 2D version of RADIA (?)
Acknowledgements
 J.-L. Laclare, J.-M. Filhol, D. Raoux
O. Rudenko, A. Dael
 All Users of RADIA and SRW
In-Vacuum Hybrid Undulator U20 (-SWING):
GA-Based Module Sorting and Magic Finger Adjustment
97 full periods, 390 magnet modules
Horizontal Field Integrals
at 5.5 mm Gap
at 10 mm Gap
Vertical Field Integrals
HU80 Field Integrals at Minimal Gap (15.5 mm)
Horizontal
Vertical
TEMPO
FOC
(after extra
shimming)
PLEIADES
APPLE-II Undulator HU80-Foc:
Extra Shimming to Reduce Multipoles
Field Integrals at Minimal Gap and Different Phases
Before Extra Shimming
Before Extra Shimming
Vertical
Horizontal
After Extra Shimming
Phase-Dependent Normal Quad Variation
After Extra Shimming
Phase-Dependent Skew Quad Variation
HU80-Foc was originally supplied by ELETTRA. Extra Shimming of the HU80-Foc was performed at SOLEIL.
The Extra Shimming was based on Genetic Optimization and it took into account Phase-Dependent Magn. Interaction Effects.
Only ELETTRA “native” spare parts (mechanical shims and “magic fingers”) were used.