Recently, there has been significant interest in formulations of macro-particle models using variational methods. This is attractive because many of the inherent pathologies of traditional particle-in-cell methods are avoided. Broadly, there are two approaches to constructing these models that on the surface appear incompatible: a Lagrangian method based on the Low Lagrangian and a Hamiltonian method based on the noncanonical Vlasov–Maxwell Poisson bracket. In both cases, a reduction is performed on the distribution function, which is replaced by a finite sum of macro-particles with a fixed spatial structure and definite momentum. The distribution is, thus, replaced as dynamical variable by a collection of macro-particle positions and momenta. Here, we resolve the apparent discrepancy between the two approaches and show (1) that the noncanonical Hamiltonian formulation can be transformed into a canonical Hamiltonian system; (2) that this canonical Hamiltonian system is identical to that obtained from the Lagrangian by Legendre transformation; and (3) that introducing a grid in the Lagrangian setting requires careful treatment and an unusual structure in the variational principle to account for the breaking of gauge invariance.

Recently, there has been renewed interest in the variational formulation of macro-particle kinetic plasma models. Early work1,2 involved a reduction of the Low Lagrangian3 using point particles that suffer from significant computational noise. More modern efforts have been based on the phase space action,4 the Low Lagrangian,5–7 or the noncanonical bracket.8,9 Benefits of the variational approach include exact energy conservation, which precludes grid heating,10–12 reduced noise,7 and a rigorous theoretical foundation based on a direct connection to the underlying Maxwell–Vlasov system. While representing the potentials (or fields) with a truncated basis set is compatible with any of these formulations, discretizing space using a grid, which is straightforward in the Lagrangian formulation, seems incompatible with the noncanonical Hamiltonian approach. The use of a grid is essential for computationally performant implementations on large multi-node computer systems. An outstanding question was what are phenomenological differences between macro-particle models obtained from the Lagrangian vs the noncanonical Hamiltonian formulation? Here, we show that once a macro-particle reduction is performed, the noncanonical system can be transformed into a canonical Hamiltonian system and then to a Lagrangian system that is identical to that obtained from the Low Lagrangian by the same macro-particle reduction. Thus, we conclude all formulations are identical. Furthermore, we demonstrate spatial discretization using a grid in both the Lagrangian and canonical Hamiltonian formulations. The latter is of significant interest as it allows for the use of symplectic integrators13 on the combined macro-particle and field phase space.6,14 We show that the grid-based discretization breaks gauge invariance and, consequently, special care is needed in handling the variational principle. Finally, we give a general, minimalist basis formulation that preserves gauge invariance. As a special case, we demonstrate the use of a truncated Fourier representation for the potentials that preserves gauge invariance and conserves momentum.

We consider a single mobile species with charge q, mass m, and phase space distribution f governed by the Vlasov–Maxwell equations and immobile ions with charge density ρion (the extension to multiple mobile species is obvious). We replace the distribution function with a finite set of macro-particles5–7 with fixed spacial structure, definite momentum, and weight wα,
(1)
where ξα(t) and ξ̇α(t) are the macro-particle position and velocity, respectively, and
(2)
so that αwα is the total number of particles. While this reduction appears ad hoc, it can be viewed as a spatially “smoothed” version of the Klimontovich distribution.15 In this way, we replace f as the dynamical variable in favor of ξα(t) and ξ̇α(t). As we will see, the ξα are not simply characteristic curves of the Vlasov–Maxwell equation. Applying this reduction to the Low Lagrangian3 yields5–7 
(3)
where φ and A are the scalar and vector potentials, respectively, with the electric and magnetic fields given in the usual way as follows:
(4a)
(4b)
We can interpret
(5a)
and
(5b)
as the macro-particle charge and current densities, respectively, and can see that the continuity equation
(6)
is satisfied by virtue of the form of the reduction (1). The reduced Lagrangian inherits energy and momentum conservation and gauge-invariance from the underlying Vlasov–Maxwell system.
Taking the action I=dtL to be stationary yields the equations of motion in the usual way,
(7a)
(7b)
and
(7c)
where
(8)
We can see that (7a) is simply the Lorentz force averaged over the spatial extent of the macro-particle while (7b) is Ampère's Law and (7c) is Gauss's Law. Had we taken the macro-particles to be points in space,1 i.e., S(rξα)=δ3(rξα), then the macro-particle equations would be the characteristic curves of the Vlasov–Maxwell system. Using point particles, however, has unusably high noise levels [similar to the nearest grid-point charge deposition in the standard particle-in-cell (PIC) algorithm16,17].
It is straightforward to show that (7) leads to conservation of energy
(9)
and total momentum
(10)
Finally, as will become important below, we see that pα, the momentum conjugate to ξα, is given by
(11)
while the momentum conjugate to A is given by
(12)
Of course, there is no momentum conjugate to φ which complicates the transformation to canonical coordinates below.
The Vlasov–Maxwell system has a well-known noncanonical structure18–21 with Poisson bracket
(13)
where
(14)
and
(15)
and Hamiltonian
(16)
The evolution of the dynamical variables is given by
(17)
This system has the Casimir invariants [null vectors of (13)]
(18)
(19)
and
(20)
for arbitrary functions αf, αE, and αB. For (13) to satisfy the Jacobi identity, ·B=0 and thus the only acceptable value is CB=0. Since E and B are constrained by Gauss's Law and ·B=0, respectively, these constraints should be added to the Hamiltonian with Lagrange multipliers.22 These terms would be identical to the Casimirs CE and CB and, thus, could not contribute to the equations of motion and so can be ignored.
We now again reduce the phase space distribution function by introducing macro-particles as follows:
(21)
To proceed, it appears necessary to treat each macro-particle as a separate species. Here, we replace functionals of f by corresponding functions of the macro-particle variables. We can view the macro-particle variables as moments of the distribution function
(22a)
(22b)
and
(22c)
from which we find
(23a)
(23b)
and
(23c)
For any functional F̃ of the distribution function and the fields, there exists an equivalent hybrid object F̂ that is a function of the macro-particle variables and a functional of the field variables
(24)
The functional derivative with respect to the phase space distribution function can be expressed as
(25)
Now,
(26)
giving
(27)
Furthermore, from (25), we see
(28)
and, thus,
(29)
Similarly,
(30)
Combining (27), (29), and (30), we find the reduced bracket to be
(31)
Under this reduction, the Casimirs (18) all become proportional to αwα [due to the structure of (21), the only admissible αf(f) are linear in f].
From (22c), we see
(32)
and, thus, we can write the reduced Hamiltonian as
(33)
where
(34)
Using (31) and (33), we find
(35a)
(35b)
(35c)
and
(35d)
These equations of motion are identical to the equations of motion (7) obtained from the reduced Lagrangian where Gauss's Law follows from Ampère's Law and the continuity equation (6).

