The formation and dynamic evolution of double layers which form inside the auroral cavity are studied using one- and two-dimensional electrostatic particle-in-cell simulations. Both the one- and two-dimensional simulations are confined to processes that occur in the auroral cavity and include four plasma populations: hot electrons, H+ and O+ anti-earthward ion beams and a hot H+background population. We show that double layers inside the auroral cavity can evolve nonlinearly from ion phase space holes and are supported by the cold, anti-earthward traveling O+beam. We then present two-dimensional particle-in-cell results which show that double layers in the interior of the auroral cavity can form in higher dimensions. The electric field structure in 2-D is verified as a double layer through simultaneous analysis of the parallel electric field and H+ and O+ phase space.
 One of the unresolved questions in auroral physics is how is the auroral potential drop distributed. The total auroral field aligned potential drop has been calculated to be ∼104 V [Knight, 1973; Reiff et al., 1988]. However, it is not clear how this potential drop is distributed along auroral flux tubes. In this letter, we focus on the role of double layers [Schamel, 1986] in contributing to the auroral potential drop. Other methods that have been suggested include anomalous resistivity [Papadopoulos, 1977; Hasegawa, 1974; Paschmann et al., 2002] and the parallel electric field from kinetic Alfvén waves [Lysak and Song, 2005; Chaston et al., 1999].
 It is now observationally [Ergun et al., 2002a, 2002b] and numerically [Main et al., 2006, 2010] established that a double layer (DL) is the most likely mechanism for creating the parallel electric field often observed at the ionosphere-auroral cavity boundary (low-altitude boundary). The auroral cavity-plasma sheet boundary (high-altitude boundary), which is less constrained due to fewer observations, is also thought to be composed of a DL [Ergun et al., 2000]. However, the low and high altitude potential drops comprise only between 10 and 50% of the total potential drop. Therefore, it has been surmised that DLs form inside of the auroral cavity which, when added to the high and low-altitude DLs, lead to auroral potential drops of ∼104 V. In this paper, we provide numerical evidence supporting the existence of DLs inside the auroral cavity in the upward current region.
 Observational evidence for DLs inside the auroral cavity has been found in FAST and Polar data by Ergun et al. , who coined the term “mid-cavity” DL, which is shown to reside inside the auroral cavity due to an anti-earthward ion beam both below and above the observed parallel electric field “E∥”. Furthermore, using analysis similar to Bernstein et al. , it was shown that locally and nonlocally trapped electrons inside the auroral cavity supports the observed mid-cavity DL [Ergun et al., 2004]. The observed mid-cavity DLs appear to have little to no drift relative to earth. Finally, the altitude range of the observed mid-cavity DLs extends from the low-altitude upward current region (just above the low-altitude boundary) to several thousand km above the low-altitude boundary.
 In addition to FAST and Polar data, observations from S3-3 [Temerin et al., 1982] reveal the coexistence of unipolar and bipolar electric field structures consistent with DLs and phase space holes in the mid-cavity auroral region. Because the FAST, Polar, and S3-3 observations measure anti-earthward traveling ion beams and DL electric fields that point anti-earthward, it is clear that the FAST, Polar, and S3-3 observations all occur inside the auroral cavity in the upward current region. The simulations presented in this paper are therefore restricted to the upward current region.
 The mechanisms that lead to the formation of DLs is a long-standing problem in plasma physics. Hasegawa and Sato  have investigated the formation of DLs from an ion phase space hole, considering one ion species, using a pseudo-potential which precludes a dynamic study of the DL. Sato and Okuda  have dynamically studied the formation of DLs using a particle-in-cell (PIC) simulation. The DLs discussed in Hasegawa and Sato  and Sato and Okuda  have potential gains or potential drops, depending on whether +xis interpreted to be earthward or anti-earthward. In comparison, the DLs that form in the simulations presented here have a potential drop which contribute to the ∼104 V auroral potential drop.
 Previous work [Main et al., 2006, 2010] has found that DLs are remarkably robust. However, it is necessary to support the DL with a trapped population of ions or electrons [Block, 1972, 1977; Raadu, 1989]. At the low-altitude DL, the trapped population consists of cold ionospheric electrons. In Hasegawa and Sato , the electrons serve as the reflected population. For the case of the simulated mid-cavity DL, we show that O+assumes the role of the reflected population in a frame moving with the DL. The trapped population of the observed mid-cavity DL [Ergun et al., 2004] is a population of reflected electrons, not O+ as seen in the simulations presented in this paper. Despite this difference, we will use the term candidate mid-cavity DL to represent double layers which form inside the auroral cavity and which may have some relationship to mid-cavity DLs observed by Ergun et al. . With the evidence presented in this paper and previous observational evidence, mid-cavity DLs become a highly viable option for partially explaining the auroral potential drop in the upward current region.
