## 1. Introduction

In typical heliospheric collisionless shocks most of the mass, momentum and energy are carried by ions. Therefore, the shock structure should be most affected by ions. In sufficiently low-Mach-number shocks, all or almost all ions cross the shock from the upstream region to the downstream region and proceed further without return (directly transmitted ions). In these shocks ion heating is due to the gyration of directly transmitted ions (Gedalin Reference Gedalin1997, Reference Gedalin2021) and the downstream magnetic structure, including moderate overshoot, is due to the non-gyrotropy of the downstream ion distributions. This non-gyrotropy causes spatially quasi-periodic variations of the total, dynamic and kinetic, pressure of ions, and corresponding variations of the magnetic pressure in the opposite phase (Balikhin *et al.* Reference Balikhin, Zhang, Gedalin, Ganushkina and Pope2008; Gedalin, Friedman & Balikhin Reference Gedalin, Friedman and Balikhin2015). With the increase of the Mach number, ion reflection becomes progressively more and more important, and the contribution of reflected–transmitted ions to ion heating is substantial (Sckopke *et al.* Reference Sckopke, Paschmann, Bame, Gosling and Russell1983; Scudder *et al.* Reference Scudder, Aggson, Aggson, Mangeney, Lacombe and Harvey1986; Sckopke *et al.* Reference Sckopke, Paschmann, Brinca, Carlson and Luehr1990). For a long time, ion reflection was described in the convenient but physically not feasible approximation of specular reflection (Gosling *et al.* Reference Gosling, Thomsen, Bame, Feldman, Paschmann and Sckopke1982). Specular reflection assumes that an ion with the bulk flow velocity is instantly reflected by a potential wall in such a way that the normal component of the ion velocity flips while the others do not change. The above description implies working in the normal incidence frame (NIF), in which the incident plasma flow velocity (upstream velocity) is along the shock normal. The specular reflection approximation has been used for years and is still often used for observational estimate of the shock speed and conversion of time in the spacecraft frame to a spatial coordinate system (Gosling & Thomsen Reference Gosling and Thomsen1985). In reality, ions should enter the shock transition where the magnetic field increases and the cross-shock potential builds up (Morse Reference Morse1973; Formisano Reference Formisano1982; Schwartz *et al.* Reference Schwartz, Douglas, Thomsen and Feldman1987, Reference Schwartz, Thomsen, Bame and Stansberry1988; Dimmock *et al.* Reference Dimmock, Balikhin, Krasnoselskikh, Walker, Bale and Hobara2012; Cohen *et al.* Reference Cohen, Schwartz, Goodrich, Ahmadi, Ergun, Fuselier, Desai, Christian, McComas and Zank2019) before the normal component of their velocity drops to zero and changes sign. It was shown, theoretically and observationally (Sckopke *et al.* Reference Sckopke, Paschmann, Bame, Gosling and Russell1983; Gedalin Reference Gedalin1996, Reference Gedalin2016) that ion reflection is essentially non-specular. This has been shown already in early simulations (Burgess, Wilkinson & Schwartz Reference Burgess, Wilkinson and Schwartz1989) but remained unnoticed. It was shown recently (Balikhin & Gedalin Reference Balikhin and Gedalin2022) that the widely used expression of Gosling & Thomsen (Reference Gosling and Thomsen1985) overestimates the actual excursion of the reflected ions along the shock normal by a factor of two. This has to be taken into account when converting spacecraft measurements of the magnetic field as a function of time to the spatial dependence of the magnetic field.

Present focus in the studies of ion reflection by shocks is mainly on the energies the ions can achieve (see, e.g. Trattner *et al.* Reference Trattner, Fuselier, Schwartz, Kucharek, Burch, Ergun, Petrinec and Madanian2023), on the ion phase space holes (see, e.g. Wang *et al.* Reference Wang, Vasko, Artemyev, Holley, Kamaletdinov, Lotekar and Mozer2022), on the observations of multiple ion phase space holes as a rippling signature (Johlander *et al.* Reference Johlander, Vaivads, Khotyaintsev, Gingell, Schwartz, Giles, Torbert and Russell2018) and on the role of reflected ions in rippling formation (Lowe & Burgess Reference Lowe and Burgess2003; Moullard *et al.* Reference Moullard, Burgess, Horbury and Lucek2006; Burgess & Scholer Reference Burgess and Scholer2007; Johlander *et al.* Reference Johlander, Schwartz, Vaivads, Khotyaintsev, Gingell, Peng, Markidis, Lindqvist, Ergun and Marklund2016; Gingell *et al.* Reference Gingell, Schwartz, Burgess, Johlander, Russell, Burch, Ergun, Fuselier, Gershman and Giles2017; Omidi *et al.* Reference Omidi, Desai, Russell and Howes2021). The motion of the reflected ions is not studied in detail, which is understandable, since neither observations nor simulations follow individual ion trajectories but measure ions appearing at a certain position and/or time, without precise knowledge of where they came from.

