Simulating the acceleration of protons traveling through the field of a superconducting radio frequency (SRF) cavity to determine the number of cavities required
for acceleration is quite complex. This paper describes a simplified model based on the actual PIP – II linac design. It does not take into account transverse
RF field and particle dynamics. This means that only the component of the field along the axis of propagation of the particle is considered in the simulation.
The simulation describes the exchange of energy between the cavity fields and a single particle as it passes through the cavities. I wrote a program to perform a
numerical integration on the cavity field to determine the NTTF curve which shows the energy gained by the particle for any particular β. The number of cavities
for acceleration is calculated from the relationship between the Kinetic energy of the beam and the NTTF curve. Even though transverse RF fields are not
considered, the result of the simulation is within a reasonable range of the real number of cavities used for the acceleration.