20
Status of the CLIC Decelerator and Test Beam Line simulation framework Erik Adli, University of Oslo and CERN, June 28, 2010

Status of the CLIC Decelerator and Test Beam Line simulation framework

  • Upload
    derora

  • View
    45

  • Download
    0

Embed Size (px)

DESCRIPTION

Status of the CLIC Decelerator and Test Beam Line simulation framework. Erik Adli , University of Oslo and CERN, June 28, 2010. CLIC Decelerator and TBL simulation. - PowerPoint PPT Presentation

Citation preview

Page 1: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Status of the CLIC Decelerator and Test Beam Line simulation framework

Erik Adli, University of Oslo and CERN, June 28, 2010

Page 2: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

CLIC Decelerator and TBL simulation

Background: the last few years extensive beam physics studies for the CLIC decelerator and the TBL has been performed, mainly using the tracking code PLACET.

The scripts have now been cleaned up and made available for everyone on cvs (placet repository), and thus put under version control.

Placet repository:https://savannah.cern.ch/projects/placet/Decelerator dir:

placet-development/examples/clic/decelerator/

Page 3: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework
Page 4: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Simulation scope: decelerator and TBL

Example decelerator studies:• PETS/wake field studies• Alignment studies• Instrumentation studies• Failure studies-> CLIC CDR

Example TBL studies:• Optics and transport• Instrumentation design• Wake fields• Online model-> TBL comissioning and physics studies

~ 1000 m, 500 FODO cells, 1500 PETS

~ 25 m, 8 FODO cells +, 16 PETS

Was found best to use a common simulation framework for the two machines.

Page 5: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Implementation philosophy• Uses PLACET core

functionality (defining beam, wakes, lattices and tracking)

• Decelerator scripts, in TCL and octave, calls placet core

• Options and parameters deemed useful for new users and "clean" are extracted in separate file

DECELERATOR SCRIPTS (TCL and Octave)

USER OPTIONSAND PARAMETERS

For studies I have performed: consideration whether it has been worth clearing things up and make it (will it be useful and understandable?)

Note: decelerator beam uses different placet core commands for beam, cavity and wake definitions.

PLACET CORE(C and C++)

Page 6: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Implementation details

PLAECET

CORE

user_options.tcl

advanced_options.tcl

main.tcl

def_pets.tcl

def_lattice.tcl

def_beam.tcl

user_tblbeamline.tcl

online_exchange

multisim.m

loop_main.tcl

"3-layer structure" :- to redo well-defined studies already prepared: only "user_" files need to be touched- for new studies other script files might need to be touched- for some new studies changes in the placet core will be ineluctable

Page 7: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Implementation details: user file

Will go througha few examples of

studies performed with these scripts, which have been "cleaned up" into user options.

user_options.tcl

# DECELERATOR AND TBL scripts# E. Adli

# basic user options

# which machine to simulate (uncomment a single choice)# a 1050 m long decelerator sectorset mysimname clic12# the Test Beam Line, including matching and instrumentation sections#set mysimname tbl12...# inital normalized emittance [m]set emitt_x 150.0e-6set emitt_y 150.0e-6

# bunch length [um]set sigma_z 1000

# number of random machines to simulate (random misalignment is applied for each machine)set n_machines 1

# default machine rms misalignments [um], [urad]set sigma_quad 20set sigma_quad_yp 1.0e3 set sigma_bpm 20set sigma_bpm_yp 1.0e3set sigma_pets 100set sigma_pets_yp 1.0e3set sigma_quad_roll 0.0set sigma_bpm_roll 0.0

# 1: force all misalignments to zero (perfect machine)set zero_all_misalignments 1...

Page 8: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Implementation details: multisim.mmultisim.m

.

.% SET QUAD STRENGTH JITTERscale_Q = 1+randn(1,length(Q))*$quad_strength_jitter;

