{'fraction_non_alphanumeric': 0.034564366271255774, 'fraction_numerical': 0.01880149593876001, 'mean_word_length': 4.513733387031817, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Magnetic-Island Contraction and Particle Acceleration in Simulated Eruptive Solar Flares

The mechanism that accelerates particles to the energies required to produce the observed high-energy impulsive emission in solar flares is not well understood. Drake et al. (2006) proposed a mechanism for accelerating electrons in contracting magnetic islands formed by kinetic reconnection in multi-layered current sheets. We apply these ideas to sunward-moving flux ropes (2.5D magnetic islands) formed during fast reconnection in a simulated eruptive flare. A simple analytic model is used to calculate the energy gain of particles orbiting the field lines of the contracting magnetic islands in our ultrahigh-resolution 2.5D numerical simulation. We find that the estimated energy gains in a single island range up to a factor of five. This is higher than that found by Drake et al. for islands in the terrestrial magnetosphere and at the heliopause, due to strong plasma compression that occurs at the flare current sheet. In order to increase their energy by two orders of magnitude and plausibly account for the observed high-energy flare emission, the electrons must visit multiple contracting islands. This mechanism should produce sporadic emission because island formation is intermittent. Moreover, a large number of particles could be accelerated in each magnetohydrodynamic-scale island, which may explain the inferred rates of energetic-electron production in flares. We conclude that island contraction in the flare current sheet is a promising candidate for electron acceleration in solar eruptions.


Introduction
The hard X-ray (HXR) and microwave radiation from solar flares is generally accepted to be emitted by nonthermal particles accelerated during the release of magnetic energy that powers the flare, when they interact with the ambient atmosphere. HXR emission is bremsstrahlung from accelerated electrons that lose their energy through collisions (Holman et al. 2011) and microwave emission is gyrosynchrotron from accelerated electrons that spiral the coronal magnetic field (White et al. 2011). On the other hand, extreme ultraviolet (EUV), coronal soft X-ray, and other secondary emissions result from the thermalization of flare energy in the ambient atmosphere (see reviews by Benz 2008;Fletcher et al. 2011). Therefore HXR and microwave flare observations, particularly during the initial impulsive phase, offer valuable clues about the physics of the particle-acceleration process (e.g., Holman et al. 2011). Decades of study have established that these emissions often are highly variable in time (e.g., Parks & Winckler 1969;Chiu 1970;Kane et al. 1983;Kiplinger et al. 1983Kiplinger et al. , 1984Machado et al. 1993;Aschwanden et al. 1995) and originate at both the tops and footpoints of coronal loops (Marsh & Hurford 1980;Hoyng et al. 1981;Masuda et al. 1994;Reznikova et al. 2009;Caspi & Lin 2010;Ishikawa et al. 2011). More recently, a second coronal source has been discovered above the loop-top coronal source Sui et al. 2004;Pick et al. 2005;Liu et al. 2008;Su et al. 2012;Liu et al. 2013).
In the standard model for eruptive two-ribbon solar flares (e.g., Carmichael 1964;Sturrock 1966;Hirayama 1974;Kopp & Pneuman 1976), the outward stretching of the magnetic structure that ultimately comprises the coronal mass ejection (CME) forms a vertical electric current sheet (CS) in the wake of the CME. Reconnection across this sheet (e.g., Sweet 1958;Parker 1963;Petschek 1964) drives Alfvénic outflows and shock waves, forms the flare arcade loops and the ejected CME flux rope, and relaxes the stressed system toward a lower-energy state. Although the original descriptions of the model posited a single reconnection site, numerous high-resolution studies of both kinetic and magnetofluid systems at high Lundquist number demonstrate that CSs develop multiple reconnection sites with strong spatial ("patchy") and temporal ("bursty") variability (e.g., Daughton et al. 2006Daughton et al. , 2014Drake et al. 2006b;Loureiro et al. 2007;Samtaney et al. 2009;Fermo et al. 2010;Uzdensky et al. 2010;Mei et al. 2012;Huang & Bhattacharjee 2012;Karpen et al. 2012;Cassak & Drake 2013;Shen et al. 2013). The plasmoids (also called magnetic islands in two dimensions) formed by reconnection can fragment, coalesce, or remain intact, as determined in part by the boundary conditions, the initial condition (e.g., isolated sheets vs. multiple interacting sheets), and whether the reconnection is driven or spontaneous. Several investigations relate solar flare pulsations to plasmoid formation by reconnection (see, for example, Kliem et al. 2000;Karlický 2004;Karlický & Bárta 2007;Bárta et al. 2008a). Dynamic plasmoid structures have been observed in a few well-resolved, large-scale simulations of eruptive solar flares (e.g., Karpen et al. 2012;Guo et al. 2013). Spatial intermittencies, in the form of bright dynamic blobs, have been observed in high-resolution EUV data from NASA's Solar and Heliospheric Observatory (SOHO), Solar TErrestrial RElations Observatory (STEREO), and Solar Dynamics Observatory (SDO) (Ohyama & Shibata 1998;Ko et al. 2003;Lin et al. 2005;Riley et al. 2007;Reeves et al. 2008;Lin et al. 2008;Ciaravella & Raymond 2008;Takasao et al. 2012;Kumar & Cho 2013;Liu et al. 2013). These discrete features generally emanate from positions above the flare loops, and often appear to be spaced along a common line like beads on a wire.
Processes proposed to accelerate flare electrons include the reconnection electric field itself, induced electric fields associated with the reconfiguration of the reconnected magnetic field, stochastic scattering by turbulent magnetohydrodynamic (MHD) waves excited in the reconnection region, and parallel electric fields associated with kinetic-scale Alfvén-wave cascades downstream from the flare site (see the review by Zharkova et al. 2011). The second process includes the acceleration of particles during magnetic-island contraction, discovered via kinetic simulations (Drake et al. 2005(Drake et al. , 2006a(Drake et al. ,b, 2010Fermo et al. 2010). In essence, the particles gain energy by reflecting off converging magnetic mirrors -in this case, the reconfigured field lines of the contracting islandsas proposed originally by Fermi (1949) in his model for cosmic-ray acceleration. Whereas a fully self-consistent treatment of the problem requires calculating individual particle orbits and feedback from the particles to the electromagnetic fields, Drake et al. (2010) derived some essential features of the acceleration process using a kinetic approach based on adiabatic invariants of the particle motion. Here, we use an analytic method extending the ideas presented in that paper.
Although the partitioning of flare energy among kinetic energy, thermal energy, radiation, and accelerated particles is not well established (Emslie et al. 2004(Emslie et al. , 2005Raymond 2008), a significant fraction of the released magnetic free energy must be used in electron acceleration to explain the observed X-ray intensities (Miller et al. 1997). A large number of particles are accelerated during the brief discrete energy releases: for example, Kiplinger et al. (1983) estimated that more than 10 34 electrons were accelerated to energies greater than 20 keV in one 400 ms spike. A major flare can accelerate more than 10 36 electrons s −1 (Hoyng et al. 1976;Holman et al. 2003). Any proposed acceleration mechanism must be highly efficient to provide such a large number of accelerated particles (known as the "number problem"; Brown & Melrose 1977). Given the low density of the preflare corona and the required electron numbers, it is highly unlikely that most or all of the electron acceleration can occur within the small diffusion region in reconnection sites. More likely, the major acceleration occurs at the reconnection outflows along the reconnecting CS, as observations of double coronal sources seem to indicate (Liu et al. 2008(Liu et al. , 2013. The objective of our paper is to apply the mechanism of charged-particle acceleration by magnetic-island contraction to the results of a large-scale MHD simulation of a solar eruption, and to assess the implications of the model for understanding observed high-energy flare emissions. For analytical simplicity, and in order to maximize the numerical resolution of our simulations of eruptive flares (EFs), we restrict our attention to an axisymmetric configuration with twodimensional spatial variations but fully three-dimensional vector fields (a so-called 2.5D system). Our analytic method of calculating the particle energy gain in contracting flux ropes is presented in detail in Appendices A-C; its key findings are summarized in §2. In §3, we describe the main features of our simulated EF initiated by the magnetic breakout mechanism (Antiochos et al. 1999), in which we extend previous work (Karpen et al. 2012, hereafter KAD12) to even finer grids that capture in greater detail the island evolution. Our analysis of island evolution and the associated energy amplification of particles in the flare CS are presented in §4. The implications of our results for the coronal origin of electrons accelerated in solar flares and suggestions for further work are discussed in §5.

Particle Acceleration via Island Contraction
The acceleration of particles to high energies in contracting magnetic islands has been studied extensively by Drake and his collaborators (Drake et al. 2005(Drake et al. , 2006a(Drake et al. ,b, 2010Fermo et al. 2010) using particle-in-cell kinetic simulations (see also Zank et al. 2014). Drake et al. assumed that many parallel CSs are present, as can occur if an initially extended single sheet bends and folds upon itself. Under these conditions, particles undergo multiple episodes of acceleration as they become energized within one contracting island, then drift or are scattered to another, where the process begins anew. In solar EFs, on the other hand, the energization process is expected to occur in islands within the single, dynamically evolving flare sheet formed in the wake of the CME.
The time-varying geometry of such a contracting island is shown schematically in Figure 1, from (a) an initial state with an elongated configuration to (b) a final state with a more circular structure. The curves represent magnetic flux surfaces; the red region is a narrow volume between two such surfaces. After an island is formed during reconnection, the retraction of the field lines from the reconnection sites (represented by X symbols to the left and right of the island), due to the Lorentz force, propels the field lines toward the center, reshaping the island as shown. In drawing this evolution, we have not assumed that the area between every pair of flux surfaces is preserved; that is, we do not assume that plasma is incompressible. This is a significant difference between the flare environment and the kinetic applications: the plasma evolution in flares is strongly compressible, whereas the evolution simulated by Fermo et al. (2010) and analyzed by Drake et al. (2010) is essentially incompressible.
We developed an analytic method to estimate the energy gained by particles in orbits around mirroring transiting -Top: schematic diagram of contraction of a 2D magnetic island. a) Early state of a two-dimensional elongated (elliptical) magnetic island. b) Late state of the island after contraction to a perimeter-minimizing (circular) shape. The red area shows a generic flux region, before and after island contraction. Bottom: sketch of particle orbits along field lines within the red region of a) and b) (the gyromotion around field lines is not shown). c) Particle mirrors at turning points of its orbit in the contracting island. d) Particle transits completely around the contracting island.
2.5D magnetic field lines in the general case where the island has an out-of-plane (toroidal) magnetic field component. The detailed calculations are presented in Appendix A, so in this section we present the key results. We assumed that the field lines are part of a flux rope ( Fig. 1 sketches their projections in the plane perpendicular to the flux rope axis) and the flux rope is translationally symmetric in the out-of-plane direction. We considered two-dimensional spatial variations, but fully 3D particle velocities and magnetic fields. Our method is based on the conservation of the magnetic moment and parallel action of particles whose orbits are completed much more quickly than the magnetic field changes in time.
Once a flux surface of the flux rope is created (after two reconnection episodes), particles magnetically linked to that surface will orbit along it. We use subscript i to denote the initial values of quantities at the time, t i , that a flux surface is created. The orbiting particles have a range of speeds V and pitch angles θ (angle between the particle velocity and the local magnetic field). The type of motion that a particle executes depends on the magnetic field strength B along the field line and the particle's pitch angle. For simplicity, we assume that the island is symmetric left/right and up/down; therefore the field strength of a field line inside the island possesses two equal minima B 1 (left and right in Fig. 1, located near the magnetic X points) and two equal maxima B 2 (located near the arrow heads in Fig. 1). B is parameterized by the arc-length coordinate l along the field line as which is a reasonable representation for our simulated islands (see §4.2). The length of one turn of the flux rope is L. Note that B 1 , B 2 , and L may be time dependent and vary from one flux surface to another inside the flux rope, and t i will be different for each flux surface of the island (those closer to the axis of the flux rope are created earlier than those farther away). The approach used in Appendix A to derive the energy amplification factors of particles orbiting these field lines is quite general, but this particular profile for B allows the results to be expressed analytically in closed form.
We identify two types of particle orbits: mirroring ( Fig. 1c) and transiting (Fig. 1d); the ever-present gyro-rotation about the magnetic field is not shown in Figure 1. Which type of orbit a particle executes is determined by the particle's pitch angle, θ 1 , when the particle is at the minimum of the field, B = B 1 , and by the mirror ratio of the field line, R m = B 2 /B 1 (see Appendix A). If sin θ 1 ≥ 1/ √ R m , the particle mirrors at or before the maximum of the field (Fig. 1c). On the other hand, if sin θ 1 < 1/ √ R m , the particle traverses the entire island and its velocity parallel to the field never changes sign (Fig. 1d). Transiting particles move from one turn of the flux rope to the next, whereas mirroring particles are trapped in the original turn of the flux rope where they were injected. Fermi (1949) described the energy gain of particles reflected by moving magnetic mirrors as being due to "type A" and "type B" acceleration for mirroring and transiting particles, respectively.
Over a single turn of a particle's orbit, the energy change is very small. We characterize the initial energy of the particle by its energy when the particle is at the minimum of the field, E 1i = mV 2 1i /2. After many turns on its orbit, the particle's final energy, E 1 = mV 2 1 /2, will have increased, as the magnetic field slowly changed. In Appendix A, we show that the ratio of these two energies can be expressed as follows: θ 1i is the pitch angle of the particle at t i , and E ⊥ and E are the energy gains in the directionperpendicular and parallel to the magnetic field, respectively: tan 2 θ 1i tan 2 θ 1 . (2-4) Here V ⊥ and V are the components of particle velocity perpendicular and parallel to the magnetic field, respectively. Therefore, the particle energy gain is a function of the field strength and the particle's initial and final pitch angles at the minimum of the field, and it is independent of the particle's initial speed. In all cases, if the strength of the field increases as the island evolves, the perpendicular energy increases. The parallel energy gain depends upon the evolution of the pitch angle relative to the field strength. The energy multipliers E ⊥ and E are different, showing that an initially isotropic energy becomes increasingly anisotropic as the islands evolve.
In Appendix A, we derive an analytic expression for the final pitch angle θ 1 as a function of the initial angle θ 1i . In practice, θ 1 is calculated by numerically solving transcendental equations that are functions of the field line properties: the minimum field strength, the mirror ratio, and the length of one turn of the field line. Because our simulations described in §3 provide us with these field line properties, we can compute the energy gain for particles at all initial pitch angles as our simulated islands evolve ( §4.3). The general results in Appendix A simplify to algebraic expressions in the limiting case of uniform field strength, B 2 = B 1 , in which there are no mirroring particles. For this case (Appendix B), we show that the toroidal (out of plane) field has the net effect of moderating the impact of changes in the island perimeter on energy gain, and that plasma compression is also relevant for particle energy change. In Appendix B, we also compare our results with previous analytical results from Drake et al. (2010). In Appendix C, we estimate the range of validity of our analysis: it is appropriate for a significant fraction of the coronal electron population, though only for protons and ions that already are strongly superthermal. Therefore, our approach is adequate for a first assessment of the contribution of magnetic-island contraction to electron acceleration in solar flares.

Simulated Breakout CME/EF
We investigate the generation and evolution of islands in a flare CS by simulating a fast CME/EF according to the well-studied breakout paradigm (Antiochos 1998;Antiochos et al. 1999;MacNeice et al. 2004;DeVore & Antiochos 2005Lynch et al. 2008Lynch et al. , 2009Karpen et al. 2012;Masson et al. 2013). This model has been described thoroughly in previous papers, so we only summarize the fundamental aspects here. Key structures and evolutionary stages in the model are illustrated in Figure 2. A fast breakout CME/EF requires three essential ingredients: two or more flux systems in the corona, yielding at least one magnetic null point; slow accumulation of magnetic free energy, through either flux emergence or (as in our simulations) footpoint motions; and a small but finite resistivity that allows reconnection to occur. Given these three elements, eruption is inevitable once the critical amount of free energy has accumulated in the system (see KAD12). Reconnection plays two key roles in this scenario: breakout reconnection at the preexisting coronal null removes overlying flux that restrains the stressed core field from erupting, and flare reconnection partially detaches the erupting core, thus separating the flux rope that comprises the CME from the arcade of flare loops below.
Our previous studies demonstrated the viability of this model in 2.5D and 3D, with and without the presence of a solar wind. A recent investigation (KAD12) found that a resistive instability in the flare CS is responsible for triggering the explosive eruption, thus identifying a physical basis for the t = 0 s a) Breakout null t = 60000 s b) Breakout CS t = 80000 s c) Flare CS t = 90000 s d) Islands CME core -Key structures of the breakout model at selected times of the simulation. The spherical surface is at 1 solar radius (R s ) and shows photospheric B φ , with shading from red (0 G) to magenta (3 G). Normalized current density magnitude, R s J/c (c is the speed of light), in the r − θ plane is shown with shading from red (0 G) to magenta (saturated at 1.5 G). Magnetic field lines (black) are drawn from the same set of footpoints for each time. a) t = 0 s (initial potential state); b) t = 60, 000 s (before onset of breakout reconnection); c) t = 80, 000 s (after breakout reconnection onset and before flare reconnection); d) t = 90, 000 s (after flare reconnection onset). The full temporal evolution is shown in the animation available in the online version (f2 movie.mpg).
strong observed connection between fast CMEs and two-ribbon flares. This conclusion followed from our analysis of an ultra-high-resolution, 2.5D MHD simulation of a breakout eruption performed with the Adaptively Refined MHD Solver (ARMS). ARMS employs a finite-volume representation of the plasma and magnetic field, high-fidelity Flux-Corrected Transport techniques (DeVore 1991), and adaptive mesh refinement managed by the PARAMESH toolkit (MacNeice et al. 2000). As in all finite-volume solutions to the MHD equations, numerical resistivity permits magnetic reconnection to occur at electric CSs that thin down to the finite scale of the simulation grid. Adaptivity criteria tailored to the developing CSs allowed us to achieve the highest overall spatial resolution to date in a CME/EF simulation. Consequently, the high-cadence KAD12 simulation followed the self-consistent formation of the breakout and flare CSs, and tracked the dynamic life cycle of numerous magnetic islands in both CSs. The null-finding capability implemented by KAD12 enables individual nulls to be identified and characterized as X-and O-types (Parnell et al. 1996).
We found that still higher resolution is required to analyze the changing shapes of the islands in the flare sheet, in order to estimate the resulting particle energization described in §4. Therefore, in the present work, we use the same initial and boundary conditions as KAD12 but increase the maximum resolution from 6 to 8 levels of refinement. A detailed description of the refinement criteria is given in KAD12. The minimum distance between grid points d g achieved in our simulated flare CS is ≈ 0.001R s = 700 km, comparable to the resolution of SDO's Atmospheric Imaging Array.
The initial potential-field configuration of our simulation represents the Sun's global dipole field plus a large equatorial active region (see Fig. 2a), the simplest configuration that meets the first (multipolar) requirement for the breakout mechanism. As in KAD12, the maximum initial field strength at the solar poles is 10 G. ARMS solved the ideal 2.5D MHD equations in spherical coordinates (r, θ, φ); see KAD12 for a full description of the equations. Figure 2 and the accompanying animation (available in the online journal) illustrate the evolution of the system from its initial potential state through eruption and flaring. As in our previous breakout studies, free energy was added slowly to the system by driving antiparallel footpoint motions in a narrow band centered on the equatorial polarity inversion line (PIL). The flow velocities are well below the Alfvén and sound speeds at the lower boundary. The resulting excess magnetic pressure compresses the initial coronal null point (Fig. 2a) into a breakout CS (Fig. 2b) that eventually thins down to the grid scale. Thereafter, reconnection steadily removes overlying flux enabling the core to expand. Behind the expanding core, the flare CS forms, lengthens, and thins down to the grid scale (Fig. 2c); it extends to the top of the flare arcade and is roughly aligned with the equatorial radial direction. When fast reconnection starts at the flare CS, much of the magnetic free energy is released rapidly as the flux rope detaches and strongly accelerates outward. Islands formed by the flare reconnection move along this CS (Fig. 2d).