Shock structure depends, in general, on the angle $\theta _{Bn}$ between the shock normal and the upstream magnetic field vector. Most quasi-perpendicular shocks, $\theta _{Bn}>45^\circ$, have a clear structure where the steepest magnetic field increase, the ramp, is followed by an overshoot, undershoot and possibly more coherent magnetic oscillations (Bale *et al.* Reference Bale, Balikhin, Horbury, Krasnoselskikh, Kucharek, Möbius, Walker, Balogh, Burgess and Lembège2005). Quasi-parallel shocks, $\theta _{Bn}<45^\circ$, often have a less regular and more extended transition with no clear ramp and overshoot (Burgess *et al.* Reference Burgess, Lucek, Scholer, Bale, Balikhin, Balogh, Horbury, Krasnoselskikh, Kucharek and Lembège2005). This is, however, not a rule. In many cases, a quasi-parallel shock has a clear magnetic profile with the same structural elements as in quasi-perpendicular shocks. An example is shown in figure 1. This shock crossing is taken from the database of the Magnetospheric MultiScale (MMS) shock crossings (Lalti *et al.* Reference Lalti, Khotyaintsev, Dimmock, Johlander, Graham and Olshevsky2022). The shock angle is determined in the database as $\theta _{Bn}\approx 32^\circ$, well within the quasi-parallel range. The black line shows the magnetic field magnitude measured in the fast mode, 16 vectors per sec. The high temporal resolution of measurements reveals plenty of fluctuations/small-scale structure. The thin red line shows the magnetic profile with the small-scale fluctuations and structure removed. The removal is done by applying wavelet transform with the Daubechies 10 wavelet, removing the 7 finest levels of the total 13 levels and applying the inverse transform. The denoised profile exhibits the basic elements of the shock profile of a typical quasi-perpendicular shock. Note that the wavelet transform smooths the transition from the foot to the ramp. In what follows, our discussion refers to the shocks with a well-defined structure (after removal of small-scale fluctuations/structure), like the one shown in figure 1.