Previously, it has been shown5 that in one-dimension, the macro-particle reduction of the nonrelativistic Vlasov–Ampère system yields dynamical equations equivalent to those obtained from the Lagrangian formulation. Here, we show the equivalence of the two formulations in the general case. The presence of the magnetic field greatly complicates the analysis.

We begin by replacing the electric field with Π using (12) and magnetic fields with the vector potential. Thus, for any F̂ there is an equivalent F¯ that is a function of the macro-particle quantities and a functional of A and Π,
(36)
Now,
(37)
and
(38)
Writing (31) in terms of our new functionals gives
(39)
In these variables, CE (19), is no longer a Casimir and, of course, CB=0. We still have the Gauss's Law constraint on Π; thus, we must add a Lagrange multiplier to the Hamiltonian which will be adjusted to enforce the constraint. In the new coordinates, the Hamiltonian is
(40)
where αE is the Lagrange multiplier.
Using (39) and (40), we find
(41a)
(41b)
(41c)
and
(41d)
Using the definition of Π (12), we see that (41c) becomes
(42)
(41d) leads to
(43)
and (41b) becomes
(44)
The Lagrange multiplier is determined from the Gauss's Law constraint and (41d) to be
(45)
Clearly, the Lagrange multiplier plays the role of the scalar potential. It is only through the Gauss's Law constraint that φ enters as there is no corresponding dynamical equation. This leads to the natural interpretation that the role of the scalar potential it to ensure that Gauss's Law is satisfied.
We now make one last change of variables, replacing πα with pα. For any F¯, there is an equivalent F that is a function of the macro-particle canonical coordinates and momenta and a functional of A and Π,
(46)
From (11), we have
(47)
giving
(48)
Now,
(49)
where there is an implied sum over repeated roman indices and jF are the components of F. Thus, (48) becomes
(50)
Here, the chain rule is significantly more complicated so comparing δF¯ to δF provides a more straightforward means to relate the derivatives. To this end, we compute
(51)
and
(52)
We now substitute (50) into (52) to obtain
(53)
which is compared to (51) to determine
(54a)
(54b)
(54c)
(54d)
We use the above to transform (39). We find that
(55)
The second term in (39) transforms trivially as
(56)
The third term also transforms trivially
(57)
The last term becomes
(58)
Putting the pieces together, (39) becomes
(59)
The last term in (59) has the following form:
(60)
where εijk is the usual 3D Levi–Civita symbol and, thus, (59) becomes
(61)
which is clearly canonical. Since we have performed a series of exact coordinate transformations leading to a canonical bracket, it must be the case that (31) and (39) are “good” Poisson brackets and, therefore, must satisfy the Jacobi identity. The Hamiltonian is given by (40) but with the understanding that πα is a function of ξα and pα and functional of A through
(62)
The equations of motion for the fields are
(63a)
and
(63b)
Using (5b), (12), and (32), these become
(64a)
and
(64b)
The macro-particle equations of motion are more involved. As we expect,
(65)
Now,
(66)
From (62), we have
(67)
Combining these equations, we have
(68)
The Lagrange multiplier is determined from the constraint by taking the divergence of (64a) to give
(69)
It is easy to see that these equations of motion are identical to (35) with the identification of αE with φ.
We now take the Legendre transform
(70)
to obtain a Lagrangian, which we can then compare to (3). From the Hamiltonian, we have
(71a)
and
(71b)
which we use to eliminate the canonical momenta, viz.,
(72)
and
(73)
where γα is given by (8). A straightforward calculation yields
(74)
which we see is identical to the reduced Lagrangian (3) if we choose
(75)
This choice re-introduces the scalar potential to the Lagrangian system derived from the noncanonical formulation and completes the equivalence between the two systems. This reinforces the view that the scalar potential can be interpreted of as a Lagrange multiplier rather than a dynamical quantity.
We have shown that the noncanonical system is identical to the system with Lagrangian (3). We now perform a Legendre transform to obtain a canonical Hamiltonian system from the Lagrangian (3) to demonstrate a well-known22 but nonetheless interesting quirk of electrodynamics. Determining the canonical momenta for the Lagrangian (3) in the standard way reveals immediately that the momentum conjugate to the scalar potential, Πφ, is identically zero. Thus, we cannot write Πφ as a function of φ̇ and we have a constrained system, which requires the use of the Dirac–Bergmann algorithm22–25 to transform the canonical system even though no gauge condition has been chosen. Here, Πφ=0 acts as a primary constraint. In the usual way, we replace the time-derivatives of the coordinates and fields using (71). We construct the constrained Hamiltonian as
(76)
which is evaluated according to our primary constraint and (71) to give
(77)
Now, Hc is restricted to the sub-manifold of the phase space defined by the primary constraint; notice that this Hamiltonian matches the Hamiltonian (40). Furthermore, we have the Gauss's Law (which plays the role of a constitutive relation) constraining the canonical field momentum
(78)
To define a Hamiltonian on all phase space, we continue the Dirac–Bergmann algorithm by adding the constraints with Lagrange multipliers to Hc to obtain the primary Hamiltonian
(79)
Explicitly, we have
(80)
We also have to extend the Poisson bracket (61) to full phase space in accordance with Dirac–Bergmann,
(81)
This system yields equations of motion identical to those obtained from (40) and (61).

