-
Notifications
You must be signed in to change notification settings - Fork 44
foxifying e-lenses #839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
foxifying e-lenses #839
Conversation
* check it actually works * have a more appropriate handling of measured radial profiles - need to re-think interpolation... * implement user-interface to veto/request CO calculation with elens in...
At the same time: * added ldebug flag in utils, for the moment set to .true.; * improved some output on fort.6 * improved use statements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know you're not done yet, but one of these files were open on my editor, and I just spotted a few things.
Hi Veronica,
shall I replace |
Yes. The error messages from CR should also go to |
…t format for elenses (FOX and INTER keywords only for the moment)
For the record - without the check that
|
ok issue solved skipping the |
Canonicals and .png files are excluded.
I am off this week, I can approve, but I have not looked in detail |
Hi @rdemaria , ok. I think that the implementation is sound, as there is a specific test that verifies that for a (full) electron lens I get a detuning similar to that of a quadrupole of the same gradient, with the same sign on both Qx and Qy (contrary to the case of the quad). @tpersson @rdemaria , shall I wait for a detailed review (it would be good, though maybe not immediate) or shall I merge straight away? |
Hi @rdemaria , |
As agreed with @rdemaria , at r=R1 and r=R2 kick and derivatives of elens will be dictated by the corona part. |
This PR aims at foxifying e-lenses. The most difficult part was to get into the logics of fox and to foxify elenses with an electron radial profile from measurements - there, I moved from a linear interpolation to a polinomial interpolation around the point of interest of order that can be chosen by the user.
I took inspiration for the foxification of elenses from
wireda
, hence with a subroutine defined in the elens module called insix_fox.f90
. A variable states if the elens should be considered or not in fox, defaulting to.true.
; anyway, the user is free to explicitly tell SixTrack if to consider or not each elens for FOX in thefort.3
file. Anyway, the elens kick is taken into account in the FOX calculation only if the closed orbit goes through the electron distribution, i.e. the hollow part does not contribute to FOX.The polinomial interpolation is essentially general, implemented in the
utils
module, and it can be used anywhere needed. I have added also an integration subroutine, trying to be more consistent with the polinomial interpolation when computing the integral of the interpolated function. Polinomial interpolation of radial elens profiles is presently set to linear, but it can be changed in the future; the user can change this setting via thefort.3
.Major changes involve:
elens
module;utils
module;Other minor changes:
elens_kz
, storing the type infort.2
(i.e.29
), andelens_ktrack
(i.e.63
) and used throughout the code - hence few modules have been affected (egdynk
);elens
module;numerical_constants
(needed for polinomial interpolation);