Energetic particle dynamics in a simplified model of a solar wind magnetic switchback

Context. Recent spacecraft observations in the inner heliosphere have revealed the presence of local Alfvenic reversals of the magnetic field, while the field magnitude remains almost constant. They are called magnetic switchbacks and are very common in the plasma environment close to the Sun explored by the Parker Solar Probe satellite. Aims. A simple numerical model of a magnetic field reversal with constant magnitude is used in order to explore the influence of switchbacks on the propagation of energetic particles, within a range of energy typical of solar energetic particles. Methods. We model the reversal as a region of space of adjustable size bounded by two rotational discontinuities. By means of test particle simulations, beams of mono-energetic particles can be injected upstream of the switchback with various initial pitch- and gyro-phase angles. In each simulation, the particle energy may also be changed. Results. Particle dynamics is highly affected by the ratio between the particle gyroradius and the size of the switchback, with multiple pitch-angle scatterings when the particle gyroradius is of the order of the switchback size. Further, particle motion is extremely sensitive to the initial conditions implying a transition to chaos; for some parameters of the system, a large share of particles is reflected backwards upstream as they interact with the switchback. These results can have a profound impact on the solar energetic particle transport in the inner heliosphere, thus possible comparisons with in-situ spacecraft data are discussed.


Introduction
The transport of energetic particles is a physical phenomenon found to take place in heliospheric plasmas and in other astrophysical contexts (Giacalone & Jokipii 2001;Florinski et al. 2003;Parizot et al. 2006;Shalchi 2009).Charged particles with kinetic energies ranging from tens of keV up to a few GeV, which is much higher than typical plasma thermal energies, are routinely observed in the solar wind (Lee et al. 2012).Such particles can be accelerated by processes related to solar flares, coronal mass ejections, and interplanetary shocks.Due to the irregular character of the interplanetary magnetic field, the transport of energetic particles is determined by their interaction with magnetic turbulence (Matthaeus et al. 2003;Pucci et al. 2016) and with coherent structures (Tessein et al. 2015) that characterise the heliospheric plasma (Veltri & Mangeney 1999;Zimbardo et al. 2010;Bruno & Carbone 2013).Particle transport is indeed affected by turbulence properties such as the fluctuation amplitude, the spectral index, and the anisotropy in the wave vector space (Jokipii 1966;Matthaeus et al. 2003;Pommois et al. 2005;Hussein & Shalchi 2016;Pucci et al. 2016).Different mechanisms determine either parallel or perpendicular transport, namely random walk of magnetic field lines, pitch-angle diffusion, and drift motion due to magnetic field inhomogeneities (Moraal 2013;Shalchi 2009).Transport properties also have implications for particle acceleration at interplanetary shock waves, because fast pitch-angle diffusion and slow spatial diffusion can speed up the acceleration process (Lee & Fisk 1982;Crooker et al. 1989;Giacalone 2013;Amato 2014).
The non-linear energy cascade process taking place in turbulence leads to the formation of coherent structures (Perri et al. 2012;Wu et al. 2013;Greco & Perri 2014;Perri et al. 2017;Perrone et al. 2020), which in magnetohydrodynamic (MHD) turbulence can be found as current sheets, rotational discontinuities (RDs), and tangential discontinuities (TDs).Such structures are usually observed in solar wind turbulence (Tsurutani & Smith 1979;Borovsky 2010;Perri et al. 2012;Greco et al. 2016), and are also related to magnetic reconnection events (Phan et al. 2020).In particular, RD and TD have been identified in studies based on single-spacecraft measurements (Burlaga 1969;Martin et al. 1973;Smith 1973;Tsurutani & Smith 1979;Mariani et al. 1983;Neugebauer 1989;Soding et al. 2001) using the variance matrix method, and in studies based on multi-spacecraft observations (Burlaga & Ness 1969;Horbury et al. 2001;Knetter et al. 2003Knetter et al. , 2004)).It has been suggested that the presence of RDs during Alfvénic periods could be related to the quasi-uniform-intensity magnetic field fluctuations (Roberts 2012;Valentini et al. 2019) that characterise such periods (Belcher & Davis 1971).
The interaction of ions with RDs has been studied by Artemyev et al. (2020) using a Hamiltonian formalism; these authors found that fast pitch-angle scattering is possible due to the destruction of the longitudinal adiabatic invariant.Moreover, Malara et al. (2021) (hereafter, Paper I) found that ions propagating in a RD can display a chaotic behaviour where particles are temporarily trapped inside the RD, with trapping times displaying a nearly power-law distribution.RDs can actually affect energetic particles whose gyroradius is comparable to the thickness of the RD; in particular, these structures can cause fast, large pitch-angle scattering.
Among the coherent structures revealed in the solar wind turbulence, magnetic switchbacks (SBs) have recently received particular attention in the literature.A SB can be defined as a structure where the main magnetic field component -typically the radial component B r -reverts its sign.SBs have been found to exist in the interplanetary magnetic field at various heliocentric distances (McCracken & Ness 1966;Neugebauer & Goldstein 2013;Borovsky 2016;Horbury et al. 2018).Recently, in situ measurements performed by the space missions Parker Solar Probe (PSP) and Solar Orbiter (SO) showed that SBs are more frequent at shorter distances from the Sun (Bale et al. 2019;Fedorov et al. 2021).Information about the magnetic field line structure in SBs has been deduced by studying the propagation direction of strahl electrons (Kasper et al. 2019).Such electrons move along magnetic lines, generally in the antisolar direction.The polarity reversal of B r inside a SB is typically associated with a reversal in the propagation direction of strahl electrons.This indicates that SBs can be considered as magnetic field line folds.The influence of SBs on ion propagation was studied by Bandyopadhyay et al. (2021) by means of the PSP/IS⊙IS instrument (McComas et al. 2016) for energy per nucleon in the range 80-200 keV.For this energy range, Bandyopadhyay et al. (2021) find that ions do not preferentially change their direction of propagation from that of the background magnetic field to that of the SBs, because of their large gyroradius.
The properties of SBs were recently examined in great detail, mainly based on PSP measurements (Dudok de Wit et al. 2020;Horbury et al. 2020;McManus et al. 2020;Mozer et al. 2020;Laker et al. 2021;Mozer et al. 2021;Tenerani et al. 2021;Pecora et al. 2022).The changes in magnetic field direction associated with both entering and exiting a SB are quite abrupt; therefore, it can be assumed that a SB is limited by a pair of RDs where the magnetic field B turns in opposite ways.Other relevant properties are a correlation between the plasma velocity u and magnetic field B and a nearly constant magnetic field magnitude B. Therefore, SBs can be considered as (very) largeamplitude Alfvénic fluctuations; the propagation direction in the plasma reference frame is away from the Sun, as is the case for most of the Alfvénic fluctuations observed in the solar wind.The duration of a SB, that is, the time difference in the spacecraft frame between the two crossings of the SB edges, can vary between 10 2 s and 10 4 s, with a distribution that follows a power law (Pecora et al. 2022).Moreover, SBs are not isolated but occur in 'patches' that are separated by quiet, steady wind.
The origin of SBs is still controversial.It has been proposed that SBs could originate in the solar corona as a consequence of interchange reconnection between open and closed field regions (Fisk & Kasper 2020;Bale et al. 2021).Observations of a structure reminiscent of a SB pattern propagating away from the corona in the Metis coronagraph (on board SO) data were recently reported (Telloni et al. 2022).In addition, a local origin of SBs due to dynamical phenomena has been considered (e.g.Ruffolo et al. 2020;Squire et al. 2020;Schwadron & McComas 2021).The stability and possible dissipation of SBs during their propagation has also been studied (Landi et al. 2006;Tenerani et al. 2020;Magyar et al. 2021a,b).
In the present paper, we study the dynamics of high-energy protons propagating across a SB, employing a simplified analytical model for the magnetic field of the SB.In particular, we investigate how the particle pitch angle is modified by the inhomogeneous magnetic field of the SB.This is accomplished by taking a test-particle approach, where single particle trajectories in phase space are determined from a numerical integration of the equations of motion.We focus on the distribution of pitchangle variations as a function of the particle initial conditions (pitch angle, gyrophase, and energy), as well as on its dependence on parameters that characterise the SB.Chaotic features in the particle behaviour are discussed.Results are relevant in the framework of high-energy particle transport and acceleration in heliospheric plasmas.
The outline of the paper is as follows: in Sect. 2 we present a model of the magnetic field and of the dynamics of particles; in Sect. 3 we show and discuss numerical results derived from the model; finally in Sect. 4 we draw conclusions, discussing possible observations of the effects of SBs on energetic particles in the solar wind.