After being reflected, ions gyrate in the upstream magnetic and electric field ahead of the shock transition before coming to the shock again and crossing it toward downstream, thus becoming a reflected–transmitted ion population. The distance between the reflection point and the re-entry point may well exceed the width of the shock transition. Thus, the whole process is non-local in space. This non-locality is known and was used for explanation of the foot formation (Woods Reference Woods1971; Leroy *et al.* Reference Leroy, Winske, Goodrich, Wu and Papadopoulos1982) as well as for the mechanism of shock drift acceleration by multiple reflection (see, e.g. Zank *et al.* Reference Zank, Pauls, Cairns and Webb1996). In both cases only the reflected ion motion in the direction of the NIF motional electric field is of interest. The motional electric field is in the direction perpendicular to the shock normal and to the upstream magnetic field vector. However, the reflected ions move also in the direction of the magnetic field. If the shock is planar and stationary, there seem to be no other implications of the non-locality, because of the translational invariance along the shock front. However, at large Mach numbers, shocks are expected to become rippled (Lowe & Burgess Reference Lowe and Burgess2003; Moullard *et al.* Reference Moullard, Burgess, Horbury and Lucek2006; Burgess & Scholer Reference Burgess and Scholer2007; Lobzin *et al.* Reference Lobzin, Krasnoselskikh, Musatenko and Dudok de Wit2008; Ofman & Gedalin Reference Ofman and Gedalin2013; Burgess *et al.* Reference Burgess, Hellinger, Gingell and Trávníček2016; Johlander *et al.* Reference Johlander, Schwartz, Vaivads, Khotyaintsev, Gingell, Peng, Markidis, Lindqvist, Ergun and Marklund2016; Gingell *et al.* Reference Gingell, Schwartz, Burgess, Johlander, Russell, Burch, Ergun, Fuselier, Gershman and Giles2017; Johlander *et al.* Reference Johlander, Vaivads, Khotyaintsev, Gingell, Schwartz, Giles, Torbert and Russell2018; Omidi *et al.* Reference Omidi, Desai, Russell and Howes2021). If this is the case, an ion which is reflected at some position at the shock front re-enters the shock transition, which may have different parameters. On the other hand, if a perturbation occurs at some shock position, ions, which are reflected at this position, convey this perturbation to a quite another position on the shock front. In the absence of translational invariance on a rippled surface, this may cause a stabilizing effect or instability. Thus, knowledge of the dependence of the shift of a reflected ion between the reflection and re-entry points is important to understanding of rippling development and for interpretation of observations. The latest hybrid simulations (Burgess *et al.* Reference Burgess, Hellinger, Gingell and Trávníček2016; Omidi *et al.* Reference Omidi, Desai, Russell and Howes2021) suggest that rippling is generated by the instability between the reflected ions and the background plasma, and that the direction and speed of ripple propagation is determined by the reflected ion velocity in the turnaround point. The direction of the shift between the reflection point and the re-entry point is consistent with this velocity. In the present paper, we use test particle analysis in a model shock to study the non-locality of ion reflection and corresponding ion distributions within the shock transition. Such test particle analyses are actually an extension of the theory on systems where the equations of motion cannot be solved analytically. Modelling of the shock profile is a necessary part of any theoretical investigation and allows us also to extract information from observations (Gedalin *et al.* Reference Gedalin, Golbraikh, Russell and Dimmock2022). Although test particle analysis is sometimes considered inferior compared with sophisticated self-particle simulations, it has the advantage of controlling each parameter separately, which allows us to determine multi-parameter dependencies. The spatial resolution is not limited by any grid cell size and each particle trajectory can be easily followed. The method has already demonstrated its efficiency. As an example, it has been used to explain the downstream magnetic oscillations as a response to non-gyrotropy of gyrating downstream ion distributions, which was later confirmed by hybrid simulations and detailed observations (Balikhin *et al.* Reference Balikhin, Zhang, Gedalin, Ganushkina and Pope2008; Ofman *et al.* Reference Ofman, Balikhin, Russell and Gedalin2009; Pope, Gedalin & Balikhin Reference Pope, Gedalin and Balikhin2019). As another example, the influence of $\alpha$-particles on the shock structure was first elucidated using the test particle analysis and later supported by simulations (Gedalin Reference Gedalin2017, Reference Gedalin2019; Ofman *et al.* Reference Ofman, Koval, Wilson III and Szabo2019). Test particle analysis has been used recently for studies of pickup ion acceleration at the shock front (Zirnstein *et al.* Reference Zirnstein, Kumar, Bandyopadhyay, Dayeh, Heerikhuisen and McComas2021). In the present study, we focus on the dependence of the direction and magnitude of the shift of a reflected particle along the shock front, without taking into account possible non-planarity or time dependence of the shock.

## 2. The model

We adopt a simple model including overshoot

Here, the magnetic field is normalized on the upstream magnetic field $B_u$. All coordinates and lengths are normalized on the upstream convective gyroradius, $V_u/\varOmega _u$, where $V_u$ is the plasma speed in NIF, and $\varOmega _u=eB_u/m_pc$ is the upstream proton gyrofrequency, where *e* is the proton charge and *m _{p}* is the proton mass. The related upstream ion inertial length is $c/\omega _{pi}$, where $\omega _{pi}=\sqrt {4{\rm \pi} e^2n_u/m_p}$ is the upstream proton plasma frequency, and $n_u$ is the upstream proton number density. The Alfvénic Mach number is defined as usual, $M_A=V_u/v_A$, where the Alfvén speed is $v_A=B_u/\sqrt {4{\rm \pi} n_um_p}$. In the above expressions the angle $\theta _{Bn}$ between the shock normal and the upstream magnetic field is used. The expression (2.1) describes a monotonic increase of the main magnetic field, $B_z$, across the shock front, while (2.2) adds an overshoot. The magnetic compression is given by

