Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

amereghe
Copy link
Contributor

@amereghe amereghe commented Feb 24, 2020

This PR aims at finalising the foxification of e-lenses, as discussed with @rdemaria recently.
For Gaussian and uniform electron beam distribution, I have added the explicit expression for R1=0, both in the FOX and in the tracking part.
In addition, for the Gaussian distribution, I have added a linearisation of the kick of the full lens when r<1E-7 mm.

I have added few tests, each checking that the de-tuning for a single full e-lens with a specific profile and kick is sound.
The check is done reducing all the beam distributions to a constant one, and comparing to the tune-shift of a quad with the same normalised kick.

At the same time, I allow the use of the elens in the very degenerate case of the wire.
I have added a test for that - checking only kick during tracking and in FOX, but no specific test on tune-shift.

At the same time:

  • more human readable output at various levels;
  • removed bug on Gaussian and radial profiles, where the normalisation geometrical factor was wrongly taken into account twice.

… distribution read from file

AT the same time:
* added units to debug echo of input parameters;
* more readable code for calculating theta_r2;
* handling of empty lines in files of radial profile;
* change of printout in echo of radial profile + warning about point at R=0.0;
* added debug lines in fox calculation with radial profile;
These follow the addition of a warning line when echoeing the profile in STDOUT
…enses, Rref must be introduced as reference radius at which the theta_ref is computed, instead of R2 and theta_r2
@amereghe
Copy link
Contributor Author

amereghe commented Feb 26, 2020

Hi @rdemaria ,
I think this is the final version.
I haven't updated the original elens tests - I will wait for your green light before doing that, such that I update the tests only once.
That's why circleci fails.
I will do the same with the documentation.

Please find here the updated .pdf with all the math - now it should be correct.
I think that the most interesting slides for you are 2 and 6.
Moreover, you can find on slide 8 the tune shifts given by the different types of e-lenses tested as calculated analytically and as computed by FOX.
Are they acceptable?

@amereghe
Copy link
Contributor Author

amereghe commented Feb 27, 2020

ok - I have updated the slides, showing also that (last slide):

  • theta_prime(r) at R1 for the uniform distribution is different if the lens is hollow or full;
  • theta_prime(r) at R2- for the Gaussian distribution tends to the limit at R2+ if R2 tends to infinity.

I have also compiled a more detailed cross-check of the tune shifts computed by FOX for the uniform, Gaussian and radial distributions, evaluating what happens also when the kick is lowered by a factor 10 - please find the table here. The tune shift predicted by SixTrack agrees much better to that predicted analytically, showing that the implementation is sound and the tests use quite strong kicks. I will re-set the tests to use the weaker kicks, then.

@rdemaria , if this is all fine for you, I will then update the documentation and the elens tests that were already existing, and then merge :)

@amereghe
Copy link
Contributor Author

amereghe commented Mar 2, 2020

ok, @rdemaria , I am done here.
You can accept the PR.
I will draft all the math in a specific report, and add in the documentation a reference :)

Copy link
Contributor

@tpersson tpersson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, but I haven't checked in details. The things I checked all looked good!

@amereghe
Copy link
Contributor Author

amereghe commented Mar 5, 2020

Hi @tpersson ,
Thanks for the feedback. Shall I wait for your detailed review or shall I merge the PR?
In addition, FYI, following the suggestion of @rdemaria , I am de-facto drafting a report on the physics behind the implementation, but the repo will come much later than this PR...
Thanks!

@amereghe
Copy link
Contributor Author

amereghe commented Mar 9, 2020

ok to merge, as agreed with @tpersson

@amereghe amereghe merged commit 4d51731 into SixTrack:master Mar 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants