Skip to content

Integrator for curved and longitudinally dependent fields#797

Open
silkevdschueren wants to merge 19 commits into
xsuite:mainfrom
silkevdschueren:Tracker
Open

Integrator for curved and longitudinally dependent fields#797
silkevdschueren wants to merge 19 commits into
xsuite:mainfrom
silkevdschueren:Tracker

Conversation

@silkevdschueren

Copy link
Copy Markdown
Contributor

Description

New beam element FieldExpansion to perform tracking through fields with longitudinal dependence and/or curvature based on a recursive representation (proceedings IPAC24) with a Runge-Kutta integrator. The practical implementation is a factory: when creating a FieldExpansion instance, it spits out a BentFieldExpansion or StraightFieldExpansion depending on curvature.

Preliminary timing results (on my simple PC): tracking through a FieldExpansion with 100 steps takes 200us per particle per turn. Twissing a FODO cell made of FieldExpansions takes similar times as a FODO cell made of regular Xsuite elements (difficult to quantify exactly due to compilation and cached twisses).

Three dedicated tests are added to the PR. Full tests of xtrack have not yet been ran completely.
Important: there is a weird issue with the last test (test_twiss). When ran sequentially, it comes last and passes without problem. But when ran in parallel using xdist, that specific test fails the twiss with a ClosedOrbitSearchError....

Checklist

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones
  • I described my changes in this PR description

Optional:

  • The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • I have updated the docs in relation to my changes, if applicable
  • I have tested also GPU contexts

@rdemaria

Copy link
Copy Markdown
Contributor

Few additional steps for Leir and Polarizer Ring use case:

  • Physics manual entry
  • Test backtracking
  • Classes name, merging classes
  • Spin and radiation
  • Bs and other quantities in the table for integral

Additionally

  • Compatible with RDTs (knowing that also solenoid is not supported)

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.

2 participants