Flare Current Sheet Nulls
Reconnection in the flare CS begins at time t ≈ 81760 s, when a single X-null forms at r = 1.4375 R s . Note that our "nulls" are locations where the 2D poloidal magnetic field (components in the r − θ plane) is zero, although the toroidal field (in the φ direction) is generally non-zero. Only a few transient, slow-moving nulls form in the flare sheet at first, but the reconnection quickly transitions at t ≈ 84000 s to produce fast Alfvénic jets and a series of sunward-and outward-moving islands. Each island is an O-null formed by reconnection at two X-nulls on either side of the O-null. Figure 3 shows the radial locations of X-(black crosses) and O-nulls (red circles) as functions of time for a small angular wedge within ±5 • of the solar equator and radial heights in the range r = 1.1 − 1.5R s . This wedge encloses the lower part of the flare CS and the central part of the top of the flare arcade.
8.2×10 4 8.4×10 4 8.6×10 4 8.8×10 4 9.0×10 4 9.2×10 4 time (s)  Throughout the evolution, there is one main X-null (marked in Fig. 3) in the flare CS from which most of the reconnection outflows, including both sunward-(negative slope in Fig. 3) and outward-moving (positive slope in Fig. 3) islands, are generated. The global evolution and the radially expanding geometry of the system dictate its location. Throughout the flare, the main null undergoes a modest change in height, much less than the change in height of the core O-null of the CME (also marked in Fig. 3; it quickly moves out beyond the height range in the figure). Occasionally, an adjacent X-null becomes the new main X-null; one such transition occurs near t = 90, 500s in Figure 3. According to Bárta et al. (2008bBárta et al. ( , 2011, a newly formed island moves in the direction away from whichever of its delimiting X-nulls has the higher rate of reconnection, due to an excess of magnetic tension. If a second X-null forms at a radial distance above/below the main X-null, the island moves outward/sunward. Shen et al. (2011) also report that the reconnection rate reaches a maximum at the main X-null in their MHD simulation of a flare CS.
Sunward-moving islands merge with the flare arcade, which grows in height as the reconnected flux piles up. Therefore, these O-nulls stop their sunward motion at progressively higher altitudes; their last recorded positions trace approximately the instantaneous top of the arcade. The first outward-moving island forms the core of the flux rope that becomes the CME (CME core O-null in Fig. 3). Subsequent outflowing islands merge with the rising flux rope above the maximum radial range of Figure 3. We find that our islands exhibit little coalescence between them as they move along the flare CS in either direction. Instead, each island remains discrete until it merges with the flare arcade below the sheet or the CME flux rope above.
Due to the magnetic shear in the erupting central arcade, each of our islands is a twisted 2.5D flux rope rather than a closed planar loop. Two examples (yellow lines) are shown in Figure 4. In our simulations, the flux ropes are not rooted at the Sun due to the special symmetry of the system; in 3D, they would be rooted on either side of the PIL, with finite displacements between their footpoints. As we noted above, the islands form due to reconnections of the same flux surfaces at two X-nulls, one above and one below the island. Beyond the ends of each island are flux surfaces that have reconnected only once at an X-null, which therefore remain rooted at the Sun. Three examples (red lines) are shown in Figure 4.

Island Evolution
For this initial investigation of particle acceleration by island contraction following flare reconnection, we focus on the sunward-moving islands in the CS. In particular, "Island 1" and "Island 2" in Figure 3 are tracked carefully from their birth to their arrival at the top of the flare arcade. We selected them because they are long-lived, clear features, with different physical characteristics. Several snapshots of these islands in the φ = 0 plane (x = r sin θ, z = r cos θ) are shown in Figures  5 and 6, with the x-locations of their respective O-nulls marked by black arrows. Island 1 is smaller and less resolved than Island 2. In Figure 5, a chain of islands can be seen both leading and trailing Island 1. The distortion of Island 2 during its interaction with the top of the arcade can -Islands are disconnected flux ropes (yellow field lines) formed from two reconnection episodes at paired X-nulls. Over-and underlying sheared flux surfaces (red field lines) formed from a single reconnection episode at one X-null. The spherical surface to the left is at 1 R s . Color shading in the plane of the flare arcade (r, θ plane) shows R s J φ /c, saturated at −18 G (red) and +4 G (magenta). This simulation snapshot is at t = 84380 s. be seen in Figure 6d. Each island has finite length along the CS and contains finite flux. As time passes and the reconnection continues, the flux entrained by the islands increases, so the islands appear to expand. The individual flux surfaces within each island contract with time, however, as demonstrated below.
The poloidal magnetic flux function, Ψ(r, θ), at each grid point, is To determine the characteristic properties of our islands over time, we chose a set of fixed flux surfaces with selected values of Ψ inside each island. We tracked each surface from its creation at time t i to its arrival at the flare arcade. Figure 7 shows the set of chosen flux surfaces (color-coded and numbered) at a time well after their formation for Island 1 (7a, top panel) and Island 2 (7b, bottom panel). The instantaneous locations of the island nulls are marked by black crosses (X-nulls) and red circles (O-nulls). The X-null to the right of Island 1 is not shown because it is well outside the range of the plot, at x = 1.3984. The number of flux surfaces chosen for Island 1 is smaller than for Island 2 because of the difference in size. The grid lines (white) show that the innermost flux surface (0) of Island 1 is only about three cells across, the minimum resolvable area, and the enclosed areas of flux surfaces 0 and 1 are not resolved after time t ≈ 84440 due to contraction. Although our simulation uses the highest resolution to date, resolving the islands, particularly their innermost flux surfaces that form earliest, is a significant computational challenge.
The flux surfaces within each island are created sequentially, from innermost (closest to the O-null) to outermost, so t i generally increases across our sample of flux surfaces. These initial times are listed in Tables 1 and 2 for Islands 1 and 2, respectively. The cadence of output from the simulation run was 20 s, which is the uncertainty in t i . -Normalized out-of-plane current density R s J φ /c at selected times for Island 2, in the φ = 0 plane (x = r cos θ, z = r sin θ). Vertical black arrows point to the x location of the island's O-null. A single flux surface is plotted as a closed black line in each frame. R s J φ /c is color-shaded from violet (saturated at −15 G) to red (saturated at +4 G). Images have been smoothed with a window of three pixels to minimize pixelation.
The profile of magnetic field strength versus arc length along each flux surface at time t i is shown in Figure 8. Arc length l = 0 corresponds to the point of the field line closest to the Sun's surface, and the end of each curve corresponds to one turn of the field line at l = L. The minima of B (B 1 ) occur near the two X-nulls, and the two maxima (B 2 ) occur between those points, consistent with the analytical formula we adopted in Equation 2-1. The inhomogeneity is more pronounced for Island 2, whose poloidal (in-plane) field component B p , is strongly dominant: the toroidal (outof-plane) field component B t weakens with time as less-sheared flux reconnects across the flare For each flux surface, we measured the properties required to determine a particle's speed versus time ( §2): L, B 1 , and B 2 . L is calculated from the arc-length integral along the perimeter of each flux surface, where dl p is the 2D arc-length differential in the poloidal r − θ plane.    (for Island 1) and 10a (for Island 2). Values are not plotted for those times when flux surfaces are unresolved, i.e., when L p is smaller than the perimeter of a 2 × 3-cell box. All flux surfaces experience a sharp decrease in length soon after formation, when they are elongated along the CS Ψ# t i (10 4 s)   Figure 7b. "<>" indicates quantities averaged along the perimeter of the flux surface.
direction. Thereafter, the changes in lengths are much smaller.
For Island 1, the maximum of flux surfaces ratios L/L i ranges between 1.4 and 2.0, with the exception of the outermost flux surface (flux surface 7, violet color), where of L/L i = 2.19. Flux surface 7 is initially much longer than its neighbors because at t i it encloses an extra X-null from a small, short-lived island that coalesces with Island 1 between 84300 and 84360 s. This flux surface initially has a large aspect ratio and then retracts, reducing its length quickly. This shows the effect of island coalescence in enhancing island contraction. Flux surfaces that were inside Island 1 before the merger experience a temporary increase in their length as they become part of the reconnection upstream flow along the direction of the CS, at the null between the islands. There is another coalescence with a much smaller and short-lived island between 84400 and 84440 s, with insignificant effects on the chosen flux surfaces.
Island 2 has similar behavior to Island 1, except that it does not merge with other islands; it only interacts with the flare arcade. The maximum ratio L/L i for Island 2 is between ≈ 1.05 (outermost flux surface) and 2.26 (innermost flux surface). All flux surfaces are well-resolved at all times except flux surface "0", whose enclosed area is not resolved after time t ≈ 90740 (see Fig.  7b for the shape of this flux surface at this time). At t ≈ 90900s, the X-null closest to the Sun starts to move quickly toward the Sun leaving the opposite X-null behind, which in turn becomes the new main X-null of the flare (see Fig. 3). This separation of the nulls slightly stretches the flux surfaces.
Island 1 has a much smaller poloidal area than Island 2, but the lengths of its field lines are in general much larger because its toroidal field is so strong relative to its poloidal field. This can be seen, for example, in the listed values of L p and L at time t i in Tables 1 and 2. The toroidal component of the field increases almost monotonically with time for the flux surfaces of Island 1 as the total magnetic pressure increases. For Island 2, this component increases until the sunward X-null starts moving rapidly toward the flare arcade, then it decreases as the total thermal pressure decreases. Tables 1 and 2 list the initial magnetic (separated by components) and thermal pressures of each flux surface. Island 1 is magnetically dominated, and its plasma-β decreases with time. In contrast, Island 2 is thermally dominated, and its plasma-β increases with time.
A particle's parallel and perpendicular energy gains directly depend on the evolution of B 1 (Eqs. 2-3 and 2-4). The evolution of B 1 is shown in Figs. 9b (Island 1) and 10b (Island 2). For both islands, B 1 increases rapidly at first as the islands tend to a more uniform magnetic field, then much more slowly, with occasional fluctuations. In general, the evolution of B 1 is favorable for both components of energy gain. The homogenization of the field can be seen in Figs. 9c and 10c, where the mirror ratio of flux surfaces is plotted. For each island, B 2 /B 1 decreases rapidly as B 1 increases; later, the rate of decrease lessens until the mirror ratio fluctuates mildly. For Island 1, its flux surfaces are most uniform at about 84480 s. After this time, the magnetic field profile no longer resembles the analytical form proposed in §2 (Eq. 2-1); energy gains are not calculated after this time in §4.3. Island 2 exhibits similar behavior: the field is most uniform at about 91080 s, after which our assumptions on the shape of the magnetic field profile are no longer applicable. Island 2's B 1 temporarily decreases after its sunward X-null moves quickly toward the Sun.
The peak mirror ratio in Island 1 is ≈ 1.6, much smaller than in Island 2, which achieves a value as large as ≈ 8. The difference in the maximum mirror ratios is due to the moderating effect of the toroidal field and the aspect ratio of the flux surfaces. Island 1 has a strong toroidal field and behaves closer to the uniform-field case discussed in Appendix B. In contrast, Island 2 has a weak toroidal field, so it behaves like a strong magnetic trap initially and transitions to uniform-field behavior very late, relative to Island 1. For Island 2, the outermost flux surfaces have the largest mirror ratios because the field strength minima always are very small near the X-nulls, whereas the maxima are highest at the greatest cross-sheet distance from the O-null. Consequently, the mirror ratio for newly formed flux surfaces more than doubles over time for Island 2 (Fig. 10c), whereas it declines slightly, but irregularly, for Island 1 (Fig. 9c). The initial values of the minimum and maximum field strengths on each flux surface are listed in Tables 1 and 2. Plasma compression occurs as the islands contract. In the uniform-field limit discussed in Appendix B, we show that plasma compression contributes directly to the perpendicular energy gain. Figures 9d and 10d show the electron density averaged over the flux surfaces, < n >, as has similar values for all flux surfaces (due mainly to their proximity in this small island). The electron density in Island 2 increases monotonically until t ≈ 91000 s (when expansion of the island starts) and then decreases. The density ratio for both islands n / n i ranges from 1 to ≈ 2.8, with the innermost surfaces having the highest compression ratios. The initial densities, n i , are listed in Tables 1 and 2 We estimated the number of electrons per radian of angular extent out of the plane, N , enclosed by the outermost studied flux surface of each island. We integrated the electron number density across the area enclosed by that flux surface, and then multiplied this integral by R s to account for the out-of-plane length. For the smaller Island 1, N ≈ 2 × 10 35 electrons per radian; for the larger Island 2, N ≈ 2.5 × 10 36 electrons per radian. Thus, our results suggest that it is theoretically possible to accelerate large numbers of electrons in flares by this macroscopic process.

Particle Energy Gain
We now calculate the energy gain of particles within our islands using the properties from §4.2 and Equations (2-2)-(2-4). As discussed previously, the energy gain of a particle moving adiabatically along a flux surface is a function of the particle's initial pitch angle and the properties of the flux surface; it is independent of the particle's initial energy. Therefore, for each flux surface in Islands 1 and 2, we calculated the energy gain for particles with initial pitch angles θ 1i in the range 5 • to 85 • , at 5 • intervals. At selected times after formation time t i , we used the instantaneous properties of the flux surfaces described in §4.2, solved the transcendental equations derived in Appendix A, and calculated the new pitch angles and the energy ratios. The value of θ and the mirror ratio of the flux surface a particle is orbiting determine whether the particle is transiting or mirroring. Conversions between these two populations occur as the flux surface properties change over time, as shown in the figures below and discussed in Appendix A.
Results for a representative flux surface within Island 1 (black curves in Fig. 5 and flux surface labeled "5" in Fig. 7a) are shown in Figure 11, and those for a flux surface within Island 2 (black curves in Fig. 6 and flux surface labeled "8" in Fig. 7b) are shown in Figure 12. The colors represent the initial pitch angles, tabulated at the right of each figure. They range from violet at 5 • for particles with almost solely parallel motion, which execute transiting orbits, to red at 85 • for particles with almost solely perpendicular motion, which execute mirroring orbits. Points overplotted with a circle indicate transiting particles; those without a circle indicate mirroring particles. In both figures, particles at certain initial pitch angles (e.g., 65 • , light green, in Fig. 11; 35 • , medium blue, in Fig. 12) convert from mirroring to transiting motion as the mirror ratio of field strengths along the flux surface decreases over time.
The principal results of this study are illustrated by Figs. 11a and 12a, which show the total energy ratios, E, from Equation (2-2). We find that the maximum total energy ratio is E max ≈ 4.7 for Island 1, on the outermost flux surface, which is involved in the island coalescence (for the effects of energy gain by island coalescence in different regimes see, for example, Fermo et al. (2010) and Zank et al. (2014)). The last column of Table 1 lists E max for each flux surface. In general, the values of E max are larger for Island 2 (see Table 2), even though this island does not experience any coalescence with other islands, achieving a maximum of ≈ 5.2. These values are somewhat larger than the factor of ≈ 3 reported by Drake et al. (2010) for electrons orbiting a single contracting island in particle-in-cell (PIC) simulations of multiple, parallel CSs. Our values are greater due mainly to compression of the flux surfaces as our islands stream down the flare CS toward the top of the flare arcade. Most of Drake's islands in PIC simulations are incompressible, i.e. the area of islands is conserved after island merging (see Fermo et al. 2010).
To understand the energy gains in greater detail, we display the parallel energy ratio, E in A steep rise in perpendicular energy gain occurs early, when B 1 changes rapidly, then the growth levels off while the islands contract slowly. The parallel energy of a particle will increase (decrease) if the length of its orbit decreases (increases), in order to conserve parallel action. For transiting particles, their parallel energy gain increases as long as the island contracts, independent of their pitch angle, because the length of their orbits is the length of the turn of the field line (L). The maximum parallel energy gain occurs for particles with θ = 0, with E max = (L i /L) 2 . Depending on how much B 1 changes compared to the change in the square of the length, E ⊥ may be smaller (Island 1 case) or larger (Island 2 case) than E max . L i /L is similar for both islands, but the change in B 1 is larger for Island 2.
For mirroring particles, the length of their orbits may decrease (increase) if the separation of the "mirrors" decreases (increases), even if the total length of the flux surface decreases. This depends on how fast the mirror ratio, the pitch angle, and the total length of the field line change (see Eqs. A.10 and A.11). For example, Figs. 13 and 14 show l o (a quarter of the orbit length, see Appendix A for details) for all particles of flux surfaces in Figs. 11 and 12, respectively. For both islands, most of the mirroring particles experience a slight decrease in l o at early times, which translates into an small increase in parallel energy. Later on, l o increases with time and the parallel energy decreases. As particles transition from mirroring to transiting, l o converges to L/4.0 For some initial pitch angles slightly larger than the loss-cone angle limit, the transition from mirroring to transiting motion may occur at early times, while the flux surface is still contracting. If l o was increasing prior to the transition time, the parallel energy ratio switches from a loss to a gain (see, for example θ 1i = 60 • in Fig. 13). If l o was decreasing prior to that time, the parallel energy ratio is always larger than 1 (see, for example θ 1i = 25 • in Figure 14).
To better distinguish between mirroring and transiting behaviors, the evolution of particle pitch angles on two flux surfaces is shown in panels b) of Figs. 13 and 14. For flux surface 5 of Island 1, whose initial mirror ratio is ≈ 1.6, particles with initial pitch angles below ≈ 52 • are inside the loss cone (see Appendix A). For flux surface 8 of Island 2, whose initial mirror ratio is ≈ 6.15, particles with initial pitch angles below ≈ 24 • are inside the loss cone. If pitch angles were initially isotropically distributed among the particles inside these islands, many more particles would experience mirroring in Island 2 than in Island 1. Pitch angles increase for those cases where the perpendicular energy gain is larger than the parallel energy gain. Pitch angles decrease at t i for Island 2 because there is a slight decrease in perpendicular energy as B 1 decreases at that time.
The weighting coefficients of the energy gain components (first and second terms of Equation 2-2) depend on the particle's initial pitch angle. Both factors contribute to the total energy amplification occurring in the islands, but in different proportions for the mirroring and transiting particles. The larger the initial pitch angle, the stronger the perpendicular gain contribution to the total energy gain. On the other hand, the smaller the initial pitch angle, the larger the parallel contribution to the energy gain. The total perpendicular and parallel contributions to the energy gain are shown in the bottom panels of Figures 11 and 12. The largest energy gains for Island 1 are due mostly to energy gain in the parallel direction and mostly for transiting particles. The opposite is true for Island 2: the largest energy gains are due mostly to energy gain in the perpendicular direction, for mostly mirroring particles. Consequently, panels a) and d) most closely resemble each other for Island 1, while panels a) and c) do so for Island 2.  Fig. 13.-Island 1, flux surface 5. Evolution of l o and θ for the same color-coded initial pitch angles as in Figure 11. a) l o . b) θ. An animation showing l o and θ for all flux surfaces of Island 1 is included in the online journal (f13 movie.mpg).

Discussion
We calculated analytically the energy gains of particles that are confined to large-scale individual 2.5D magnetic islands generated by spatially and temporally variable reconnection in a single CS. Due to contraction of the islands as they move along the sheet after being formed, their particles are subject to type A and type B Fermi (1949) acceleration. Our calculations extend an analysis by Drake et al. (2006a) of particle motion and adiabatic invariants in kinetic systems. We applied the method to an MHD-scale system including plasma compressibility and a finite guide field for consistency with the solar flare environment. As derived in Appendix A, a particle's energy 9.06 9.08 9.10 time ( gain depends upon its initial pitch angle and on the changes in length, magnetic field strength, and mirror ratio of the flux surface along which the particle moves. The energy gain is different in the directions parallel and perpendicular to the magnetic field, so that an initially isotropic distribution of particles becomes increasingly anisotropic over time. To calculate the island formation and evolution leading to particle energy gains in flares, we performed a 2.5D simulation of a breakout CME/EF with the highest resolution to date (8 levels of refinement). Fast reconnection in our simulated flare CS is intermittent and forms large-scale magnetic islands. We analyzed in detail two sunward-moving islands formed by reconnection in the flare CS below the CME, from their birth to their arrival at the top of the flare arcade. These islands contract, their field strengths increase, and they have relatively large magnetic mirror ratios. We found that individual islands are candidates for only modest acceleration of particles intermittently in flares, yielding energy gain ratios of 1-5. This energy gain is higher than those shown in Figure 2 of Drake et al. (2006a) and Figure 5 of Drake et al. (2010) due to the compressibility of the plasma in our simulations. The mechanism should produce sporadic emission because island formation is intermittent. A large number of particles is accelerated while an island evolves, then streamed toward the footpoints or released into the top of the arcade by reconnection. When a new island is formed, a new set of particles is accelerated.
The modest energy ratios obtained on flux surfaces within single islands cannot boost superthermal electrons sufficiently to account for the observed flare HXR and microwave emissions. However, we expect that a larger number of islands would be formed in simulations with finer grids at lower resistivity. Higher resolution simulations are needed to test this in our global simulation. In this case, particles near the outermost flux surfaces could "jump" between islands at the X-null that separates one island from the next, as described by Drake et al. (2006a). In this way, a particle needs to visit only a few islands to increase its energy by two orders of magnitude. It is currently impossible to test this hypothesis with even state-of-the-art PIC simulations (e.g., Daughton et al. 2009Daughton et al. , 2014, for the parameters of our simulation. To corroborate our analytical results, look for evidence of particle transfer from island to island, and examine the particle acceleration that occurs during fast island mergers at the top of the flare arcade, we are currently developing a "test particle" method. In this approach, the individual guiding-center orbits of an ensemble of test particles are calculated in the evolving electromagnetic field of the MHD simulation. Drake et al. (2006a) report that the back pressure from accelerated particles limits the contraction achieved. If many particles are accelerated, large amounts of energy will be transferred to them, reducing the total available free magnetic energy. These nonlinear effects are not included in our, or any other, purely MHD simulation, because calculating the self-consistent simultaneous evolution of the particles and the electromagnetic field requires a fully kinetic approach. A kinetic simulation also might reveal disruptive phenomena such as mirror and firehose instabilities, driven by the anisotropic particle distribution functions that develop due to the island contraction . Furthermore, MHD shocks form in our flare current sheet (KAD12), and shock electric fields at kinetic scales also could contribute to particle acceleration. The only potentially feasible approach to solving the global problem of eruptive-flare evolution together with the local problem of self-consistent nonlinear feedback between particles and fields would seem to be an embedded PIC method (e.g., Daldorff et al. 2014).
As shown for Island 1, island coalescence may increase the energy gain. Coalescence is favored in kinetic systems with many current layers, but there is no evidence (observational or numerical) for a flare CS to have multiple layers or to be folded upon itself. Reconnection in our flare CS is globally driven, as opposed to kinetic scenarios where reconnection is spontaneous or triggered by a small perturbation. Higher resolution may increase the coalescence frequency in our simulations. In more complicated 3D geometries, current filamentation may occur with plasmoids forming at multiple reconnection sites and interacting and merging. High-resolution 3D simulations capable of resolving a wide range of island sizes are needed to address these issues.
We show that our analysis is valid for a significant fraction of the coronal electron population over a reasonable range of preflare temperatures. The number of electrons in our simulated islands is large, of order 10 35 -10 36 per radian of angular extent along the PIL of the flare arcade. Thus, it is theoretically possible to accelerate a large number of electrons to higher energies by this macroscopic process. Our simulated active region is about an order of magnitude larger than a typical solar active region, however, which suggests that the sizes of the islands would be reduced by a similar factor in an actual flare. On the other hand, the electron density in our simulation is significantly lower than is typical of the flaring corona. These effects of length scale and plasma density would compensate each other, at least partially, in a more realistic configuration. These promising results need to be tested in a configuration with scales and densities characteristic of actual observed flares. As explained in KAD12, the timescale of our simulation is about 40 times larger than that of a typical active-region flare. The lifetime of our islands (hundreds of seconds) corresponds to a few seconds of typical active-region flare times, comparable to the duration of some of the observed HXR spikes.
Most flare HXRs are produced by bremsstrahlung emitted by energetic electrons colliding with ambient charged particles. In principle, this process could be calculated from the results of our simulation, but it is beyond the scope of the present paper. The energetic-electron spectrum must be convolved with the cross sections for bremsstrahlung emission and the local plasma density to generate the HXR photon intensity (e.g., Kontar et al. 2011). Within the confines of MHD, we plan to use a test particle approach to track the evolving energetic-electron spectrum. However, a comprehensive determination would require a self-consistent particle calculation including all sources of acceleration, transport, and interaction with the background plasma (e.g., Liu et al. 2009).
Early islands, such as Island 1, are formed by reconnection of highly sheared field lines (large toroidal field). Its mirror ratios are small and most of the particles orbiting this island are transiting along the helical field lines. Transiting particles have the highest energy gains, mostly in the parallel direction. In 3D, particles on these field lines would precipitate toward their footpoints near the PIL. If these conditions are typical of islands formed in the early, impulsive phase of flares, then this could help explain the observed HXR footpoint sources observed in a flare.
On the other hand, islands formed later in the flare, such as Island 2, have less sheared field. The large mirror ratios yield a population of predominantly mirroring particles, which are trapped above the top of the flare arcade until the island collides with the top of the arcade. After the collision with the arcade, these accelerated particles may find a thick target and emit in HXR (Lee et al. 2013), explaining the observed flare loop-top sources. Note that a small fraction of particles in Island 1 are also trapped above top of the arcade and some in Island 2 are transiting. Therefore some emission might be seen at the footpoints and loop-top sources simultaneously. We have not analyzed the merger of the islands with the top of arcade, which could be a subsequent acceleration mechanism for those trapped particles (e.g., Sakai 1992;Ko lomański & Karlický 2007;Milligan et al. 2010;Karlický & Bárta 2011;Nishizuka & Shibata 2013).
We thank Prof. Jim Drake, Dr. Spiro Antiochos, and Dr. Peter Wyper for helpful comments and advice. This research was supported in part by the NASA Heliophysics Supporting Research program. Resources supporting this work were provided by the NASA High-End Computing Program through the NASA Center for Climate Simulation at Goddard Space Flight Center.

Appendix A Analytical Solutions for Mirroring and Transiting Particles
We calculate in detail the energy gained by a particle orbiting along a magnetic flux surface in a 3D flux rope. A cross section of such a flux rope is shown schematically as a 2D island in Figure  1. The two principal assumptions underlying our approach are: (1) adiabatic invariance, i.e., the characteristic time over which the magnetic field changes is much longer than the time required for the particle to complete a periodic orbit; and (2) collisionless motion, i.e., the characteristic time over which the particle suffers a significant deflection of its motion by collisions is much longer than the orbit time. The validity of these assumptions in the flaring corona is tested in Appendix C below.
The adiabatic invariants arise from conservation relations for the action A associated with Hamiltonian coordinates of the motion, q, and their conjugate momenta, p, over a complete orbit of periodic motion, , Kruskal 1962;Kulsrud 2005). For a charged particle moving in a magnetic field, the first invariant is µ, the magnetic moment, associated with the gyromotion of the particle perpendicular to the field direction. The second invariant is J, the parallel action, associated with the longitudinal motion of the particle parallel to the field direction. They are expressed by where V ⊥ and V are the particle velocity components perpendicular and parallel to the magnetic field, respectively, B is the field strength, and l is the arc-length coordinate along the field line.
The longitudinal motion is periodic if either (1) the particle is trapped along a finite length of the flux rope due to magnetic mirroring at both ends of its orbit, or (2) the flux rope structure is periodic along its length, as is true in our simple simulation setup with axial symmetry along the out-of-plane direction in Figure 1. The invariance of µ follows simply from conservation of the axial magnetic flux passing through the particle's gyro-orbit; the invariance of J is less intuitive, and demonstrating it is rather intricate mathematically (Northrop & Teller 1960).
Conservation of the magnetic moment implies that the perpendicular speed |V ⊥ | varies with the magnetic field strength B(l) along the field line. Therefore, the parallel speed V does, as well. To make progress, we adopt the following model profile for the magnetic field strength, B 1 and B 2 are the minimum and maximum field strengths, respectively, along the flux surface, and L is the length of one full turn of the flux rope. The resulting island is symmetric both left/right and up/down, as sketched in Figure 1, possessing two equal minima B = B 1 at l = 0, L/2 and two equal maxima B = B 2 at l = L/4, 3L/4. All three of the flux surface parameters are time dependent, in general.
Introducing the total speed, V , and the pitch angle, θ, of the particle, we can write Let θ 1 be the pitch angle where the magnetic field strength is smallest, B = B 1 . Conservation of the magnetic moment, µ, and kinetic energy (i.e., V ) along the orbit implies after using Equations (A.2) and (A.5). From this expression, we derive = sin 2 θ 1 + B 2 B 1 − 1 sin 2 θ 1 sin 2 2π l L after using the model profile in Equation (A.4). For the parallel velocity, we then find It is convenient to introduce the new parameter β, If β < 1, i.e., if the particle's pitch angle θ 1 at B = B 1 is sufficiently small, then V in Equation (A.9) is never zero; this particle is transiting and samples the entire flux surface. On the other hand, if β ≥ 1, i.e., the pitch angle θ 1 is sufficiently large, then V goes to zero at two positions within a distance l r < L/4 of l = 0 or l = L/2 (the particle can be trapped on either side of the island); this particle is mirroring and samples only a subset of the flux surface. The following condition is satisfied at the mirror points: The condition on β is equivalent to the well-known definition of the loss cone: a particle mirrors if sin θ 1 ≥ B 1 /B 2 = 1/ √ R m , where R m = B 2 /B 1 is the mirror ratio, and transits (is lost) if For either type of orbit, the parallel action integral in Equation (A.3) reduces to the form after substituting the expression in Equation (A.9) and exploiting the four-fold symmetry of the orbit between l = 0 and l = l o . The upper limit of the integral is l o = L/4 for a transiting particle, and l o = l r for a mirroring particle. In the first case, for β < 1, a variable change yields in the second case, for β ≥ 1, a different variable change gives The above expressions for J are monotonic over the entire range of β and smoothly continuous at β = 1. Introducing the function F(β), we write J as The preceding integrals can be expressed in closed form (see Gradshteyn et al. 2007, integrals 3.671.2 and 3.671.1), where F (a, b, c, z) is Gauss's hypergeometric function.
We now derive a conserved expression involving V from the definition of the magnetic moment, Evaluating this expression at position "1", substituting the result into Equation (A.15), and using Equation (A.16) leads to Finally, using the subscript "i" to denote the initial values of all quantities and remembering that µ is conserved, we obtain This is a transcendental equation in tan θ 1 that can be solved numerically. The new pitch angle θ 1 of any particle is then a function of its initial pitch angle and of the initial and new properties of the flux surface: the field strength, mirror ratio, and length of one turn of a field line. Whether the particle is transiting or mirroring is determined by the new values of θ 1 and the mirror ratio We now calculate the energy gain of a particle E, the ratio of its new kinetic energy to its initial value, evaluated at the minimum of the field, as follows: E ⊥ and E are the energy gains in the directions perpendicular and parallel to the magnetic field, respectively. From Equations (A.7) and ( A.17), The above energy factors show that initially isotropic energies become increasingly anisotropic as islands evolve. In all cases, the perpendicular energy increases if the minimum field strength increases. The parallel energy changes in a complicated way depending upon the initial pitch angle of the particle and the three parameters describing the magnetic field profile.
There are two useful limiting behaviors for the parallel energy gain: 1) Uniform field (B 1 = B 2 , β → 0); and 2) Strong magnetic trap (B 2 >> B 1 , β → ∞). For these cases, from Equation A.19 and considering the fact that F (a, b, c, 0) = 1, the parallel energy gain takes the following forms For the uniform field case, the parallel energy increases if the island contracts, but is not affected by a change in field strength. For the strong magnetic trap, the parallel energy could also increase if the island contracts, as long as the field satisfies that B 2 /B 2i > L 2 /L 2 i .
If the initial θ i of a particle is equal to zero, then µ = 0 and θ = 0 for all times. This purely parallel motion has an increase in energy E = E = (L i /L) 2 . Another special case occurs when θ 1 = π/2, which corresponds to pure gyromotion at the minimum of the field, with no parallel displacement (different from θ = π/2 at a mirroring point). In this case, E = E ⊥ = B 1 /B 1i .

