Chapter 5 ALGORITHM CONFIDENCE Confidence in the validity and accuracy of solutions obtained from the test-particle algorithm is essential before one can draw meaningful conclusions when novel electromagnetic fields are introduced into the system. In this chapter, the simulation is tested against known analytical solutions of fundamental trapped particle behavior. Figure 5-1 shows the reaction of charged particles in the presence of a dipole magnetic field. Particles spiral around magnetic field lines with gyro motion, defined in Section 2.1; move between mirror points along the field lines with bounce motion; and revolve about the Earth in drift motion. Figure 5-1. Illustration from Baumjohann and Treumann [1997] depicting the modes of particle motion within the Earth’s magnetic field. Electron and ion trajectories simultaneously spiral around magnetic field lines; move along the field lines bouncing between the mirror points; and drift about the Earth’s axis westward for ions and eastward for electrons. 33 34 The first section, 5.1, describes a benchmark study involving pure electron bounce acceleration in the presence of a dipole magnetic field. The study in Section 5.2 includes a transverse electric field component, which induces an azimuthal drift of the particle about the Earth. Section 5.3 includes a static parallel potential drop; hence, an electric field in accelerates the electron and changes its mirror points relative to its bounce motion in a pure dipole magnetic field. The overall reliability of the algorithm is discussed in Section 5.4. 5.1 BOUNCE ACCELERATION Charged particles in the presence of a dipole magnetic field, like the geomagnetic field given by equation (3.1), may become trapped between mirror points in the northern and southern hemispheres due to the mirror force in the parallel acceleration equation from Chapter 2. The first benchmark study concerns one-dimensional parallel electron motion in the presence of only the mirror force. The relevant equations of motion are: v μ v h M 1 B , m h μ . 5.1 The bounce period of the motion is the time it takes for a particle to travel along the field line to each mirror point and back to its original position. Baumjohann and Treumann [1997] give the bounce period as, τB LRE W / m1 / 2 3.7 1.6 sin , eq 5.2 35 which is strongly dependent on the energy of the particle, the equatorial distance from the Earth, LRE, and weakly dependent on the equatorial pitch angle. The dependence of the bounce period on mirror point colatitude, which may be mapped uniquely onto equatorial pitch angle [Baumjohann and Treumann, 1997], is shown in Figure 5-2. Numerical bounce periods are calculated with the normalization used in Schultz and Lanzerotti [1974], 4L v , for a direct comparison to the analytical bounce periods of a 100 eV electron as it varies with mirror point colatitude. Figure 5-2. Top panel is a comparison of numerical solutions and analytical solutions from Schultz and Lanzerotti [page 19] of electron bounce periods varying with the mirror point colatitude. The numerical values of bounce periods of a 100eV electron at L=7.5 are normalized to the coefficients in Schultz and Lanzerotti, 4 L v . The bottom panel illustrates the percent error between the analytic and numeric solutions. Note that the analytical solution is itself an approximation. The errors in this approximation are attributed to an irreducible integral are not included in the error of the figure. 36 The matrices representing the wave electromagnetic drift and acceleration terms of the integrator algorithm were turned off (set to zero) for the test. Only the mirror force due to the ambient magnetic field function contributes to particle motion. To understand bounce motion in a physical sense, imagine releasing a particle in the equatorial plane at a distance LRE from the Earth’s center; it travels down the dipole field line. The particle parallel velocity decreases with increasing magnetic field strength while the perpendicular velocity increases conserving the total energy of the particle. The mirror point occurs when the parallel velocity is zero whereupon the perpendicular velocity achieves its maximum value. At the mirror point, the particle reverses its parallel motion and begins to accelerate back up the field line toward the equator where the magnetic field strength is weaker. After crossing the equatorial plane, the particle again experiences the parallel deceleration while approaching the mirror point in the other geomagnetic hemisphere. The bounce period solutions shown in Figure 5-2 exhibit an error of approximately 0.15 percent between the analytical and numerical models. Errors in the model are introduced in the form of local truncation errors associated with integration and roundoff error due to multiple transformations between coordinate systems. 5.2 AZIMUTH DRIFT MOTION Consider the drift motion about the earth shown in Figure 5-1, which occurs in the presence of the dipole magnetic field. There is also an azimuthal component from the electric drift velocity described in equation (3.4) when a transverse electric field, EL, is 37 introduced. A static electric field transverse to the ambient magnetic field is defined for this test, and the numerically calculated particle drift motion is proportional to the value of this field. The drift velocity expressed in terms of dipole coordinates is given in Section 3.1. The relevant component of the electric drift equation is, vφ h E L B0 1 . 2 2 B B0 r sin A static perpendicular electric field, proportional to the ambient magnetic field is chosen to evaluate the azimuthal drift velocity: EL 5B0 V/m. 5.3 This test exercises and verifies the accuracy of the field interpolation algorithm, as well as, the particle integration for simple azimuthal drift motion combined with dipole bounce motion. Mapping the electric field of equation (5.3) into the computational domain, with respect to the spherical coordinates r, θ , is completed according to the generic matrix form established for the input fields in Section 4.3. The velocity is constant; therefore, the associated error is dependent upon the accuracy with which the electric field is mapped and interpolated in addition to the original truncation and round-off errors associated with the integration algorithm already discussed. The algorithms described in Chapter 4 interpolate EL and predict a constant drift for particles with energies varying from 10eV to 500eV, shown in Figure 5-3. The 38 constant slope of the lines in Figure 5-3 represent the angular velocity of the particles and is accurate to approximately 0.15 percent error. Figure 5-3. The numerical solutions of azimuth drift motion for a transverse static electric field of various electrons with energies from 10eV to 500eV are compared. 5.3 FIXED POTENTIAL EFFECTS The third and final validation of the algorithm incorporates a specified parallel electric potential distribution that changes the mirror point relative to that found in Section 5.1. If an electric potential distribution is imposed along magnetic field lines between the ionospheres, a static parallel electric field is introduced into the system: E|| || . 5.4 39 This electric field acts as the Coulomb force in equation (3.7), accelerating electrons in the direction opposing the parallel electric field. 5.3.1 ELECTRIC POTENTIAL For this benchmark, the electric potential is taken to be an explicit function of the dipole magnetic field; therefore, it depends implicitly on its position along the field line. The representation of the electric potential used for this benchmark is defined as, 0 sin 1 B B p . 5.5 The variable 0 is the amplitude of the potential. The maximum potential occurs at the equator and its minimum, 0 , occurs where B B p , which is taken to be the dipole field strength on a particular L-shell at an altitude of 100 kilometers above the Earth where the particles are expected to precipitate. The field-aligned gradient of the potential is not explicitly known because the electric potential is an implicit function of position, f B(r, ) . Applying the chain rule in terms of dipole coordinates reveals that μ̂ 1 B . h B In Section 3.4 the dipole magnetic field gradient along the field was evaluated as 1 B 3BE cos h RE r RE 4 sin 2 2 . 1 3 cos 2 40 Combining this expression and the partial derivative of the potential with respect to the dipole magnetic field to form the parallel electric field yields, E 3BE cos B p RE r RE 4 sin 2 B . 2 0 cos1 2 B 1 3 cos p 5.6 Mapping the electric field above into the dipolar computational domain, with respect to the spherical coordinates r , , is completed according to the generic matrix form established for the input fields in Section 4.3. 5.3.2 ELECTRON ENERGY BALANCE The energy balance for an electron including the static electric potential is W W|| e eq W e m W W|| e i , 5.7 where the subscript eq denotes values at the equator, the subscript m depicts values at the mirror point and i represents the iterate values at any point during the simulation. The value of the electric potential is calculated at every time step within the integration algorithm. These numerical solutions are shown plotted with the analytic function, equation (5.5), in Figure 5-4. The energy balance of equation (5.7) also implies that the total energy of the particle must remain constant throughout the simulation, illustrated in the bottom panel of Figure 5-5. 41 Figure 5-4. The electric potential function is directly compared to the numerical approximation. This approximation of the electric potential is calculated within the particle integrator every iteration. The initial electron thermal energy, equatorial pitch angle and maximum amplitude of the test case are displayed between the panels, respectively. 5.3.3 POTENTIAL FIELD ACCURACY For the parallel potential problem, the continual coordinate transformations due to dependence on particle position and magnetic field strength incurs additional roundoff errors compared to the other tests in this chapter. The complexity of evaluating electric potential every iteration also contributes to the round-off error of the solutions. These errors are in addition to the truncation error and interpolation round off inherent in the algorithm. 42 The analytic and numerical potential values in the top panel of Figure 5-4 are found to differ on average by 0.001 percent which appears to be increasing with time at a rate of 110-6 percent per second. The total numerically calculated energy of the particles remained constant during the simulation illustrated in the bottom panel of Figure 5-5. Figure 5-5. The bottom panel demonstrates the constancy of the total energy, Wtotal W W|| e and the top panel depicts the oscillatory behavior of the ratio, W|| W , due the bounce motion. The initial electron energy, equatorial pitch angle and maximum amplitude of the test case are displayed between the panels. 5.4 ERROR ANALYSIS The benchmarks presented in this chapter include an evaluated percent error between numerical values and the corresponding known values. These errors arise from several 43 sources and the estimates are the criteria for which this algorithm is considered reliable. Round-off errors from continual coordinate transformations and linear interpolation, along with local truncation errors associated with the numerical integration, all contribute to the overall error. Any inherent errors associated with the wave fields are also a factor. Title: /afs/thayer.dartmouth.edu/home/grad/epac k/w eb/researc h/matlab/DT.eps Creator: MATLAB, The Mathw orks, Inc. Prev iew : This EPS picture w as not s av ed w ith a preview inc luded in it. Comment: This EPS picture w ill print to a Pos tSc ript printer, but not to other ty pes of printers. Figure 5-6. Step size is compared to the local truncation error of the integrator algorithm. Numerical bounce period solutions for a 100 eV electron and 30˚ mirroring colatitude were calculated. The percent error of these calculations compared to the analytical solution found in Baumjohann and Treumann [1997] are plotted as a function of step size. The slope of this relation is four indicating that the calculation is indeed fourth order (see Burden and Faires [1993]). Local truncation error mentioned in Section 4.2 decreases with step size. The figure below illustrates the relationship between error and step size (i.e., error increases with 44 step size). This relationship normally holds until the increased resolution of the step size creates instabilities in the code. The truncation error breaks down at this local minimum and algorithm error increases as step size decreases. The amount of error associated with a coarse step size, according to Figure 5-6, is acceptable and stable while the algorithm operates within this range of resolution. The anticipated errors discussed above appear to validate the assumptions made in Chapter 3 and the numerical calculations described in Chapter 4. The functions and subroutines developed for the solution have proven reliable and robust when subjected to controlled phenomena. The direct comparisons give the range of precision of the solutions generated by the aggregate algorithm.