RF Cavity has no good default parameters

Issue #143 resolved
Jochem Snuverink created an issue

As the title says the rfcavity element does not run out of the box, it needs the following:

  • material
  • cavityModel

Since there is no default cavityModel either, this also needs to be defined (for examples see examples/features/components/rf.gmad

It would be good if the minimum could be something like:

ACC2: rfcavity, gradient=20.0, l=0.01;

Comments (5)

  1. Laurie Nevay

    I have fixed this. This took quite a redesign of the rf cavity code. The geometry and fields have now been separated and an rf object can be constructed without a cavitymodel object. A cavitymodel can optionally be attached and provide greater control over the geometry. The documentation has been updated appropriately.

    The RF cavity field was also fixed as the B component was many orders of magnitude stronger than it should've been (H field was being used). It also didn't obey phase.

    The phase is now calculated based on the position in the beam line such that the cavity has 0 phase at half it's length for a reference trajectory of the machine.

    The sign of the field is also flipped so that a positive field will cause the primary particle to be accelerated.

  2. Log in to comment