2 Candidate Mid-Cavity Double Layers in One Dimension
 In this section, we present candidate mid-cavity DLs that form in a one-dimensional (1-D) particle-in-cell (PIC) simulation. We include only processes that occur in the auroral cavity and do not include the ionosphere or low-altitude DL. Four plasma populations are included in the simulation which include H+ and O+ ion beams and hot electrons and H+ions. The temperature of the ion beams is 20 eV, and the anti-earthward drift velocity (vd) is ∼21vth, where . The large ion drift velocity can be accounted for by a 4000–5000 V potential drop at the low-altitude DL. The temperature of the ion beams accelerated through a 4000–5000 V potential drop would normally be ∼1 eV. However, to reduce numerical heating, we have artificially initialized the ion beams at 20 eV. The temperature of the hot electrons and hot ions is 5000 eV and 104 eV, respectively. Realistic mass ratios are used in the 1-D simulations presented in this paper. In order to resolve phase space density in the ion holes and candidate mid-cavity DLs, we use an average of ∼8000 electrons per cell (with an equal number of ions). The cell size is set to 0.7 electron Debye lengths (λDe) and the time step is 0.125, where ωpe is the electron plasma frequency. The 1-D simulations are periodic, which differs little from equivalent open boundary simulations. The simulation presented in this section is ∼3000 electron plasma periods (2π/ωpe) and is 540λDe which corresponds to ∼650 km assuming an electron plasma density of 0.2 cm−3. The ion beam density is 0.08 cm−3 for each species, and the hot H+density is 0.04 cm−3.
 A time history of the electric field is shown in Figure 1. The electric field is plotted only over the nonlinear stage of the simulation which begins at ωet≈5000 and is limited spatially to 0<x<400 km. One candidate mid-cavity DL is labeled in the graph. The bipolar electric field structure below the DL is an ion phase space hole which evolves from a linearly unstable acoustic mode [Muschietti and Roth, 2008; Bergmann and Lotko, 1986], which grows as the result of the velocity difference between H+ and O+. Both ion beams are accelerated through the DL at the lower boundary (not included in our simulations) and therefore acquire a factor of 4 velocity difference due to the mass difference between the two species.
 An interesting aspect to the electric field plot shown in Figure 1 is the dominant role of particular ion holes during the early nonlinear stage of the simulation, which has also been observed by Main et al.. During the linear stage of the evolution, we find plane wave solutions. However, as the simulation advances in time, we find that particular holes dominate the evolution. Therefore, rather than a series of holes growing homogeneously, we find a few holes (10–12) which dominate and grow. The extra space between the holes allows DLs to grow out of the ion holes during the holes' initial development, which we will discuss below in connection with phase space. For smaller velocity differences, the growth is more typical, and the nonlinear evolution does indeed show homogeneous growth of the phase space holes [Main et al., 2012].
 We find that in 1-D, the plasma parameters which lead to mid-cavity DLs is fairly restrictive. Let U=VH−VO be the velocity difference between the H+and O+beam velocities. For a cold, two ion beam instability like the one discussed in this letter, then if U>UL (where UL is found using equation (8) in Muschietti and Roth ), then no instability exists in 1-D. Generally, we need to initialize the beam velocities near ULin order for a mid-cavity DL to grow in 1-D. However, in 2-D (discussed below), we generally find a wider variety of plasma parameters over which mid-cavity DLs will grow.
 In order to gain further insight into the growth and evolution of the candidate mid-cavity DL, Figures 2a and 2aa show snapshots of H+ phase space, O+ phase space (Figures 2b and 2bb), electron, H+, and O+number density (Figures 2c and 2cc) and potential (Figures 2d and 2dd) at two different times in the simulation. Figure 2 is plotted over a spatial range that extends from 0 to 150 km and is centered on the DL labeled in Figure 1. Phase space is plotted in the DL reference frame, which is traveling anti-earthward at ∼500 km/s (a speed that lies between the H+and O+ drift speeds). The electrons in these simulations behave mainly as a Boltzmann fluid. The primary kinetic instability is between H+and O+, which has been discussed in more detail by others [Bergmann and Lotko, 1986; Muschietti and Roth, 2008]. Electron phase space is therefore not included in Figure 2.
 A positive unipolar potential bump is seen in Figure 2d. This potential bump is a precursor to the ion phase space hole observed at x≈90 km in Figure 2aa. Figures 2a and 2b show that the potential bump causes both ion beams to decelerate in the DL reference frame, albeit from different sides of the potential bump. Even at this early stage in the ion hole evolution, a DL is beginning to emerge on the right of the potential bump.
 As both ion beams continue to decelerate due to the positive potential bump, eventually both beams acquire a reflected population, which can be seen in Figure 2a for H+. Eventually, a negative potential dip forms which traps the reflected H+population leading to the formation of an ion hole which can be seen in Figure 2aa at x≈90 km. Essentially, the potential bump in Figure 2d bifurcates with half of it evolving into the ion hole.
 To the right of the ion hole in Figure 2aa, the right half of the potential bump has evolved into a DL (x≈100 km). The evolution of the ion holes in this simulation differ significantly from runs in which the ion holes form homogeneously. In homogeneous runs, the initial potential bump leading to the holes is accompanied by a symmetric potential dip, and there is no bifurcation leading to a net potential drop.
 The O+ions play a crucial role in allowing the DL to form. We see that in the DL frame, O+acts as a reflected population whose density grows as the potential increases (blue curve in Figure 2cc) and dramatically decreases as potential decreases. According to Berstein, Greene, and Kruskal [Bernstein et al., 1957], who discuss the so-called BGK modes, a reflected population is needed to sustain a DL [Schamel, 1986]. Therefore, in the context of BGK theory, the O+ ion beam acts as the reflected population and serves to support the DL.
 By ωet=9250, the mid-cavity DL observed in Figure 2aa is ∼5000 V. This large potential drop causes the plasma density to decrease, which can be seen in the plot of electron density in Figure 2cc, essentially causing a small density cavity in the larger auroral cavity. At the time shown in Figure 2cc, the density within the small cavity is ∼0.15 cm−3and is therefore about 50–60% of the surrounding plasma. Notice that the reflected O+ beam to the right of the DL in Figure 2bb is symmetric about 0 km/s, which is consistent with the idea that O+ serves the role of the reflected population in BGK theory.
