13
ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf of the Beam Dynamics group of the ESRF Accelerator Toolbox collaboration meeting May 17 2017

02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

ESRF developments of the Accelerator Toolbox

Nicola Carmignani, ESRFon behalf of the Beam Dynamics group of the ESRF

Accelerator Toolbox collaboration meetingMay 17 2017

Page 2: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

OUTLINE

• Pass methods • Turn number and RFCavityPass• Physical apertures and losses• Atplot• Quantum diffusion• Atfastring• Atmatch• Touschek lifetime

17/05/2017

Page 2 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Page 3: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

PASS METHODS

17/05/2017

Page 3 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Each PassMethod file has three functions:• The integrator => it does the tracking• The passFunction (or trackFunction) => it is called by atpass and it calls

the integrator• The mexFunction => it is used to call the integrator from the matlab

command windowWith the new AT, both passFunction and the trackFunction can be used, but the trackFunction is faster.

Page 4: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

PASS METHODS

The matlab structure of each element is copied to a C structure at turn 0, then the access is faster.The tracking results in being about 20% faster.The turn number is passed to all the integrators through the parameter structure.

17/05/2017

Page 4 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Element structure for StrMPoleSymplectic4Pass

Page 5: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

TURN NUMBER AND RFCAVITYPASS

17/05/2017

Page 5 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

CavityPass RFCavityPass

With the turn number, the cavity passmethod can be improved. With the new RFCavityPass, changing the RF frequency we change the closed orbit.

Page 6: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

PHYSICAL APERTURES AND BEAM LOSSES

Most of the pass methods have two additional optional fields: RAperturesand EApertures, for rectangular and elliptical physical apertures.RApertures=[xlim -xlim ylim -ylim];EApertures=[xlim ylim];

17/05/2017

Page 6 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

See R. Versteegen, “Modeling of Beam Losses at ESRF”, IPAC 15

Page 7: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

ATPLOT

17/05/2017

Page 7 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Further examples of plotting functions: curly H, beam sizes, closed orbit, physical apertures, W functions, second order dispersion

Page 8: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

QUANTUM DIFFUSION

17/05/2017

Page 8 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Page 9: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

ATFASTRING

17/05/2017

Page 9 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

atfastring creates a lattice with only a few elements:• Linear matrix;• Nonlinear element (chromaticity

and detuning with amplitude);• RF cavity;• Quantum diffusion.

The fast ring can be used for impedance studies and for harmonic cavity studies.

-120 -100 -80 -60 -40 -20 0

ct (mm)

0

1000

2000

3000

4000

5000

6000

7000

8000

charg

e d

ensi

ty (

a.u

.)

With third harmonic cavity

Without harmonic cavity

Simulation done with the atfastring300000 particles200000 turns

Page 10: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

ATMATCH

17/05/2017

Page 10 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

AT has now a function for general matching, written by Simone Liuzzo: atmatch

Matching an orbit bump with atmatch

Matching of longitudinal gradient dipoles

Page 11: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

TOUSCHEK LIFETIME

The function TouschekPiwinskiLifetimecomputes the Touscheklifetime for a lattice, given the momentum acceptance

17/05/2017

Page 11 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Momentum acceptance

Page 12: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

CONCLUSION

The version of AT in the sourceforge repository has many new features:• physical apertures and losses information;• atplot;• quantum diffusion;• atfastring;• atmatch;• Touschek lifetime;

It is backwards compatible, it is compatible with the python AT and it is 20% faster!

17/05/2017

Page 12 Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola Carmignani

Page 13: 02-Carmignani ESRF developments Accelerator Toolboxatcollab.sourceforge.net/.../02-Carmignani_ESRF... · ESRF developments of the Accelerator Toolbox Nicola Carmignani, ESRF on behalf

Accelerator Toolbox collaboration meeting l 17 May 2017 l Nicola CarmignaniPage 13

Many thanks for your attention

17/05/2017