1 / 12

Acceleration issue in PTC-Orbit debugged

Acceleration issue in PTC-Orbit debugged. E.Benedetto Space Charge meeting, 29/8/2013. Outline. The issue The proposed solution Examples Influence on our (PSB) simulations. The issue.

nariko
Download Presentation

Acceleration issue in PTC-Orbit debugged

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Acceleration issue in PTC-Orbit debugged E.Benedetto Space Charge meeting, 29/8/2013

  2. Outline • The issue • The proposed solution • Examples • Influence on our (PSB) simulations

  3. The issue • PTC was not communicating to ORBIT the increase of energy (momentum, beta, gamma, etc..) imposed through the PTC RF tables. • How we noticed it ( Vincenzo’s presentation 18/7/2013): • showAccelerate(fio) (pure Orbit command) output not showing increase of Energy and Beta • Still had the doubt (=hope) it was just a wrong output…

  4. Acceleration issues: • Orbit seems to not recognize the acceleration imposed through PTC RF tables showaccelerate(fio) PTC-ORBIT issues for PSB simulations - V. Forte – E. Benedetto – M. Martini - S.c. meeting (18/07/2013)

  5. The proposed solution • Changes in the PTC source file Sq_orbit_ptc.f90 two subroutines: • ORBIT_up_grade_mag: called every turn before entering the RF cavity to update the RF freq. (for the new BETA0) and where the new revolution freq. is passed to Orbit. • energize_ORBIT_lattice: called at the very beginning to set the correct RF cavity freq. (and revolution freq.) • The proposal is to modify at these 2 location and pass to Orbit not only the new revolution frequency, but also the new energy, momentum, beta, gamma, etc..

  6. subroutine energize_ORBIT_lattice(t) implicit none real(dp), optional :: t type(fibre), pointer :: p type(work) werk,travail real(dp) e_in,t0,freqs integer i logical found found=.false. freqs=1.e38_dp werk=0 travail=0 t0=x_orbit_sync(6) ! read from the initial_settings file and multiplied by clight if(present(t)) t0=t if(fill_patch) then write(6,*) " filling patches with t= x0 from main program " t0=t0_main endif write(6,*) "energize at time ", t0,t0/clight write(6,*) "Initial Frequency of First Cavity", paccfirst%mag%c4%freq call find_acc_energy(paccfirst,t0,e_in,my_true) ! new ! call find_acc_energy(paccfirst,x_orbit_sync(6),e_in,.false.) call find_energy(werk,kinetic=e_in) p=>paccfirst%parent_layout%start do i=1,paccfirst%parent_layout%n travail=p if(p%mag%kind==kind4) then p%mag%c4%freq = p%mag%c4%freq*werk%beta0/travail%beta0 p%magp%c4%freq = p%mag%c4%freq if(p%mag%c4%freq<freqs)then freqs=p%mag%c4%freq found=.true. endif call find_acc_energy(paccfirst,t0,e_in,my_true) !new endif p=werk p=>p%next enddo if(freqs/=0.and.found) then my_ORBIT_LATTICE%ORBIT_OMEGA=twopi*freqs/CLIGHT ! EB beginning - added by Elena Benedetto - to have correct energy already at the beginning my_ORBIT_LATTICE%ORBIT_P0C=werk%P0C my_ORBIT_LATTICE%ORBIT_kinetic=werk%kinetic my_ORBIT_LATTICE%orbit_beta0=werk%beta0 my_ORBIT_LATTICE%orbit_brho=werk%brho my_ORBIT_LATTICE%orbit_energy=werk%energy my_ORBIT_LATTICE%orbit_gamma=1.0_dp/werk%gamma0i ! EB end - added by Elena Benedetto else write(6,*) " cavity with frequency problems ", freqs,found stop endif write(6,*) "Final Frequency of First Cavity", paccfirst%mag%c4%freq write(6,*) "Initial and Final beta0 ",travail%beta0,werk%beta0 write(6,*) "Starting time of simulations =",t0/clight ," and kinetic energy =",my_ORBIT_LATTICE%ORBIT_kinetic end subroutine energize_ORBIT_lattice The same is done in the ORBIT_up_grade_mag subroutine

  7. Test #1: showAccelerate(fio) output Same job, with the new compiled version, vs. the old one, i.e. PTC11012012-ORBIT10 • New: • Energy, beta0 are updated • Elepsed time takes into account the beta0 increase • Old: • Energy, beta0 stay constant • Elapsed time increases linearly with #turns

  8. Test #2: SpaceCharge diagnostics Same job, with the new compiled version, vs. the old one, i.e. PTC11012012-ORBIT10 Perveance~ l/(b2 g3) ~ It can be seen as the “coefficient” of the space charge force • New: • Perveance/l decreasing • Old: • Perveance/lconstant

  9. Implications for PSB simulations • d(Brho)/dt=10 Tm/s PTC-ORBIT issues for PSB simulations - V. Forte – E. Benedetto – M. Martini - S.c. meeting (18/07/2013)

  10. Implications for PSB simulations Same job, with the new compiled version, vs. the old one, i.e. PTC11012012-ORBIT10 • In 7000 turns (d(Brho)/dt=10 Tm/s): • Energy: 160MeV  170.9 MeV • Beta: 0.5197  0.533 • Perveance/l/rp ~A*1/(b2g3): 1.064  1.154 Horizontal emittance Vertical emittance # turns # turns

  11. FINAL_SETTINGS issue • Small differences (with acceleration) between: • Elapsed time in Orbit diagnostics (e.g. showAccelerate(fio)) • FINAL_SETTINGS.txt file if only 1 long simulation • FINAL_SETTINGS.txt file resulting from “continuous tracking” • Differences between 1) and 2,3) understood: “Orbit time” is simply the sum over #turns of (2pR/bc) • But 2) and 3) should be exactly the same!!! • 3) getting closer to 1) for jobs of 1turn each • See example next page

  12. FINAL_SETTINGS issue

More Related