The relation of the non-coplanar component $B_y$ approximately follows the theoretical analysis (Gedalin Reference Gedalin1998) and was successfully applied to observational analysis (Gedalin *et al.* Reference Gedalin, Golbraikh, Russell and Dimmock2022). The electric field is normalized on $V_uB_u/c$. The coefficients $k_E$ and $k_B$ are found from the condition on the cross-shock potential

The subscript ${\rm HT}$ means de Hoffman–Teller frame, which is the shock frame where the upstream plasma flow is along the upstream magnetic field. The parameters $\theta _{Bn}$, $B_d/B_u$, $R_{{\rm add}}$, $s_{{\rm NIF}}$, $s_{{\rm HT}}$, $D$, $c_l$, $c_r$, $w_l$ and $w_r$ completely define the planar stationary shock profile used in the analysis. In the present study we fix the following parameters: $M_A=6$, $B_d/B_u=3$, $R_{{\rm add}}=1$, $s_{{\rm NIF}}=0.4$, $s_{{\rm HT}}=0.1$, $D=2/M$, $w_l=D$, $w_r=3D$, $c_l=0.5D$, $c_r=0.5D$. The incident ion distribution is Maxwellian with $\beta _i=8{\rm \pi} n_uT_{iu}/B_u^2=1$. The shock angle is varied. Figure 2 illustrates the magnetic field given by (2.1)–(2.6), for the same $B_d/B_u$, $R_{{\rm add}}$ and $D$, for two different shock angles, $\theta _{Bn}=60^\circ$ (a quasi-perpendicular shock) and $\theta _{Bn}=40^\circ$ (a quasi-parallel shock). In the quasi-parallel shock the non-coplanar component $B_y$ is significant and even becomes larger than $B_z$ in a small region, which results in the appearance of a small peak inside the ramp on the profile of the magnetic field magnitude. Ions are not sensitive to such small details of the shock profile.

## 3. Results

We trace 320 000 initially Maxwellian distributed ions across the shock by solving the equations of motion in the model fields. Figure 3 shows $x$ vs $v_x$ for reflected ions only, together with the magnetic field magnitude, for $\theta _{Bn}=75^\circ$. The red line marks the coordinate $x=0$ at which the distributions shown below are derived. Note that the ions are reflected after the ramp but before the maximum of the overshoot. This means that the reflection is due to the combined effect of the deceleration by the cross-shock electric field and deflection by the increasing magnetic field (Gedalin *et al.* Reference Gedalin, Dimmock, Russell, Pogorelov and Roytershteyn2023).

Figure 4 shows two-dimensional cuts, $v_x-v_y$ and $v_x-v_z$, of the three-dimensional distribution function of all ions crossing the position $x=0$ in any direction. The black arrow marks the population of directly transmitted ions. The blue arrow marks the ions which are reflected, that is, move toward upstream at this position. The red arrow marks the reflected–transmitted ions, that is, the ions which were reflected, gyrated in the upstream and are crossing again the shock toward downstream. In the $v_x-v_y$ cut the three populations are clearly distinct, in the $v_x-v_z$ cut there is substantial overlap of directly transmitted and reflected–transmitted populations.

Figure 5 shows the $y$ and $z$ positions of the ions crossing the shock at $x=0$. The reflected–transmitted ion population is significantly shifted along $y$, by one ion convective gyroradius and more, with a substantial dispersion of their $z$-coordinates.

Figure 6 shows $x$ vs $v_x$ for reflected ions only, together with the magnetic field magnitude, for $\theta _{Bn}=60^\circ$, and it is rather similar to figure 3. Note that the magnetic field in the overshoot maximum is slightly smaller in this case. The left panel of figure 7 is similar to the left panel of figure 4. The right panel shows that reflected–transmitted ions acquire larger negative $v_z$ for $\theta _{Bn}=60^\circ$ than for $\theta _{Bn}=75^\circ$. The three panels of figure 8 show $y$ and $z$ coordinates of ions crossing the plane $x=0$, similarly to figure 5, but for three different values of the cross-shock potential, $s=0.3, 0.4, 0.5$. The value of the cross-shock potential affects the dispersion of the positions but the position of the maximum is affected only weakly. This maximum is at $\Delta y\approx 1.2$, $\Delta z\approx -0.5$ for $s=0.4$, so that the ions are moving at the angle $\approx 65^\circ$ to the main magnetic field $B_z$. For larger $s$ the maximum is slightly farther from the coordinate origin, for smaller $s$ it is slightly closer. The $z$-coordinates of the reflected–transmitted ions experience a systematic shift toward negative values.