The primary Hamiltonian (80) and extended bracket (81) is the correct canonical formulation according to the Dirac–Bergmann algorithm, yet the noncanonical system only produced us the constrained Hamiltonian and its corresponding bracket. Since the noncanonical formulation begins with E and B, it has no need to represent the entire phase space for the potentials and, as can be seen by its Casimirs, is only valid on the constrained phase space. In the noncanonical formulation, we do not need φ to be a dynamical variable but simply “some scalar function that makes Gauss's Law true.” When starting from the Lagrangian, where the system is derived in terms of potentials, the actual dynamics of φ are significant and can be carried into the Hamiltonian picture via the primary Hamiltonian.

Previous work has shown that using a Fourier representation for the potential results in exact momentum conservation in the electrostatic case.5 It has also been shown,6 in one-dimension, that if the potentials are expanded in a truncated basis that exactly represents the derivative operator, then a discrete from of the continuity holds and the Lagrangian is gauge invariant and momentum is exactly conserved.

We now introduce a truncated Fourier series representation of the potentials5,6,14,26 which, as expected, preserves both gauge and translation invariance. This is a special case of the general basis expansion shown in the  Appendix. To simplify the exposition, we take the domain to be a cube of size L and take the same number of modes in each direction. The generalization to an arbitrary Cartesian domain with different truncations in each direction is straightforward. We define the Fourier representation over a periodic domain of length L as
(82)
where I represents a triple of integers from the set N=[N,N]×[N,N]×[N,N] with the sum ranging over all possible triples and
(83)
where (l,m,n)N. The amplitudes are defined
(84)
Since we are dealing only with real-valued functions,
(85)
Using this representation, the Lagrangian (3) becomes
(86)
where
(87a)
and
(87b)
The equations of motion are
(88a)
(88b)
and
(88c)
These equations are identical to (7) with the truncated expansion substituted for the potentials. In addition, if we compare the time-derivative of (88c) with the dot product of ikI/c and (88b), we find
(89)
[which also follows immediately from (87)]. This is what we expect based on the analysis in Sec. V; this is a discretization that preserves gauge invariance and, thus, in the absence of an imposed gauge condition, the equations of motion should imply the appropriate discrete continuity equation.
The Lagrangian (86) retains the translation symmetry of (3) and, therefore, there is a conserved momentum. The symmetry transformation is
(90a)
(90b)
and
(90c)
The conserved momentum given by Noether's Theorem is
(91)
Using the equations of motion, this can be simplified to give
(92)
in agreement with (10).

For the Lagrangian (3), the continuity equation is structural in the reduction (1) and not dynamic as it is, say, in the general Vlasov system. With the noncanonical formulation seen in Sec. III B, Gauss's Law does not appear as an equation of motion but rather as a constraint on the system and instead follows from the equations of motion as a consequence of ρ and J satisfying the continuity equation. While discretizations such as that in Sec. IV can maintain this property, representing the fields on a grid, which is desirable for computational performance, generically results in the discrete version of the continuity equation not being exactly satisfied.6 As we will see below, the failure of the continuity equation to hold implies the system is not gauge-invariant.