Appendix B Algebraic Expressions for Uniform Magnetic Field Strength
We now specialize the calculations of Appendix A to derive algebraic expressions for the energy gain of particles traversing a flux surface with uniform field strength. In this special case, all particles are transiting, because the mirror ratio is unity. The energy gain can be expressed simply as functions of the macroscopic quantities: mass density, island length, and magnetic field strength.
Consider a flux region, such as those shaded red in Figure 1ab. We assume that its width w is small and the magnetic field is uniform inside the flux surface. The field components are poloidal B p (in-plane) and toroidal B t (out-of-plane). Thus, B = B 1 = B 2 t + B 2 p . If the 2D projected length of the flux surface is L p , the length of one turn of the field lines on the flux surface is There are three macroscopic constraints for particles orbiting inside this flux region: conservation of mass M , toroidal flux Ψ t , and poloidal flux Ψ p : where n is the plasma density. By combining Equations (B.2), (B.3), and (B.4) we find that The last expression was derived and discussed by Drake et al. (2010).
The energy multiplication factors above show that initially isotropic particle distributions become increasingly anisotropic as the island perimeter shrinks. Indeed, in the zero guide field, incompressible limit of (B.11), the perpendicular energy (first term) actually decreases, but the parallel energy (second term) increases even faster, so that overall the particle accrues energy. The decrease in perpendicular energy occurs because, as the island perimeter L p shrinks, the width w increases to preserve the enclosed volume, B p decreases to conserve the enclosed poloidal flux, and V ⊥ decreases to keep the magnetic moment invariant, when n = n i , B t = 0. The increase in parallel energy maintains the constancy of the parallel action as the perimeter shrinks, (B.13) and an increase in the total particle energy results, as described by Fermi (1949). Allowing for plasma compression (n = n i ), as in (B.10), changes the outcome qualitatively if the width w decreases, rather than increases, as the perimeter L p shrinks. This requires a sufficiently large density enhancement, n n i > L p,i L p , (B.14) (B.15) In this regime, both the perpendicular and parallel energies increase as the island contracts. At smaller compressions, the perpendicular energy decreases as before, but more slowly than in the incompressible limit, so that overall the particle energy gain is greater. A finite out-of-plane component of the magnetic field (B t = 0) has the net effect of moderating the impact of changes in the island perimeter: the parallel energy increases less rapidly, and the perpendicular energy factor that depends upon L p decreases less rapidly. Because a finite B t also is expected to reduce the compression n/n i , however, the net effect seems to be a smaller change in the perpendicular energy, whether the latter increases or decreases.

