170 likes | 350 Views
Zgoubi development David Kelliher ASTeC/STFC/RAL. Contents. Zgoubi introduction (2) Python interface (4) Fringe field studies in MULTIPOL (6). Zgoubi. C.R. Prior, “Start to end simulation of a Neutrino Factory”, IDS-NF-003.
E N D
UKNF WP1 meeting, 12/11/08 Zgoubi developmentDavid KelliherASTeC/STFC/RAL
Contents • Zgoubi introduction (2) • Python interface (4) • Fringe field studies in MULTIPOL (6)
UKNF WP1 meeting, 12/11/08 Zgoubi C.R. Prior, “Start to end simulation of a Neutrino Factory”, IDS-NF-003 • Zgoubi is a ray-tracing code that computes particle trajectories in arbitrary magnetic and/or electric field maps or analytical models. The code is a compendium of numerical recipes for simulation of mode optical elements encountered in beam optics • Uses an integration method founded on stepwise resolution of the Lorentz equation using a technique based on Taylor series
UKNF WP1 meeting, 12/11/08 Integration method Use truncated Taylor series for position and normalised velocity Obtain velocity terms via Lorentz equation Calculating R to the sixth order requires 4th derivative of B(s)
UKNF WP1 meeting, 12/11/08 Running Zgoubi zgoubi.dat Run zgoubi zgoubi.res • At present running Zgoubi can be tedious as much work needs to be done “by hand”. • Two interfaces being developed • C++/Root (S. Sheehy/R. Fenning) • Python (S. Tygier)
UKNF WP1 meeting, 12/11/08 Input file emma 'OBJET' -3.501946e+01 2 1 1 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 1.000000e+00 ' ' 1 'PARTICUL' 5.109989e-01 -1.602177e-19 1.159652e-03 0.000000e+00 0 'DRIFT' ld 1.050000e+01 'CHANGREF' 0.000000e+00 0.000000e+00 8.571429e+00 'CHANGREF' 0.000000e+00 -3.404800e+00 0.000000e+00 'QUADRUPO' defoc 0 7.569900e+00 5.300000e+00 2.493120e+00 0.000000e+00 0.000000e+00 0 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 #20|20|20 0 0.000000e+00 0.000000e+00 0.000000e+00 'CHANGREF' 0.000000e+00 3.404800e+00 0.000000e+00 'DRIFT' sd 5.000000e+00 'CHANGREF' 0.000000e+00 -7.514000e-01 0.000000e+00 'QUADRUPO' foc 0 5.878200e+00 3.700000e+00 -2.477150e+00 0.000000e+00 0.000000e+00 0 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 #20|20|20 0 0.000000e+00 0.000000e+00 0.000000e+00 'CHANGREF' 0.000000e+00 7.514000e-01 0.000000e+00 'END'
UKNF WP1 meeting, 12/11/08 Zgoubi input file created and may be easily modified. Elements such as QUADRUPO and MULTIPOL included. Still working on DIPOLES and FFAG. A utility to find the closed orbit, the tune (from the MATRIX result) and the dynamic aperture have been written. Utilities currently being developed - calculate dynamic aperture over tune space - add magnet misalignments and check effect on dynamic aperture Python interface
UKNF WP1 meeting, 12/11/08 EMMA example ob = OBJET2() emma.add(ob) emma.add(ELECTRON()) emma.add(DRIFT('ld', XL=ld*cm_/2)) emma.add(CHANGREF(ALE=angle)) emma.add(CHANGREF(YCE=d_offset*cm_)) emma.add(QUADRUPO('defoc', XL=dq*cm_, R_0=dr*cm_, B_0=db*kgauss_, XPAS=xpas)) emma.add(CHANGREF(YCE=-d_offset*cm_)) emma.add(DRIFT('sd', XL=sd*cm_)) emma.add(CHANGREF(YCE=f_offset*cm_)) emma.add(QUADRUPO('foc', XL=fq*cm_, R_0=fr*cm_, B_0=fb*kgauss_, XPAS=xpas)) emma.add(CHANGREF(YCE=-f_offset*cm_)) emma.add(DRIFT('ld', XL=ld*cm_/2)) emma.add(FAISCNL(FNAME='zgoubi.fai')) emma.add(REBELOTE(K=99, NPASS=10)) emma.add(END())
Zgoubi fringe fields - Multipol MULTIPOL Uses the multipole fringe field with Enge fall off as described earlier. A rectangular type magnet is assumed. Four terms in multipole expansion are included. e.g. Vertical dipole field expansion
Zgoubi fringe fields – DIPOLES DIPOLE/DIPOLE-M/DIPOLES • Provides a model of a dipole field in a radial magnet geometry. Terms up to octupole can be included. • Multipole expansion is ignored – instead a smooth Enge fall off is assumed at every position. In polar coordinates
Dipole fringe field in MULTIPOL • Assume 1m MULTIPOL magnet with 1T dipole field only. The fringe field fall off extent λ is set to 20cm. • Calculate vertical fringe field in Zgoubi by tracking a particle through the magnet at various horizontal locations (5cm, 10cm, 20cm) from that magnetic axis. (Switch off bending)
Mathematica study of MULTIPOL fringe field Replicate result in Mathematica. First four terms in dipole fringe field included. Plot Bz longitudinally at 5cm, 10cm and 20cm. Fringe field extent is 20cm
MULTIPOL fringe field details 5 cm 10 cm 20 cm
UKNF WP1 meeting, 12/11/08 MULTIPOL summary • There is some radius inside which the multipole equations converge. Beyond that strong oscillations in the fringe field appear. • Create a new “MULTIPOL” object – a rectangular magnet with arbitrary number of multipoles, each of which fall off smoothly at all radii, just as in the case of radial magnets • Rather than using analytic equations directly, instead create “ideal” field map in which to track (JAI).
UKNF WP1 meeting, 12/11/08 Conclusions • Python interface to Zgoubi being developed. The interface will facilitate the use of Zgoubi in ongoing studies of muon acceleration. • The problem of fringe field oscillations in the Zgoubi description of rectangular magnets is being tackled.