Qy_nominal = placet_element_get_attribute("$mysimname", Q, "y");if( length(P) > 0 ), placet_element_set_attribute("$mysimname", P(P_failed), "e0", -1.0); end; % drive wedges PETSplacet_element_set_attribute("$mysimname", Q, "y", Qy_nominal.+jitter_Qy); % y jitterplacet_element_set_attribute("$mysimname", Q, "strength", Qstrength_nominal.*scale_Q); % strength jitterplacet_element_set_attribute("$mysimname", Q(Q_failed), "strength", Qstrength_nominal(Q_failed)*$quad_fail_current_reduction);placet_element_set_attribute("$mysimname", B, "resolution", 0);[E0, BEAM] = placet_test_no_correction("$mysimname", "$beamname1", "None", 1); % final beam in centre quady0 = placet_element_get_attribute("$mysimname", B, "reading_y") + placet_element_get_attribute("$mysimname", B, "y");losses_NC += placet_element_get_attribute("$mysimname", Q, "aperture_losses");..placet_element_set_attribute("$mysimname", B, "resolution", $bpm_resolution);placet_element_set_attribute("$mysimname", Q, "strength", Qstrength_nominal ); % restore quadsplacet_element_set_attribute("$mysimname", Q, "y", Qy_nominal ); % restore quads.if( length(P) > 0 ), placet_element_set_attribute("$mysimname", P, "e0", PETS_nominal); end; % restore PETSy0_NC += y0;

Core of the decelerator script is the placet-octave based "multisim.m" which handles beamline modifications and tracking, within one clear and compact script.

Page 9: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

First users

The scripts have already been shared with :• CERN BE/BI (M. Olvegaard); TBL

instrumentation• CERN BE/RF (R. Lillestoel); TBL steering• CERN TE/EPC (M. Jonker): in progress • IFIC Valencia (J. Garrigos, A. Faus-Golfe): in

progress

Page 10: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

A few examples

Page 11: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

PETS wake fieldsuser_options.tcl

.

.# scaling factors for RQ, Q and w. All modes scaled simultainously. Scalong factor of 1: nominal PETS parametersset RQ_scaling_factor [expr 1.0e-0]set w_t_scaling_factor [expr 1.0e-0]set Q_t_scaling_factor [expr 1.0e-0]set beta_t_scaling [expr 1.0e-0]#set Q_t_scaling_factor $loop_param2..# MAIN BEAM: static beam offset and jitter beam offset (in y) in quantities of sigma_y (total is partioned over available modes)set static_mainbeam_offset [expr 0.0]#set static_mainbeam_offset [expr 0.0/1.944582]#set static_mainbeam_offset [expr ($loop_param1-1)/10.0]set jitter_mainbeam_offset_total 0.0...

For changes of modes: def_pets.tcl

Page 12: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Alignmentuser_options.tcl...# default machine rms misalignments [um], [urad]set sigma_quad 20set sigma_quad_yp 1.0e3 set sigma_bpm 20set sigma_bpm_yp 1.0e3set sigma_pets 100set sigma_pets_yp 1.0e3set sigma_quad_roll 0.0set sigma_bpm_roll 0.0

# 1: force all misalignments to zero (perfect machine)set zero_all_misalignments 0

# BPM resolution [um]set bpm_resolution 2.0

# mover corrector step size [um]set corrector_step_size 1

# performing tracking with selected correction schemes (1: selected, multiple schemes can be selected, and the machine will then apply them in the order marked below)set track_no_correction 1set track_1to1_correction 0set track_DFS_correction 0..

Page 13: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Alignment (more)user_options.tcl

.

.

.# load R-matrix if exists, save R-matrix when generatedset do_multisim_load_save_R 1# load and save machinesset do_multisim_load_mach 0set do_multisim_save_mach 0...# Options to use only a sub-set of BPMs and/or correctors # use every n'th BPM for correction (1: use all BPMs)set B_BBA_interval 1# use every m'th QUAD for correction (1: use all quads)set Q_BBA_interval 1# use every k'th QUAD/BPM combo for correction (1: use all combos) - if > 1 above B and Q are IGNOREDset QB_BBA_interval 1#set QB_BBA_interval $loop_param2# if 0: use corr-BPM 1 3 5 7 9 .... if 1: use corr-BPM 1 2 4 6 8 ...# note: first BPM is in front of a F-quad (DEFOC in y), therefore best effect in y when starting using 2 4 6set BBA_interval_start2 0...