Variations of the action obtained from (3) with respect to A and φ yield
(93)
(the variation with respect to ξα has been ignored as it is irrelevant to gauge invariance). These variations yield Gauss's Law
(94a)
and Ampère's law
(94b)
as the equations of motion. The definitions of the electric and magnetic fields in terms of potentials give the other two Maxwell equations. Subtracting the time derivative of (94a) from the divergence of (94b) gives the continuity equation (6) consistent with our definitions of ρ and J.
We now explicitly decompose the general variations δφ and δA into a part that can be expressed as a gauge transformation and the remainder. The simplest representation is
(95a)
and
(95b)
where δλ and δC are arbitrary. We can, thus, rearrange (93) as
(96)
The equations of motion for the above variation are
(97a)
and
(97b)
and, similar to before, we can take the divergence of Ampère's Law and substitute in the other equation of motion to find
(98)
which is the time derivative of Gauss's Law. Since we only have the time derivative of Gauss's Law in this formulation, the stationary ions only enter the dynamics via initial conditions. Taking δC=0 results in the variations corresponding to a gauge transformation and so we see that the continuity equation holding is a prerequisite for the action to be invariant under gauge transformations. By this splitting of variations, we see that either the continuity equation must be satisfied or the variations must be made in a way that keeps δλ=0. When the method of discretization results in the discrete continuity equation not holding exactly (and, thus, breaks gauge invariance), we can no longer vary φ without introducing contradictions into the equations of motion; since the equations of motion can be combined to yield the continuity equation this is an obvious contradiction when the continuity equation is no longer true. It has previously been shown6 that, in one-dimension, a contradiction existed between Ampère's Law and Gauss's Law unless a discrete version of the continuity equation held. Here, we have now shown that this contradiction arises from the gauge transformation “part” of the variation and setting δλ=0 yields the correct dynamics.

Gauss's Law and charge conservation are effectively tied to one another in the continuous system. As was seen in the Lagrangian (74), the multiplier that enters the system to produce Gauss's Law in the Hamiltonian picture transforms into the structure needed to allow gauge transformations in the Lagrangian picture. Thus, when the discretization violates local charge conservation, the dynamical equations no longer imply Gauss's Law.

Knowing that the method of discretization can change the variational principle such that Gauss's Law is no longer an equation of motion, we seek to keep it in the system by adding it to the Lagrangian as a constraint
(99)
We remove gauge transformations from the variations and, thus, vary with respect only to C and μ (and again ignore the variations in ξα as they are not important to the discussion) giving
(100)
This obviously re-introduces Gauss's Law as an equation of motion with the consequence of the addition of μ/t in Ampère's Law. We combine the two equations of motion as before to find
(101)
Of course for a gauge invariant system that preserves the continuity equation, the right hand side of the above is zero and the only reasonable solution is μ=0. This is to be expected since a gauge invariant system already has Gauss's Law as an equation of motion so the Lagrange multiplier enforcing it is unnecessary. For a non-gauge invariant system, however, we see that the error in the continuity equation enters as a source for the Lagrange multiplier's equation of motion and modifies Ampère's Law.
We consider a discretization of (3) by representing the potentials on a grid. When projected onto the grid, the charge and current densities, (5a), and (5b) will no longer satisfy the discrete form of the continuity equation6 and the discrete Lagrangian will not be gauge invariant. As we have seen above, we must restrict variations of the potentials to exclude gauge transformations. The simplest way to accomplish this is to choose a gauge that does not impose constraints amongst the potentials; here we will use the Weyl gauge, φ=0 and enforce Gauss's Law using a Lagrange multiplier; see Sec. V B. We take a uniform grid with Nx, Ny, and Nz grid points in the x, y, and z directions, respectively, grid spacing Δx, Δy, and Δz, and extent Lx, Ly, and Lz. We enumerate the grid points as xi, 0i<Nx, yj, 0j<Ny, and zk, 0k<Nz. For any function of F(r), we denote the approximate value at a grid point as FijkF(xi,yj,zk). As much as possible we will suppress indices and sums to reduce clutter in expressions. The relevant finite difference operators needed are N and N2, the discrete approximations of and 2, respectively. We define
(102)
where
(103a)
(103b)
(103c)
are central difference approximations to the first derivative in x, y, and z, respectively, and, consequently, are antisymmetric: Dija=Djia. Similarly, we define
(104)
where
(105a)
(105b)
(105c)
are central difference approximations to the second derivative in x, y, and z, respectively, and, consequently, are symmetric: Kija=Kjia for ax,y,z. For example, a second order approximation yields
(106)
and
(107)
The divergence and curl have a natural approximation in terms of (102),
(108a)
(108b)
where ea are the Cartesian unit vectors. A consequence of these definitions is that important vector calculus identities, which are geometric in nature, are respected by these finite difference operators, namely,
(109a)
(109b)
and
(109c)
Whether [(N·N)F] reduces to (N2F) depends on the details of Dija and Kija but does not hold for commonly used compact approximations for the first and second derivative regardless of order. The symmetry properties of D and K lead to the identities
(110a)
and
(110b)
where the sum extends over all grid points and we take either periodic boundary conditions or assume that F and G vanish at the edge of the domain. An immediate consequence of (110a) is
(110c)
In general, there is no finite difference analog of the product rule.
We now discretize (3) in the Weyl gauge and add a constraint to enforce Gauss's Law. Furthermore, we replace the integration by a sum and expand |×A|2 before approximating. This gives
(111)
where the sums extend over all grid points, Δ=ΔxΔyΔz,
(112)
and ϱijkα is the interpolated particle shape evaluated at ξα and is assumed to be product of one-dimensional shapes (see Ref. 5). The equations of motion are
(113a)
and
(113b)
where
(114)
The Lagrange multiplier satisfies
(115)
The first term on the right of (115) is a measure of the discrepancy between N2 and N.N and vanishes as the grid spacing is reduced in accordance with the truncation errors of the finite-difference approximations. The second term is measure of the error in the discrete version of the continuity equation and does not generally vanish as the grid is refined. This is a consequence of the usual practice of tying the particle shape to the grid spacing. This term will tend to zero as the number of grid points within the support of the particle shape function grows.
When discretizing the canonical Hamiltonian formulation on a grid, we expect the Poisson bracket (61) to become
(116)
as we have a finite degree-of-freedom system. If we examine the unconstrained version of (111), we see that the momentum conjugate to A becomes
(117)
which differs from (12) by a factor of the discrete volume element. Working in the Weyl gauge eliminates the constraint associated with Πφ, but the Gauss's Law constraint still needs to be considered. The primary Hamiltonian is now
(118)
where γα is given by (34) and
(119)
The equations of motion for the fields are
(120a)
(120b)
which can be combined to give
(121)
which is identical to (113b). The constraint is evaluated using (117) to give
(122)
in agreement with (115). Again, the equation of motion for the macro-particle quantities are more involved. We find
(123)
and
(124)
while from (119), we have
(125)

