bmad-sim / BeamTracking.jl

Julia routines for tracking particle beams through accelerators
Other
0 stars 2 forks source link

Implement utility functions for SR quantities. #15

Open dtabell opened 5 hours ago

dtabell commented 5 hours ago

Place functions for computing beta, gamma, Brho, etc. in utils.jl.

dtabell commented 4 hours ago

@DavidSagan and @mattsignorelli It turns out (I should have remembered this) to be much better to compute the various relativistic quantities starting from either the kinetic energy, $E_\text{kin}$, or $\beta\gamma$. So the beam struct should store the reference value of one of those quantities instead of $\beta_0$. I have a slight preference for storing $(\beta\gamma)_0$—it is dimensionless—but I am comfortable with either. Thoughts?

dtabell commented 4 hours ago

On the other hand, storing the kinetic energy would likely make it easier for people to debug their simulations.

mattsignorelli commented 1 hour ago

My vote would be for the dimensionless quantity, so that all unitful quantities are contained in the species field