Generate full R-matrix once, save, and re-load for further studiesLoad/save corrected machines for further studiesValidity at discretion of user....

Correct using sub-set of BPMs and/or correctors (automatically extracting relevant information from full R-matrix).For full flexibility in BPM/corrector choice: manipulate vector in :

multisim.m

Page 14: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Failure modesuser_options.tcl...# component failure

# number of quads failedset n_failure_quad 0# fail N quads in series for each failure (in total: n_failure_quad x quadfail_in_series are failed)set quadfail_in_series 1# effect of failure: reduction of current the following fraction of original current [-]set quad_fail_current_reduction 0.0# fraction of BPMs failed (e.g. 0.9: 90%)set n_failure_BPM_percent 0...

Page 15: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Optics studies (example TBL)user_options.tcl.# save lattice geometryset savelattice_active 1# save multisim beta for lowest energy particleset savebeta_multisim_active 1.

Page 16: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

TBL online exchangeuser_options.tcl....# TBL online exhange?# 0: use nominal ctf3 parameters, for baseline studies# 1: read tbl magnet currents, initial energy and initial energy from files (for online use in CTF3)set tbl_online_exchange 0...

Calculate response matrices and transfer matrices (TBI) for the TBL, including the effect of the PETS.

Exchanging files using the standard(?) CTF3 method with "virtual.currents".

TBL response matrix

Expected found in online_exchange folder:virtual.currentsvirtual.energiesvirtual.beamcurrentes

Page 17: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

TBL spectrometeruser_options.tcl...# TBL options} elseif { $mysimname == "tbl12" } { set activate_power_optimization 0 # default current [A] set initial_current [expr 28.0e-0] # default decelerator initial energy [GeV] set initial_energy 0.150 # default power [MW] set requested_PETS_power 135.0 # default maximum energy spread [-] set requested_E_spread 0.55...# indicate where a PETS is installed (0: no PETS in this slot, 1: PETS installed in this slot)#set tbl_PETS_list "1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0"set tbl_PETS_list "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1"...

Simulated beam at spectrometer dump location after 8 PETS.

Page 18: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

Simulation parametersuser_options.tcl....# number of bunches to simulate (to reach steady-state, at least 20 for clic and at least if { $mysimname == "clic12" } { set n_bunches_sim 50} elseif { $mysimname == "tbl12" } { #set n_bunches_sim 240 set n_bunches_sim 60 # full CTF3 train length #set n_bunches_sim 1680

# TBL: beam is converted to a particle beam before the spectrometerset n_particle_beam 50000

NB: number of particles simulated and length of simulated train might need to be changed for some studies.

Default is a short train (~ x 2 longer than transient).

TBL: might want to simulate full train length

TBL: particle beam dumped, number of particles can be specified

For other simulation-techincal changes there are also some options in : advanced_options.tcl

Page 19: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

How to run

Page 20: Status  of the  CLIC  Decelerator  and Test Beam Line  simulation framework

To get started1) run the main script, e.g.cd ...../decelerator/results/placet-octave ../dec_scripts/main.tcl

2) change parameters and options (each option well documented in the file)../dec_scripts/user_options.tcl

3) retrieve data in the main dump-file (matlab/octave format), using matlab or octave load "../results/decsimdata.1.1.1.1.1.dat"

3b) examples of data in dump-fileplot(Bs, y0_NC) % BPM y-readings at each BPMplot(Qs, env_NC(1:end-1)) % 3-sigma beam envelope at each quadrupoleplot(b0nc(:,1), b0nc(:,3), 'x') % beam energy profile

and, please see:1) decelerator/README.txt (decelerator get started doc)2) PLACET.pdf (standard placet manual)