3 Candidate Mid-Cavity Double Layers in Two Dimensions
 In this section, we present PIC simulations which demonstrate the formation and evolution of candidate mid-cavity DLs in two spatial and three velocity dimensions (2D3V). The simulation is initialized with the same plasma parameters as the 1-D runs. We set the thermal velocity in the z and y directions (i.e., the two perpendicular thermal velocities) to be the same as the x direction for all species. The electrons are assumed to be strongly magnetized (i.e., electron gyromotion is ignored). The ions are magnetized such that ΩH/ωe = 0.06. The H+to electron mass ratio used in the 2-D simulation is 100, and the O+ to H+ mass ratio is 16. The simulation size is nx×ny= 1536×64, where x and y are parallel and perpendicular to the earth's magnetic field, respectively. Runs with ny=256 have been run with similar results as presented here. The simulation is open along x and periodic along y. We set Ex(0)=Ex(xmax)=0 at the two xboundaries, which allows the potential difference between the parallel boundaries to float. The x and y cell sizes are 0.5λDe∼588 m, so that xmax≈900 km and the extent of the y direction is ∼ 38 km. The time step used is . The simulation has an average of 1200 electrons per cell with an equal number of ions. We note that these simulations lead to large amplitude Langmuir waves, which do not interest us in this paper. Nevertheless, a small time step is needed in order to resolve all wave modes present in the simulation.
 Figure 3a shows E||(x,y) at ωet=2700. The horizontal line in Figure 3a at y≈25 km indicates the value of y which Figures 3b–3e are plotted. Figure 3a shows considerable localized electric field structures. Many of these structures are transient, lasting ∼10–20 electron plasma periods and are therefore assumed to be associated with the Langmuir waves discussed above. The electric field data in Figure 3 is averaged in time in order to smooth over the Langmuir waves. Most of the non-transient structures observed in Figure 3a are ion holes identified by the bipolar (blue-red) electric field structures. The other non-transient structure is a unipolar mid-cavity DL (labeled “DL”) at x≈195 km. The scale size of most candidate mid-cavity DLs that form in the simulations is ∼5–10 λDe in the x direction and ∼15–20λDein the y direction, indicating that the mid-cavity DL does not extend across the entire auroral cavity in the perpendicular direction.
 Figures 3c and 3d show H+and O+ phase space (vxversus x) plotted in the reference frame of the moving mid-cavity DL which has an anti-earthward velocity of ∼1.2×106 m/s. The artificially large DL velocity is due to the artificial mass ratios used in the 2-D simulation. Superimposed on H+ and O+ phase space is the electric field in V/m and the potential in kV, respectively. The potential drop due to the mid-cavity DL is ∼1500 V with a peak electric field of ∼0.3 V/m. The H+and O+signatures of the mid-cavity DL are similar to the 1-D results. We observe in Figure 3c that the H+beam is accelerated anti-earthward by the parallel electric field of the mid-cavity DL, indicating that the DL is stable long enough to accelerate the H+ beam. Furthermore, in the DL frame, O+is observed to be traveling earthward. Upon encountering the DL at x≈195 km, O+ is decelerated, forming a slower moving beam to the left of the DL and also forming a reflected population, which serves as the trapped population as in the 1-D case. Note here the similarity between observed and simulated mid-cavity DLs, both of which indicate an anti-earthward ion beam both above and below the mid-cavity DL. A time history of the parallel electric field at y≈25 km is shown in Figure 3e. The y axis shows time from 1000<ωet<3750. Up to ωet≈1500, the simulation domain is dominated by ion holes. The mid-cavity DL is the red, unipolar structure traveling anti-earthward and is observed to evolve from an ion hole at (x,ωet)≈ (190 km,2400). The mid-cavity DL decays at (x,ωet)≈ (240 km,3400), indicating that the DL persists for s. In the 2-D simulations, we typically see lifetimes of the DL for 1000–1500 . Electron phase space is shown in Figure 3b. Notice the absence of trapped electrons, in contrast to the mid-cavity DLs observed by FAST [Ergun et al., 2004]. The electrons mainly behave as a Boltzmann fluid.