Appendix C Conditions for Adiabatic Invariance
We now estimate the range of validity of our analytical analysis presented in Appendix A. A major assumption of those calculations is the adiabatic invariance of the magnetic moment and parallel action of the accelerated particle. This requires, first, that the associated particle orbit (gyromotion, mirroring, or transiting) be completed much more quickly than the magnetic field changes in time. The characteristic speed for magnetic field changes in the islands is the Alfvén speed, V A . V A is large compared to the proton (or other ion) thermal speed in the CS of a flare, where the plasma β is small, so the analysis above is appropriate only for protons and ions that already are strongly superthermal. This is not necessarily the case for electrons, however, whose speed V e at energy E e is where E 6 is the thermal energy corresponding to a coronal electron temperature T e = 10 6 K. The normalization speed, 5000 km s −1 , is comparable to Alfvén speeds estimated in the corona (e.g., at field strength B = 10 G and number density n = 10 9 cm −3 ). Thus, for moderately superthermal electrons at 1 × 10 6 K and for thermal electrons at 10 7 K -a typical range of preflare temperatures -the adiabatic invariance of the parallel action is a reasonable approximation. A second condition also applies, however: the particle must not suffer collisions while executing its trajectory. The mean free path D e is D e = 3 4 √ 2πnλe 4 E 2 e ≈ 100 10 9 n 10 λ E e E 6 2 km, (C.2) where λ is the Coulomb logarithm (Spitzer 1962). The normalization length, 100 km, is small compared to the size of flaring regions, but the islands are small structures within the flare CS. In addition, D e varies quadratically with the particle energy, so the mean free path rises rapidly for moderately superthermal electrons at ambient coronal temperatures, and it is very large for thermal electrons at enhanced preflare temperatures. Thus, again we conclude that the adiabatic invariance of the parallel action is a reasonable approximation. For at least a significant fraction of the coronal electron population, therefore, our analysis is adequate for a first assessment of the contribution of magnetic-island contraction to particle acceleration in solar flares. In principle, all particles are accelerated by the mechanisms described in this paper, but the energy gain of those that do not satisfy the above restrictions cannot be estimated by our equations based on adiabatic invariance.