The model
We model a SB as a magnetic reversal included between a pair of RDs, where the magnetic field magnitude remains approximately constant.We denote the width of the RDs and the magnetic field magnitude ℓ and B 0 , respectively.In particular, we assume: B 0 = 1.5 × 10 −4 G, a RD crossing time of δt = 28 s (in the spacecraft frame of reference), and a solar wind velocity of v S W = 3.4 × 10 2 km s −1 (Pecora et al. 2022).This gives ℓ = v S W δt = 9.52 × 10 3 km.However, the range of variation of these parameters can be broad (Dudok de Wit et al. 2020;Pecora et al. 2022).In the following, we use dimensionless quantities.In particular, the magnetic field is normalised to B 0 and spatial coordinates are normalised to ℓ.Moreover, we introduce the typical proton gyrofrequency Ω 0 = qB 0 /(m p c), where m p is the proton mass, and we normalise time to the corresponding time t = 1/Ω 0 .Particle velocity is normalised to the value ṽ = ℓΩ 0 .The above values of B 0 and ℓ give t = 0.69 s and ṽ = 1.37 × 10 4 km s −1 , respectively.We note that the value of ṽ is almost equal to the speed of the protons with an energy of 1 MeV.To simplify the notation, from now on we indicate dimensionless quantities with the same symbols as the corresponding dimensional quantities, except when explicitly indicated.