Figure 9 illustrates the effect of the magnetic compression and overshoot strength. For the lower magnetic field ion reflection is substantially weaker but the effect of the maximum of the position is not noticeable.

In what follows we present the results of ion tracing in the model shock front for two smaller angles (Figures 10–17). The tracing procedure and the analysis are the same as for the two previous cases. The set of figures for $\theta _{Bn}=50^\circ$ is similar to that for $\theta _{Bn}=75^\circ$, while for $\theta _{Bn}=40^\circ$ we show also the effects of $s$ and $B_d/B_u$ and $R_{{\rm add}}$, as is done above for $\theta _{Bn}=60^\circ$. Variation of these parameters affects mainly the dispersion in the positions of the ions but only weakly affects the position of the maximum. There is further shift of the re-entry point in the $z$-direction. The major difference from the cases of larger angles is the appearance of backstreaming ions. These ions are produced by multiple reflection, as shown in figure 11. In all cuts these backstreaming ions are indicated with a green arrow. The number of backstreaming ions seems to increase with the decrease of the shock angle, at the expense of the reflected–transmitted ions.

Reduction of the magnetic field does not affect the position of the two maxima for $\theta _{Bn}=40^\circ$. For $s=0.4$ these maxima are at $\Delta y\approx 1.6$ and $\Delta z\approx -1.2$ for reflected–transmitted ions, and $\Delta y\approx 1.2$ and $\Delta z\approx -2.5$ for multiply reflected (backstreaming) ions. The maxima move closer to the coordinate origin for smaller $s$ and farther from it for larger $s$. The angle between $\Delta \boldsymbol {r}=(\Delta y,\Delta z)$ and $B_z$ is $\approx 53^\circ$.

## 4. Conclusions

Ion reflection at a collisionless shock front is a manifestly non-local process: the distance between the reflection point of an ion and the re-entry point of this ion into the shock transition is substantial and exceeds the upstream ion convective gyroradius. For quasi-perpendicular shocks the shift between the two points is mainly in the direction perpendicular to the magnetic field. For quasi-parallel shocks the shift in the perpendicular direction is similar to the shift in quasi-perpendicular shocks. It is accompanied by the shift in the direction opposite to the magnetic field direction. The latter parallel shift may significantly exceed the perpendicular shift. In a planar stationary shock this non-locality may seem of no importance because of the translational symmetry along the shock front. This is, however, not true. Increase of $B_z$ ahead of the shock, the magnetic foot, is related to the current in the $y$-direction produced by the motion of reflected ions in this direction. For smaller shock angles the motion of reflected ions in the $z$-direction may become more substantial than in the $y$-direction, so that a current in the $z$-component is produced which should cause appearance of nonzero $B_y$ in the foot.

Non-locality should be taken into account when interpreting observations. In multi-spacecraft missions different probes often observed different magnetic profiles. Distributions of reflected ions measured by a probe may have been produced at a shock crossing with parameters different from those at the measurement position.

Non-locality may be related to the development of rippling since a perturbation at one site is conveyed along the shock front by the reflected ions. If, for example, an overshoot increases at some site, ion reflection is enhanced at this site (Gedalin *et al.* Reference Gedalin, Dimmock, Russell, Pogorelov and Roytershteyn2023). A larger number of reflected ions enter the shock at a certain distance from the perturbed site. Higher ion pressure there would cause decrease of the overshoot, because of the momentum conservation, that is, the pressure balance. At this stage we are unable to quantify this possible instability. However, if it occurs, we can estimate the velocity of ripples as $\boldsymbol {V}_{{\rm ripple}}\sim \varOmega \Delta \boldsymbol {r}/{\rm \pi}$, where $\Delta \boldsymbol {r}$ is the vector from the reflection point to the re-entry point of the reflected–transmitted ions and we estimate that this motion occurs roughly during half of the upstream gyroperiod, ${\rm \pi} /\varOmega _u$. The latter gives an estimate of the surface wave (rippling) period. Accordingly, the wavelength may be estimated as $\sim | \Delta \boldsymbol {r}|$. For our $\theta _{Bn}=60^\circ$ case this estimate gives $V_{{\rm ripple}} \approx 0.4 V_u$ at $\approx 65^\circ$ to $B_z$. For the $\theta _{Bn}=40^\circ$ case we have $V_{{\rm ripple}} \approx 0.65 V_u$ at $\approx 53^\circ$ to $B_z$.