Combining these two expressions, we arrive at (113a). While the canonical and Lagrangian formulations give identical dynamics, the canonical formulation allow for the use of symplectic integrators13 on the combined macro-particle and field phase space.6,14

To illustrate our formulation, we consider a combination of an electron electromagnetic mode and a Langmuir wave in one spatial dimension with stationary ions in the nonrelativistic approximation. We solve (113) taking μ0 to understand the errors in Gauss's Law due to the lack of an exact continuity equation. We take the domain size kpL=2π, where kpc=ωp and ωp=4πq2n0/m is the plasma frequency and n0 is the equilibrium density. We examine three choices for ϱi, which correspond to standard particle shapes17 used with the PIC algorithm, that are piecewise quadratic, cubic, and quartic, extending over three, four, and five cells, respectively. The non-zero values of ϱk are given by
(126)
quadratic;
(127)
cubic; and
(128)
quartic, where δ=(ξzαzk)/Δz and zk is the grid point closest to the macro-particle location ξzα.
The macro-particles are initially uniformly spaced as
(129)
where Nppc is the number of macro-particles loaded in each cell. Initially, ξ̇xα=0 and
(130)
Thus, the initial charge density is zero and hence Ȧz,i=0 exactly satisfies Gauss's Law. The initial transverse vector potential is taken to be
(131)
with Ȧx,i=0. We solve the equations of motion using the method of lines27 with a second-order central differencing in space and fourth-order Runge–Kutta time stepping which has the stability constraint cΔt/Δz2.28 We take Nz{32×2j|j,j8} and Nppc{1,2,4,8,16,32}. For Nz=32, we set ωpΔt=0.1 (cΔt/Δz0.509) while for Nz64, we set cΔt=(16/5π)Δz1.019Δz.

Figure 1 shows Ex/E0 (top row), Ez/E0 (second row), Ne/no=ρ/(qn0) (third row), and the error in Gauss's Law ( D x E z ) i k p E 0 ( N e n ion ) i (bottom row), where E0=mcωp/q. We compare Nz=32, Nppc=1, and quadratic ϱk (first and third column) with Nz=1024, Nppc=32, and quartic ϱk (second and fourth column). While Nz=32 is insufficient resolution to capture the dynamics, the qualitative features are plausibly correct. The differences in the two cases is largely due to spatial resolution; taking Nz=32, Nppc=32, quartic ϱk and the same time step as the high-resolution gives essentially the same results as the Nz=32 case in Fig. 1.

FIG. 1.

Electric fields, density, and the error in Gauss's Law for Nz=32, Nppc=1, and quadratic ϱK (126), (a)–(d) (early time) and (i)–(l) (late time) and for Nz=1024, Nppc=32 and quartic ϱk (128), (e)–(h) (early time) and (m)–(p) (late time): Ex/E0 (a), (e), (i), and (m); Ez/E0 (b), (f), (j), and (n); Ne/n0 (c), (g), (k), and (o); and ( D x E z ) i k p E 0 ( N e n ion ) i (d), (h), (l), and (p).

FIG. 1.

Electric fields, density, and the error in Gauss's Law for Nz=32, Nppc=1, and quadratic ϱK (126), (a)–(d) (early time) and (i)–(l) (late time) and for Nz=1024, Nppc=32 and quartic ϱk (128), (e)–(h) (early time) and (m)–(p) (late time): Ex/E0 (a), (e), (i), and (m); Ez/E0 (b), (f), (j), and (n); Ne/n0 (c), (g), (k), and (o); and ( D x E z ) i k p E 0 ( N e n ion ) i (d), (h), (l), and (p).

Close modal

Figure 2 shows the RMS error (in z) in Gauss's Law for quadratic (top row) and quartic (bottom row) ϱk with Nz=32 (left column), Nz=512 (center column), and Nz=8192 (right column) for various values of Nppc. For quadratic ϱk, the error in Gauss's Law exhibits significant dependence on Nppc as the resolution increases; for the range of Nppc, the error plateaus for Nz512 (see Fig. 4). Quartic ρk yields errors that are essentially independent of Nppc for all but the highest resolution considered. The error in Gauss's Law arises from the difference between ϱk/ξxα and (Dxϱ)k, thus, we expect the error to be smaller for ϱk that span more cells and to scale with Δz2 due to second-order approximations of spatial derivatives. Both of these expectations are borne out in Fig. 2.