Magnetic field
We adopt a simple analytical model for the magnetic field of a SB.To represent the magnetic field B we use a Cartesian reference frame, indicating the corresponding unit vectors by e x , e y , and e z .The model is 1D, in that B has three non-vanishing components, but depends only on one spatial coordinate, that is, x: B = B(x).As the SB size, as described above, is much smaller than the distance between the SB and the Sun, we can assume a local Cartesian frame without going to a spherical coordinate system.We might relate x to the radial direction, as suggested by PSP observations, but more precisely x represents the direction along which B most rapidly varies in space in the plasma reference frame.If the SB orientation is 'oblique', the x direction will not correspond to the radial.
The condition ∇ • B = 0 implies that B x = const.We further assume that the magnetic field magnitude is uniform: is the perpendicular, variable component of B. A magnetic field satisfying the above conditions can be written in the following form: where α is the constant angle between B and the x axis, while the quantity ψ(x) represents the variable angle between B ⊥ and the y axis.We define α as the 'obliquity angle'.We further assume that B is uniform both in the two regions outside the SB, where we have ψ(x) = −β, and inside the SB, where ψ(x) = β.Therefore, when crossing the two RDs that limit the SB, B ⊥ rotates by an angle 2β and −2β, respectively.We define the constant β as the 'rotation angle'.Equation ( 2) is an analytical expression for ψ(x) that satisfies the above assumptions: According to Eq. ( 2), the two RDs are located at x = ±x c , while ∆x represents the width of the two RDs.In normalised units, ∆x = 1.The model for the magnetic field depends on three free parameters, namely the SB half-width x c and the two angles α and β.However, not all of the choices for α and β correspond to a magnetic reversal.To see this, we consider the direction of the magnetic field outside the SB; conventionally, we indicate this direction as the 'radial' direction.The corresponding unit vector is  Fig. 2, this region is coloured blue/black and it is limited by a black line.Therefore, a SB is present when B ⊥ performs a sufficiently large rotation across the RDs and the obliquity angle is sufficiently large.In what follows, we consider only magnetic configurations where a field reversal is present, that is, where the condition B r (x = 0) < 0 is satisfied.The deepest reversal, where B r (x = 0) = −1, is obtained for β = α = 90 • .However, in this case we have B x = 0 and the two RDs become TDs.Moreover, in the whole spatial domain, magnetic field lines are straight lines contained in planes perpendicular to the x direction, and therefore they do not connect the two sides of each discontinuity, as is typical of TDs.As a consequence, particles moving along field lines will not cross the discontinuities unless they are already very close to the discontinuities at the initial time.For those reasons, we do not consider the particular configuration α = β = 90 • .