Johlander *et al.* (Reference Johlander, Schwartz, Vaivads, Khotyaintsev, Gingell, Peng, Markidis, Lindqvist, Ergun and Marklund2016) report MMS observations of a rippled shock with $\theta _{Bn}=83^\circ$ and $M=4.2$. The rippling wavelength was estimated as $\approx V_u/\varOmega _u$ (one in our dimensionless units) and the speed was estimated as $\sim 0.3 V_u$. The propagation angle could not be determined. Burgess *et al.* (Reference Burgess, Hellinger, Gingell and Trávníček2016) performed three-dimensional hybrid simulations of a rippled shock. Although their analysis was devoted to the waves in the foot, the figures there show that the wavelength of ripples is $\sim V_u/\varOmega _u$. The speed was estimated as $\sim 0.5 V_u$. Our estimates of the speed and wavelength are in better agreement with the values found in observations (Johlander *et al.* Reference Johlander, Schwartz, Vaivads, Khotyaintsev, Gingell, Peng, Markidis, Lindqvist, Ergun and Marklund2016) and three-dimensional hybrid simulations (Burgess *et al.* Reference Burgess, Hellinger, Gingell and Trávníček2016) than could be hoped for by the planar stationary model. Further comparison requires development of a more sophisticated model which would include rippling (Gedalin & Ganushkina Reference Gedalin and Ganushkina2022), and more three-dimensional simulations. Since the direction of the reflected ion motion is neither perpendicular nor parallel to the upstream magnetic field, two-dimensional simulations with the field in-plane or out-of-plane may suppress rippling or misestimate the rippling parameters. This has been shown in the comparison of two- and three-dimensional hybrid similations (Burgess *et al.* Reference Burgess, Hellinger, Gingell and Trávníček2016), where it is found that fluctuations carried by the reflected ions are coupled to fluctuations propagating along the magnetic field. Non-locality of the reflection process may be directly related to the cross-field component of the rippling. The coupling with the other component may arise due to the developing rippling which causes variation of the shock angle along the shock front. Even initially perpendicular shocks become locally oblique (Burgess *et al.* Reference Burgess, Hellinger, Gingell and Trávníček2016), so that the shift acquires component along the magnetic field. This issue is beyond the scope of this study and will be investigated separately.

In the cases $\theta _{Bn}=50^\circ$ and $\theta _{Bn}=40^\circ$ there appears a population of multiply reflected ions which eventually escape upstream. As long as the number of these ions is small relative to the number of the reflected–transmitted ions, the effect of the multiply reflected ions can be expected to be minor. With further decrease of the shock angle they may become progressively more important. If rippling is indeed related to the vector of the shift of reflected ions from the reflection point to the point of the re-entry into the shock, these ions may affect the rippling pattern by adding another wavelength or making the surface wave a wavepacket rather than a quasi-monochromatic wave. However, the main effect of the backstreaming ions may be causing instabilities ahead of the shock. Generated waves may drift toward the shock and interact with it, thus providing another mechanism of rippling generation (Hao *et al.* Reference Hao, Lu, Gao and Wang2016). Shocks, which are strongly affected by waves excited due to backstreaming ions, are not within the scope of the present study.

## Acknowledgements

*Editor Antoine C. Bret thanks the referees for their advice in evaluating this article.*

## Funding

The work was partially supported by the European Union's Horizon 2020 research and innovation programme under grant agreement No 101004131 (SHARP). Wavelab850 software has been used for wavelet denoising.

## Declaration of interests

The author reports no conflict of interest.