
Computer Physics Communications 69(1992) 306—316 Computer Physics North-Holland Communications Rigorous charge conservation for local electromagnetic field solvers John Villasenor Jet Propulsion Laboratory, 4800 Oak (Jim e Dr., Pasadena, (‘A 9/109, USA and Oscar Buneman Department of Electrical Lngmeering,5tanjord Uno’ersity, ,Stanjord, (A 94305-4055. (ISA Received 23 January 1991: in final lorni 12 June 1991 in this paper we present a rigorous method for finding the electric field in two-and—one-half and three dimensional electromagnetic plasma simulations without resorting to coniputationally expensive transforms. A finite grid interpretation of the divergence equation ~‘J = — ~ip/~)i is offered which allows the current density and thus ness local electric and magnetic field strengths to he determined directly from knowledge of charge motion. 1. Introduction ence form, already express such local updating explicitely, namely: Field equations are most commonly solved by transform methods in simulations. The ready — = V xE, (1) availability of efficient transform codes encour- ages one to use such “spectral” methods. So does our custom to describe, interpret, and understand = V X B — J. (2) field phenomena in terms of waves. However, transform methods are “global”: all (using units such that = 1, ,u = I. and c= 1). By of the field information, near and far, contributes staggering B-component and E-component data to each single field harmonic. Computers of the suitably in both space and time (“leapfrogging”). immediate future demand minimization of data these equations provide new data from old, using paths and therefore call for local methods. Even present values only immediately to the east, west, with hypercube topology, ideally suited to FFT north, and south (see fig. 5), and above and below implementation, the physical length of single data in three dimensions [1.71. links will ultimitely become the bottleneck. Meth- By contrast, the two divergence equations, ods which allow one to update fields purely from local data should therefore receive renewed at- V E = p. (3) tention and it is gratifying to note that two of Maxwell’s equations, when cast into finite differ- V B = 0, (4) 00l0-4655/92/$05.00 © 1992 — Elsevier Science Publishers By. All rights reserved J. Villasenor, 0. Buneman / Rigorous charge conservation for local EM field solvers 307 require distant information (spatial boundary on gently and (2) that enough steps are taken to conditions) for their solution, particularly in the let the initial radiation escape across the compu- case of static conditions. Coupled with V x E = 0 tational boundary. (Non-reflecting boundary con- and V X B = J, they then lead to elliptic equations ditions, such as Lindman’s [51become important for the components (or for the associated poten- here.) tials). Transform methods, or other global, direct In a two-dimensional N x N grid this number non-iterative poisson solvers would therefore of steps is of the order N with a computational seem inevitable, effort of order N2 per step. The transform effort Fortunately, the dynamic problem of field evo- is of the order N2 log 2 N. However, since the lution can be solved by means of the evolution- local Maxwell algorithm is so much simpler than ary, local equations (1) and (2) alone, after impos- even the most elegant transform algorithm, the ing the divergence equations (3) and (4) only as transient, local method wins over the global initial conditions. One readily checks that V . B transform method even on present-day computers remains zero if it was so initially and that this is on which the length of data paths is not yet an rigorously true also for the simple space-and- issue. time-centered finite difference versions of a/at, In the first proposal for solving the field prob- curl and div that go with the data arrangement lem locally (Buneman [1]) strict charge conserva- shown in fig. 5. One also checks that V E re- tion was to be achieved with a technique called mains p by virtue of the conservation condition “zero-order current weighting”. In this method, a charge crossing a cell boundary furnishes an im- — (5\ pulse of current proportional to the value of the — “ “ charge. While charge is conserved, the current discontinuities introduced generate large amounts on the charge density. of noise. The nature of this noise is discussed in What we shall be concerned with in this paper Birdsall and Langdon [2]. Morse and Nielson [3] is to make sure that the finite-difference imple- discuss first-order current weighting, where the mentation of the charge conservation law (5) is charge is taken to be evenly distributed across a also consistent with the finite difference version square of unit size and the particle mover calcu- of a/at, div and curl as applied to E and B. In lates currents by breaking a general translation other words, if we generate E time step after into two orthogonal moves of magnitude z~xand time step from the finite-difference versions of ~y. Most recently, Marder [4] described a simula- (1) and (2) and calculate V . E, the resulting p tion method which allows eq. (5) to be approxi- should satisfy (5) exactly in this finite-difference mately satisfied, and the error, or “pseudo-cur- version. rent” is kept small. Both our particle mover and Enforcing the initial conditions on the diver- those discussed by Morse and Nielson are able to gences of E and B at time t = 0 now remains as a rigorously satsify eq. (5); the crucial difference is once-only task. Given the initial p (and some that we do not break up the charge motion into boundary conditions), one can either use a trans- orthogonal moves. form or other non-local method for this first step, or one can let p evolve from zero to its initial state transiently in a certain number of prelimi- 2. Calculating the fluxes and currents nary steps, starting with source-free E and B that satisfy the boundary conditions. Such E and B Instead of updating the “longitudinal” and are in many cases known analytically. “transverse” parts of the E-field separately, as is Experiments performed on a personal corn- often done in field solvers which employ spatial puter by one of us have shown that the static field Fourier transforms, we update E entirely from is approached satisfactorily in transience pro- Maxwell’s aE/at = V x B — J. In the process the vided (1) that the charge distribution p is switched curl B term will, of course, only cause changes in 308 J. Villasenor, 0. Buneman / Rigorous charge conservation for local EM field solvers the transverse part of E. However, when J has a longitudinal part — which by virtue of V J = —ap/at means when the charge density changes — we get changes in the longitudinal part of E, ______________ i e its flux by Just the change in p as it should be In other words there is no need to calculate ______________ __________ the longitudinal part of E separately except at the very begtnntng (at time t = 0) This supposes that the ftnite difference form of current depost tion is consistent with the continuity equation, i.e. __________________ that the flux of J represents the change in the charge distribution p rigorously. The transverse part of E is affected also by the magnetic field B. The record of B has to be updated at every step by the transverse part of E, in accordance with Maxwell’s aB/at = — V x E. In doing this, one accounts fully for both TE modes as well as TM modes which are excited by Fig. 1. Particle-in-cell. A charge with square cross-section the motion of the charges. ‘ ‘ . moves in a simulation space divided into cells also having We start the simulation by adopting the part!- square cross-section. cle-in-cell method — creating a grid consisting of squares of unit size, and placing on it unit square charges. The charges may be located at arbitrary the moves for purposes of illustration; in the places, and can be assigned either positive or actual simulation the time step must satisfy the negative values. The total amount of charge is Courant condition, ~t < ~x/~/i for a square assumed to be uniformly distributed over its sur- mesh in two dimensions. This limits the charge face, and as fig. 1 shows, each charge will in displacements to less than ~x/ ~ per step. general contribute to the charge density in four The simplest and most common type of charge cells. The fractions contributed to each of the motion involves four boundaries. The action of four cells are proportional to the rectangular the charge sweeping across the cell boundaries areas of the charge square intercepted by the gives rise to currents J~,~ in’ “v2’ as mdi- cells. This is “area weighting” (see ref. [2]). cated in fig. 2. With each step of the simulation, each charge Defining the “local origin” for any charge to is instructed to move a certain distance in a he the intersection of cell boundaries nearest to certain direction. Since current density is in the the charge center at the start of its motion and discrete case represented by motion of charge the coordinates x and y to be the location of the into or out of a cell, it can be seen by the cell center relative to this origin, we can then divergence equation (5) that each boundary will write the currents (assuming unit charge) as: be swept over by an area of the square charge I that exactly corresponds to the current in a given j 51 = ~X(1 —y — (6) direction into or out of that cell.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages11 Page
-
File Size-