Particle dynamics
We consider populations of protons moving in the electromagnetic field of the heliosphere.Each particle is subject to the Lorentz force , where q and v are the proton charge and velocity; E and B are the electric and magnetic fields; and c is the speed of light.
It is straightforward to show that, for high-energy particles, the electric force F e can be neglected with respect to the magnetic force F m .Assuming the value v A ∼ 30 − 50 km s −1 and considering protons with velocity v 4.4 × 10 3 km s −1 (corresponding to energy E ≥ 10 2 keV), we obtain F e /F m ≤ 10 −2 .For the same reason, we can neglect the time dependence in the magnetic field B. The above conditions are met to an increasing extent with increasing particle energy.Within this approximation, the motion equations can be written in the following dimensionless form: where is the Lorentz factor.Equation ( 5) implies that v = |v| = const, that is, the particle energy is conserved.This condition also implies that γ(v) = const.Therefore, A&A proofs: manuscript no.46990_final the motion equation ( 5) can be rewritten in a simpler form: Motion equations ( 4) and ( 6) are numerically integrated by employing the Boris method.It has been shown that this method is symplectic and conserves the particle energy up to the round-off error (Webb 2014).We note that we choose to adopt a Cartesian geometry in the plasma frame because we are integrating the particle equations in the vicinity of the SB, which means that we can neglect the curvature of the background magnetic field as well as adiabatic cooling.
We study the evolution of a population of protons that propagate across the SB.The population is characterised by a given value of the energy E, and the corresponding proton velocity is where v and E are expressed in normalised and in physical units, respectively.The velocity components parallel and perpendicular to B are given by v The ratio µ(t) = v || (t)/v represents the cosine of the particle pitch angle.The particle Larmor radius is ρ = γ(v)v ⊥ /B (in normalised units), and is related to We define the constant quantity ρ max = γ(v)v/B, corresponding to the Larmor radius calculated for µ = 0.The Larmor radius ρ max is plotted in Fig. 3 as a function of the particle energy E, for B = 1.The dependence of ρ max on E departs from being linear for energies E 100 MeV.Each particle is initially located outside the SB on the side of negative x and moves towards the SB.The initial position for all particles is (x 0 , y 0 , z 0 ), with x 0 = −(6x c + 2ρ max ) and y 0 = z 0 = 0.The value chosen for |x 0 | is large enough to guarantee that the particle is initially well outside the SB.As the magnetic field depends only on x, the values of y 0 and z 0 are not relevant.
To define the initial velocity, we consider another reference frame {x ′ , y ′ , z ′ }, where the z ′ axis is parallel to B(x 0 ).With respect to this reference frame, the initial velocity is defined as: where µ 0 = µ(t = 0) is the initial pitch-angle cosine and φ 0 is the initial gyrophase.The values of µ 0 and φ 0 are chosen in the intervals 0 < µ 0 ≤ 1 and 0 ≤ φ 0 < 2π.Only strictly positive values of µ 0 are considered, corresponding to particles initially moving toward the SB.In Eq. ( 8), the unit vector along the z ′ axis is e z ′ = B(x 0 )/B(x 0 ); the unit vector along the y ′ axis is chosen to be perpendicular both to the x axis and to e z ′ : e y ′ = (e x × e z ′ ) /|e x × e z ′ |; finally, e x ′ = e y ′ × e z ′ /|e y ′ × e z ′ |.Using the above definitions, the initial velocity components with respect to the {x, y, z} reference frame are given by Time integration is carried out until the given particle has completely left the SB, either on the positive or negative x side (the latter situation corresponding to a particle that is reflected back by the SB).This condition is well met numerically when

Results
In the problem under study, the particle energy is conserved in time.Therefore, the effect of the inhomogeneous magnetic field on particles is an energy transfer from parallel to perpendicular motion, or vice versa.This is equivalent to a change in the pitch angle cosine µ.Considering a population of protons, this can correspond to a scattering in pitch angle or to a focusing process, as we show below.The details of this process depend on the parameters defining the magnetic field structure and on the particle energy.In this section, we discuss numerical results and their dependence on those quantities.
In order to have the initial velocities v 0 uniformly distributed over a half sphere with v 0 = const in the velocity space, the values of the µ 0 and φ 0 are taken within a regular grid of N µ × N φ points: (µ 0;i , φ 0; j ) , where µ 0;i = i/N µ , φ 0; j = 2π j/N φ , with i = 1, ..., N µ , j = 0, ..., N φ − 1.Typically, we used N µ = N φ = 1000, which corresponds to a total number of particles N tot = 10 6 .Starting from those initial conditions, the motion equations ( 4) and ( 6) are numerically integrated in time for all particles, until each particle has permanently left the SB (see above).The final value of the pitch angle cosine (which depends on both µ 0;i and φ 0; j ) is µ 1;i, j and the corresponding variation is ∆µ i, j = µ 1;i, j −µ 0,i .We note that 0 < µ 0;i ≤ 1, while −1 ≤ µ 1;i, j ≤ 1; therefore the variation ∆µ i, j varies in the interval −2 ≤ ∆µ i, j < 1.To simplify the notation, from now on we drop the indexes i and j.We calculated the distribution of the pitch-angle cosine variations f (∆µ) and the distribution of the final pitch-angle cosine g(µ 1 ) for different choices of the energy of particles and of the parameters characterising the magnetic structure of the SB.