FIG. 2.

The RMS error in Gauss's Law for quadratic ϱk (126) (top row) and quartic ϱk (128) (bottom row) and a range of Nppc: Nz=32 (a) and (d); Nz=512 (b) and (e); and Nz=8192 (c) and (f).

FIG. 2.

The RMS error in Gauss's Law for quadratic ϱk (126) (top row) and quartic ϱk (128) (bottom row) and a range of Nppc: Nz=32 (a) and (d); Nz=512 (b) and (e); and Nz=8192 (c) and (f).

Close modal

Figure 3 shows the absolute value Pz/mc for the same parameters as in Fig. 2. The departure of Pz from its initial value of 0 is the consequence of the lack of translation invariance of the discretization. The error in Pz is seen to be largely insensitive to both Nppc and to the nature of ϱk. For quadratic ϱk, the behavior for Nppc=1 and Nppc=2 is inconsistent with the other cases. We do not have an explanation for this observation.

FIG. 3.

The absolute value of Pz/mc for quadratic ϱk (126) (top row) and quartic, ϱk (128), (bottom row) and a range of Nppc: Nz=32 (a) and (d); Nz=512 (b) and (e); and Nz=8192 (c) and (f).

FIG. 3.

The absolute value of Pz/mc for quadratic ϱk (126) (top row) and quartic, ϱk (128), (bottom row) and a range of Nppc: Nz=32 (a) and (d); Nz=512 (b) and (e); and Nz=8192 (c) and (f).

Close modal

Figures 4 and 5 show the RMS (in z and t) error in Gauss's Law and the RMS value of Pz/mc, respectively, for quadratic (top), cubic (center), and quartic (bottom) ϱk. The dashed gray line is proportional to Δz2 from which we see that both quantities scale consistent with second-order spatial differencing. At fixed Nppc, the error in Gauss's Law will become independent of Δz for small kpΔz. As the macro-particle becomes broader and smoother, the quadratic scaling persists to smaller kpΔz. We have verified that Δt does not influence this behavior: we repeated the quadratic ϱk cases with the smallest value of Δt used in our computations and we obtain virtually identical results to those of Fig. 4(a).

FIG. 4.

The RMS error in Gauss's Law for quadratic ϱk (126), (a); cubic ϱk (127), (b); and quartic ϱk (128), (c).

FIG. 4.

The RMS error in Gauss's Law for quadratic ϱk (126), (a); cubic ϱk (127), (b); and quartic ϱk (128), (c).

Close modal
FIG. 5.

The RMS value of Pz/mc for quadratic ϱk (126), (a); cubic ϱk (127), (b); and quartic ϱk (128), (c).

FIG. 5.

The RMS value of Pz/mc for quadratic ϱk (126), (a); cubic ϱk (127), (b); and quartic ϱk (128), (c).

Close modal

Again we see that the behavior of Pz is nearly independent of the details of ϱk and Nppc; Pz exhibits nearly perfect scaling with Δz. As with Fig. 3, for quadratic ϱk, the behavior for Nppc=1 and Nppc=2 is inconsistent with the other cases. There is an indication of this behavior in the cubic ϱk case as the Nppc=1 curve appears to be slightly above the other lines for large kpΔz. Understanding the interplay of spatial resolution and macro-particle shape will be the subject of future work.

The errors in Gauss's Law and momentum generally do not grow in time and scale as expected with spatial resolution. The error in Gauss's Law can be reduced to near machine precision by using the Lagrange multiplier however doing so involves a significant increase in computational cost as an elliptic equation, (115), would have to be solved at each stage of the time stepper. We do not expect imposing the Gauss's Law constraint to effect the error in momentum. Exploring the advantages and trade-off of imposing Gauss's Law as a constraint will be explored in a future publication.

