We develop a fully three-dimensional numerical code describing the diffusion of cosmic rays (CRs) in the Milky Way. It includes the nuclear spallation chain up to oxygen, and allows the study of various CR properties, such as the CR age, grammage traversed, and the ratio between secondary and primary particles. This code enables us to explore a model in which a large fraction of the CR acceleration takes place in the vicinity of galactic spiral arms that are dynamic. We show that the effect of having dynamic spiral arms is to limit the age of CRs at low energies. This is because at low energies the time since the last spiral arm passage governs the CR age, and not diffusion. Using the model, the observed spectral dependence of the secondary to primary ratio is recovered without requiring any further assumptions such as a galactic wind, re-acceleration or various assumptions on the diffusivity. In particular, we obtain a secondary to primary ratio which increases with energy below about 1 GeV.
- Galaxy: kinematics and dynamics
- cosmic rays