Varying reversal depth
We consider a case where all particles have energy E = 1 MeV, corresponding to ρ max = 1 (see Fig. 3).In this case, particles trajectories have a Larmor radius of the order of the width of the two RDs.As shown in Paper I, in this condition there is a strong effect of the RD on the particle dynamics, which can lead to a relevant modification of the pitch angle.A similar behaviour is expected in the present case as well.
In Fig. 4 (top panel), the distribution f (∆µ) of pitch-angle cosine variations is plotted for β = 90 • and α = 50 • , 60 • , 75 • , that is, for a reversal depth going from mild to very pronounced.The pitch-angle variation that a particle experiences depends on the initial condition {µ 0 , φ 0 } of the given particle.This gives the change from the initial to final pitch angle.From Fig. 4, we see that the width of the f (∆µ) distribution increases with increasing depth of the magnetic reversal, corresponding to larger variations in pitch angle.However, such a diffusion process is not symmetric; indeed, positive values of ∆µ prevail over negative values and this asymmetry tends to increase for increasing obliquity angle α.
In the bottom panel of Fig. 4, the distribution g(µ 1 ) of the final pitch angle cosine is plotted for the same parameter values as in the top panel.Though initial values µ 0 are uniformly distributed in the interval ]0, 1], in the distribution g(µ 1 ) there is a prevalence of values close to µ 1 ∼ 1, corresponding to particles with v || ≫ v ⊥ .This tendency becomes more evident with increasing obliquity angle α; for α = 75 • (deep magnetic reversal) the particle velocity distribution strongly focuses in the direction parallel to B. A small population of particles with µ 1 < 0 is also In summary, when the particle Larmor radius is of the order of the RD width (E = 1 MeV), increasing the reversal depth leads to both larger pitch-angle diffusion and to velocity focusing in the parallel direction, along with a lower percentage of reflected particles.

Varying particle energy
The Larmor radius ρ max can be compared with the typical lengths in the magnetic structures, namely the RD width ∆x = 1 and the SB width 2x c .In order to study different regimes, we considered an energy interval going from E = 0.1 MeV, corresponding to ρ max ≃ 0.32 < ∆x, up to E = 10 4 MeV, corresponding to ρ max ≃ 255 ≫ 2x c (Fig. 3).Values of ρ max corresponding to values of the particle energy E used in Figs. 5 and 6 are listed in Table 1 in physical units, and are also given as values normalised to the RD width ∆x and to the SB width 2x c in the case x c = 5.
The top panel of Fig. 5 shows the distributions f (∆µ) of pitch-angle cosine variations calculated for various values of the particle energy E ranging in the interval 0.1 MeV ≤ E ≤ 3 × 10 3 MeV.The cases E = 0.1, 0.2, 0.3, 0.5 MeV are shown in the inset.All distributions are calculated for α = 75 • and β = 90 • , corresponding to a relatively deep magnetic reversal (Fig. 1).
In the case where E = 0.1 MeV, the distribution f (∆µ) is strongly peaked around the value ∆µ = 0, indicating that the pitch-angle of each particle is almost unchanged when crossing the SB: µ 1 ≃ µ 0 .This behaviour is a consequence of the conservation of the magnetic moment, µ B = m p v 2 ⊥ /(2B) ≃ const, which is satisfied when the Larmor radius is much smaller than the RD width.As the magnetic field intensity B is uniform in our configuration, the above condition implies v ⊥ ≃ const.Moreover, as v = const, it follows that also v || ≃ const.Therefore, µ = v || /v remains approximately constant in time.
With increasing particle energy E from 0.1 MeV to 0.5 MeV, the width of the distribution f (∆µ) gradually increases, indicating that magnetic moment conservation is progressively lost.Further increasing E, the distribution f (∆µ) broadens until it covers almost all of the allowed interval −2 ≤ ∆µ ≤ 1 at E = 10 MeV.This feature is found up to energies E ∼ 100 MeV, corresponding to ρ max ∼ 10.Therefore, when the Larmor radius varies between the width ∆x of the RDs up to the width 2x c of the SB, particles undergo a very significant pitch-angle scattering.
Further increasing the energy E leads to the opposite behaviour: the distributions f (∆µ) at E = 10 3 MeV and E = 3×10 3 MeV become increasingly peaked around ∆µ = 0.This regime corresponds to ρ max ≫ 2x 0 .Therefore, when the Larmor radius is much larger than the SB width, particles 'jump' across the SB, remaining much less affected than at lower energies.We conclude that the regime of maximum pitch-angle scattering corresponds to ρ max in between the RD width and the SB width.The distribution g(µ 1 ) of the final pitch-angle cosine is shown in the bottom panel of Fig. 5 for different values of the particle energy in the range 0.1 MeV ≤ E ≤ 3 × 10 3 MeV.The cases E = 0.1, 0.2, 0.3, 0.5 MeV are shown in the inset.At low energies, the distribution g(µ 1 ) is very close to the initial pitchangle cosine distribution, and is almost constant in the range 0 µ 1 1.By increasing E, g(µ 1 ) starts to depart from a constant profile.This is consistent with the behaviour of f (∆µ) shown in the inset of the upper panel.For intermediate energies, a relevant population of reflected particles, characterised by µ 1 < 0 is present.This is particularly evident in the distribution at E = 10 MeV (purple curve, corresponding to ρ max comprised between the RD and the SB widths) where, after crossing the SB, particles focus in two beams, respectively almost parallel and anti-parallel to the magnetic field direction.Reflected particles are less copious at lower and higher energies.
The abundance of particles reflected by the SB can be considered as one of the possible measures of the effectiveness of the SB in affecting particle propagation.Figure 6 shows the fraction N refl /N tot of reflected particles over the total particle number N tot in the energy range 1 MeV ≤ E ≤ 10 4 MeV and for two values of the SB width: 2x c = 10 and 2x c = 30.Both curves correspond to β = 90 • , α = 60 • , and ∆x = 1.As expected, we see that the fraction of reflected particles is more relevant at intermediate energies, that is, for Larmor radii comprised between the RD width and the SB width.The fraction N refl /N tot reaches high values (around 60% − 70%) at energies E ∼ 30 MeV, corresponding to ρ max ∼ 5 − 6.When increasing the SB width, the energy range where particle reflection is relevant extends towards higher energies, and the maximum fraction N refl /N tot slightly increases.We also note that, at low energies (E 10 MeV), the two curves corresponding to different SB widths are superposed.This indicates that in the low-energy regime, particle dynamics is mainly regulated by their interaction with the two RDs.Instead, at higher energies, the effect of the entire SB width becomes more relevant and the two curves deviate from each other.It is interesting to notice that a secondary peak at high energies is visible in both curves in Fig. 6: we reserve the investigation of this feature to a future study.

