Derivations¶
Fundamental derivations connecting Maxwell's equations to the fluid and kinetic equations used throughout pypic. Each section states the key result up front; click Derivation to expand the full mathematical development.
These derivations use normalized units (\(\mu_0 = \epsilon_0 = 1\)) unless stated otherwise. See Conventions for the normalization mapping.
Maxwell's Equations¶
The foundation for all plasma physics in pypic. In SI:
In normalized units (\(\mu_0 = \epsilon_0 = 1\)):
The constraint \(\nabla \cdot \mathbf{B} = 0\) is monitored by
div_b as a numerical
health check. The displacement current \(\partial \mathbf{E}/\partial t\)
is retained in PIC codes but dropped in MHD (\(v \ll c\)) 1.
Vlasov-Maxwell System¶
PIC codes solve the Vlasov equation for the distribution function \(f_s(\mathbf{x}, \mathbf{v}, t)\) of each species \(s\):
This is a collisionless Boltzmann equation in 6D phase space. The electromagnetic fields \((\mathbf{E}, \mathbf{B})\) evolve via Maxwell's equations with sources computed from \(f_s\):
This self-consistent loop (particles \(\to\) moments \(\to\) fields \(\to\) forces \(\to\) particles) is the Vlasov-Maxwell system.
Fluid Moment Equations¶
Taking velocity moments of the Vlasov equation yields the fluid equations that connect kinetic physics to the macroscopic quantities in pypic. The zeroth moment gives mass conservation; the first moment gives momentum balance.
Continuity (zeroth moment):
Momentum (first moment):
where the pressure tensor \(\mathbf{P}_s\) is the second velocity moment about the mean flow:
Derivation: velocity moments of the Vlasov equation
Multiply the Vlasov equation by a velocity-space weight \(\phi(\mathbf{v})\) and integrate over all velocities:
Zeroth moment (\(\phi = 1\)):
The first term gives \(\partial n_s / \partial t\). The second gives \(\nabla \cdot (n_s \mathbf{V}_s)\). The third vanishes by integration by parts (the Lorentz force is divergence-free in velocity space, and \(f_s \to 0\) as \(|\mathbf{v}| \to \infty\)):
First moment (\(\phi = m_s \mathbf{v}\)):
Decompose \(\mathbf{v} = \mathbf{V}_s + \mathbf{w}\) where \(\mathbf{w}\) is the random (thermal) velocity with \(\langle \mathbf{w} \rangle = 0\). The convective term produces the pressure tensor divergence:
The Lorentz term integrates by parts to give \(n_s q_s (\mathbf{E} + \mathbf{V}_s \times \mathbf{B})\) (the magnetic force contribution from random velocities vanishes because \(\mathbf{P}_s\) is symmetric while \(\mathbf{v} \times \mathbf{B}\) is antisymmetric). Combining and using the continuity equation to simplify the convective derivative:
where \(d/dt = \partial/\partial t + \mathbf{V}_s \cdot \nabla\) is the convective derivative.
Each moment introduces the next-higher moment (the closure problem): the continuity equation involves \(\mathbf{V}_s\), the momentum equation involves \(\mathbf{P}_s\), and so on. MHD closes the hierarchy by assuming an equation of state (\(P = P(\rho, s)\)); PIC sidesteps it by evolving \(f_s\) directly.
Generalized Ohm's Law¶
The electric field in a plasma can be decomposed into physical contributions by manipulating the electron momentum equation. The result is the generalized Ohm's law:
Each term has a characteristic length scale where it becomes important: the ideal term dominates at MHD scales (\(L \gg d_i\)), the Hall term at ion scales (\(d_e \ll L \lesssim d_i\)), and the pressure and inertia terms at electron scales (\(L \sim d_e\)). The non-ideal electric field \(\mathbf{E}' = \mathbf{E} + \mathbf{V} \times \mathbf{B}\) vanishes in ideal MHD and is non-zero where the frozen-in condition breaks down.
See E_prime,
E_Hall,
E_ideal in
the equations reference 23.
Derivation: from the two-fluid momentum equations
Start with the electron momentum equation:
(using \(q_e = -|q_e|\) for electrons). Solve for \(\mathbf{E}\):
Now express \(\mathbf{V}_e\) in terms of the bulk (ion) velocity and current. For a quasi-neutral plasma (\(n_e \approx n_i \equiv n\)):
Since \(m_i \gg m_e\), the center-of-mass velocity \(\mathbf{V} \approx \mathbf{V}_i\). Substituting into the \(\mathbf{V}_e \times \mathbf{B}\) term:
Substituting back:
This identifies the four terms:
| Term | Expression | Dominant scale |
|---|---|---|
| Ideal (convective) | \(-\mathbf{V} \times \mathbf{B}\) | \(L \gg d_i\) |
| Hall | \(\mathbf{J} \times \mathbf{B} / (n\|q_e\|)\) | \(d_e \ll L \lesssim d_i\) |
| Electron pressure | \(-\nabla \cdot \mathbf{P}_e / (n\|q_e\|)\) | \(L \sim d_e\) |
| Electron inertia | \((m_e/\|q_e\|) \, d\mathbf{V}_e/dt\) | \(L \sim d_e\) |
Dropping all but the first term recovers ideal MHD: \(\mathbf{E} = -\mathbf{V} \times \mathbf{B}\).
Ideal MHD Equations¶
Ideal MHD treats the plasma as a single conducting fluid. It follows from the two-fluid equations by (1) taking the single-fluid limit (\(m_e \to 0\), charge neutrality), (2) dropping the displacement current (\(v \ll c\)), and (3) using the ideal Ohm's law (\(\mathbf{E} = -\mathbf{V} \times \mathbf{B}\)).
The closed system in normalized units (\(\mu_0 = 1\)):
Derivation: from two-fluid to single-fluid MHD
Single-fluid variables. Define the mass density, bulk velocity, and total pressure:
Mass conservation. Sum the species continuity equations:
Momentum. Sum the species momentum equations. The internal electric forces cancel by quasi-neutrality (\(\sum_s n_s q_s = 0\)). Using Ampere's law without displacement current (\(\mathbf{J} = \nabla \times \mathbf{B}\)):
The magnetic force can be decomposed via the vector identity:
revealing magnetic tension \((\mathbf{B} \cdot \nabla)\mathbf{B}\) (field lines resist bending) and magnetic pressure \(-\nabla(B^2/2)\) (field lines resist compression). The plasma beta \(\beta = 2P/B^2\) measures their relative importance.
Induction. Substitute the ideal Ohm's law \(\mathbf{E} = -\mathbf{V} \times \mathbf{B}\) into Faraday's law:
This is the frozen-in flux equation: magnetic field lines move with the fluid. It breaks down wherever the non-ideal terms in Ohm's law become significant (reconnection sites, current sheets).
Energy closure. Assuming adiabatic evolution (no heat conduction or radiation), the entropy is conserved along fluid elements:
This is equivalent to the entropy \(s = \ln(P/\rho_m^\gamma)\) being a Lagrangian invariant.
Energy Conservation: Poynting's Theorem¶
The electromagnetic energy balance connects the field energy densities (\(e_B\), \(e_E\)), the Poynting flux (\(\mathbf{S}\)), and the energy conversion rate (\(\mathbf{J} \cdot \mathbf{E}\)):
Identifying: \(e_B = B^2/2\), \(e_E = E^2/2\), \(\mathbf{S} = \mathbf{E} \times \mathbf{B}\) (normalized Poynting flux), and \(-\mathbf{J} \cdot \mathbf{E}\) as the sink term transferring electromagnetic energy to particle kinetic energy.
See e_B,
e_E,
S,
J_dot_E in
the equations reference.
Derivation: from Maxwell's equations
Take the dot product of Faraday's law with \(\mathbf{B}\) and Ampere's law with \(\mathbf{E}\):
Subtract the first from the second:
The left side equals \(-\nabla \cdot (\mathbf{E} \times \mathbf{B})\) by the vector identity \(\nabla \cdot (\mathbf{A} \times \mathbf{B}) = \mathbf{B} \cdot (\nabla \times \mathbf{A}) - \mathbf{A} \cdot (\nabla \times \mathbf{B})\). Rearranging:
Physical interpretation: \(\mathbf{J} \cdot \mathbf{E} > 0\) means the electromagnetic field loses energy to particle motion (acceleration) 1. In reconnection, this identifies the energy conversion region 4. Per-species decomposition \(\mathbf{J}_s \cdot \mathbf{E}\) reveals which species is energized.
In MHD, \(e_E\) is negligible (\(v \ll c\)), and Poynting's theorem reduces to the magnetic energy budget:
MHD Wave Speeds¶
Linearizing the ideal MHD equations around a uniform equilibrium (\(\rho_0\), \(P_0\), \(\mathbf{B}_0 = B_0 \hat{z}\), \(\mathbf{V}_0 = 0\)) yields three wave families. Their phase speeds are the characteristic speeds used throughout pypic.
Alfvén wave (incompressible, transverse) 56:
Sound wave (compressible, longitudinal, no magnetic coupling) 6:
Fast and slow magnetosonic waves (compressible, coupled) 7:
At perpendicular propagation (\(\theta = 90°\)), the fast speed reduces
to \(v_{ms} = \sqrt{v_A^2 + c_s^2}\), which is the
v_ms stored by pypic.
See v_A,
c_s,
v_ms in the equations reference.
Derivation: linearization of ideal MHD
Perturb all quantities around a uniform equilibrium: \(\rho = \rho_0 + \rho_1\), \(\mathbf{V} = \mathbf{V}_1\), \(\mathbf{B} = B_0 \hat{z} + \mathbf{B}_1\), \(P = P_0 + P_1\), with \(P_1 = c_s^2 \rho_1\) from the adiabatic equation of state.
Substitute into the ideal MHD equations and keep only first-order terms. Seek plane-wave solutions \(\propto \exp[i(\mathbf{k} \cdot \mathbf{x} - \omega t)]\) with wavevector \(\mathbf{k}\) at angle \(\theta\) to \(\mathbf{B}_0\).
The linearized momentum equation becomes:
using the linearized induction equation \(\mathbf{B}_1 = -(\mathbf{k} \times (\mathbf{V}_1 \times \mathbf{B}_0))/\omega\) and Ampere's law.
Alfvén mode. For perturbations \(\mathbf{V}_1\) perpendicular to both \(\mathbf{k}\) and \(\mathbf{B}_0\) (shear polarization), the pressure force vanishes (\(\hat{k} \cdot \mathbf{V}_1 = 0\), so \(\rho_1 = 0\)) and the dispersion relation reduces to:
This is the Alfvén wave: an incompressible transverse oscillation of field lines, propagating only along \(\mathbf{B}_0\), with phase speed \(v_A = B_0/\sqrt{\rho_0}\).
Magnetosonic modes. For perturbations in the \((\mathbf{k}, \mathbf{B}_0)\) plane, the pressure and magnetic forces couple. The dispersion relation becomes a quadratic in \(\omega^2/k^2\):
with solutions:
The \(+\) root is the fast magnetosonic wave (magnetic pressure and gas pressure reinforce). The \(-\) root is the slow magnetosonic wave (they oppose). At perpendicular propagation (\(\theta = 90°\), \(\cos\theta = 0\)):
At parallel propagation (\(\theta = 0°\)): \(v_f = \max(v_A, c_s)\) and \(v_s = \min(v_A, c_s)\).
CGL Double-Adiabatic Invariants¶
In a collisionless magnetized plasma, the pressure tensor is not isotropic. The CGL theory 8 provides closure by conserving two adiabatic invariants along fluid elements:
These govern the gyrotropic entropy \(s_{gyro} = \ln(P_\parallel P_\perp^2 / n^5)\) and the firehose/mirror instability thresholds.
Derivation: from magnetic moment conservation and flux tube geometry
First invariant (\(P_\perp / nB\)): the magnetic moment \(\mu = m v_\perp^2 / (2B)\) is an adiabatic invariant for individual particles gyrating in a slowly varying field. For a distribution of particles, the perpendicular thermal energy per particle is \(P_\perp / n\), giving:
Second invariant (\(P_\parallel B^2 / n^3\)): consider a flux tube of cross-section \(A\) and length \(L\). Magnetic flux conservation gives \(BA = \text{const}\), and particle conservation in the tube gives \(nAL = \text{const}\), so \(nL/B = \text{const}\), i.e. \(L \propto B/n\).
For the parallel degree of freedom, the particles bounce between mirror points. The parallel adiabatic invariant \(J = \oint m v_\parallel \, dl\) gives \(v_\parallel L = \text{const}\), so \(P_\parallel / n \propto v_\parallel^2 \propto 1/L^2 \propto n^2/B^2\). Therefore:
Gyrotropic entropy. Eliminating \(B\) between the two invariants:
- From the first: \(B \propto P_\perp / n\)
- Substituting into the second: \(P_\parallel (P_\perp / n)^2 / n^3 = P_\parallel P_\perp^2 / n^5 = \text{const}\)
Hence \(s_{gyro} = \ln(P_\parallel P_\perp^2 / n^5)\) is conserved. The exponent 5 arises from the geometric constraint (\(3\) from parallel + \(2\) from perpendicular), not from the adiabatic index \(\gamma = 5/3\). See Conventions for this distinction.
Instability thresholds. When the CGL invariants are violated (collisions, wave-particle interactions), the pressure anisotropy drives kinetic instabilities:
-
J. D. Jackson. Classical Electrodynamics. Wiley, 3rd edition, 1999. ↩↩
-
Joachim Birn and Eric R. Priest. Reconnection of Magnetic Fields: Magnetohydrodynamics and Collisionless Theory and Observations. Cambridge University Press, 2007. doi:10.1017/cbo9780511536151. ↩
-
M. Hesse, N. Aunai, D. Sibeck, and J. Birn. On the electron diffusion region in planar, asymmetric, systems. Geophysical Research Letters, 41:8673–8680, 2014. doi:10.1002/2014GL061586. ↩
-
Seiji Zenitani and Masahiro Hoshino. The generation of nonthermal particles in the relativistic magnetic reconnection of pair plasmas. The Astrophysical Journal, 562:L63–L66, 2001. doi:10.1086/337972. ↩
-
J. D. Richardson. NRL Plasma Formulary. Naval Research Laboratory, 2019. ↩
-
Francis F. Chen. Introduction to Plasma Physics and Controlled Fusion. Springer, 3rd edition, 2016. doi:10.1007/978-3-319-22309-4. ↩↩
-
Richard Fitzpatrick. Plasma Physics: An Introduction. CRC Press, 2014. doi:10.1201/b17263. ↩
-
G. F. Chew, M. L. Goldberger, and F. E. Low. The Boltzmann equation and the one-fluid hydromagnetic equations in the absence of particle collisions. Proceedings of the Royal Society A, 236:112–118, 1956. doi:10.1098/rspa.1956.0116. ↩
-
P. Hellinger, P. Trávníček, J. C. Kasper, and A. J. Lazarus. Solar wind proton temperature anisotropy: linear theory and WIND/SWE observations. Geophysical Research Letters, 33:L09101, 2006. doi:10.1029/2006GL025925. ↩
-
S. Peter Gary. Theory of Space Plasma Microinstabilities. Cambridge University Press, 1993. doi:10.1017/cbo9780511551512. ↩
-
Matthew W. Kunz, Alexander A. Schekochihin, and James M. Stone. Firehose and mirror instabilities in a collisionless shearing plasma. Physical Review Letters, 112:205003, 2014. doi:10.1103/PhysRevLett.112.205003. ↩