We have shown that a macro-particle reduction applied to the Low Lagrangian or to the noncanonical Vlasov–Maxwell system results in equivalent dynamical systems with continuous space. In the case of the noncanonical system, a complicated coordinate transformation yielded a canonical Hamiltonian and bracket. Using the Dirac–Bergmann procedure, we constructed a canonical Hamiltonian system on the extended phase-space from the macro-particle reduced Lagrangian, which differs from the transform noncanonical system as the latter yields the constrained Hamiltonian. We considered two approaches to reducing these systems to a finite degree-of-freedom approximations suitable for computational implementation. We illustrated a general truncated basis function expansion approach that preserves gauge invariance (and, thus, Gauss's Law) and showed that the special case of a truncated Fourier representation of the potentials also conserves total momentum.

The use of a Fourier basis seems unavoidable if exact momentum conservation is desired. The basis must be an eigenfunction of the translation operator which seems to suggest that a Fourier representation is required.5,6 Provided the domain is large enough, the influence of periodic boundary conditions can be minimized. Of more concern is the all-to-all communications necessary a parallel implementation since all of the macro-particle couple to all field modes (in contrast to the localized coupling in a gridded mode). As a result, there currently appears to be no path to obtaining sufficient computational performance to allow use of a Fourier representation for production work. Nonetheless, the Fourier representation is valuable for assessing the quantitative errors introduced by the lack of exact momentum conservation.

We presented a grid-based discretization of both the Lagrangian and canonical Hamiltonian formulations in the Weyl gauge. The spatial grid results in the continuity equation only holding on average and, thus, Gauss's Law must be enforced with a constraint. Of course, all of these reductions have exact energy conservation with continuous time. We have presented numerical examples in one spatial dimension of a combined electromagnetic mode and Langmuir wave. The error in Gauss's Law does not grow secularly and scales as expected with spatial resolution. The equation of motion in canonical Hamiltonian formulation can be numerically integrated using standard symplectic methods which should result in excellent (but not exact) energy conservation.

It has been shown that variational methods can have low level of noise.6,7 Here we have shown that the Weyl gauge, without imposing Gauss's Law with a Lagrange multiplier results in reasonable conservation properties. Thus, it is possible to use the variational formulation without having to solve an elliptic equation, thereby having performance approximately equivalent (in terms of arithmetic operations per time step) to traditional PIC algorithms but with much less noise so fewer particles should be necessary. As our examples show, the departure from exact conservation is rather benign: errors do not grow secularly and scales quadratically with grid resolution. It seems likely that with higher-order spatial approximations, these errors could become negligible.

The authors gratefully acknowledge helpful discussions with P. J. Morrison, John Finn, and Evstati Evstatiev. This work was supported by NSF (Grant No. PHY-2108788). A.J.H. was supported by the University of Nebraska Program of Excellence in Atomic, Molecular, Optical, and Plasma Physics.

The authors have no conflicts to disclose.

Adam J. Higuet: Conceptualization (supporting); Formal analysis (supporting); Writing – original draft (lead); Writing – review & editing (lead). B. A. Shadwick: Conceptualization (lead); Formal analysis (lead); Funding acquisition (lead); Supervision (lead); Writing – original draft (supporting); Writing – review & editing (supporting).

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Inspired by Kraus et al.,9 which seeks to discretize the noncanonical formulation in a way that preserves the entire de Rahm complex present in vector calculus, we seek to construct a simpler restriction on basis elements while retaining automatic gauge invariance. The idea we keep from the exploration into discrete exterior calculus is that 0-forms and 1-forms (scalars and polar vectors) are geometrically different objects, but related to one another via a gradient operator. We, thus, choose to expand the scalar potential with some set of basis functions and the vector potential with a new basis made from derivatives of the scalar basis
(A1a)
and
(A1b)
where
(A2a)
(A2b)
capital roman letters are used as a shorthand for three lowercase indices {i,j,k} denoting individual Cartesian directions' basis indices, lowercase roman letters at the start of the alphabet are used for the Cartesian directions {x,y,z}, ea are Cartesian unit vectors, and the summation convention is not used. For example,
(A3)
The gradient operator can be written as =aeaa so we have that uI=auIa, which is the only carryover from discrete exterior calculus that is necessary to maintain gauge invariance. Using this expansion, we find
(A4)
where
(A5)
is the projection of the particle shape onto the basis. A similar calculation gives
(A6)
The discretized Lagrangian becomes
(A7)
where the so-called mass matrices are defined by
(A8)
and
(A9)
The mass matrix MIJa is generally expected to be sparse but have large bandwidth; its inverse (which will be dense) appears in the evolution equations for φI and AIa. Except for very small numbers of basis functions, iterative solution of the corresponding linear systems will be necessary. Furthermore, the force terms in the macro-particle evolution equations couple to all φI and AIa, thus, necessitating all-to-all communication in a parallel implementation.
Consider a general gauge transformation,
(A10a)
and
(A10b)
We expand the gauge function as
(A11)
which gives us
(A12)
and
(A13)
This implies the potentials transform mode-by-mode as
(A14)
and
(A15)
It is easy show that the field terms in (A7) are exactly invariant under this transformation. The interaction terms in the Lagrangian are found to transform as
(A16)
so we find that the transformation does not effect the dynamics and the structure of the basis expansion preserves gauge symmetry. While this expansion preserves gauge invariance, the basis functions, in general, are not translation invariant (i.e., they are not eigenfunctions of the translation operator). By the same analysis in the previous work,5,6 we determine that translational invariance and momentum conservation are only maintained by a discrete Fourier basis, which can be viewed as a special case of this general formulation. By virtue of the analysis of Sec. III, this same expansion can be used directly in the noncanonical system and will yield a good Poisson bracket.
1.
H. R.
Lewis
, “
Energy-conserving numerical approximations for Vlasov plasmas
,”
J. Comput. Phys.
6
,
136
141
(
1970
).
2.
J. W.
Eastwood
, “
The virtual particle electromagnetic particle-mesh method
,”
Comput. Phys. Commun.
64
,
252
266
(
1991
).
3.
F. E.
Low
, “
A Lagrangian formulation of the Boltzmann–Vlasov equation for plasmas
,”
Proc. R. Soc. London, Ser. A
248
,
282
287
(
1958
).
4.
J.
Squire
,
H.
Qin
, and
W. M.
Tang
, “
Geometric integration of the Vlasov–Maxwell system with a variational particle-in-cell scheme
,”
Phys. Plasmas
19
,
084501
(
2012
).
5.
E. G.
Evstatiev
and
B. A.
Shadwick
, “
Variational formulation of particle algorithms for kinetic plasma simulations
,”
J. Comput. Phys.
245
,
376
398
(
2013
).
6.
B. A.
Shadwick
,
A. B.
Stamm
, and
E. G.
Evstatiev
, “
Variational formulation of macro-particle plasma simulation algorithms
,”
Phys. Plasmas
21
,
055708
(
2014
).
7.
A. B.
Stamm
,
B. A.
Shadwick
, and
E. G.
Evstatiev
, “
Variational formulation of macroparticle models for electromagnetic plasma simulations
,”
IEEE Trans. Plasma Sci.
42
,
1747
1758
(
2014
).
8.
Y.
He
,
Y.
Sun
,
H.
Qin
, and
J.
Liu
, “
Hamiltonian particle-in-cell methods for Vlasov–Maxwell equations
,”
Phys. Plasmas
23
,
092108
(
2016
).
9.
M.
Kraus
,
K.
Kormann
,
P. J.
Morrison
, and
E.
Sonnendrücker
, “
GEMPIC: geometric electromagnetic particle-in-cell methods
,”
J. Plasma Phys.
83
,
905830401
(
2017
).
10.
A. B.
Langdon
, “
Effects of the spatial grid in simulation plasmas
,”
J. Comput. Phys.
6
,
247
267
(
1970
).
11.
H.
Okuda
, “
Nonphysical noises and instabilities in plasma simulation due to a spatial grid
,”
J. Comput. Phys.
10
,
475
486
(
1972
).
12.
E.
Cormier-Michel
,
B. A.
Shadwick
,
C. G. R.
Geddes
,
E.
Esarey
,
C. B.
Schroeder
, and
W. P.
Leemans
, “
Unphysical kinetic effects in particle-in-cell modeling of laser wakefield accelerators
,”
Phys. Rev. E
78
,
016404
(
2008
).
13.
P. J.
Channell
and
C.
Scovel
, “
Symplectic integration of Hamiltonian systems
,”
Nonlinearity
3
,
231
(
1990
).
14.
A. B.
Stamm
and
B. A.
Shadwick
, “
Comparison of conservation behavior in several variationally derived implementations for simulating electromagnetic plasmas
,” in
2018 IEEE Advanced Accelerator Concepts Workshop (AAC)
, edited by
E. I.
Simakov
,
N.
Yampolsky
, and
K. P.
Wootton
(
IEEE
,
2018
), pp.
1
5
.
15.
Y. L.
Klimontovich
,
The Statistical Theory of Non-Equilibrium Processes in a Plasma
(
MIT Press
,
Cambridge, MA
,
1967
).
16.
C. K.
Birdsall
and
A. B.
Langdon
,
Plasma Physics via Computer Simulations
, Series in Plasma Physics No. IP586 (
Institute of Physics Publishing
,
Bristol
,
1991
).
17.
R. W.
Hockney
and
J. W.
Eastwood
,
Computer Simulation Using Particles
(
Taylor & Francis Group
,
New York
,
1988
).
18.
P. J.
Morrison
, “
The Maxwell–Vlasov equations as a continuous Hamiltonian system
,”
Phys. Lett. A
80
,
383
386
(
1980
).
19.
A.
Weinstein
and
P. J.
Morrison
, “
Comments on: The Maxwell–Vlasov equations as a continuous hamiltonian system
,”
Phys. Lett. A
86
,
235
236
(
1981
).
20.
P. J.
Morrison
, “
Poisson brackets for fluids and plasmas
,”
AIP Conf. Proc.
88
,
13–46
(
1982
).
21.
J. E.
Marsden
and
A.
Weinstein
, “
The Hamiltonian structure of the Maxwell–Vlasov equations
,”
Phys. D
4
,
394
(
1982
).
22.
K.
Sundermeyer
, Constrained Dynamics: With Applications to Yang–Mills Theory, General Relativity, Classical Spin, Dual String Model, Lecture Notes in Physics, Vol. 169 (
Springer-Verlag
,
Berlin
,
1982
).
23.
P. A. M.
Dirac
, “
Generalized Hamiltonian dynamics
,”
Can. J. Math.
2
,
129
148
(
1950
).
24.
J. L.
Anderson
and
P. G.
Bergmann
, “
Constraints in covariant field theories
,”
Phys. Rev.
83
,
1018
1025
(
1951
).
25.
P. G.
Bergmann
and
I.
Goldberg
, “
Dirac bracket transformations in phase space
,”
Phys. Rev.
98
,
531
538
(
1955
).
26.
A. B.
Stamm
, “
Variational formulation of Macro-Particle algorithms for studying electromagnetic plasmas
,” Ph.D. thesis (
University of Nebraska
,
Lincoln
,
2015
).
27.
W. E.
Schiesser
,
The Numerical Method of Lines: Integration of Partial Differential Equations
(
Academic Press
,
San Diego
,
1991
).
28.
J.
Reyes
and
B.
Shadwick
, “
Higher-order explicit methods for laser-plasma interactions
,” in
2013 19th IEEE Pulsed Power Conference
(
IEEE
,
2013
), pp.
1
5
.