Ergun et al.  indicate that the spatial extent of the mid-cavity DL observed by FAST is localized and/or has a lifetime less than 1 s which is consistent with the results presented in this paper. Furthermore, the amplitude of E∥ from the 2-D simulation is similar to the observations (∼250 mV/m). Another similarity is the observation of an anti-earthward ion beam both below and above the mid-cavity DL. However, there are also differences. The observed mid-cavity DL is supported by a trapped population of mirrored electrons, whereas the simulated DL is supported by the O+population. Furthermore, the simulated mid-cavity DLs are observed to travel anti-earthward at several hundred km/s (assuming realistic mass ratios) whereas the observed mid-cavity DLs by FAST [Ergun et al., 2004] are observed to be nearly stationary. We do note, however, that Temerin et al.  calculate the anti-earthward drift of the observed mid-cavity DLs from S3-3 to be 50 km/s. Therefore, our simulation results are consistent with observations from S3-3. The fact that some mid-cavity DLs are observed to be nearly stationary and others are both observed and simulated to have a significant anti-earthward drift velocity could point to several classes of mid-cavity DLs.
 We have varied the plasma parameters to determine the robustness of the mid-cavity DLs with different plasma conditions. We find that mid-cavity DLs form with a variety of plasma parameters in 2-D. For example, mid-cavity DLs are observed to form in simulations similar to case B discussed in Muschietti and Roth  (we set T⟂=416 eV instead of 52 eV). We also find that mid-cavity DLs form in simulations which contains ions that have greater perpendicular thermal velocities than the run reported in this letter. For the parameters considered in this paper, we find that the instability is primarily parallel to the geomagnetic field and hence 1-D. Using equation (8) from Muschietti and Roth , we find UL≈2.95×106 m/s and in the simulations presented in this paper, U=VH−VO≈2.8×106 m/s, indicating the dominant instability is 1-D. However, in other runs that we have performed that are similar to Case B from Muschietti and Roth , we find O+ cyclotron waves form, consistent with Muschietti and Roth . In these runs, we find a mid-cavity DL forms after the O+cyclotron waves have peaked in amplitude are beginning to decay into phase space holes. Therefore, a spacecraft flying through the region would observe O+cyclotron waves, a mid-cavity DL, and phase space holes, consistent with S3-3 observations.
4 Conclusion and Discussion
 In this paper, we have investigated the role of ion holes in leading to the formation of DLs inside the auroral cavity. We find that the DL positively contributes to the ∼104V auroral potential drop. We recognize, however, that the candidate mid-cavity DL presented in this paper is localized in space and is relatively short-lived (compared with auroral time scales of seconds to minutes). Therefore, in order for such mid-cavity DLs to contribute significantly to the total auroral potential drop, there must be many such structures that form across multiple auroral flux tubes. Furthermore, a comparison of potential drops from other physical processes, such as anomalous resistivity, is too preliminary since much larger simulations are needed to study other mechanisms that could lead to significant auroral potential drops over large distances. In addition, larger simulations require the inclusion of additional physics such as the mirror and the gravitational forces. Therefore, future work is needed to compare the contribution of mid-cavity DLs to the total auroral potential drop with other mechanisms.
 This research was supported by NSF award PHY-0903556.
 The Editor thanks Chung-Sang Ng and an anonymous reviewer for their assistance in evaluating this paper.