Particle dynamics and chaos
The presence of a fine structure is apparent in the final pitchangle cosine distribution g(µ 1 ) (Figs. 4 and 5).We verified that those features do not change when increasing the number N tot of particles and therefore cannot be ascribed to noise caused by insufficient counting statistics.Instead, they are related to a complex particle dynamics that generates structures and deterministic chaos in the phase space, as deeply discussed in Paper I. Indeed, in the SB model, we also observe significant variations in the final particle pitch angle values as tiny variations of the particle initial conditions (in µ 0 and φ 0 ) are considered.
To illustrate the chaotic behaviour, in Fig. 7 we plot the final pitch-angle cosine µ 1 as a function of the initial gyrophase φ 0 for a fixed value of the initial pitch-angle cosine, µ 0 = 0.5, and for β = 90 • , α = 60 • , and E = 1 MeV.In panel (a) the whole range 0 ≤ φ 0 ≤ 360 • is represented.For almost the whole interval, µ 1 > 0, which corresponds to forward-moving particles, and µ 1 has a smooth dependence on the initial gyrophase φ 0 .However, some subranges are present where µ 1 as a function of φ 0 shows very fast variations and can take negative values, corresponding to back-reflected particles.A zoom onto one of these subranges is shown in Fig. 7((b); indicated by two vertical red lines in panel (a)), where a structure similar to that in Fig. 7(a) is visible at a smaller scale; namely, a succession of subdomains where µ 1 (φ 0 ) has either a smooth or a rapidly changing behaviour.Further progressive enlargements of such subdomains plotted in Figs.7(c) and 7(d) display the same behaviour at increasingly small scale.Similar properties have been found in the dynamics of energetic particles propagating across a single RD (Paper I).
To illustrate the extreme sensitivity of the particle dynamics to initial conditions in the chaotic regions, Fig. 8 reports the trajectories of three particles -denoted A, B and C-that are injected with µ 0 = 0.5 and φ 0A = 143.491270• , φ 0B = 143.491275• and φ 0C = 143.491348• .Trajectories are projected onto the xy plane.The positions of the two RDs are indicated by red dashed lines.The values of the other parameters are the same as in Fig. 7. Though the initial conditions are very close to one another (the relative difference in the initial gyrophases is 5 × 10 −7 ), the subsequent time evolution is completely different.In particular, particle A enters the SB crossing the first RD and reaches the second RD.It then remains trapped for a certain time inside the second RD, finally exiting from the opposite side.Particle trapping inside RDs was also demonstrated in Paper I. It can be noticed that the final pitch-angle of particle A is very different from the initial one.Particle B, which has an initial gyrophase very close to that of particle A (|φ 0B −φ 0A |/φ 0B = 3.5×10 −8 ), initially behaves in a similar way to particle A, until it is trapped inside the second RD.However, particle B subsequently exits the RD, moving back in the negative-x direction; it then crosses the first RD again, permanently exiting the SB.Therefore, particle B is classified as a reflected particle.The dynamics of particle C is even more complex: it crosses the first RD, reaches the second one, and is then reflected back towards the first.Here, it experiences a further reflection in the positive x direction.Finally, it crosses the second RD leaving the SB.Therefore, though particle C is not classified as a reflected particle (µ 1 > 0), its dynamics includes multiple reflections inside the SB.These different particle time evolutions, that is, reflected, trapped, and transmitted, may be compared with those reported in Fig. 1 of Moraal (2013), and the values of the initial conditions of the trajectories in Fig. 8 show that it is very difficult to devise a priori the behaviour of a particle interacting with a SB.
Finally, we notice that the presence of chaos in specific regions of the (µ 0 , φ 0 ) plane implies that in those regions the calculation of single-particle evolution becomes sensitive to details of the numerical method.For instance, the trajectories shown in Fig. 8 change when changing the time step.This is an unavoidable aspect of chaotic dynamics.However, we verified that the A&A proofs: manuscript no.46990_final distributions f (∆µ) and g(µ 1 ) shown in Figs. 4 and 5 remain unchanged when reducing the time step.Therefore, from a statistical point of view, our results are not sensitive to the numerical method.

Conclusions
We studied the dynamics of energetic charged particles in a nonuniform magnetic field B, which represents a simplified model of a magnetic SB.Recent measurements performed by spacecraft, such as PSP and SolO, revealed that SBs are commonly present in the inner heliosphere.Those structures can affect the transport of energetic particles.Our model emphasises relevant features characterising B in SBs, namely the presence of abrupt B rotations (RDs) limiting the SB and a nearly uniform magnetic field intensity |B|.The model depends on some parameters, in particular the obliquity angle α and the rotation angle β; a magnetic field reversal from outside to inside the magnetic structure is obtained for large values of α and for β ∼ 90 • .The evolution of mono-energetic populations of particles impinging on the SB has been studied numerically by employing a symplectic inte-grator for the solution of relativistic motion equations.Energy conservation implies a possible exchange between parallel and perpendicular energy, which generates pitch-angle scattering.
Results have been characterised by calculating the distributions of the variations of the pitch-angle cosine f (∆µ) and of the final pitch-angle cosine g(µ 1 ) for uniformly distributed initial values µ 0 .In Paper I, where the effect of a single RD is examined, we found a relevant pitch-angle scattering when the particle Larmor radius ρ is comparable to the RD thickness ∆x.Similarly, in the present model, we find a relevant pitch-angle scattering for values of ρ comprised within the interval ρ ∼ ∆x up to ρ 2x c , with 2x c being the SB width.Moreover, for ρ ≪ ∆x, the conservation of both magnetic moment µ B and energy E implies near constancy of µ.On the other hand, when ρ ≫ 2x c , our model indicates a low level of pitch-angle scattering; when the particle Larmor radius is much larger than the SB width, the associated magnetic field inhomogeneity does not modify the particle pitch angle in a significant way.The latter result is analogous to the observation of adiabatic motion for energetic particles at oblique and quasi-perpendicular shock waves when particle gyroradii are much larger than the shock thickness, with a very small difference between the magnetic moment of a particle before and after a single shock encounter (Whipple et al. 1986;Decker 1988).
For the parameter values used in the present model, the most relevant effect of the SB on the particle dynamics is in the energy interval 1 MeV E few GeV.With this range, wide distributions f (∆µ) of the variation of the pitch-angle cosine have been found, covering the whole interval −2 ∆µ 1, mostly for energies E ∼ 10 − 100 MeV.Moreover, the width of f (∆µ) tends to increase with increasing depth of the magnetic reversal.In the same energy interval, we find a population of reflected particles that constitute up to ≃ 70% of the total particle population.
Therefore, our results indicate the existence of a regime of intermediate energy E (or Larmor radii) where the effects of the SB on the particle dynamics is particularly relevant.For lower or higher energies, particles are much less affected by the SB.This is partly in agreement with the findings of Bandyopadhyay et al. (2021) from their analysis of high-energy particles as detected by the EPI-Lo instrument on board PSP, where the ion flux was not changing from antisunward to sunward within the SB for particles with gyroradii comparable with the SB size.In our model, large pitch-angle changes tend to be reduced for particles with gyroradii larger than the SB width.However, in our model, we checked the pitch-angle variations upstream of the discontinuity, not through it, and the magnetic field value is different from the dataset analysed in Bandyopadhyay et al. (2021); comparisons should therefore be made with caution.
Of course, the values of the energy E quoted above can vary when the values of the parameters characterising the model are changed.In particular, we considered a SB width of 2x c = 10 − 30 (in normalised units), which corresponds to a crossing time t c = 280 − 840 s (assuming ℓ = 9.52 × 10 3 km and v S W = 340 km s −1 ).Indeed, an analysis of SB duration has shown that the SB width can vary by about two orders of magnitude, in the interval t c ∼ 10 2 − 10 4 s (Pecora et al. 2022).Therefore, we expect that the regime where the effect of a SB on particles is relevant can be found at different energies according to both the SB width and the RD thickness.
The presence of chaos is another feature of the dynamics of particles propagating across a RD (see Paper I).This property has also been found in our SB model.In particular, there are regions in the space of initial condition, where very small variations in the particle initial condition lead to completely different trajectories.In those regions, we verified that particles start-ing with the same pitch angle go beyond the SB, are reflected back, or undergo multiple reflections between the RDs as a consequence of variations in the initial gyrophase by an amount as small as ∼ 5 × 10 −5 %.Such extreme sensitivity to initial conditions is one of the features that characterises a chaotic dynamics .Chaotic regions are mostly concentrated at large initial pitch angles, but they can also be found at lower pitch angles, especially when the fraction of reflected particles N refl /N tot is large.Therefore, values of energy (or Larmor radius) giving rise to a more relevant effect of SB on particles also correspond to larger chaotic regions in the initial condition space.In this connection, we recall that the presence of chaotic scattering regions in phase space can influence not only particle propagation but also processes such as magnetic reconnection (Buechner & Zelenyi 1987, 1989).
We note that the pitch-angle scattering resulting from the interaction between particles and a SB described here is different from the perturbative, small-angle scattering considered in diffusion theories, because large-angle scattering is often prevailing, as shown in Fig. 5. Indeed, the probability distribution functions of pitch-angle variations are far from bell-shaped functions.Also, the particle reflection process is different from magnetic mirroring, because the amplitude of the magnetic field is constant and the fraction of reflected particles also depends on energy, as shown in Fig. 6 Our results show that the interaction of energetic particles with magnetic SB can have a number of consequences.For instance, if a solar energetic particle (SEP) event is impinging on a SB, which is ahead of the energetic particles, that is, is farther away from the Sun, a large number of these particles can be scattered back towards the Sun, meaning that the intensity of SEPs beyond the SB will be decreased, giving rise to possible dropouts in the energetic particle fluxes.We note that, according to Figure 6, the energy range in which a dropout is expected can be predicted if the SB width is obtained from the measured SB duration and the solar wind speed.At the same time, transmitted particles may become more field aligned, as shown by the distribution of final pitch-angle cosines in Figures 4 and 5.It would be interesting if this could be checked in spacecraft measurements, looking at the particle (ions and electrons) fluxes sampled at different pitch-angles.We believe that with multi-spacecraft observations it should be possible to check these properties, if simultaneous SEP measurements by magnetically connected spacecraft on both sides of a SB are available.
Another consequence is related to the fact that SBs increase pitch-angle scattering for the range of energies outlined above, and in particular they increase large pitch-angle scattering: this can have an influence on the processes of Fermi acceleration, both first and second order, because, as we show here, a SB can reflect particles very efficiently.In some sense, SBs can act as magnetic mirrors, even if the magnetic field magnitude is constant.We propose that these effects should be taken into account when studying energetic particle propagation and acceleration.
where B 0 = 1 in normalised units.The above two conditions imply that |B ⊥ | = const, where B ⊥ (x) = B y (x)e y + B z (x)e z Malara et al.: Energetic particles in switchbacks Radial component B r is plotted as a function of x, for β = 90 • and α = 30 • , 45 • , 60 • , and 75 • .The radial component reverts its sign in the central region for α > 45 • .
while the 'radial' magnetic field component is B r (x) = B(x) • e r .In Fig.1the profile of B r is plotted as a function of x for β = 90 • and various values of the obliquity angle α.The figure illustrates the two RDs located at x = ±x c = ±5.It can be seen that, for β = 90 • , a magnetic field reversal inside the central region is attained only for values α > 45 • .Strictly speaking, our model can represent a SB only if the magnetic reversal is actually present, that is, if the condition B r (x = 0) < 0 is satisfied.In Fig.2, the value of B r (x = 0) is plotted as a function of the angles β and α.The magnetic reversal is verified in a region of the (β, α) plane located around β ∼ 90 • and α 45 • .In

Fig. 2 .
Fig.2.B r (x = 0) as a function of the angles β and α.The condition B r (x = 0) < 0, corresponding to a magnetic reversal, is verified inside the blue/black coloured region limited by the black line.

Fig. 3 .
Fig.3.Larmor radius ρ max , corresponding to µ = 0, is plotted as a function of the particle energy E.

Fig. 6 .
Fig. 6.Fraction N refl /N tot of reflected particles plotted as a function of the particle energy E for two values of SB width: 2x c = 10 and 2x c = 30.Both curves correspond to β = 90 • , α = 60 • , and ∆x = 1.The values of ρ max are indicated in the top horizontal axis for reference.

Fig. 8 .
Fig. 8. Trajectories of three particles (particle A: top panel; particle B: middle panel; particle C: bottom panel) projected onto the xy plane.Each particle starts with a slightly different initial gyrophase φ 0 , the value of which is indicated in each panel, while the initial pitch-angle cosine is the same for the three particles (µ 0 = 0.5).The values of the parameters β, α, and E are the same as in Fig.7.The positions of the two RDs are indicated by red dashed lines.