Introduction
The dynamics of collisionless or weakly-collisional systems are fundamental to astrophysics, atmospheric sciences, and many other domains, appearing in e.g. plasma physics, radiation hydrodynamics (RHD), stellar dynamics, dark matter/cosmology, cosmic ray physics, particulate/dust/grain/pebble dynamics, polydisperse and multiphase flows, atomic/molecular kinetics, and more. In all of these applications, the highly non-linear, chaotic, multi-physics nature of the interesting problems necessitates numerical simulations. And although a huge variety of methods have been developed to solve the equations-of-motion of these systems, for very-weakly collisional or truly collisionless systems (for which one cannot use typical “fluid like” or Boltzmann moments methods, as these ignore the fundamentally collisionless nature of these systems in favor of assuming quantities like the velocity/flux/intensity are single-valued at each point), the most widely used methods are often variants of MC/PIC/NB methods. Those allow one to capture truly collisionless behaviors, but at the cost of representing some enormous true number of microphysical particles or elements via an orders-of-magnitude smaller (and therefore computationally manageable) discrete N “super-particles,” each evolving to a single micro-particle. For example, in gravitational dynamics N-body methods, one solves the equations of motion for N N N point masses (Hernquist & Barnes 1990; Dehnen & Read 2011), but while this might be appropriate for a system which actually has N-particle masses (e.g. a small star cluster with ≲ 10 5 \lesssim10^{5} ≲ 1 0 5 stars) in e.g. cosmological simulations a typical MC/PIC/NB super-particle might represent ∼ 10 60 − 10 90 \sim10^{60}-10^{90} ∼ 1 0 60 − 1 0 90 individual dark matter particles. Clearly, in the limits MC/PIC/NB sampling can generate a number of spurious effects, including discreteness noise and far-too-rapid relaxation (Melott et al. 1997; Binney 2004; Chavanis 2006; Campa et al. 2009). Since the continuum (smooth) density is not well-defined in the numerical method (a MC/PIC/NB particle is, by definition, a δ \delta δ -function in phase space), force softening for long-range forces and often regularization or Monte-Carlo sampling prescriptions for short-range forces are necessary but ad hoc (for discussion in gravitational dynamics, see e.g. Merritt 1996; Dehnen 2001; Athanassoula et al. 2000; Zhang et al. 2019), and the adaptive softening schemes which can be reliably applied to continuum systems (e.g. gas, Price & Monaghan 2007; Hopkins 2015; Hopkins et al. 2018) become formally ill-defined for MC/PIC/NB super-particles Jannuzi & Doolin 2011; Jannuzzi & Athanassoula 2013; Barnes 2012; Mansfield & Avestruz 2021, and themselves enable spurious heating, equipartition, and disruption effects Ludlow et al. 2019a, 2021; van den Bosch & Ogiya 2018; van den Bosch et al. 2018; Garrison-Kimmel et al. 2017; Chiang et al. 2025; Hopkins et al. 2023. The formal/analytic convergence properties for continuum predictions are similarly ill-defined, and are instead defined in practice via brute-force resolution tests Power et al. 2003; Springel et al. 2008; Diemand et al. 2008; Stadel et al. 2009, leading to long-standing questions about whether e.g. predictions for the central structure of collapsed objects or merged particulate piles or long-range (self-gravitating or Coulomb) force equilibrium are actually robust or numerical artifacts (again, for gravity see e.g. [111 ] (Navarro et al. 1996; Pontzen & Governato 2012; Pontzen & Governato 2014), and references therein). And it is difficult if not impossible to couple such approaches to certain types of collision or relaxation operators with non-trivial phase-space interactions (a limitation for many particle dark matter models, types of plasma collisions and interactions, coupling terms for aerosols or polydisperse media, cosmic ray losses and scattering, van der Waals forces, anisotropic radiation scattering/absorption, annihilation operators, solid boundaries, etc.).
For continuum systems where the number of “micro-particles” is large, the obvious “correct” approach would be to directly integrate the phase-space distribution function (DF) obeying the Vlasov equation in 6 + 1 6 + 1 6 + 1 (spatial and momentum + time) dimensions. But simply discretizing phase space into a uniform 6D “grid” (in Δ 3 x Δ 3 v \Delta^{3}x \Delta^{3}v Δ 3 x Δ 3 v ) is prohibitively expensive for most problems. However, a variety of advances in simulation techniques for hydrodynamics, RHD, and moment as well as PIC schemes for plasma physics suggest promising routes forward (e.g. (Fox et al. 2008; Marchisio & Fox 2013; Jiang et al. 2014; Hopkins 2015; Miller & Shumlak 2016; Grudic et al. 2021)).
Figure 1. High-level schematic illustrating the method here (right), as compared to standard MC/PIC/NB methods (left). Left: In MC/PIC/NB: particles i i i sample trajectories of individual micro-particles, i.e. a distribution function (DF) f ( x , v , t ) ∝ δ ( x − x i , v − v i , t ) f(\mathbf{x},\mathbf{v},t) \propto\delta(\mathbf{x}-\mathbf{x}_i,\mathbf{v}-\mathbf{v}_i,t) f ( x , v , t ) ∝ δ ( x − x i , v − v i , t ) , but then get assigned a “weight” corresponding to many micro-particles (Δ m i ≫ m m i c r o \Delta m_i \gg m_{\mathrm{micro}} Δ m i ≫ m micro ). As such, concepts like “force softening” must be defined ad-hoc since the volume is not formally partitioned in any meaningful manner, and collisions or inter-particle forces must be sampled in a Monte Carlo or coarse-grained manner. Right: The volume domain obeys a partition of unity into cells/domains Ω i \Omega_i Ω i , around mesh-generating points x i m e s h \mathbf{x}^{\mathrm{mesh}}_i x i mesh . For the MFM-like method we implement, these involve a smooth, overlapping decomposition with effective faces (black line) between neighbors, with Lagrangian motion x i m e s h = ⟨ x ⟩ i = m i − 1 ∫ Ω i ρ ( x ) d 3 x \mathbf{x}^{\mathrm{mesh}}_i = \langle\mathbf{x}\rangle_i = m_i^{-1}\int_{\Omega_i}\rho(\mathbf{x})\,\mathrm{d}^3x x i mesh = ⟨ x ⟩ i = m i − 1 ∫ Ω i ρ ( x ) d 3 x and v i m e s h ≡ d x i m e s h / d t = ⟨ v ⟩ i \mathbf{v}^{\mathrm{mesh}}_i \equiv\mathrm{d}\mathbf{x}^{\mathrm{mesh}}_i/\mathrm{d}t = \langle\mathbf{v}\rangle_i v i mesh ≡ d x i mesh / d t = ⟨ v ⟩ i . The DF is partitioned within each cell according to a set of basis functions f ( v ∣ x , t ) = ∑ α ρ α ( x ) f ~ α ( v ) f(\mathbf{v}|\mathbf{x},t) = \sum_\alpha\rho_\alpha(\mathbf{x})\,\tilde{f}_\alpha(\mathbf{v}) f ( v ∣ x , t ) = ∑ α ρ α ( x ) f ~ α ( v ) which are carried with the cells and evolve with time. The DF evolution is determined directly by the solution to the Vlasov equation, via fluxes between neighbors constructed at the face (after some higher-order reconstruction of f → f ∗ f \rightarrow f^* f → f ∗ from each side). Thus the method is a full 6+1D representation of the DF, Lagrangian in both x \mathbf{x} x and v \mathbf{v} v .
In this paper, we propose and test a method for directly integrating the continuous, 6+1 dimensional Vlasov equation for weakly-collisional or truly collisionless systems (which interpolates smoothly into fully-collisional systems as well). The method is quasi-Lagrangian or arbitrary-Lagrangian-Eulerian as desired in both position and velocity space, providing adaptively higher resolution automatically in regions of phase space of greatest interest. It manifestly conserves mass, momentum, and energy; can stably handle arbitrary shell-crossing and phase-wrapping without increasing CPU cost; and couples trivially to existing MC/PIC/NB methods for integrating long-range or collective forces like gravity or magnetic fields. Most importantly, it introduces only a modest, fixed cost multiplier compared to typical methods already in use in these fields – either “particle” methods like MC/PIC/NB or “moments” methods like 13-moment/M1/CR-fluid/dust-fluid methods (both of which it extends and improves by evolving the full DF). This makes it feasible to run full high-resolution, high-dynamic range, multi-physics simulations with this family of methods. We specifically outline and test one example implementation, which we make public in the code GIZMO.1
Numerical Principle & Theory
Conceptually, the method is simple. Configuration space d D x \mathrm{d}^D x d D x is partitioned among a set of mesh-generating points x a \mathbf{x}_a x a (positions x a \mathbf{x}_a x a ), according to a standard partition of unity (domains Ω a \Omega_a Ω a , surfaces ∂ Ω a \partial\Omega_a ∂ Ω a ). Momentum (velocity) space d D p \mathrm{d}^D p d D p (d D v \mathrm{d}^D v d D v ) is reconstructed according to a set of independent basis functions, each of which evolves via fluxes between cells+bases and external forces independently according to a generalized anisotropic N N N -moment scheme.
Theoretical Basis: Equations Solved
Continuum Vlasov-Poisson Equation
Consider a system of N N N point-like test particles at spatial co-ordinate/positions x \mathbf{x} x and individual rest masses μ \mu μ , with velocity/momentum coordinate v / p \mathbf{v}/\mathbf{p} v / p defined on a D D D -dimensional domain, evolving in time t t t subject to some force F = F ( x , v , t , … ) \mathbf{F}=\mathbf{F}(\mathbf{x},\mathbf{v},t,\ldots) F = F ( x , v , t , … ) . When N N N is large, the ensemble is described by a continuous phase-space DF f = f ( x , v , … ) f=f(\mathbf{x},\mathbf{v},\ldots) f = f ( x , v , … ) , whose evolution is generically determined by the Vlasov equation:
∂ f ∂ t + v ⋅ ∇ f + F ⋅ ∂ f ∂ p = ( ∂ f ∂ t ) c o l l i s i o n s (1) \frac{\partial f}{\partial t}+\mathbf{v}\cdot\nabla f+\mathbf{F}\cdot\frac{\partial f}{\partial\mathbf{p}}=\left(\frac{\partial f}{\partial t}\right)_{\mathrm{collisions}} \tag*{(1)} ∂ t ∂ f + v ⋅ ∇ f + F ⋅ ∂ p ∂ f = ( ∂ t ∂ f ) collisions (1)
where F \mathbf{F} F collects all external forces, including e.g. gravity F = − μ ∇ Φ \mathbf{F}=-\mu\nabla\Phi F = − μ ∇Φ determined by the coupled Poisson equation (∇ 2 Φ = 4 π G ρ = 4 π G ∫ f d D v \nabla^2\Phi=4\pi G\rho=4\pi G\int f\,\mathrm{d}^D v ∇ 2 Φ = 4 π Gρ = 4 π G ∫ f d D v , in terms of the mass density ρ \rho ρ ). We will consider the specific example of gravity here but any external force could be applied (and we discuss other cases below). We will consider non-relativistic systems, although the generalization of our methods to relativistic cases is, in principle, straightforward. Here f f f is the differential mass d M \mathrm{d}M d M per interval in coordinate space x \mathbf{x} x and velocity space v = p / μ \mathbf{v} = \mathbf{p}/\mu v = p / μ :
f ≡ d M d D x d D v . (2) f \equiv\frac{dM}{d^{D}\mathbf{x}\,d^{D}\mathbf{v}} . \tag*{(2)} f ≡ d D x d D v d M . (2)
The right-hand side of Eq. (1) represents the collision operator. This can be operator-split from the remaining equation, and solved separately, giving an update of the form
Δ f c o l l i s i o n s = ( ∂ f ∂ t ) c o l l i s i o n s Δ t (3) \Delta f_{\mathrm{collisions}} = \left(\frac{\partial f}{\partial t}\right)_{\mathrm{collisions}} \Delta t \tag*{(3)} Δ f collisions = ( ∂ t ∂ f ) collisions Δ t (3)
(note this can be arbitrarily high-order, we simply use the ∂ t f Δ t \partial_t f \Delta t ∂ t f Δ t notation as symbolic of the operator-split update). For collisionless systems it vanishes. With this and the non-relativistic approximation we obtain:
∂ f ∂ t = − v ⋅ ∇ f − a e x t ⋅ ∂ f ∂ v , (4) \frac{\partial f}{\partial t} = -\mathbf{v}\cdot\nabla f-\mathbf{a}_{\mathrm{ext}}\cdot\frac{\partial f}{\partial\mathbf{v}}, \tag*{(4)} ∂ t ∂ f = − v ⋅ ∇ f − a ext ⋅ ∂ v ∂ f , (4)
where a e x t = F / μ \mathbf{a}_{\mathrm{ext}} = \mathbf{F}/\mu a ext = F / μ is the bulk external acceleration.
External-Force Operator Split
If a e x t \mathbf{a}_{\mathrm{ext}} a ext is independent of the velocity v \mathbf{v} v (as it is for gravity), this term amounts to pure advection in v \mathbf{v} v space. It is trivial to operator-split this as well, giving an update of the form
f ( x , v + Δ v [ x ] ) = f ( x , v ) (5) f(\mathbf{x},\mathbf{v}+\Delta\mathbf{v}[\mathbf{x}])=f(\mathbf{x},\mathbf{v}) \tag*{(5)} f ( x , v + Δ v [ x ]) = f ( x , v ) (5)
Δ v [ x ] ≡ a e x t ( x ) Δ t , \Delta\mathbf{v}[\mathbf{x}]\equiv\mathbf{a}_{\mathrm{ext}}(\mathbf{x})\Delta t, Δ v [ x ] ≡ a ext ( x ) Δ t ,
which can be solved via usual numerical methods.
Finite-Volume Discretization
This leaves the phase-space advection equation:
∂ f ∂ t = − v ⋅ ∇ f . (6) \frac{\partial f}{\partial t}=-\mathbf{v}\cdot\nabla f . \tag*{(6)} ∂ t ∂ f = − v ⋅ ∇ f . (6)
Since v \mathbf{v} v is an independent variable here (not a function of position), this can be integrated over volume in the usual finite-volume fashion, giving the rate-of-change of the velocity DF G ≡ d M / d D v = ∫ f d D x G\equiv dM/d^{D}\mathbf{v}=\int f\,d^{D}\mathbf{x} G ≡ d M / d D v = ∫ f d D x within a differential volume Ω \Omega Ω around the point x \mathbf{x} x :
∂ ∂ t ( d M d D v ) Ω = ∫ Ω ∂ f ∂ t d D x = − v ⋅ ∫ Ω ∇ f d D x = − v ⋅ ∫ ∂ Ω f d D − 1 A . (7) \begin{aligned}
\frac{\partial}{\partial t}\left(\frac{dM}{d^{D}\mathbf{v}}\right)_{\Omega}=\int_{\Omega}\frac{\partial f}{\partial t}\,d^{D}\mathbf{x}=-\mathbf{v}\cdot\int_{\Omega}\nabla f\,d^{D}\mathbf{x} \\
&=-\mathbf{v}\cdot\int_{\partial\Omega}f\,d^{D-1}\mathbf{A}. \tag*{(7)}
\end{aligned} ∂ t ∂ ( d D v d M ) Ω = ∫ Ω ∂ t ∂ f d D x = − v ⋅ ∫ Ω ∇ f d D x = − v ⋅ ∫ ∂ Ω f d D − 1 A . (7)
In the last step, we follow the usual finite-volume Godunov step of using Gauss’s law to replace the integral over the D D D -dimensional volume Ω \Omega Ω with the integral over the D − 1 D-1 D − 1 -dimensional surface ∂ Ω \partial\Omega ∂ Ω . Around a mesh-generating point a a a (the analog of an MC/PIC/NB “particle”), in standard fashion, this is then discretized at a desired order by replacing the integral with a discrete sum over the geometric faces A a b A_{ab} A ab between a a a and neighboring mesh-generating points b b b :
∂ ∂ t ( d m a d D v ) ≈ − v ⋅ ∑ b f a b ∗ ( x a b ∗ , v ) A a b = − ∑ b v ⋅ f a b ∗ ( x a b ∗ , v ) A a b , (8) \frac{\partial}{\partial t}\left(\frac{dm_a}{d^{D}\mathbf{v}}\right)\approx-\mathbf{v}\cdot\sum_b f^*_{ab}(\mathbf{x}^*_{ab},\mathbf{v})A_{ab}=-\sum_b\mathbf{v}\cdot f^*_{ab}(\mathbf{x}^*_{ab},\mathbf{v})A_{ab}, \tag*{(8)} ∂ t ∂ ( d D v d m a ) ≈ − v ⋅ b ∑ f ab ∗ ( x ab ∗ , v ) A ab = − b ∑ v ⋅ f ab ∗ ( x ab ∗ , v ) A ab , (8)
where f a b ∗ ( x a b ∗ , v ) f^*_{ab}(\mathbf{x}^*_{ab},\mathbf{v}) f ab ∗ ( x ab ∗ , v ) denotes the “interface value” of f f f (with the desired quadrature rule for the order of the solver).
Velocity-Space Partition: Basis Function Expansion
To discretize the Vlasov equation, we must partition the independent variables into some discrete representation. First consider velocity space.
Basis Function Definitions
Let f a ( v ) ≡ V a − 1 ∫ Ω a f ( x ∈ Ω a , v ) d D x f_a(\mathbf{v})\equiv V_a^{-1}\int_{\Omega_a}f(\mathbf{x}\in\Omega_a,\mathbf{v})\,d^{D}\mathbf{x} f a ( v ) ≡ V a − 1 ∫ Ω a f ( x ∈ Ω a , v ) d D x be the phase-space DF averaged in the domain Ω = Ω a \Omega=\Omega_a Ω = Ω a surrounding the mesh-generating point a a a , and represent this with the basis functions g ~ α \tilde{g}_{\alpha} g ~ α ,
f a ( v ) ≡ ρ a ∑ α ϖ α g ~ α ( v ) , (9) f_a(\mathbf{v})\equiv\rho_a\sum_{\alpha}\varpi_{\alpha}\tilde{g}_{\alpha}(\mathbf{v}), \tag*{(9)} f a ( v ) ≡ ρ a α ∑ ϖ α g ~ α ( v ) , (9)
where ρ a \rho_a ρ a is the mean mass density2 within Ω \Omega Ω , ϖ α \varpi_{\alpha} ϖ α are dimensionless weights, and the basis functions are normalized to unity:
1 = ∫ g ~ α ( v ) d D v . (10) 1=\int\tilde{g}_{\alpha}(\mathbf{v})\,d^{D}\mathbf{v}. \tag*{(10)} 1 = ∫ g ~ α ( v ) d D v . (10)
By definition ρ a = ∫ f a d D v \rho_a=\int f_a\,d^{D}\mathbf{v} ρ a = ∫ f a d D v , so the weights must sum to unity, ∑ α ϖ α = 1 \sum_{\alpha}\varpi_{\alpha}=1 ∑ α ϖ α = 1 . We also define the first and second moments of each basis:
⟨ v α ⟩ = ∫ v g ~ α ( v ) d D v , (11) \langle\mathbf{v}_{\alpha}\rangle=\int\mathbf{v}\tilde{g}_{\alpha}(\mathbf{v})\,d^{D}\mathbf{v}, \tag*{(11)} ⟨ v α ⟩ = ∫ v g ~ α ( v ) d D v , (11)
S α = ( ∫ v ⊗ v g ~ α ( v ) d D v ) − ( ⟨ v α ⟩ ⊗ ⟨ v α ⟩ ) . (12) \mathbf{S}_{\alpha}=\left(\int\mathbf{v}\otimes\mathbf{v}\tilde{g}_{\alpha}(\mathbf{v})\,d^{D}\mathbf{v}\right)-\left(\langle\mathbf{v}_{\alpha}\rangle\otimes\langle\mathbf{v}_{\alpha}\rangle\right). \tag*{(12)} S α = ( ∫ v ⊗ v g ~ α ( v ) d D v ) − ( ⟨ v α ⟩ ⊗ ⟨ v α ⟩ ) . (12)
Any velocity distribution can be represented with a sufficiently large set of basis functions; of course, for computational reasons we will use a finite set. This means our “velocity resolution” is limited by the number of basis functions, times the number of “particles” (finite-element mesh-generating points) used. Figure 2 illustrates the kind of representation this enables at a single position in space x a \mathbf{x}_a x a (i.e. within a single spatial resolution element), with a complex multi-peaked f a ( v ) f_a(\mathbf{v}) f a ( v ) in 1D being captured by an N b a s i s = 6 N_{\mathrm{basis}}=6 N basis = 6 Gaussian mixture, and an anisotropic, multi-stream 2D f a ( v x , v y ) f_a(v_x,v_y) f a ( v x , v y ) captured by N b a s i s = 5 N_{\mathrm{basis}}=5 N basis = 5 Gaussian components with non-trivial covariance. We discuss the meaning of this resolution further below.
Figure 2. Schematic of the per-cell basis-function representation of the velocity DF f a ( v ) f_a(\mathbf{v}) f a ( v ) . Left: a stylized 1D distribution (heavy black) with multiple unresolved peaks, reconstructed (red dashed) as a sum of N b a s i s = 6 N_{\mathrm{basis}} = 6 N basis = 6 Gaussian components (thin dashed coloured lines), each with its own weight ϖ α \varpi_\alpha ϖ α , mean ⟨ v α ⟩ \langle\mathbf{v}_\alpha\rangle ⟨ v α ⟩ , and dispersion σ α \sigma_\alpha σ α , all Lagrangian-evolved with the local flow. Right: a stylized 2D distribution f a ( v x , v y ) f_a(v_x,v_y) f a ( v x , v y ) (filled contours of the mixture) built from N b a s i s = 5 N_{\mathrm{basis}} = 5 N basis = 5 anisotropic Gaussian basis components (here 5 independent streams), with 1 σ 1\sigma 1 σ ellipses (white) marking the orientation and aspect of each individual g ~ α \tilde{g}_\alpha g ~ α , and centres (white +) at ⟨ v α ⟩ \langle\mathbf{v}_\alpha\rangle ⟨ v α ⟩ . The same parameters carry over directly to D = 3 D = 3 D = 3 , where each basis carries ( m , p , T ) (m,\mathbf{p},\mathbf{T}) ( m , p , T ) with T \mathbf{T} T a symmetric 3 × 3 3 \times3 3 × 3 tensor encoding an anisotropic local dispersion. The fact that ⟨ v α ⟩ \langle\mathbf{v}_\alpha\rangle ⟨ v α ⟩ and S α \mathbf{S}_\alpha S α are themselves evolved Lagrangian variables – not fixed on a global ( v x , v y , v z ) (v_x,v_y,v_z) ( v x , v y , v z ) grid – is what makes this representation many orders of magnitude cheaper than a uniform-velocity-grid Vlasov scheme at comparable effective phase-space resolution.
Conceptually, we stress that the basis functions are not required to be either (a) orthogonal, nor (b) complete (in the per-cell instantaneous sense). For (a), overlap is completely fine and creates no issues, since f a ( v ) f_a(\mathbf{v}) f a ( v ) (the real object) is reconstructed identically. If two become strictly degenerate it creates a practical implementation challenge (and redundancy/waste), but that is trivially solved by merging/splitting as noted below. For (b), because the basis functions are adaptive in velocity space, even if a given cell only has a few bases (so can only represent a few independent non-overlapping streams “at a time”), all velocities are realizable in principle (it can always adapt to move ⟨ v ⟩ \langle\mathbf{v}\rangle ⟨ v ⟩ if new material advects in with new velocities. They are thus automatically complete/spanning in a general sense. Of course, the accuracy of the representation scales with the basis number, with a defined convergence order discussed below.
Corresponding Conservative Variables
If we consider each basis function as an independent DF f a , α ≡ ρ a ϖ α g ~ α ( v ) f_{a,\alpha}\equiv\rho_a\varpi_\alpha\tilde{g}_\alpha(\mathbf{v}) f a , α ≡ ρ a ϖ α g ~ α ( v ) , then each has a set of conserved variables corresponding to the moments defined above, integrated over its domain in phase-space. In standard finite-volume fashion we will often explicitly work in these conserved variables:
m a , α ≡ ∫ Ω Δ f a , α = ϖ α m a , (13) m_{a,\alpha} \equiv\int_{\Omega} \Delta f_{a,\alpha} = \varpi_\alpha m_a , \tag*{(13)} m a , α ≡ ∫ Ω Δ f a , α = ϖ α m a , (13)
p a , α ≡ ∫ Ω v Δ f a , α = m a , α ⟨ v α ⟩ , (14) \mathbf{p}_{a,\alpha} \equiv\int_{\Omega} \mathbf{v}\,\Delta f_{a,\alpha} = m_{a,\alpha}\langle\mathbf{v}_\alpha\rangle, \tag*{(14)} p a , α ≡ ∫ Ω v Δ f a , α = m a , α ⟨ v α ⟩ , (14)
T a , α ≡ ∫ Ω ( v ⊗ v ) Δ f a , α = m a , α [ S α + ⟨ v α ⟩ ⊗ ⟨ v α ⟩ ] , (15) \mathbf{T}_{a,\alpha} \equiv\int_{\Omega}(\mathbf{v}\otimes\mathbf{v})\Delta f_{a,\alpha} = m_{a,\alpha}\left[\mathbf{S}_\alpha+\langle\mathbf{v}_\alpha\rangle\otimes\langle\mathbf{v}_\alpha\rangle\right], \tag*{(15)} T a , α ≡ ∫ Ω ( v ⊗ v ) Δ f a , α = m a , α [ S α + ⟨ v α ⟩ ⊗ ⟨ v α ⟩ ] , (15)
Δ f a , α ≡ ρ a ϖ α g ~ α ( v ) d D x d D v . (16) \Delta f_{a,\alpha} \equiv\rho_a\varpi_\alpha\tilde{g}_\alpha(\mathbf{v})\,d^D x\,d^D v. \tag*{(16)} Δ f a , α ≡ ρ a ϖ α g ~ α ( v ) d D x d D v . (16)
The total mass (m a = ∑ α m a , α m_a=\sum_\alpha m_{a,\alpha} m a = ∑ α m a , α ), momentum (p a = ∑ α p a , α \mathbf{p}_a=\sum_\alpha\mathbf{p}_{a,\alpha} p a = ∑ α p a , α ), stress (T a = ∑ α T a , α \mathbf{T}_a=\sum_\alpha\mathbf{T}_{a,\alpha} T a = ∑ α T a , α ), and energy (E a = Trace ( T a ) / 2 + U a g r a v i t y E_a=\operatorname{Trace}(\mathbf{T}_a)/2+U_a^{\mathrm{gravity}} E a = Trace ( T a ) /2 + U a gravity ) on the domain are simply sums over the basis functions. Note that T \mathbf{T} T is symmetric, so in D = ( 1 , 2 , 3 ) D=(1,2,3) D = ( 1 , 2 , 3 ) dimensions this system has ( 3 , 6 , 10 ) (3,6,10) ( 3 , 6 , 10 ) independent variables per basis function α \alpha α . We can continue to define higher-order conserved variables, e.g. G a , α ≡ ∫ Ω ( v ⊗ v ⊗ v ) Δ f a , α \mathbf{G}_{a,\alpha}\equiv\int_{\Omega}(\mathbf{v}\otimes\mathbf{v}\otimes\mathbf{v})\Delta f_{a,\alpha} G a , α ≡ ∫ Ω ( v ⊗ v ⊗ v ) Δ f a , α ; where to truncate depends on the basis definition.
Closure Order and Choice of Bases
We can of course continue to define higher-order moments. However, if our basis functions are chosen to be any functions which close at second-order (i.e. have higher-order moments which are entirely defined by the zeroth, first, and second moments), then these moments are sufficient to completely specify the basis functions. Since we will truncate our flux approximations at second-order in our study here, we go no further now. Second-order moments are also important because they are sufficient to ensure manifest mass, momentum, and energy conservation with a finite basis set.
We stress that truncating at second order does not mean we are unable to represent terms like skew or kurtosis in the DF, nor that we miss physical effects like heat flux/conduction in the weakly-collisional regime. Because we use multiple basis functions, in principle (with sufficient bases), any arbitrarily complex DF can be represented. In terms of reconstruction, introducing more complex basis functions is formally degenerate with simply adding additional (well-chosen) second-order basis functions. This is an important distinction from e.g. 13-moment methods in plasma physics, which we discuss further below. There, one represents the DF via a single basis function, and generally assumes the DF is close-to-Maxwellian (often a good approximation for ionized plasmas owing to kinetic instabilities if the DF deviates too far). In that case a Gaussian basis with 3 additional moments physically corresponding to a (small/weakly non-Gaussian) skew (producing the reduced heat flux vector q \mathbf{q} q ) is useful.
One is completely free, in our method, to choose bases which close at third or higher order, provided they can be specified via the set of evolved moments (or moments are added appropriately) – one simply needs to calculate the correct fluxes for those moment definitions. We discuss the pros and cons of extending the methods here to higher-moments (like 13+ moment methods), versus including more basis functions, below. As one might expect, this is highly problem-dependent.
Numerical Implementation & Choices
Everything below outlines an implementation in detail: we attempt to specify throughout what is “intrinsic” to the method, versus what is simply a specific implementation choice we have adopted in our particular numerical examples.
Volume (Configuration-Space) Partition
The definition of the volume partition Ω \Omega Ω and corresponding faces A a b \mathbf{A}_{ab} A ab can, in principle, follow any partition method for fluid dynamics, around some set of mesh-generating points x a \mathbf{x}_a x a . For example, an Eulerian fixed or adaptive-mesh-refinement Cartesian grid is a simple option that lends itself well to high-order methods and idealized, homogeneous problems. But for the applications we’ll study here, where there are cold streams in phase-space, Eulerian partitions involve large numerical diffusion as the streams advect across the grid and have to be constantly “jumping across” basis functions that may not be well-aligned. In this regime quasi-Lagrangian methods, e.g. moving mesh or meshless finite-volume methods are convenient.
Specific Implementation: Meshless Finite Mass
Here we will follow the meshless finite mass (MFM) method developed in Hopkins (2015) for GIZMO (following earlier work by Lanson & Vila 2008a,b; Gaburov et al. 2012. The advantage of this is that (1) the method can define the partition Ω a \Omega_a Ω a , densities ρ a \rho_a ρ a and faces A a b A_{ab} A ab from an arbitrary, moving, irregular set of generating points (naturally present if we are evolving subject to strong external or long-range forces), (2) the method is naturally second-order, and (3) it conserves element mass in each domain, which reduces MC/PIC/NB noise in the integration scheme and eliminates the need for particle merging/splitting.
The derivations of these properties and expressions are in Hopkins (2015); here we simply quote them. The faces and densities are given by:
A a b ≡ n ˉ a − 1 q ˉ b ( x a ) + n ˉ b − 1 q ˉ a ( x b ) . (17) A_{ab} \equiv\bar{n}_a^{-1}\bar{q}_b(\boldsymbol{x}_a) + \bar{n}_b^{-1}\bar{q}_a(\boldsymbol{x}_b) . \tag*{(17)} A ab ≡ n ˉ a − 1 q ˉ b ( x a ) + n ˉ b − 1 q ˉ a ( x b ) . (17)
q ˉ b ( x a ) ≡ E a − 1 ⋅ x b a W ( x b a , h a ) . (18) \bar{q}_b(\boldsymbol{x}_a) \equiv\mathbf{E}_a^{-1}\cdot\boldsymbol{x}_{ba}W(\boldsymbol{x}_{ba},h_a) . \tag*{(18)} q ˉ b ( x a ) ≡ E a − 1 ⋅ x ba W ( x ba , h a ) . (18)
E a ≡ ∑ c ( x c a ⊗ x c a ) W ( x c a , h a ) , (19) \mathbf{E}_a \equiv\sum_c(\boldsymbol{x}_{ca}\otimes\boldsymbol{x}_{ca})W(\boldsymbol{x}_{ca},h_a) , \tag*{(19)} E a ≡ c ∑ ( x c a ⊗ x c a ) W ( x c a , h a ) , (19)
n ˉ a ≡ ∑ c W ( x c a , h a ) = V a − 1 , (20) \bar{n}_a \equiv\sum_c W(\boldsymbol{x}_{ca},h_a)=V_a^{-1} , \tag*{(20)} n ˉ a ≡ c ∑ W ( x c a , h a ) = V a − 1 , (20)
ρ a ≡ m a n ˉ a = m a h a − D , (21) \rho_a \equiv m_a\bar{n}_a=m_a h_a^{-D} , \tag*{(21)} ρ a ≡ m a n ˉ a = m a h a − D , (21)
where x b a ≡ x b − x a \boldsymbol{x}_{ba}\equiv\boldsymbol{x}_b-\boldsymbol{x}_a x ba ≡ x b − x a , “⋅ \cdot ⋅ ” and “⊗ \otimes ⊗ ” denote the inner and outer product, respectively. Eqs. (20) –(21) form an implicit system for h a h_a h a (solved iteratively as in Springel & Hernquist 2002). W W W is a kernel function which should have various properties (symmetry, isotropy, smooth first derivatives, compact support, and Gaussian-like shape): here we adopt a standard cubic spline3 with maximum radius of compact support (analogous to the stencil for regular-grid methods) H a = 2 h a H_a=2h_a H a = 2 h a .
Motion of Mesh-Generating Points & Faces
In MFM, the mesh-generating points move strictly with the bulk center-of-mass velocity, v a ≡ p a / m a \boldsymbol{v}_a\equiv\boldsymbol{p}_a/m_a v a ≡ p a / m a , i.e.
x a → x a + p a m a Δ t . (22) \boldsymbol{x}_a\rightarrow\boldsymbol{x}_a+\frac{\boldsymbol{p}_a}{m_a}\Delta t . \tag*{(22)} x a → x a + m a p a Δ t . (22)
This is done using a standard leapfrog scheme (see Springel 2005). The volume partition (e.g. V a V_a V a , h a h_a h a ) is therefore re-calculated each timestep (for more details on how to efficiently evolve H a H_a H a to optimize this, see Hopkins 2015).
This means the faces A a b A_{ab} A ab move and deform with an effective face-centered velocity v F , a b \boldsymbol{v}_{F,ab} v F , ab (usually ∼ v a ∼ v b \sim v_a\sim v_b ∼ v a ∼ v b ). We therefore must re-write Eq. (8) in terms of the Lagrangian derivative moving with v F , a b \boldsymbol{v}_{F,ab} v F , ab :
d d t ( d m a d D v ) = ∑ b d d t ( d m a , b d D v ) . (23) \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\mathrm{d}m_a}{\mathrm{d}^D\boldsymbol{v}}\right)=\sum_b\frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\mathrm{d}m_{a,b}}{\mathrm{d}^D\boldsymbol{v}}\right) . \tag*{(23)} d t d ( d D v d m a ) = b ∑ d t d ( d D v d m a , b ) . (23)
d d t ( d m a , b d D v ) = − ( v − v F , a b ) ⋅ f a b ∗ ( x a b ∗ , v ) A a b . (24) \frac{\mathrm{d}}{\mathrm{d}t}\left(\frac{\mathrm{d}m_{a,b}}{\mathrm{d}^D\boldsymbol{v}}\right)=-\left(\boldsymbol{v}-\boldsymbol{v}_{F,ab}\right)\cdot f^\ast_{ab}(\boldsymbol{x}^\ast_{ab},\boldsymbol{v})A_{ab} . \tag*{(24)} d t d ( d D v d m a , b ) = − ( v − v F , ab ) ⋅ f ab ∗ ( x ab ∗ , v ) A ab . (24)
Following Hopkins (2015), the face motions v F , a b \boldsymbol{v}_{F,ab} v F , ab in MFM are defined by the mean motion of the effective Lagrangian surface between the cells, meaning that the net mass flux through each face vanishes identically (ensuring the mass per domain Ω \Omega Ω is conserved to machine precision, independent of the time-integration scheme). As shown therein, this is second-order consistent (given the mesh-generating-point motion), and for a collisional fluid (e.g. hydrodynamics) with an HLLC-type solver corresponds to the face moving with the S ∗ S^\ast S ∗ contact-wave. The generalization of this is to solve for
Reconstruction
General Considerations
A wide range of higher-order methods exist by which to reconstruct fluid quantities Q Q Q – e.g. primitive variables like ρ \rho ρ , v \boldsymbol{v} v , S S S – at the effective interaction faces or quadrature points ( x f , a b ) (\boldsymbol{x}_{f,ab}) ( x f , ab ) . Any of these can be combined with the basic method here, in principle. However, care is needed thinking about reconstruction here.
The meaningful quantity one wishes to reconstruct is the DF f a b ∗ − v f^\ast_{ab}-\boldsymbol{v} f ab ∗ − v is an independent variable like x \boldsymbol{x} x . If the DF f ( x , v ) f(\boldsymbol{x},\boldsymbol{v}) f ( x , v ) is smooth and continuous, then the representation f ∗ ≈ ∑ b a s e s ρ ∗ g ∗ f^\ast\approx\sum_{\mathrm{bases}}\rho^\ast g^\ast f ∗ ≈ ∑ bases ρ ∗ g ∗ can be reconstructed via interpolation of the bases. At second-order spatial accuracy as we implement below, since our bases are fully-specified by their primitive ρ α \rho_\alpha ρ α , ⟨ v ⟩ α \langle\boldsymbol{v}\rangle_\alpha ⟨ v ⟩ α , S α \boldsymbol{S}_\alpha S α , it is sufficient to reconstruct those variables, associating each reconstructed ρ a b , α ∗ , g a b , α ∗ , ⟨ v ⟩ a b , α ∗ , S a b , α ∗ \rho^\ast_{ab,\alpha},g^\ast_{ab,\alpha},\langle\boldsymbol{v}\rangle^\ast_{ab,\alpha},\boldsymbol{S}^\ast_{ab,\alpha} ρ ab , α ∗ , g ab , α ∗ , ⟨ v ⟩ ab , α ∗ , S ab , α ∗ with its reconstruction piece ρ a , α g a , α ( ⟨ v ⟩ a , α , S a , α ) \rho_{a,\alpha}g_{a,\alpha}(\langle\boldsymbol{v}\rangle_{a,\alpha},\boldsymbol{S}_{a,\alpha}) ρ a , α g a , α (⟨ v ⟩ a , α , S a , α ) . But this means that there is more freedom in non-smooth flows. Because we solve a series of one-sided vacuum Riemann problems reflecting a collisionless flow, monotonicity is not a stability criterion in the usual sense – an illustrative example being the case of propagation of a cold stream into true “vacuum” (what we call “empty basis” below), i.e. a region where such a stream does not exist. Obviously it does not make sense for the “empty” side (where this has not yet reached) any role in the gradient, since there is – as of yet – no basis function in that cell representing the stream before it propagates in, so its empty bases into which the stream will flow have undefined (vacuum) values of ⟨ v ⟩ \langle\boldsymbol{v}\rangle ⟨ v ⟩ . But it is critical to enforce realizability of the reconstructed DF.
In practice, we have experimented with piecewise-linear and piecewise-constant reconstructions. Consistent with most fluid dynamics results, we find piecewise-constant is so diffuse on our test problems that it is not practically useful. Piecewise linear does much better. Higher order methods like PPM or WENO-type methods are conceptually straightforward, with the primary challenges being (1) memory overhead (since these must apply to all moments of all bases), relevant on many GPU architectures, and (2) ensuring realizability (amplified here by arbitrary velocity anisotropy).
Slope-Limiting
In our default implementation, we consider a piecewise-linear reconstruction of Q Q Q at the interface A a b A_{ab} A ab between a a a and b b b , defined from each side for a given basis α \alpha α :
Q a b , α ∗ = Q a , α + ∇ Q a , α ⋅ ( x f , a b − x a ) , (25) Q^\ast_{ab,\alpha}=Q_{a,\alpha}+\nabla Q_{a,\alpha}\cdot(\boldsymbol{x}_{f,ab}-\boldsymbol{x}_a) , \tag*{(25)} Q ab , α ∗ = Q a , α + ∇ Q a , α ⋅ ( x f , ab − x a ) , (25)
with the face center x f , a b ≡ x a + ψ a b ( x b − x a ) \boldsymbol{x}_{f,ab}\equiv\boldsymbol{x}_a+\psi_{ab}(\boldsymbol{x}_b-\boldsymbol{x}_a) x f , ab ≡ x a + ψ ab ( x b − x a ) located at the fractional distance ψ a b \psi_{ab} ψ ab along the line connecting the centers of a a a and b b b (to second-order accuracy given our MFM partition, with ψ a b ≈ h b / ( h a + h b ) \psi_{ab}\approx h_b/(h_a+h_b) ψ ab ≈ h b / ( h a + h b ) , this is effective geometric location; see Hopkins 2015). The cell-centered gradients ∇ Q a , α \nabla Q_{a,\alpha} ∇ Q a , α are computed by the same matrix-weighted least-squares (MLS) used for MFM hydrodynamics:
∇ Q a , α = Φ a , α Q E a − 1 ⋅ ∑ b [ Q b , α ( b ) − Q a , α ] x b a W ( x b a , h a ) , (26) \nabla Q_{a,\alpha}=\boldsymbol{\Phi}_{a,\alpha}^{Q}\mathbf{E}_a^{-1}\cdot\sum_b\left[Q_{b,\alpha(b)}-Q_{a,\alpha}\right]\boldsymbol{x}_{ba}W(\boldsymbol{x}_{ba},h_a) , \tag*{(26)} ∇ Q a , α = Φ a , α Q E a − 1 ⋅ b ∑ [ Q b , α ( b ) − Q a , α ] x ba W ( x ba , h a ) , (26)
where E a \mathbf{E}_a E a is the same kernel-moment matrix defined in Eq. (19) (saved for the face computation), and Φ a , α Q \boldsymbol{\Phi}_{a,\alpha}^{Q} Φ a , α Q is a slope limiter.
Slope-Limiting
For stability, the gradients must be limited and must ensure realizability of the reconstructed DF (i.e. that S a b , α ∗ \boldsymbol{S}^\ast_{ab,\alpha} S ab , α ∗ remains symmetric positive-definite [SPD] and ρ a b , α ∗ \rho^\ast_{ab,\alpha} ρ ab , α ∗ remains positive-definite, corresponding to a positive-definite f f f ). This is not trivial. But as usual one desires a less-aggressive limiter where not needed, as too-strong limiters can easily ensure stability but effectively reduce the method to piecewise-constant. For the simple implementation here, we attempt to balance these by mirroring the component-wise limiting4 of the independent primitive fluid variables already standard in the MFM hydrodynamics Hopkins 2015, but err on the side of stronger limiters. An independent ϕ a , α Q \phi^{Q}_{a,\alpha} ϕ a , α Q is applied to the reconstructed gradient of each primitive Q ∈ { ρ , ⟨ v ⟩ , S } Q \in\{\rho, \langle\mathbf{v}\rangle, \mathbf{S}\} Q ∈ { ρ , ⟨ v ⟩ , S } .
For Q = ρ Q=\rho Q = ρ , we adopt the following Barth & Jespersen (1989)-style pairwise limiter, adapted from the standard global-stencil form to the per-basis moments here. For each matched neighbor pair, ϕ a , α Q \phi^{Q}_{a,\alpha} ϕ a , α Q is the largest value ∈ [ 0 , 1 ] \in[0,1] ∈ [ 0 , 1 ] such that
min ( Q a , α , Q b , α ( b ) ) ≤ Q a b , α ∗ ≤ max ( Q a , α , Q b , α ( b ) ) (27) \min(Q_{a,\alpha},Q_{b,\alpha(b)}) \le Q^{*}_{ab,\alpha} \le\max(Q_{a,\alpha},Q_{b,\alpha(b)}) \tag*{(27)} min ( Q a , α , Q b , α ( b ) ) ≤ Q ab , α ∗ ≤ max ( Q a , α , Q b , α ( b ) ) (27)
taking the minimum of ϕ a , α Q \phi^{Q}_{a,\alpha} ϕ a , α Q over all matched neighbors b b b . This preserves monotonicity for smooth flows and, since ρ a , α → 0 \rho_{a,\alpha}\to0 ρ a , α → 0 in the vacuum limit and ρ a , α > 0 \rho_{a,\alpha}>0 ρ a , α > 0 elsewhere, is trivially positivity-preserving and correctly interpolates in the stable sense for cold flows into un-represented bases.
For Q = ⟨ v ⟩ Q=\langle\mathbf{v}\rangle Q = ⟨ v ⟩ , there is no realizability concern, and we verify that our implementation remains stable in every problem we consider, with ϕ a , α v k = 1 \phi^{v_k}_{a,\alpha}=1 ϕ a , α v k = 1 . However in the unlimited case a second problem can arise in discontinuities or disordered/noisy flows. If the gradients are large, the reconstructed values of ⟨ v ⟩ a , α 1 \langle v\rangle_{a,\alpha_1} ⟨ v ⟩ a , α 1 , ⟨ v ⟩ a , α 2 \langle v\rangle_{a,\alpha_2} ⟨ v ⟩ a , α 2 from two bases can “cross” between a a a and the face a b ab ab , which causes our adopted neighbor bases-matching algorithm (§ 3.5 ) to flip assignments, which in turn further modifies the gradients and can lead to the incorrect basis “receiving” flux from neighbors. We therefore adopt a conservative limiter to prevent this: when the gradients are sufficiently large, such that the change in ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ from the reconstruction becomes comparable to some inter-particle velocity scale ς \varsigma ς , we enforce smoothness/monotonicity with Eq. (27) ; otherwise we use the second-order gradient estimator. We define ς k ≡ max ( ∣ ⟨ v a , α , k ⟩ − ⟨ v a , k ⟩ ∣ , σ a , α , k , ∣ ⟨ v b , β , k ⟩ − ⟨ v b , k ⟩ ∣ , σ b , β , k ) \varsigma_k \equiv\max(|\langle v_{a,\alpha,k}\rangle-\langle v_{a,k}\rangle|,\sigma_{a,\alpha,k},|\langle v_{b,\beta,k}\rangle-\langle v_{b,k}\rangle|,\sigma_{b,\beta,k}) ς k ≡ max ( ∣ ⟨ v a , α , k ⟩ − ⟨ v a , k ⟩ ∣ , σ a , α , k , ∣ ⟨ v b , β , k ⟩ − ⟨ v b , k ⟩ ∣ , σ b , β , k ) component-wise (so bulk velocities are normalized to cell-mean and preserve Galilean invariance), the threshold at a conservative ϵ v ς \epsilon_v\varsigma ϵ v ς with ϵ v = 0.1 \epsilon_v=0.1 ϵ v = 0.1 , and
ϕ a , α v k = { 1 if ∣ ∇ v k , a , α ⋅ x b a ∣ < ϵ v ς k ϕ a , α Q from Eq. 27 otherwise . (28) \phi^{v_k}_{a,\alpha} =
\begin{cases}
1 & \text{if } |\nabla v_{k,a,\alpha}\cdot\mathbf{x}_{ba}| < \epsilon_v\varsigma_k \\
\phi^{Q}_{a,\alpha}\text{ from Eq. 27} & \text{otherwise}.
\end{cases} \tag*{(28)} ϕ a , α v k = { 1 ϕ a , α Q from Eq. 27 if ∣∇ v k , a , α ⋅ x ba ∣ < ϵ v ς k otherwise . (28)
We show below (§ 5.12 ) the ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ limiter has a large effect on numerical dissipation.
For Q = S Q=S Q = S , taking the gradient of each component S k S^k S k with a monotonicity-preserving limiter can still produce an unrealizable S a b , α ∗ S^{*}_{ab,\alpha} S ab , α ∗ (even if every cell-centered S \mathbf{S} S is SPD). So we adopt the more conservative approach of defining a single ϕ a , α S \phi^{S}_{a,\alpha} ϕ a , α S , applied to all components S k S^k S k . This is defined as the largest value ∈ [ 0 , 1 ] \in[0,1] ∈ [ 0 , 1 ] such that Eq. (27) is satisfied for every component (in α \alpha α ), and the reconstructed S a b , α ∗ \mathbf{S}^{*}_{ab,\alpha} S ab , α ∗ remains SPD. This is solved using an iterative bisection algorithm: first taking the minimum ϕ a b , α S , g u e s s ≡ min [ ϕ a b , α S ] \phi^{S,\mathrm{guess}}_{ab,\alpha}\equiv\min[\phi^{S}_{ab,\alpha}] ϕ ab , α S , guess ≡ min [ ϕ ab , α S ] satisfying Eq. (27) for all components k k k for a given pair α \alpha α , then iteratively reducing this to find the largest value ϕ a b , α S ∈ [ 0 , ϕ a b , α S , g u e s s ] \phi^{S}_{ab,\alpha}\in[0,\phi^{S,\mathrm{guess}}_{ab,\alpha}] ϕ ab , α S ∈ [ 0 , ϕ ab , α S , guess ] such that the reconstructed S a b , α ∗ \mathbf{S}^{*}_{ab,\alpha} S ab , α ∗ is SPD, then taking the minimum over all neighbors ϕ a , α S ≡ min b [ ϕ a b , α S ] \phi^{S}_{a,\alpha}\equiv\min_b[\phi^{S}_{ab,\alpha}] ϕ a , α S ≡ min b [ ϕ ab , α S ] . This enforces monotonicity and realizability. It is stronger than the minimal needed, and further improvements are definitely warranted.
Matched-Basis Reconstruction Stencil
Note that because the basis index α \alpha α refers to a spatial-and-velocity-Lagrangian basis component, two (spatially) neighboring cells are not ensured to have exactly identical bases. The neighbor value Q b , α ( b ) Q_{b,\alpha(b)} Q b , α ( b ) entering Eq. (26) must therefore use the basis index α ( b ) \alpha(b) α ( b ) on side b b b that is paired to α \alpha α on side a a a by the consistent pairing operator described below (§ 3.5 ) and used in the actual flux computation.
Flux Computation
Per-Basis Flux Integrals
The flux of f f f at a specific value of v \mathbf{v} v through the face A a b \mathbf{A}_{ab} A ab is given by Eq. (24) . This is just the linear sum of the flux from each basis component g ~ α \tilde{g}_{\alpha} g ~ α :
d d t ( d m a , b d D v ) = − ( v − v F , a b ) f a b ∗ ( x a b ∗ , v ) ⋅ A a b = − ( v − v F , a b ) [ ∑ α ρ a b , α ∗ g ~ a b , α ∗ , a + ∑ β ρ b a , β ∗ g ~ b a , β ∗ , b ] ⋅ A a b . (29) \begin{aligned}
\frac{d}{dt}\left(\frac{d m_{a,b}}{d^D\mathbf{v}}\right)=-(\mathbf{v}-\mathbf{v}_{F,ab})f^{*}_{ab}(\mathbf{x}^{*}_{ab},\mathbf{v})\cdot\mathbf{A}_{ab} \\
&=-(\mathbf{v}-\mathbf{v}_{F,ab})\left[\sum_{\alpha}\rho^{*}_{ab,\alpha}\tilde{g}^{*,a}_{ab,\alpha}+\sum_{\beta}\rho^{*}_{ba,\beta}\tilde{g}^{*,b}_{ba,\beta}\right]\cdot\mathbf{A}_{ab}. \tag*{(29)}
\end{aligned} d t d ( d D v d m a , b ) = − ( v − v F , ab ) f ab ∗ ( x ab ∗ , v ) ⋅ A ab = − ( v − v F , ab ) α ∑ ρ ab , α ∗ g ~ ab , α ∗ , a + β ∑ ρ ba , β ∗ g ~ ba , β ∗ , b ⋅ A ab . (29)
where ρ a b , α ∗ ≡ ρ a b , α ∗ g ~ a b , α ∗ , a \rho^{*}_{ab,\alpha}\equiv\rho^{*}_{ab,\alpha}\tilde{g}^{*,a}_{ab,\alpha} ρ ab , α ∗ ≡ ρ ab , α ∗ g ~ ab , α ∗ , a and g ~ a b , α ∗ , a ( v ) ≡ g ~ a , α ( v ∣ v ) a b , α ∗ , a , S a b , α ∗ , a , … ) \tilde{g}^{*,a}_{ab,\alpha}(\mathbf{v})\equiv\tilde{g}_{a,\alpha}(\mathbf{v}\mid\mathbf{v})^{*,a}_{ab,\alpha},\mathbf{S}^{*,a}_{ab,\alpha},\ldots) g ~ ab , α ∗ , a ( v ) ≡ g ~ a , α ( v ∣ v ) ab , α ∗ , a , S ab , α ∗ , a , … ) are the reconstructed density and velocity DFs, (and the sum goes over those reconstructed from the a a a and b b b side).
As noted above, we want to define a strictly conservative method, so we want to consider fluxes of the conservative variables U V ≡ { m , p , T } \mathrm{UV}\equiv\{\mathbf{m},\mathbf{p},\mathbf{T}\} UV ≡ { m , p , T } . This is given by integrating over v n d D v ( m , p , T ) \mathbf{v}^{n}d^{D}\mathbf{v}\,(\mathbf{m},\mathbf{p},\mathbf{T}) v n d D v ( m , p , T ) corresponding to n = 0 , 1 , 2 n=0,1,2 n = 0 , 1 , 2 , i.e.
d ( U V ) a d t = ∑ b d ( U V ) a , b d t = ∑ b [ ∑ α d ( U V ) a b , α d t ∣ b + ∑ β d ( U V ) a b , β d t ∣ b ] = − ∑ b [ ∑ α F a → b , α ∗ + ∑ β F b → a , β ∗ ] ⋅ A a b . (30) \begin{aligned}
\frac{d(\mathrm{UV})_a}{dt}=\sum_b\frac{d(\mathrm{UV})_{a,b}}{dt} \\
&=\sum_b\left[\sum_{\alpha}\frac{d(\mathrm{UV})_{ab,\alpha}}{dt}\bigg|_b+\sum_{\beta}\frac{d(\mathrm{UV})_{ab,\beta}}{dt}\bigg|_b\right] \\
&=-\sum_b\left[\sum_{\alpha}\mathbf{F}^{*}_{a\to b,\alpha}+\sum_{\beta}\mathbf{F}^{*}_{b\to a,\beta}\right]\cdot\mathbf{A}_{ab}. \tag*{(30)}
\end{aligned} d t d ( UV ) a = b ∑ d t d ( UV ) a , b = b ∑ α ∑ d t d ( UV ) ab , α b + β ∑ d t d ( UV ) ab , β b = − b ∑ α ∑ F a → b , α ∗ + β ∑ F b → a , β ∗ ⋅ A ab . (30)
where the flux from a a a to b b b associated with a a a ’s basis α \alpha α is defined by
F a → b , α ∗ ( n ) = ∫ v ( n ) ( v − v F , a b ) f a b , α ∗ ( x a b ∗ , v ) d D v . (31) \mathbf{F}^{*(n)}_{a\to b,\alpha}=\int\mathbf{v}^{(n)}(\mathbf{v}-\mathbf{v}_{F,ab})f^{*}_{ab,\alpha}(\mathbf{x}^{*}_{ab},\mathbf{v})\,d^{D}\mathbf{v}. \tag*{(31)} F a → b , α ∗ ( n ) = ∫ v ( n ) ( v − v F , ab ) f ab , α ∗ ( x ab ∗ , v ) d D v . (31)
For properly defined fluxes, this is automatically conservative of mass, momentum, and energy on equal timesteps, because the d ( U V ) a , b / d t = − d ( U V ) b , a / d t d(\mathrm{UV})_{a,b}/dt=-d(\mathrm{UV})_{b,a}/dt d ( UV ) a , b / d t = − d ( UV ) b , a / d t are antisymmetric. Like with most existing fluid-dynamics and gravity methods, momentum and energy conservation becomes integration-accurate for adaptive individual timesteps, unless one carries additional variables to represent the shorter-timestep active-side updates at all times. In either case mass is conserved to machine precision, owing to our definition of the face motion.
Direct and Lax-Friedrichs Type Fluxes
If we simply insert f a b , α ∗ ≡ ρ a b , α ∗ g a b , α ∗ , a f^{*}_{ab,\alpha}\equiv\rho^{*}_{ab,\alpha}g^{*,a}_{ab,\alpha} f ab , α ∗ ≡ ρ ab , α ∗ g ab , α ∗ , a and evaluate Eq. (31) for the system of primitive variables:
U ≡ ( ρ ρ ⟨ v ⟩ ρ ⟨ v ⊗ v ⟩ ) = 1 V ( m p T ) , (32) \mathbf{U}\equiv
\begin{pmatrix}
\rho\\
\rho\langle\mathbf{v}\rangle\\
\rho\langle\mathbf{v}\otimes\mathbf{v}\rangle
\end{pmatrix}
=\frac{1}{V}
\begin{pmatrix}
m \\
\mathbf{p} \\
\mathbf{T}
\end{pmatrix}, \tag*{(32)} U ≡ ρ ρ ⟨ v ⟩ ρ ⟨ v ⊗ v ⟩ = V 1 m p T , (32)
we immediately obtain
F a → b , α ∗ = ρ ( u ⟨ v ⟩ u + S ⟨ v ⊗ v ⟩ u + ⟨ v ⟩ ⊗ S + S ⊗ ⟨ v ⟩ ) a b , α ∗ , a , (33) \mathbf{F}^{*}_{a\to b,\alpha}=\rho
\begin{pmatrix}
\mathbf{u} \\
\langle v\rangle\mathbf{u}+\mathbf{S} \\
\langle\mathbf{v}\otimes\mathbf{v}\rangle\mathbf{u}+\langle\mathbf{v}\rangle\otimes\mathbf{S}+\mathbf{S}\otimes\langle\mathbf{v}\rangle
\end{pmatrix}^{*,a}_{ab,\alpha}, \tag*{(33)} F a → b , α ∗ = ρ u ⟨ v ⟩ u + S ⟨ v ⊗ v ⟩ u + ⟨ v ⟩ ⊗ S + S ⊗ ⟨ v ⟩ ab , α ∗ , a , (33)
u ≡ ⟨ v ⟩ − v F , a b , ⟨ v ⊗ v ⟩ = ⟨ v ⟩ ⊗ ⟨ v ⟩ + S . \mathbf{u}\equiv\langle\mathbf{v}\rangle-\mathbf{v}_{F,ab},\quad
\langle\mathbf{v}\otimes\mathbf{v}\rangle=\langle\mathbf{v}\rangle\otimes\langle\mathbf{v}\rangle+\mathbf{S}. u ≡ ⟨ v ⟩ − v F , ab , ⟨ v ⊗ v ⟩ = ⟨ v ⟩ ⊗ ⟨ v ⟩ + S .
The ( ) a b , α ∗ , a (\ )^{*,a}_{ab,\alpha} ( ) ab , α ∗ , a notation means these indices should be applied to all variables on the right-hand side. The expressions for the m \mathbf{m} m and p \mathbf{p} p fluxes are valid for any form of the bases; for T \mathbf{T} T we assume only that the basis is even in ( v − ⟨ v α ⟩ ) (\mathbf{v}-\langle\mathbf{v}_{\alpha}\rangle) ( v − ⟨ v α ⟩) consistent with our earlier representation.
However, since all we are doing here is integrating a series of simple hyperbolic equations, it is well-known that this flux will be numerically unstable, unless we add some upwind dissipation terms. We confirm this in our own implementations. One option, akin to smoothed-particle-hydrodynamics methods, would be to add some sort of “artificial viscosity” to the problem to cure the instability. For example, in 13-moment methods for plasma physics, one often combines a more diffusive HLL or GLF-like solver with an artificial diffusion term and an artificial collisionality term (to damp the DF back to quasi-thermal; Torrilhon 2010; McDonald & Torrilhon 2013; Cai et al. 2014; Miller & Shumlak 2016). But this has many well-known challenges and potential pitfalls, especially for a collisionless problem like this one (where there may be no physical viscosity/damping/collisionality).
Even a lower-order method suffers from this. Consider (purely for illustrative purposes) a reconstruction which assumes a pairwise-taper (e.g. q = q a ( x b − x ) / ( x b − x a ) q=q_a(x_b-x)/(x_b-x_a) q = q a ( x b − x ) / ( x b − x a ) , along the line connecting x a x_a x a , x b x_b x b ) for ρ \rho ρ with constant specific properties, giving: ρ a b , α ∗ , a → ( 1 − ξ S ) ψ a b ρ a , α \rho_{ab,\alpha}^{*,a}\rightarrow(1-\xi_S)\psi_{ab}\rho_{a,\alpha} ρ ab , α ∗ , a → ( 1 − ξ S ) ψ ab ρ a , α , ⟨ v ⟩ a b , α ∗ , a → ⟨ v ⟩ a , α \langle v\rangle_{ab,\alpha}^{*,a}\rightarrow\langle v\rangle_{a,\alpha} ⟨ v ⟩ ab , α ∗ , a → ⟨ v ⟩ a , α , S a b , α ∗ , a → S a , α S_{ab,\alpha}^{*,a}\rightarrow S_{a,\alpha} S ab , α ∗ , a → S a , α , u a b , α ∗ , a → ( 1 + ξ m ) ( ⟨ v ⟩ a , α − v F , a b ) u_{ab,\alpha}^{*,a}\rightarrow(1+\xi_m)(\langle v\rangle_{a,\alpha}-v_{F,ab}) u ab , α ∗ , a → ( 1 + ξ m ) (⟨ v ⟩ a , α − v F , ab ) . Here the terms ξ m \xi_m ξ m and ξ S \xi_S ξ S are the upwind numerical dissipation terms; their placement is motivated by anisotropic SPH solvers well-studied in the elastodynamics literature (which use a similar reconstruction, hence our reference; see Deng et al. 2017), and some tedious algebra (for our basis functions below) gives ξ S = c e / ( S M + c e ) \xi_S=c_e/(S_M+c_e) ξ S = c e / ( S M + c e ) , ξ m = c e / v A \xi_m=c_e/v_A ξ m = c e / v A , with S M = v A + c e 2 / ( v A + c e ) S_M=v_A+c_e^2/(v_A+c_e) S M = v A + c e 2 / ( v A + c e ) , v A = ∣ ( ⟨ v ⟩ a , α − v F , a b ) ⋅ A ^ a b ∣ v_A=\lvert(\langle v\rangle_{a,\alpha}-v_{F,ab})\cdot\hat{A}_{ab}\rvert v A = ∣(⟨ v ⟩ a , α − v F , ab ) ⋅ A ^ ab ∣ , and c e 2 = A ^ a b T ⋅ S a , α ⋅ A ^ a b c_e^2=\hat{A}_{ab}^{\mathsf T}\cdot S_{a,\alpha}\cdot\hat{A}_{ab} c e 2 = A ^ ab T ⋅ S a , α ⋅ A ^ ab . If we insert this in Eq. (33) with ξ m = ξ S = 0 \xi_m=\xi_S=0 ξ m = ξ S = 0 , it is both low-order and (still) unstable. If we use this with the above ξ \xi ξ values, it is stable, but extremely diffusive (as expected).
One-Sided Collisionless Riemann Solution (Default)
A better solution is to consider an actual upwind Riemann problem solution, and there is a simple generalization of known methods. For collisionless or weakly-collisional systems (where the collisional deflection length or mean free path is large compared to the effective thickness of the face/resolution), then on an upwind face, the matched-basis state on the opposite side carries no incoming component along A ^ a b \hat{A}_{ab} A ^ ab that can “feed back.” So the symmetric central-difference dissipation built into an HLL or GLF solver is spurious. The natural conclusion is to treat the right state in each per-pair Riemann problem as a v v v -space vacuum from the perspective of the outgoing basis on the upwind side. Essentially, the upwind solution in the weakly-collisional regime is the linear sum of the upwind vacuum solutions “from each side.” This makes computing an exact upwind Riemann problem solution trivial – one simply computes the exact integral flux “out of” each basis α \alpha α “into” each basis β \beta β (e.g. computing the flux integrals from the reconstructed primitives over the velocities projected relative to their position and direction versus the moving face which will flow “out”). This is therefore our default flux formulation adopted. But to compute this rigorously, we do require specifying the functional form of the basis functions g α ( v ) g_\alpha(v) g α ( v ) .
Choice of Basis Function & Exact Gaussian Riemann Solution
We desire a second-order function with defined moments. To be fully closed, the functions must be even in ( v − ⟨ v α ⟩ ) (v-\langle v_\alpha\rangle) ( v − ⟨ v α ⟩) . One obvious function which can be constructed that satisfies these criteria is the three-dimensional Gaussian function:
g ~ α ( v ) = [ Det ( 2 π S α ) ] − 1 / 2 exp ( − F α ( v ) ) , F α = 1 2 ( v − ⟨ v α ⟩ ) T S α − 1 ( v − ⟨ v α ⟩ ) . (34) \tilde{g}_\alpha(v)=\left[\operatorname{Det}(2\pi S_\alpha)\right]^{-1/2}\exp\left(-\mathcal{F}_\alpha(v)\right),
\qquad
\mathcal{F}_\alpha=\frac{1}{2}(v-\langle v_\alpha\rangle)^{\mathsf T}S_\alpha^{-1}(v-\langle v_\alpha\rangle). \tag*{(34)} g ~ α ( v ) = [ Det ( 2 π S α ) ] − 1/2 exp ( − F α ( v ) ) , F α = 2 1 ( v − ⟨ v α ⟩ ) T S α − 1 ( v − ⟨ v α ⟩) . (34)
This is a reasonable basis, in principle, and it also has the advantage that it reduces exactly in the collisional limit to hydrodynamics or MHD as desired, because it becomes a Maxwellian. It is certainly possible that using different basis functions might be more efficient (i.e. require fewer evolved variables to represent the same information) or more accurate in some circumstances (if e.g. there is a large skew in the real velocity DF), but we defer an exploration of this to future work.
With this, it is possible to evaluate an exact one-sided kinetic flux into the velocity-space vacuum, since for Gaussian basis functions the half-space moment integrals close in terms of standard error functions. Let x ^ ≡ A ^ \hat{x}\equiv\hat{A} x ^ ≡ A ^ be the face-normal, and define the upwind normal-flow velocity u x ≡ ( ⟨ v ⟩ − v f ) ⋅ A ^ u_x\equiv(\langle v\rangle-v_f)\cdot\hat{A} u x ≡ (⟨ v ⟩ − v f ) ⋅ A ^ , as well as S x ≡ S ⋅ A ^ S_x\equiv S\cdot\hat{A} S x ≡ S ⋅ A ^ , and
σ x = ( A ^ ⋅ S ⋅ A ^ ) 1 / 2 , u ~ = u x σ x , w ~ = u x ζ + σ x ω , (35) \sigma_x=(\hat{A}\cdot S\cdot\hat{A})^{1/2},\qquad\tilde{u}=\frac{u_x}{\sigma_x},\qquad\tilde{w}=u_x\zeta+\sigma_x\omega, \tag*{(35)} σ x = ( A ^ ⋅ S ⋅ A ^ ) 1/2 , u ~ = σ x u x , w ~ = u x ζ + σ x ω , (35)
ζ = 1 2 erfc ( − u ~ 2 ) , ω = 1 2 π e − u ~ 2 / 2 , \zeta=\frac{1}{2}\operatorname{erfc}\left(-\frac{\tilde{u}}{\sqrt{2}}\right),\qquad\omega=\frac{1}{\sqrt{2\pi}}e^{-\tilde{u}^2/2}, ζ = 2 1 erfc ( − 2 u ~ ) , ω = 2 π 1 e − u ~ 2 /2 ,
so that ζ \zeta ζ and ω \omega ω are the standard normal CDF and PDF, respectively. Then the exact one-sided fluxes in the standard face-normal component form are given by
F G = ρ ( w ~ ⟨ v ⟩ w ~ + S x ζ ⟨ v ⊗ v ⟩ w ~ + ( ⟨ v ⟩ ⊗ S x + S x ⊗ ⟨ v ⟩ ) ζ + S x ⊗ S x σ x ω ) . (36) \mathcal{F}_G=\rho\left(
\begin{array}{c}
\tilde{w}\\
\langle v\rangle\tilde{w}+S_x\zeta\\
\langle v\otimes v\rangle\tilde{w}+(\langle v\rangle\otimes S_x+S_x\otimes\langle v\rangle)\zeta+\dfrac{S_x\otimes S_x}{\sigma_x}\omega
\end{array}
\right). \tag*{(36)} F G = ρ w ~ ⟨ v ⟩ w ~ + S x ζ ⟨ v ⊗ v ⟩ w ~ + (⟨ v ⟩ ⊗ S x + S x ⊗ ⟨ v ⟩) ζ + σ x S x ⊗ S x ω . (36)
In the cold-outflow/converging limit u ~ → + ∞ \tilde{u}\rightarrow+\infty u ~ → + ∞ : ζ → 1 \zeta\rightarrow1 ζ → 1 , ω → 0 \omega\rightarrow0 ω → 0 , w ~ → u x \tilde{w}\rightarrow u_x w ~ → u x , and F G → ρ u x \mathcal{F}_G\rightarrow\rho u_x F G → ρ u x . In the cold-receding limit u ~ → − ∞ \tilde{u}\rightarrow-\infty u ~ → − ∞ , F G → 0 \mathcal{F}_G\rightarrow0 F G → 0 (exponentially suppressed Gaussian tail).
Note that the terms break into three groups with simple physical interpretations. Those in w ~ \tilde{w} w ~ represent advection (the dependence of w ~ \tilde{w} w ~ on u x u_x u x just reflects the finite-velocity width of the basis). The S x ζ S_x\zeta S x ζ terms in momentum and energy are the “pressure” and “PdV” or “adiabatic” (work/stress-tensor energy transfer) terms – even if the fluid is collisionless, it still has a stress tensor providing support in e.g. a Jeans sense. The last term in S x ⊗ S x ω S_x\otimes S_x\omega S x ⊗ S x ω is akin to an effective conductivity.
We can immediately distinguish the numerical upwinding terms from comparison with Eq. (33) . This is especially simple if we assume a stationary (non-moving) equilibrium: then from “each side” F G → ρ ( σ x ω , S x / 2 , S x σ x ω + σ x − 1 S x S x ω ) \mathcal{F}_G\rightarrow\rho(\sigma_x\omega,S_x/2,S_x\sigma_x\omega+\sigma_x^{-1}S_xS_x\omega) F G → ρ ( σ x ω , S x /2 , S x σ x ω + σ x − 1 S x S x ω ) (note here we have ζ → 1 / 2 \zeta\rightarrow1/2 ζ → 1/2 , true for any symmetric basis in this limit, and distinguish the prefactors ω 1 \omega_1 ω 1 and ω 2 \omega_2 ω 2 as these can depend weakly on the shape of the basis function, with values = ( 0.4 , 0.4 ) (0.4,0.4) ( 0.4 , 0.4 ) here or = ( 0.43 , 0.22 ) (0.43,0.22) ( 0.43 , 0.22 ) for the top-hat basis below), while the single-valued F d i r e c t ∗ = ρ ( 0 , S x , 0 ) \mathcal{F}_{\mathrm{direct}}^*=\rho(0,S_x,0) F direct ∗ = ρ ( 0 , S x , 0 ) . These might appear quite different, but note that if we have a sufficiently smooth DF, such that the spatial reconstructions of f a b f_{ab} f ab agree from the left and right sides of the face, then the signed terms are such that the mass flux and conduction terms (those in ω 1 , ω 2 \omega_1,\omega_2 ω 1 , ω 2 ) calculated from the matched bases on each side exactly cancel, while the signed S x / 2 S_x/2 S x /2 term adds from each side, giving F G , L + F G , R → F d i r e c t ∗ \mathcal{F}_{G,L}+\mathcal{F}_{G,R}\rightarrow\mathcal{F}_{\mathrm{direct}}^* F G , L + F G , R → F direct ∗ exactly as intended. So these terms only act (like any other well-posed numerical dissipation terms) when the reconstruction produces a discontinuity at the face. For smooth flows, since we implement a piecewise-linear reconstruction, this means the dissipation/upwinding enters at second-order, e.g. for conduction O ( Δ x 2 [ ∂ 2 ρ 3 / ∂ r 2 ] ) \mathcal{O}(\Delta x^2[\partial^2\rho^3/\partial r^2]) O ( Δ x 2 [ ∂ 2 ρ 3 / ∂ r 2 ]) .
The exact Gaussian basis has, formally, particles at infinite velocities (since the Gaussian tail extends to arbitrarily large ∣ v ∣ \lvert v\rvert ∣ v ∣ ), but one can generalize this with appropriate basis choice and construction to the relativistic Riemann problem. For the non-relativistic case here, the contribution of the tail to the fluxes (the only place it appears causally) is bounded by the largest eigenvalue of the Jacobian, which is well-understood for a single-moment Gaussian (Maxwellian) 10-moment method, giving the signal speed ∣ u x ∣ + χ σ x \lvert u_x\rvert+\chi\sigma_x ∣ u x ∣ + χ σ x with χ = 3 \chi=\sqrt{3} χ = 3 for advective and “pressure” terms, if we adopted a non-upwinded HLL or GLF-type flux. However for the heat-flux term with the higher-order reconstruction and less-diffusive (physically minimal) upwinding, this is not sufficient to always capture the signal speed of communication via the heat flux “tail” communicating (especially if there are “near-empty” basis functions into which this heat flux channels energy). In practice, we find that because the flux diminishes rapidly (by definition) for high-σ \sigma σ fluctuations, adopting a “safety factor” increasing χ \chi χ to ∼ 4 − 5 \sim4-5 ∼ 4 − 5 is sufficient to stabilize the method in the CFL criterion below, when also coupled to our conservative realizability repair methods. But this not only requires shorter timesteps, it does pose a risk of un-physical heat fluxes arising: consider a simple 1D Gaussian where only the “tail” at some large v > 0 v>0 v > 0 is lost to heat flux. After some time, the physical basis would be a skew-Gaussian without said tail to v > 0 v>0 v > 0 , and no heat flux. But because we re-project the updated moments onto a new Gaussian, a new tail is “generated” by the re-projection, producing an additional (unphysical) heat flux.
Alternative Approximate Solvers
A variety of exact and approximate alternatives can be derived from different assumptions for the basis functions, which we illustrate here. As noted above, a disadvantage of Gaussian bases is that they lack compact support. So instead, consider a “top hat” distribution in velocity space (essentially a constant-density in d 3 v d^3v d 3 v parallelogram) defined (after rotating into the diagonal coordinate frame) over − 3 S i i < v i − ⟨ v ⟩ i < 3 S i i -\sqrt{3}S_{ii}<v_i-\langle v\rangle_i<\sqrt{3}S_{ii} − 3 S ii < v i − ⟨ v ⟩ i < 3 S ii . The expressions in arbitrary dimensions for any anisotropy and “slice” (direction of A ^ \hat{\mathbf{A}} A ^ and offset v F v_{\mathrm{F}} v F ) do not have simple representations, but it is worth noting that for second-order-closed bases and a one-sided collisionless Riemann problem, the dimensional form of Eq. (36) is complete. The only difference between different assumptions is the form of the “weight functions” w ~ \tilde{w} w ~ , ζ \zeta ζ , ω \omega ω associated to the advective, pressure, and conductive fluxes. So, akin to approximate solvers like HLLC, we can approximate these in higher-dimensions with expressions exact for the 1D Riemann problem.
Defining c x = 3 σ x c_x=\sqrt{3}\sigma_x c x = 3 σ x this gives:
F T H = { F T H , 0 ( c x ≤ u x ) F T H , 1 ( − c x < u x < c x ) 0 ( u x ≤ − c x ) (37) \mathcal{F}_{\mathrm{TH}}=
\begin{cases}
\mathcal{F}_{\mathrm{TH},0} & (c_x\le u_x)\\
\mathcal{F}_{\mathrm{TH},1} & (-c_x<u_x<c_x)\\
0 & (u_x\le-c_x)
\end{cases} \tag*{(37)} F TH = ⎩ ⎨ ⎧ F TH , 0 F TH , 1 0 ( c x ≤ u x ) ( − c x < u x < c x ) ( u x ≤ − c x ) (37)
The piecewise definition of g ~ \tilde{g} g ~ divides the solution into a fan with:
F T H , 0 = ρ ( u x ⟨ v ⟩ u x + S x ⟨ v ⊗ v ⟩ u x + ⟨ v ⟩ ⊗ S x + S x ⊗ ⟨ v ⟩ ) (38) \mathcal{F}_{\mathrm{TH},0}=\rho
\begin{pmatrix}
u_x\\
\langle v\rangle u_x+\mathbf{S}_x\\
\langle v\otimes v\rangle u_x+\langle v\rangle\otimes\mathbf{S}_x+\mathbf{S}_x\otimes\langle v\rangle
\end{pmatrix} \tag*{(38)} F TH , 0 = ρ u x ⟨ v ⟩ u x + S x ⟨ v ⊗ v ⟩ u x + ⟨ v ⟩ ⊗ S x + S x ⊗ ⟨ v ⟩ (38)
F T H , 1 = ρ ( ⟨ v ⟩ w ~ ′ + S x ζ ′ ⟨ v ⊗ v ⟩ w ~ ′ + ( ⟨ v ⟩ ⊗ S x + S x ⊗ ⟨ v ⟩ ) ζ ′ + S x ⊗ S x σ x ω ′ ) \mathcal{F}_{\mathrm{TH},1}=\rho
\begin{pmatrix}
\langle v\rangle\tilde{w}' + \mathbf{S}_x\zeta'\\
\langle v\otimes v\rangle\tilde{w}' + (\langle v\rangle\otimes\mathbf{S}_x+\mathbf{S}_x\otimes\langle v\rangle)\zeta' + \dfrac{\mathbf{S}_x\otimes\mathbf{S}_x}{\sigma_x}\omega'
\end{pmatrix} F TH , 1 = ρ ⟨ v ⟩ w ~ ′ + S x ζ ′ ⟨ v ⊗ v ⟩ w ~ ′ + (⟨ v ⟩ ⊗ S x + S x ⊗ ⟨ v ⟩) ζ ′ + σ x S x ⊗ S x ω ′
w ~ ′ = c x 4 ( 1 + u ′ ) 2 , u ′ = u x c x , \tilde{w}'=\dfrac{c_x}{4}(1+u')^2,\qquad u'=\dfrac{u_x}{c_x}, w ~ ′ = 4 c x ( 1 + u ′ ) 2 , u ′ = c x u x ,
ζ ′ = 2 − u ′ 4 ( 1 + u ′ ) 2 , ω ′ = 3 8 ( 1 − u ′ 2 ) 2 . (39) \zeta'=\dfrac{2-u'}{4}(1+u')^2,\qquad\omega'=\dfrac{\sqrt{3}}{8}(1-u'^2)^2. \tag*{(39)} ζ ′ = 4 2 − u ′ ( 1 + u ′ ) 2 , ω ′ = 8 3 ( 1 − u ′2 ) 2 . (39)
In other words, F T H , 0 = F G ( w ~ , ζ , ω → u x , 1 , 0 ) \mathcal{F}_{\mathrm{TH},0}=\mathcal{F}_{\mathrm{G}}(\tilde{w},\zeta,\omega\rightarrow u_x,1,0) F TH , 0 = F G ( w ~ , ζ , ω → u x , 1 , 0 ) and F T H , 1 = F G ( w ~ , ζ , ω → w ~ ′ , ζ ′ , ω ′ ) \mathcal{F}_{\mathrm{TH},1}=\mathcal{F}_{\mathrm{G}}(\tilde{w},\zeta,\omega\rightarrow\tilde{w}',\zeta',\omega') F TH , 1 = F G ( w ~ , ζ , ω → w ~ ′ , ζ ′ , ω ′ ) .
This is useful as a contrast to Eq. (36) , given that this is close to the most-compact centrally-peaked distribution with the same moments ρ \rho ρ , ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ , S \mathbf{S} S . Direct comparison of the fluxes or “effective” w ~ , ζ , ω \tilde{w},\zeta,\omega w ~ , ζ , ω (advection/pressure/conduction) terms shows that the advection & pressure terms scale nearly identically up to O ( % ) \mathcal{O}(\%) O ( % ) level in Eqs. (36) and (38) , with the major difference being compact support (going to zero outside of domain), which leads to the well-defined maximum ( ∣ u x ∣ + c x ) (|u_x|+c_x) ( ∣ u x ∣ + c x ) and minimum signal speeds. However, the “conduction” term is quantitatively quite different (albeit qualitatively similar): it is a factor of ∼ 2 \sim2 ∼ 2 lower at its peak (u x = 0 u_x=0 u x = 0 ), and tapers exactly to nil at ∣ u x ∣ ≥ c x |u_x|\ge c_x ∣ u x ∣ ≥ c x , while ω \omega ω decays as a Gaussian in u x / σ x u_x/\sigma_x u x / σ x . More importantly, here this means that the “re-projection problem” of Gaussian bases in § 3.3.4 \S3.3.4 §3.3.4 is eliminated: once the slice of the parallelogram producing a physical heat flux has moved out of a cell, the updated parallelogram correctly produces no overlap, and this term vanishes.
Because it retains compact support – giving a well-defined finite maximum signal speed ∣ u x ∣ + c x |u_x|+c_x ∣ u x ∣ + c x (with c x = 3 σ x c_x=\sqrt{3}\sigma_x c x = 3 σ x ) and truncating the conductive flux exactly for ∣ u x ∣ ≥ c x |u_x|\ge c_x ∣ u x ∣ ≥ c x – while reproducing the advective and pressure fluxes of the exact Gaussian to O ( % ) \mathcal{O}(\%) O ( % ) , we adopt this top-hat one-sided solver as our default in the tests and applications below, retaining the exact Gaussian solver of § 3.3.4 \S3.3.4 §3.3.4 as a reference cross-check (the two are compared directly in § 5.9.3 \S5.9.3 §5.9.3 ). The compactly-truncated conductive flux is important in practice: the non-compact Gaussian conduction term (α S x ⊗ S x ω / σ x \alpha\,\mathbf{S}_x\otimes\mathbf{S}_x\omega/\sigma_x α S x ⊗ S x ω / σ x , which diverges as σ x → 0 \sigma_x\to0 σ x → 0 for cold streams) drives a stronger core contraction in the 3D equilibrium tests of § 5.12 \S5.12 §5.12 that the top-hat truncation removes.
Face Velocity vF for the Chosen Partition
Per § 3.1.2 \S3.1.2 §3.1.2 , we now have what is needed to compute the face velocity v F , a b v_{\mathrm{F},ab} v F , ab . This is trivial for some partition choices, but for our MFM-like volume partition it is defined as the velocity of the mean Lagrangian frame through which net mass flux vanishes (hence requiring a flux definition):
d m a , b d t = [ ∑ α F a → b , α ∗ , ( m ) + ∑ β F b → a , β ∗ , ( m ) ] ⋅ A a b = 0. (40) \frac{d m_{a,b}}{dt}=
\left[
\sum_{\alpha}\mathbf{F}^{*,(m)}_{a\to b,\alpha}
+
\sum_{\beta}\mathbf{F}^{*,(m)}_{b\to a,\beta}
\right]\cdot\mathbf{A}_{ab}=0. \tag*{(40)} d t d m a , b = α ∑ F a → b , α ∗ , ( m ) + β ∑ F b → a , β ∗ , ( m ) ⋅ A ab = 0. (40)
At second order, the transverse component of v F , a b v_{\mathrm{F},ab} v F , ab never enters the fluxes or evolution, so we only need to calculate the normal component v F , n ≡ v F , a b ⋅ A ^ a b v_{\mathrm{F},n}\equiv\mathbf{v}_{\mathrm{F},ab}\cdot\hat{\mathbf{A}}_{ab} v F , n ≡ v F , ab ⋅ A ^ ab . So we just need to solve Eq. (40) given our flux definitions at each face for the scalar v F , n v_{\mathrm{F},n} v F , n .
For the exact Gaussian flux F G \mathcal{F}_{\mathrm{G}} F G , this is ∑ α , β ρ w ~ = 0 \sum_{\alpha,\beta}\rho\tilde{w}=0 ∑ α , β ρ w ~ = 0 , or
v F , n = ∑ α , β ρ ( σ x ω + ⟨ v ⟩ x ) ∑ α , β ρ ζ . (41) v_{\mathrm{F},n}=
\frac{\sum_{\alpha,\beta}\rho\left(\sigma_x\omega+\langle v\rangle_x\right)}
{\sum_{\alpha,\beta}\rho\zeta}. \tag*{(41)} v F , n = ∑ α , β ρζ ∑ α , β ρ ( σ x ω + ⟨ v ⟩ x ) . (41)
– i.e. a simple weighted-average of the left and right state velocities (over bases), plus a term in the non-cold limit in σ x \sigma_x σ x which represents the upwind “contact wave-like” motion. The only non-trivial aspect of this is that the face velocity appears implicitly in u x u_x u x , and therefore the weights (ζ \zeta ζ and ω \omega ω ), in a nonlinear fashion. We therefore determine v F , n v_{\mathrm{F},n} v F , n at each face by directly solving ∑ F m ( v F , n ) = 0 \sum F_m(v_{\mathrm{F},n})=0 ∑ F m ( v F , n ) = 0 via a one-dimensional bracketed Brent’s-method root-find (Brent 1973), which can be applied to any flux definition.
Pairing of Bases Across Faces
A subtle but important issue, which has no exact analog in standard finite-volume hydrodynamics, arises in the bookkeeping of where the flux at a face goes (Figure 3 ). The conservative update transfers mass, momentum, and stress out of some basis component α \alpha α on side a a a and into some matched basis component β = β ( α ) \beta=\beta(\alpha) β = β ( α ) on side b b b . Like most Godunov methods, conservation is enforced by requiring the − F -\mathbf{F} − F subtracted from α \alpha α on a a a (“flux out”) and the + F +\mathbf{F} + F added to β \beta β on b b b (“flux in”) to be identical. In an infinite (complete) basis, this is unambiguous: the “correct” matched component on b b b is the one with ⟨ v β ⟩ = ⟨ v α ⟩ \langle v_\beta\rangle=\langle v_\alpha\rangle ⟨ v β ⟩ = ⟨ v α ⟩ and S β = S α \mathbf{S}_\beta=\mathbf{S}_\alpha S β = S α , which simply represents the same parcel of phase space being advected into the neighboring cell, and in this limit the scheme would be exactly dissipationless in velocity space. With a finite basis, however, an exact match is generally not available, and some choice has to be made about which β \beta β to associate with each α \alpha α .
Figure 3. Cartoon of the basis-pairing, reconstruction, and fluxes at a face A ^ a b \hat{A}_{ab} A ^ ab between adjacent cells a a a & b b b (§ 3.5 ), in the face frame (A ^ a b \hat{A}_{ab} A ^ ab projection). Axes show the position and velocity along this axis, relative to the face (at x F x_F x F , v F v_F v F ). Each cell carries bases: red circles (α \alpha α ) in a a a , blue squares (β \beta β ) in b b b , with the mean ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ shown and vertical spread proportional to the dispersion/width in v v v . Lines show the piecewise-linear reconstruction adopted here: gradients are constructed between matched bases in neighbors to extrapolate the DF to the face from both sides (L L L and R R R states). The pairing is done on the extrapolated states based on continuity in phase-space of the bases. Arrows show the sense of the fluxes: when v > v F v > v_F v > v F , mass flows L → R L \to R L → R (and vice-versa). For the middle basis, the spread means the basis represents some material with v > v F v > v_F v > v F and some with v < v F v < v_F v < v F , so there is flux L → R L \to R L → R and R → L R \to L R → L . The fluxes follow the one-sided vacuum Riemann solutions in § 3.3.2 , computed in Godunov fashion over conserved quantities (mass, momentum, stress) ensuring manifest conservation.
Cost Functions on the Basis Pair Space
We therefore introduce a cost, C α β C_{\alpha\beta} C α β , for pairing α \alpha α on a a a with β \beta β on b b b , designed to be small when α \alpha α and β \beta β are smoothly-connected in phase-space, and large otherwise. We define C α β C_{\alpha\beta} C α β on the moments Q Q Q of α \alpha α and β \beta β , so it can compare any two bases: importantly in what follows, it can be applied to the reconstructed bases/moments at the inter-cell face Q a b , α ∗ , a Q^{*,a}_{ab,\alpha} Q ab , α ∗ , a , Q a b , β ∗ , b Q^{*,b}_{ab,\beta} Q ab , β ∗ , b , not just the cell-centered values.
Naively, one might consider (and we have) many choices, including: (a) the mean-velocity (squared) distance C α β v ≡ ∣ ⟨ v α ⟩ − ⟨ v β ⟩ ∣ 2 C_{\alpha\beta}^{v} \equiv\lvert\langle v_\alpha\rangle-\langle v_\beta\rangle\rvert^2 C α β v ≡ ∣⟨ v α ⟩ − ⟨ v β ⟩ ∣ 2 ; (b) the simplified-Wasserstein and L 2 L^2 L 2 Bures-Wasserstein distances (e.g. Marchisio & Fox 2013, and references therein)
C α β t r ≡ ∣ ⟨ v α ⟩ − ⟨ v β ⟩ ∣ 2 + ( Tr S α − Tr S β ) 2 C_{\alpha\beta}^{\mathrm{tr}} \equiv\lvert\langle v_\alpha\rangle-\langle v_\beta\rangle\rvert^2+\left(\sqrt{\operatorname{Tr}S_\alpha}-\sqrt{\operatorname{Tr}S_\beta}\right)^2 C α β tr ≡ ∣⟨ v α ⟩ − ⟨ v β ⟩ ∣ 2 + ( Tr S α − Tr S β ) 2
and
C α β W ≡ ∣ ⟨ v α ⟩ − ⟨ v β ⟩ ∣ 2 + Tr [ S α + S β − 2 ( S α 1 / 2 S β S α 1 / 2 ) 1 / 2 ] , C_{\alpha\beta}^{W} \equiv\lvert\langle v_\alpha\rangle-\langle v_\beta\rangle\rvert^2+\operatorname{Tr}\left[S_\alpha+S_\beta-2\left(S_\alpha^{1/2}S_\beta S_\alpha^{1/2}\right)^{1/2}\right], C α β W ≡ ∣⟨ v α ⟩ − ⟨ v β ⟩ ∣ 2 + Tr [ S α + S β − 2 ( S α 1/2 S β S α 1/2 ) 1/2 ] ,
(c) the negative log Bhattacharyya overlap C α β B C ≡ − log BC ( g ~ α , g ~ β ) C_{\alpha\beta}^{\mathrm{BC}}\equiv-\log\operatorname{BC}(\tilde{g}_\alpha,\tilde{g}_\beta) C α β BC ≡ − log BC ( g ~ α , g ~ β ) (an overlap measure between two probability densities; Bhattacharyya 1946). But these share three problems. (1) They have units of velocity-squared, so (1a) penalize a fractionally-small mismatch between two bases with large absolute ∣ v ∣ \lvert v\rvert ∣ v ∣ much more than an O ( 1 ) O(1) O ( 1 ) mismatch between bases with smaller absolute ∣ v ∣ \lvert v\rvert ∣ v ∣ , and (1b) make empty-basis thresholds (below) give cell-dependent results. (2) S S S does not appear sensibly: the difference between S S S or σ ≡ Tr [ S ] \sigma\equiv\sqrt{\operatorname{Tr}[S]} σ ≡ Tr [ S ] is given equal penalty to v v v distances. So a cold basis flowing into b b b , given a choice between a basis (2a) with identical ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ and large ∣ S ∣ \lvert S\rvert ∣ S ∣ (completely overlapping it) or (2b) with cold ∣ S ∣ → 0 \lvert S\rvert\to0 ∣ S ∣ → 0 but significantly different ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ (zero overlap) could actually choose the latter. (3) Most importantly, only velocity information appears, so these cannot say if the DF of f ( v , … ) f(v,\ldots) f ( v , … ) (whose similarity we wish to evaluate) is continuous. These betray the origins of (abc) as χ 2 \chi^2 χ 2 -like measures for unit-normalized probability distribution functions, not what we require. As a result, each of these cost functions fails badly on at least one test problem in § 5 , producing obviously incorrect “matches” with consequences ranging from severe numerical dissipation to outright instability. This is especially acute in problems where mean velocities are similar and small, like the outer edges/turnaround points of the harmonic breathing test (§ 5.12 ).
We address these by defining a combined dimensionless cost:
C α β ≡ C α β v + λ ρ C α β ρ , (42) C_{\alpha\beta}\equiv C_{\alpha\beta}^{v}+\lambda_\rho C_{\alpha\beta}^{\rho}, \tag*{(42)} C α β ≡ C α β v + λ ρ C α β ρ , (42)
C α β v ≡ ∣ u α − u β ∣ 2 ∣ u α ∣ 2 + ∣ u β ∣ 2 + 2 ∣ u α ⋅ u β ∣ + Tr [ S α ∗ ] + Tr [ S β ∗ ] , (43) C_{\alpha\beta}^{v}\equiv\frac{\lvert\mathbf{u}_\alpha-\mathbf{u}_\beta\rvert^2}{\lvert\mathbf{u}_\alpha\rvert^2+\lvert\mathbf{u}_\beta\rvert^2+2\lvert\mathbf{u}_\alpha\cdot\mathbf{u}_\beta\rvert+\operatorname{Tr}[S_\alpha^*]+\operatorname{Tr}[S_\beta^*]}, \tag*{(43)} C α β v ≡ ∣ u α ∣ 2 + ∣ u β ∣ 2 + 2 ∣ u α ⋅ u β ∣ + Tr [ S α ∗ ] + Tr [ S β ∗ ] ∣ u α − u β ∣ 2 , (43)
C α β ρ ≡ ∣ ρ a , α ∗ − ρ b , β ∗ ∣ ρ a , α ∗ + ρ b , β ∗ + 0.001 ρ a ∗ . (44) C_{\alpha\beta}^{\rho}\equiv\frac{\lvert\rho_{a,\alpha}^*-\rho_{b,\beta}^*\rvert}{\rho_{a,\alpha}^*+\rho_{b,\beta}^*+0.001\rho_{a}^*}. \tag*{(44)} C α β ρ ≡ ρ a , α ∗ + ρ b , β ∗ + 0.001 ρ a ∗ ∣ ρ a , α ∗ − ρ b , β ∗ ∣ . (44)
Here u α ≡ ⟨ v ∗ ⟩ − v F \mathbf{u}_\alpha\equiv\langle\mathbf{v}^*\rangle-\mathbf{v}_F u α ≡ ⟨ v ∗ ⟩ − v F , ρ ∗ \rho^* ρ ∗ and S ∗ S^* S ∗ refer to the reconstructed variables at the face (§ 3.2 ), in the frame of the face velocity v F v_F v F (preserving Galilean-invariance), and ρ a ∗ ≡ ∑ α ρ a , α \rho_a^*\equiv\sum_\alpha\rho_{a,\alpha} ρ a ∗ ≡ ∑ α ρ a , α . This combines a velocity C α β v C_{\alpha\beta}^{v} C α β v and density C α β ρ C_{\alpha\beta}^{\rho} C α β ρ separation, akin to a leading-order f ( … ) f(\ldots) f ( … ) separation, at the face. Using the reconstructed values means that in smooth flows the distance vanishes perfectly (otherwise we deal with larger resolution-dependent errors). Both costs are normalized by their characteristic values (and bounded in [ 0 , 1 ] [0,1] [ 0 , 1 ] ) so small fractional differences are favored (units-independent); the “floor” 0.001 ρ a ∗ 0.001\rho_a^* 0.001 ρ a ∗ is a safety factor to prevent numerical divergence for near-vacuum bases. And in C v C^v C v the combined dispersion appears in the denominator, favoring bases whose velocity-centers differ by less than either basis dispersion.
The relative-weight factor λ ρ \lambda_\rho λ ρ is an adjustable parameter. Too-small λ ρ → 0 \lambda_\rho\to0 λ ρ → 0 gives the problematic velocity-only weights. But too-large λ ρ \lambda_\rho λ ρ begins to penalize legitimate same-stream matches which happen to straddle steep density gradients. In situations with a real velocity continuity (e.g. a cold stream jumping cells), it is better to think of C α β ρ C_{\alpha\beta}^{\rho} C α β ρ as a “tiebreaker,” for which one desires λ ρ ≲ 1 \lambda_\rho\lesssim1 λ ρ ≲ 1 . In practice, we find the behavior is insensitive in our tests in the range λ ρ ∼ 0.05 − 0.5 \lambda_\rho\sim0.05-0.5 λ ρ ∼ 0.05 − 0.5 , so adopt a value near the middle, λ ρ = 0.25 \lambda_\rho=0.25 λ ρ = 0.25 as a default. But we stress that there are many conceivable improved cost functions worth exploring.
Empty-Basis or “free-slot” Weighting
The more interesting question arises when no basis on side b b b is a close velocity-space match for α \alpha α – for example, when a new stream is injected into a cell whose neighbors do not yet carry a matching basis component. In this case the relevant question is not “which β \beta β can be overwritten by mass and moments from α \alpha α with the smallest information loss?” For our purposes the answer is the emptiest basis: numerical mixing entropy is maximized when the two paired bases have comparable mass (the merge mixes “average” properties of both, losing the identity of each), and is minimized when one of the pair has negligibly small mass (the merge inherits essentially all properties of the heavier basis, while the lighter one is overwritten without loss).
Naively one might therefore change the weights Eq. (42) to favor low-mass bases, e.g. multiplying by ρ b , β / ( ρ a , α + ρ b , β ) \rho_{b,\beta}/(\rho_{a,\alpha}+\rho_{b,\beta}) ρ b , β / ( ρ a , α + ρ b , β ) . But that can easily lead to always favoring the lowest-mass basis, even when there is a good (just not perfect) fit, and forcing multiple bases to always all write to the same basis, producing extreme numerical dissipation. What we really want is for this to be a “fallback” when there is no good velocity fit (we also do not want to penalize a good velocity match at a spatial density discontinuity, which is a new basis moving into a cell and the code behaving correctly). There are many re-weightings one might imagine to accomplish this, but we have primarily experimented with the following:
C α β e b ≡ C α β ( 1 − Θ ~ [ C α f i t − ϵ τ / 2 ] / ϵ τ 1 + ρ b , β / ρ a , α ) (45) C^{\mathrm{eb}}_{\alpha\beta} \equiv C_{\alpha\beta}\left(1-\frac{\widetilde{\Theta}\left[C^{\mathrm{fit}}_{\alpha}-\epsilon_{\tau}/2\right]/\epsilon_{\tau}}{1+\rho_{b,\beta}/\rho_{a,\alpha}}\right) \tag*{(45)} C α β eb ≡ C α β ( 1 − 1 + ρ b , β / ρ a , α Θ [ C α fit − ϵ τ /2 ] / ϵ τ ) (45)
C α f i t ≡ min β [ ∣ u α − u β ∣ 2 ∣ u α − u β ∣ 2 + Tr [ S α ∗ ] + ϵ v ′ 2 + ϵ τ 1 + ρ b , β / ϵ e b ρ b ] (46) C^{\mathrm{fit}}_{\alpha}\equiv\min_{\beta}\left[\frac{\lvert\mathbf{u}_{\alpha}-\mathbf{u}_{\beta}\rvert^{2}}{\lvert\mathbf{u}_{\alpha}-\mathbf{u}_{\beta}\rvert^{2}+\operatorname{Tr}[\mathbf{S}^{*}_{\alpha}]+\epsilon_{v}^{\prime2}}+\frac{\epsilon_{\tau}}{1+\rho_{b,\beta}/\epsilon_{\mathrm{eb}}\rho_{b}}\right] \tag*{(46)} C α fit ≡ β min [ ∣ u α − u β ∣ 2 + Tr [ S α ∗ ] + ϵ v ′2 ∣ u α − u β ∣ 2 + 1 + ρ b , β / ϵ eb ρ b ϵ τ ] (46)
In C α f i t C^{\mathrm{fit}}_{\alpha} C α fit , the first term is akin to the usual velocity-cost (C v C^{\mathrm{v}} C v in Eq. (43) ; with ϵ v ′ \epsilon_{\mathrm{v}}' ϵ v ′ (set to 0.01 times the denominator in C α β v C^{\mathrm{v}}_{\alpha\beta} C α β v ) here just preventing divide-by-zero errors for good matches of very cold bases); one could simply use C v C^{\mathrm{v}} C v here as well. The second term in ϵ τ ≪ 1 \epsilon_{\tau}\ll1 ϵ τ ≪ 1 (here ∼ 0.04 \sim0.04 ∼ 0.04 after some trial-and-error) is a function designed to further low-cost-weight the fits in “well-resolved” bases with ρ b , β \rho_{b,\beta} ρ b , β larger than some tiny fraction of ϵ e b ρ b \epsilon_{\mathrm{eb}}\rho_b ϵ eb ρ b (here ϵ e b = 0.01 \epsilon_{\mathrm{eb}}=0.01 ϵ eb = 0.01 chosen somewhat arbitrarily). The function Θ ~ \widetilde{\Theta} Θ is some sigmoid function,6 which addresses whether there is a good fit (→ 0 \to0 → 0 ) or not (→ 1 \to1 → 1 ). The denominator ρ b , β / ρ a , α \rho_{b,\beta}/\rho_{a,\alpha} ρ b , β / ρ a , α then upweights the lowest-mass basis when there is no good fit. If a good fit exists, then C α f i t C^{\mathrm{fit}}_{\alpha} C α fit is small, Θ ~ → 0 \widetilde{\Theta}\to0 Θ → 0 , and C α β e b → C α β C^{\mathrm{eb}}_{\alpha\beta}\to C_{\alpha\beta} C α β eb → C α β . If no good fit exists, then C α f i t ≫ ϵ τ C^{\mathrm{fit}}_{\alpha}\gg\epsilon_{\tau} C α fit ≫ ϵ τ , Θ ~ → 1 \widetilde{\Theta}\to1 Θ → 1 , and C α β e b → C α β [ ρ b , β / ( ρ b , β + ρ a , α ) ] C^{\mathrm{eb}}_{\alpha\beta}\to C_{\alpha\beta}[\rho_{b,\beta}/(\rho_{b,\beta}+\rho_{a,\alpha})] C α β eb → C α β [ ρ b , β / ( ρ b , β + ρ a , α )] , biasing pairing to the lowest-mass available basis. We show below this plays a critical role in dealing with very different bases interacting, as can arise in complex problems with finite basis number.
One-Sided (Asymmetric) Pairing
The one-sided Riemann solution of § 3.3.2 pairs naturally with a one-sided assignment in which each side a , b a,b a , b independently selects its own outgoing pairings β ( α ) \beta(\alpha) β ( α ) and α ( β ) \alpha(\beta) α ( β ) . This means β ( α ) \beta(\alpha) β ( α ) as defined by a a a ’s outgoing flux need not equal the inverse of α ( β ) \alpha(\beta) α ( β ) as defined by b b b ’s outgoing flux. The method remains exactly conservative pair-by-pair, because each outgoing flux is subtracted from its source and added to the other cell. Our default is to simply independently assign each basis the cost-minimizing α ( β ) \alpha(\beta) α ( β ) and β ( α ) \beta(\alpha) β ( α ) . We note the two directions are built from two separately-evaluated cost matrices rather than from one matrix and its transpose.
Pairwise-Symmetric Assignment Algorithms
Alternatively, one could enforce pairwise-symmetric pairings (e.g. “if α \alpha α donates to β \beta β , then β \beta β donates to $\alpha”). Given a cost matrix there are several well-known algorithms for this “assignment problem” (see e.g. Kuhn 1955; Burkard et al. 2012): the simplest is the greedy (or “one-sided nearest”)7 rule, in which each basis α \alpha α is paired with its individual cost-minimum β \beta β on the other side (so setting β \beta β ’s choice without evaluating its cost matrix); the mutual-nearest rule, in which α \alpha α and β \beta β are paired iff each is the cost-minimum of the other; and the optimal-bijection or Hungarian rule (Kuhn 1955), in which β ( α ) \beta(\alpha) β ( α ) is a permutation of { 1 , 2 , … , N b a s i s } \{1,2,\ldots,N_{\mathrm{basis}}\} { 1 , 2 , … , N basis } chosen to minimize ∑ α C α β ( α ) \sum_{\alpha}C_{\alpha\beta(\alpha)} ∑ α C α β ( α ) . We have also experimented with weighted pairing, where the flux from α \alpha α can be spread to multiple bases β \beta β . As shown below, regardless of which rule we adopt, these all introduce significant dissipation compared to our default method, by roughly two orders of magnitude in kinetic energy on the test of § 5.7 . It is easy to see why – if a a a has two cold bases α 1 , α 2 \alpha_1,\alpha_2 α 1 , α 2 which differ slightly, and b b b has one basis β 1 \beta_1 β 1 identical to α 1 \alpha_1 α 1 but another β 2 \beta_2 β 2 very different, our default allows α 1 \alpha_1 α 1 and α 2 \alpha_2 α 2 to both pair with β 1 \beta_1 β 1 , minimizing mixing entropy and numerical dissipation.
Time-Integration & Averaging Steps
Flux Assignment and Updates
Given the per-pair flux F a , b , α ∗ , a F^{*,a}_{a,b,\alpha} F a , b , α ∗ , a from § 3.3.1 and the basis pairing β ( α ) \beta(\alpha) β ( α ) from § 3.5 , the conservative update follows from Eq. (30) :
d ( U V ) a , α d t = − ∑ b [ F a → b , α ∗ , a + ∑ β : α = α ( β ) F b → a , β ∗ , b ] ⋅ A a b (47) \frac{d(UV)_{a,\alpha}}{dt}=-\sum_b\left[F^{*,a}_{a\to b,\alpha}+\sum_{\beta:\alpha=\alpha(\beta)}F^{*,b}_{b\to a,\beta}\right]\cdot\mathbf{A}_{ab} \tag*{(47)} d t d ( U V ) a , α = − b ∑ F a → b , α ∗ , a + β : α = α ( β ) ∑ F b → a , β ∗ , b ⋅ A ab (47)
which can then be advanced in time according to the usual schemes, e.g.:
( U V ) a , α → ( U V ) a , α + d ( U V ) a , α d t Δ t (48) (UV)_{a,\alpha}\rightarrow(UV)_{a,\alpha}+\frac{d(UV)_{a,\alpha}}{dt}\Delta t \tag*{(48)} ( U V ) a , α → ( U V ) a , α + d t d ( U V ) a , α Δ t (48)
Many schemes for this exist and are well-studied, for example higher-order Runge-Kutta-type integrators are common, and for certain types of problems different time-integrators satisfying symplectic or other properties are important. Here we adopt a simple second-order leapfrog (kick-drift-kick + Strang-split external force update) scheme matching exactly the MFM hydrodynamics and gravity implementation in GIZMO, with adaptive hierarchical timesteps (see Hopkins 2015 for details). But we have tested a simple explicit-Euler update and do not measure any difference on any of the test problems we studied here.
After the per-step, per-basis conservative update, the averaging step is trivial. The cell-centered specific/primitive variables are recomputed from the conserved variables as:
U a , α = ( U V ) a , α / V a U_{a,\alpha}=(UV)_{a,\alpha}/V_a U a , α = ( U V ) a , α / V a
ρ a , α = m a , α / V a \rho_{a,\alpha}=m_{a,\alpha}/V_a ρ a , α = m a , α / V a
⟨ v ⟩ a , α = p a , α / m a , α \langle\mathbf{v}\rangle_{a,\alpha}=\mathbf{p}_{a,\alpha}/m_{a,\alpha} ⟨ v ⟩ a , α = p a , α / m a , α
S a , α = T a , α / m a , α − ⟨ v ⟩ a , α ⊗ ⟨ v ⟩ a , α . (49) \mathbf{S}_{a,\alpha}=\mathbf{T}_{a,\alpha}/m_{a,\alpha}-\langle\mathbf{v}\rangle_{a,\alpha}\otimes\langle\mathbf{v}\rangle_{a,\alpha}. \tag*{(49)} S a , α = T a , α / m a , α − ⟨ v ⟩ a , α ⊗ ⟨ v ⟩ a , α . (49)
Any time the conservative or primitive variables are updated (drift or kick), this is followed by the realizability-repair step below.
Because the net flux into/out of any face adds to zero (see Eq. (40) ) for the particular MFM partition adopted here, it is necessarily true that the total cell mass change d m a / d t = ∑ α d m a , α / d t = 0 dm_a/dt=\sum_{\alpha}dm_{a,\alpha}/dt=0 d m a / d t = ∑ α d m a , α / d t = 0 to machine precision, and all bases within a cell a a a are updated on the same timestep Δ t = Δ t a \Delta t=\Delta t_a Δ t = Δ t a , this means m a m_a m a is manifestly conserved independent of the details of the time integration scheme. But it also means, like with MFM hydrodynamics and standard MC/PIC/NB integration for short and long-range forces, the account of total momentum or energy conservation depends on the flux-accumulation and timestep scheme, and can be reduced to integration accuracy when individual particle-differing adaptive timesteps Δ t a ≠ Δ t b \Delta t_a\ne\Delta t_b Δ t a = Δ t b are adopted.
Timestep Constraints
In time integration, all of the usual “external” timestep criteria apply: e.g. acceleration-based criteria commonly adopted for gravity methods (Δ t < C a ( h a / ∣ a a ∣ ) 1 / 2 \Delta t<C_a(h_a/\lvert\mathbf{a}_a\rvert)^{1/2} Δ t < C a ( h a / ∣ a a ∣ ) 1/2 with C a ≈ 0.4 C_a\approx0.4 C a ≈ 0.4 ; Power et al. 2003). Since we solve a series of hyperbolic equations, we also require the usual Courant condition:
Δ t a < C C F L Δ x a v s i g , m a x a (50) \Delta t_a<C_{\mathrm{CFL}}\frac{\Delta x_a}{v_{\mathrm{sig,max}}^a} \tag*{(50)} Δ t a < C CFL v sig , max a Δ x a (50)
where we define the signal velocity v s i g , m a x a v_{\mathrm{sig,max}}^a v sig , max a as the maximum over all ∣ u x ∣ + χ σ x \lvert u_x\rvert+\chi\sigma_x ∣ u x ∣ + χ σ x of all interacting neighbor faces and bases with bases in a a a (as defined in § 3.3.1 ). We find this (with C C F L ≤ 0.5 C_{\mathrm{CFL}}\leq0.5 C CFL ≤ 0.5 ) is sufficient for stability.
Many other timestep criteria are possible in addition (taking the minimum over all). One that we do implement, which can occasionally matter, is a per-basis mass-flux criterion that bounds the single-basis fractional mass change in a step:
Δ t a < C m min α [ m a , α e f f ∣ d m a , α / d t ∣ ] (51) \Delta t_a < C_m \min_{\alpha}\left[\frac{m_{a,\alpha}^{\mathrm{eff}}}{\left|\mathrm{d}m_{a,\alpha}/\mathrm{d}t\right|}\right] \tag*{(51)} Δ t a < C m α min [ ∣ d m a , α / d t ∣ m a , α eff ] (51)
with C m = 0.1 C_m = 0.1 C m = 0.1 , m a , α e f f ≡ max ( m a , α , f f l o o r m a ) m_{a,\alpha}^{\mathrm{eff}} \equiv\max(m_{a,\alpha}, f_{\mathrm{floor}}m_a) m a , α eff ≡ max ( m a , α , f floor m a ) , f f l o o r = 0.01 f_{\mathrm{floor}} = 0.01 f floor = 0.01 . The floor in m a , α e f f m_{a,\alpha}^{\mathrm{eff}} m a , α eff prevents Δ t → 0 \Delta t \to0 Δ t → 0 in negligible-mass/empty bases. In our tests below the CFL condition almost always dominates, but this enforces an effectively stricter CFL when a simulation contains a high-mass basis rapidly flowing “out” into a new lower-mass basis (e.g. a cold clump moving between cells). This is not strictly necessary, but it reduces the number of realizability repairs required.
Another common criterion for moving-mesh methods like MFM is that the mesh not deform too heavily in a single timestep, often approximated via a divergence-like criterion: Δ t a < C m e s h ∣ ⟨ ∇ ⋅ v ~ ⟩ a ∣ − 1 \Delta t_a < C_{\mathrm{mesh}}|\langle\nabla\cdot\tilde{\boldsymbol{v}}\rangle_a|^{-1} Δ t a < C mesh ∣ ⟨ ∇ ⋅ v ~ ⟩ a ∣ − 1 , where ⟨ ∇ ⋅ v ~ ⟩ a \langle\nabla\cdot\tilde{\boldsymbol{v}}\rangle_a ⟨ ∇ ⋅ v ~ ⟩ a refers to the numerical definition of the partition relative to the “velocities” of the mesh-generating points, and is defined for MFM in Hopkins et al. (2018). We include this in our implementation as a safety guard but find in our test problems that the CFL condition is basically always stricter.
Realizability Repair
After the conservative update, each basis must remain a valid representation of an underlying phase-space DF: each m a , α m_{a,\alpha} m a , α must be non-negative and S a , α S_{a,\alpha} S a , α must be SPD, and no two basis components should become so degenerate (in mean velocity and dispersion) that they together carry less information than a single component. Numerical roundoff and the upwind diffusion of the Riemann step can occasionally produce mildly non-physical states – a slightly-negative eigenvalue of S a , α S_{a,\alpha} S a , α , or a near-zero m a , α m_{a,\alpha} m a , α which (left alone) would amplify rapidly. We therefore apply a local realizability-preserving correction D D D after updates. This problem has a long history in the moment-method literature for kinetic theory and multiphase flows (e.g. (Levermore & Pomraning 1981; Fox et al. 2008; Marchisio & Fox 2013)), from which we adapt the relevant pieces.
The operations D D D performs are, in order:
(i) Any basis whose mass has dropped below a small relative floor m a , α < ϵ m m a / N b a s i s m_{a,\alpha}<\epsilon_m m_a/N_{\mathrm{basis}} m a , α < ϵ m m a / N basis (we take ϵ m = 10 − 12 \epsilon_m=10^{-12} ϵ m = 1 0 − 12 ) is re-set to an inert realizable state at the cell-bulk velocity ⟨ v a ⟩ \langle\boldsymbol{v}_a\rangle ⟨ v a ⟩ – ( m a , α , p a , α , T a , α ) → ( ϵ m , e f f , ϵ m , e f f ⟨ v a ⟩ , ϵ m , e f f ( ⟨ v a ⟩ ⊗ ⟨ v a ⟩ + S f l o o r I ) ) (m_{a,\alpha},\boldsymbol{p}_{a,\alpha},T_{a,\alpha})\rightarrow(\epsilon_{m,\mathrm{eff}},\epsilon_{m,\mathrm{eff}}\langle\boldsymbol{v}_a\rangle,\epsilon_{m,\mathrm{eff}}(\langle\boldsymbol{v}_a\rangle\otimes\langle\boldsymbol{v}_a\rangle+S_{\mathrm{floor}}I)) ( m a , α , p a , α , T a , α ) → ( ϵ m , eff , ϵ m , eff ⟨ v a ⟩ , ϵ m , eff (⟨ v a ⟩ ⊗ ⟨ v a ⟩ + S floor I )) with ϵ m , e f f = max ( ϵ m , a b s , ϵ m m a / N b a s i s ) \epsilon_{m,\mathrm{eff}}=\max(\epsilon_{m,\mathrm{abs}},\epsilon_m m_a/N_{\mathrm{basis}}) ϵ m , eff = max ( ϵ m , abs , ϵ m m a / N basis ) , and the residual mass, momentum, and stress (the difference between the pre-reset and post-reset basis state) are redistributed to a real-mass basis within the same cell. We have experimented with both (a) simply giving “all” of the conservative merge/split algebra follows the EQMOM method in Fox et al. (2008); Marchisio & Fox (2013).
(ii) Each S a , α S_{a,\alpha} S a , α is symmetrized ( S a , α → ( S a , α + S a , α T / 2 ) ) (S_{a,\alpha}\rightarrow(S_{a,\alpha}+S_{a,\alpha}^{T}/2)) ( S a , α → ( S a , α + S a , α T /2 )) and then projected to the positive-definite cone via a standard symmetric eigendecomposition, with any negative eigenvalues replaced by ϵ S Tr ( S a , α ) / D \epsilon_S\operatorname{Tr}(S_{a,\alpha})/D ϵ S Tr ( S a , α ) / D , with ϵ S = 10 − 12 \epsilon_S=10^{-12} ϵ S = 1 0 − 12 . If the cell has Tr ( S a , α ) < 0 \operatorname{Tr}(S_{a,\alpha})<0 Tr ( S a , α ) < 0 we repair by replacing this with a tiny positive 10 − 30 ∣ ⟨ v ⟩ a , α ∣ 2 10^{-30}|\langle\boldsymbol{v}\rangle_{a,\alpha}|^2 1 0 − 30 ∣ ⟨ v ⟩ a , α ∣ 2 , but we find this is never invoked. Again any change to conserved quantities is distributed to the other bases.
(iii) Any pair of components which have become locally near-degenerate (in mean velocity and dispersion) is merged to a single component, preserving m \boldsymbol{m} m , p \boldsymbol{p} p , and T T T for the cell exactly, while any single component whose dispersion has grown anomalously large is split into two, again preserving the cell-summed moments. The conservative merge/split algebra follows the EQMOM method in Fox et al. (2008); Marchisio & Fox (2013).
Note D D D is purely intra-cell and involves no communication. The total drift in ( p , T ) (\boldsymbol{p},T) ( p , T ) induced by D D D , summed over all cells and time steps, gives a useful measure of how often and how aggressively the repair operator has been called. In practice, on the test problems we consider here, this cumulative drift is many orders of magnitude smaller than the equivalent drift from the Riemann diffusion itself, so the specific form of D D D is not a significant source of error.
External & Long-Range Forces
Evaluation and Time-Integration
External and/or long-range forces can be operator-split from the Riemann problem (or just like with hydrodynamics, they can be included in principle, but this is rarely done as it is generally much less accurate). The evaluation of some external force F e x t \boldsymbol{F}_{\mathrm{ext}} F ext at the position or integrated over the domain Ω a \Omega_a Ω a follows the usual methods. For example, for self-gravity, one can use the usual tree or fast multipole or particle-mesh type methods to obtain the potential Φ \Phi Φ or acceleration − ∇ Φ -\nabla\Phi − ∇Φ . This can then be applied to update the basis moments according to whatever time integration scheme is used.
For forces which are velocity-independent, this is especially trivial because it is a uniform translation in velocity space (d v / d t = a e x t \mathrm{d}\boldsymbol{v}/\mathrm{d}t=\boldsymbol{a}_{\mathrm{ext}} d v / d t = a ext ); m a , α m_{a,\alpha} m a , α and S a , α S_{a,\alpha} S a , α are invariant while p \boldsymbol{p} p and therefore T T T change as:
p a , α → p a , α + m a , α a e x t a Δ t (52) \boldsymbol{p}_{a,\alpha}\rightarrow\boldsymbol{p}_{a,\alpha}+m_{a,\alpha}\boldsymbol{a}_{\mathrm{ext}}^{a}\Delta t \tag*{(52)} p a , α → p a , α + m a , α a ext a Δ t (52)
T a , α → m a , α S α + p a , α ⊗ p a , α m a , α . (53) T_{a,\alpha}\rightarrow m_{a,\alpha}S_{\alpha}+\frac{\boldsymbol{p}_{a,\alpha}\otimes\boldsymbol{p}_{a,\alpha}}{m_{a,\alpha}}. \tag*{(53)} T a , α → m a , α S α + m a , α p a , α ⊗ p a , α . (53)
In our specific implementation we follow § 3.8.1 and do this following a leapfrog time-stepper (Springel 2005).
For velocity-dependent forces this step is slightly more complicated but still straightforward. For example, in the limit of large (resolved) gyro-radii, a Boris integrator can be used, and one simply needs to calculate the map from the moments at time t t t to some t + Δ t t+\Delta t t + Δ t (e.g. ⟨ v n ⟩ → ⟨ v n + 1 ⟩ \langle\boldsymbol{v}^n\rangle\rightarrow\langle\boldsymbol{v}^{n+1}\rangle ⟨ v n ⟩ → ⟨ v n + 1 ⟩ ). Again for a Lorentz force this is particularly simple, as the electric field term is velocity independent and the magnetic force is pure rotation about B ^ \hat{\boldsymbol{B}} B ^ (with v-independent gyro-frequency). But even for complicated cases this is a strictly local operation on each basis within each cell, so can be integrated to any arbitrary desired accuracy numerically, or subcycled, in a straightforward manner.
Note that short-range self-forces fall into the “collision operator” category, which we discuss in § 3.10 .
Force Softening
Typically, long-range (e.g. gravitational or Coulomb or light-mediator-driven dark/fifth-force) forces often have a divergence at small r r r that must be softened when a single numerical particle or cell represents many micro-physical “true” particles. But in MC/PIC/NB methods, such softening is fundamentally ad hoc and ill-defined, because the discretization of the DF f ( x , v , t , … ) f(\boldsymbol{x},\boldsymbol{v},t,\ldots) f ( x , v , t , … ) for purposes of other dynamics is fundamentally a δ \delta δ -function (there is no self-consistent volume partition under motion/advection of the particles; see Hopkins et al. 2023 and references in § 1 ). But in our proposed method, there is a well-defined volume partition and reconstruction. That means that there is a unique, self-consistent, well-defined, and correct force softening: the force induced by the collectively spatially-distributed DF. For e.g. gravitational force softening, the continuous reconstruction of ρ ( x ) = ∫ f d 3 v \rho(\boldsymbol{x})=\int f\,\mathrm{d}^3v ρ ( x ) = ∫ f d 3 v inserted into the Poisson equation corresponds to a smooth, divergence-free Φ \Phi Φ and a g r a v = − ∇ Φ \boldsymbol{a}_{\mathrm{grav}}=-\nabla\Phi a grav = − ∇Φ .
For our adopted MFM partition, this corresponds identically to the adaptive gravitational force softening defined for MFM fluid dynamics (see Hopkins 2015; Hopkins et al. 2018, 2023). Derived properly (see e.g. Price & Monaghan 2007) this ensures manifest conservation of momentum and energy under gravitational forces, as well as consistency with the Vlasov equation dynamics, and numerically is identical to the “nNGB” implementation in § 3.3.1 of Hopkins et al. (2023).8
Collision Operators & Local Mixing
As noted above, the collision operator ( ∂ f / ∂ t ) c o l l i s i o n s (\partial f/\partial t)_{\mathrm{collisions}} ( ∂ f / ∂ t ) collisions can be operator-split from the previous operations. The precise form depends on the physics being modelled – self-interacting dark matter, annihilation, neutrino-baryon coupling, plasma Coulomb collisions – but a feature shared by all of these is that the relevant collision operator is local: it depends only on f ( x , v ) f(\mathbf{x},\mathbf{v}) f ( x , v ) within the cell a a a , and not on the neighbors. Because the full phase-space DF f a ( v ) f_a(\mathbf{v}) f a ( v ) is carried in each cell, the operator can therefore be applied entirely within a single cell – no inter-cell communication is required, and (more importantly) the operator can be physically correct rather than artificially coarse-grained over super-particles, as it must be in MC/PIC/NB methods.
Example: Hard-Sphere Elastic Scattering
To illustrate, we work out explicitly the case of isotropic, elastic, two-body scattering with a constant (hard-sphere like) cross-section σ \sigma σ between identical particles of physical mass μ p \mu_p μ p (so that an SIDM-like model with cross-section per unit mass σ / μ p \sigma/\mu_p σ / μ p specified is recovered). The Boltzmann collision operator in this case is
∂ f ( v 1 ) ∂ t ∣ c o l l = ∫ d 3 v 2 σ / μ p 4 π ∫ d Ω ∣ v 1 − v 2 ∣ H 12 \left.\frac{\partial f(\mathbf{v}_1)}{\partial t}\right|_{\mathrm{coll}}=\int d^3\mathbf{v}_2\,\frac{\sigma/\mu_p}{4\pi}\int d\Omega\,|\mathbf{v}_1-\mathbf{v}_2|\mathcal{H}_{12} ∂ t ∂ f ( v 1 ) coll = ∫ d 3 v 2 4 π σ / μ p ∫ d Ω ∣ v 1 − v 2 ∣ H 12
H 12 ≡ f ( v 1 ′ ) f ( v 2 ′ ) − f ( v 1 ) f ( v 2 ) , (54) \mathcal{H}_{12}\equiv f(\mathbf{v}'_1)f(\mathbf{v}'_2)-f(\mathbf{v}_1)f(\mathbf{v}_2), \tag*{(54)} H 12 ≡ f ( v 1 ′ ) f ( v 2 ′ ) − f ( v 1 ) f ( v 2 ) , (54)
where ( v 1 ′ , v 2 ′ ) (\mathbf{v}'_1,\mathbf{v}'_2) ( v 1 ′ , v 2 ′ ) are the post-collision velocities of a pair drawn from the isotropic-in-centre-of-mass distribution and ( v 1 , v 2 ) (\mathbf{v}_1,\mathbf{v}_2) ( v 1 , v 2 ) are the corresponding pre-collision velocities. The mass, momentum, and trace of the second-moment tensor (i.e. the kinetic energy) of the integrand vanish identically on integration over v \mathbf{v} v , so the cell-integrated ( m a , p a , Tr ( T a ) ) (m_a,\mathbf{p}_a,\operatorname{Tr}(\mathbf{T}_a)) ( m a , p a , Tr ( T a )) are exactly conserved by Eq. (54) . The anisotropic part of T a \mathbf{T}_a T a is not conserved: isotropic elastic scattering relaxes the local distribution toward a Maxwell-Boltzmann distribution, so the off-diagonal and trace-free parts of T a \mathbf{T}_a T a decay on a collisional timescale.
Especially for our Gaussian-basis representation, the standard simplification is the BGK closure (Bhatnagar et al. 1954), which replaces Eq. (54) by a relaxation toward the local Maxwell-Boltzmann fixed point:
( ∂ f ∂ t ) c o l l = − ν a [ f a ( v ) − f a e q ( v ) ] , (55) \left(\frac{\partial f}{\partial t}\right)_{\mathrm{coll}}=-\nu_a\left[f_a(\mathbf{v})-f_a^{\mathrm{eq}}(\mathbf{v})\right], \tag*{(55)} ( ∂ t ∂ f ) coll = − ν a [ f a ( v ) − f a eq ( v ) ] , (55)
which conserves ( m a , p a , Tr ( T a ) ) (m_a,\mathbf{p}_a,\operatorname{Tr}(\mathbf{T}_a)) ( m a , p a , Tr ( T a )) by construction (the loss and gain terms have the same first three moments) and recovers the full Boltzmann scattering rate and equilibrium. The collision rate is
ν a ≡ n a σ ⟨ ∣ v r e l ∣ ⟩ = ρ a σ μ p 16 k B T a , k i n π μ p , (56) \nu_a\equiv n_a\sigma\langle|\mathbf{v}_{\mathrm{rel}}|\rangle=\frac{\rho_a\sigma}{\mu_p}\sqrt{\frac{16k_{\mathrm{B}}T_{a,\mathrm{kin}}}{\pi\mu_p}}, \tag*{(56)} ν a ≡ n a σ ⟨ ∣ v rel ∣ ⟩ = μ p ρ a σ π μ p 16 k B T a , kin , (56)
with ρ a = m a / V a \rho_a=m_a/V_a ρ a = m a / V a , n a = ρ a / μ p n_a=\rho_a/\mu_p n a = ρ a / μ p , and the cell kinetic temperature defined from the trace of the centre-of-mass second-moment tensor,
k B T a , k i n ≡ μ p 3 Tr ( S a c o m ) , S a c o m ≡ T a m a − ⟨ v a ⟩ ⊗ ⟨ v a ⟩ , (57) k_{\mathrm{B}}T_{a,\mathrm{kin}}\equiv\frac{\mu_p}{3}\operatorname{Tr}(\mathbf{S}_a^{\mathrm{com}}),\qquad\mathbf{S}_a^{\mathrm{com}}\equiv\frac{\mathbf{T}_a}{m_a}-\langle\mathbf{v}_a\rangle\otimes\langle\mathbf{v}_a\rangle, \tag*{(57)} k B T a , kin ≡ 3 μ p Tr ( S a com ) , S a com ≡ m a T a − ⟨ v a ⟩ ⊗ ⟨ v a ⟩ , (57)
and ⟨ v a ⟩ ≡ p a / m a \langle\mathbf{v}_a\rangle\equiv\mathbf{p}_a/m_a ⟨ v a ⟩ ≡ p a / m a is the bulk velocity of the cell. The Maxwell-Boltzmann fixed point is the single isotropic Gaussian
f a e q ( v ) = ρ a ( 2 π σ e q 2 ) − 3 / 2 exp [ − ∣ v − ⟨ v a ⟩ ∣ 2 2 σ e q 2 ] , σ e q 2 ≡ 1 3 Tr ( S a c o m ) . (58) f_a^{\mathrm{eq}}(\mathbf{v})=\rho_a(2\pi\sigma_{\mathrm{eq}}^2)^{-3/2}\exp\left[-\frac{|\mathbf{v}-\langle\mathbf{v}_a\rangle|^2}{2\sigma_{\mathrm{eq}}^2}\right],\qquad\sigma_{\mathrm{eq}}^2\equiv\frac{1}{3}\operatorname{Tr}(\mathbf{S}_a^{\mathrm{com}}). \tag*{(58)} f a eq ( v ) = ρ a ( 2 π σ eq 2 ) − 3/2 exp [ − 2 σ eq 2 ∣ v − ⟨ v a ⟩ ∣ 2 ] , σ eq 2 ≡ 3 1 Tr ( S a com ) . (58)
Eq. (55) integrates over a step Δ t \Delta t Δ t in closed form, f a n + 1 = e − ν a Δ t f a n + ( 1 − e − ν a Δ t ) f a e q f_a^{n+1}=e^{-\nu_a\Delta t}f_a^n+(1-e^{-\nu_a\Delta t})f_a^{\mathrm{eq}} f a n + 1 = e − ν a Δ t f a n + ( 1 − e − ν a Δ t ) f a eq . The basis representation f a n = ρ a ∑ α ω α n g ~ α ( v ) f_a^n=\rho_a\sum_\alpha\omega_\alpha^n\tilde{g}_\alpha(\mathbf{v}) f a n = ρ a ∑ α ω α n g ~ α ( v ) is then re-projected onto the same number of components by a per-basis convex update which holds the basis masses fixed and pulls each ⟨ v α ⟩ \langle\mathbf{v}_\alpha\rangle ⟨ v α ⟩ , S α \mathbf{S}_\alpha S α toward the equilibrium values, with relaxation fraction
η a ≡ 1 − e − ν a Δ t . (59) \eta_a\equiv1-e^{-\nu_a\Delta t}. \tag*{(59)} η a ≡ 1 − e − ν a Δ t . (59)
The resulting per-basis update is
⟨ v α ⟩ n + 1 = ( 1 − η a ) ⟨ v α ⟩ n + η a ⟨ v a ⟩ , (60) \langle\mathbf{v}_\alpha\rangle^{n+1}=(1-\eta_a)\langle\mathbf{v}_\alpha\rangle^n+\eta_a\langle\mathbf{v}_a\rangle, \tag*{(60)} ⟨ v α ⟩ n + 1 = ( 1 − η a ) ⟨ v α ⟩ n + η a ⟨ v a ⟩ , (60)
S α n + 1 = ( 1 − η a ) S α n + η a σ e q 2 I + η a ( 1 − η a ) Δ v α ⊗ Δ v α , (61) \mathbf{S}_\alpha^{n+1}=(1-\eta_a)\mathbf{S}_\alpha^n+\eta_a\sigma_{\mathrm{eq}}^2\mathbf{I}+\eta_a(1-\eta_a)\Delta\mathbf{v}_\alpha\otimes\Delta\mathbf{v}_\alpha, \tag*{(61)} S α n + 1 = ( 1 − η a ) S α n + η a σ eq 2 I + η a ( 1 − η a ) Δ v α ⊗ Δ v α , (61)
m a , α n + 1 = m a , α n , (62) m_{a,\alpha}^{n+1}=m_{a,\alpha}^n, \tag*{(62)} m a , α n + 1 = m a , α n , (62)
where Δ v α ≡ ⟨ v α ⟩ n − ⟨ v a ⟩ \Delta\mathbf{v}_\alpha\equiv\langle\mathbf{v}_\alpha\rangle^n-\langle\mathbf{v}_a\rangle Δ v α ≡ ⟨ v α ⟩ n − ⟨ v a ⟩ . The third (variance-of-the-mean) term in Eq. (61) is necessary: f n + 1 f^{n+1} f n + 1 is a convex mixture of the per-basis g ~ α n \tilde{g}_\alpha^n g ~ α n and the equilibrium f a e q f_a^{\mathrm{eq}} f a eq , and the variance of a convex mixture includes the squared spread of component means about their joint mean, which here is exactly η a ( 1 − η a ) Δ v α ⊗ Δ v α \eta_a(1-\eta_a)\Delta\mathbf{v}_\alpha\otimes\Delta\mathbf{v}_\alpha η a ( 1 − η a ) Δ v α ⊗ Δ v α . One can verify by direct substitution that the cell-summed ( m a , p a , T a ) = ∑ α ( m a , α , m a , α ⟨ v α ⟩ , [ S α + ⟨ v α ⟩ ⊗ ⟨ v α ⟩ ] ) (m_a,\mathbf{p}_a,\mathbf{T}_a)=\sum_\alpha(m_{a,\alpha},m_{a,\alpha}\langle\mathbf{v}_\alpha\rangle,[\mathbf{S}_\alpha+\langle\mathbf{v}_\alpha\rangle\otimes\langle\mathbf{v}_\alpha\rangle]) ( m a , p a , T a ) = ∑ α ( m a , α , m a , α ⟨ v α ⟩ , [ S α + ⟨ v α ⟩ ⊗ ⟨ v α ⟩]) are individually exactly preserved by Eqs. (60) –(62) . In the collisionless limit ν a Δ t → 0 \nu_a\Delta t\to0 ν a Δ t → 0 , η a → 0 \eta_a\to0 η a → 0 and the update is the identity; in the strongly-collisional limit ν a Δ t ≫ 1 \nu_a\Delta t\gg1 ν a Δ t ≫ 1 , η a → 1 \eta_a\to1 η a → 1 and every basis collapses onto the single isotropic Maxwell-Boltzmann component, which is the realizability-repair step (§ 3.8.3 ) when merged into a single Gaussian via the EQMOM-style algebra, correctly recovering the hydrodynamic limit.
For non-Maxwellian targets – velocity-dependent σ ( v r e l ) \sigma(v_{\mathrm{rel}}) σ ( v rel ) , anisotropic differential cross-sections, annihilation/inelastic operators, or non-spherically-symmetric scattering kernels – Eq. (54) generalizes in the obvious way, and the post-step distribution f a n + 1 f_a^{n+1} f a n + 1 can be projected onto the same N b a s i s N_{\mathrm{basis}} N basis Gaussian mixture by minimizing the L 2 L^2 L 2 -Wasserstein cost (§ 3.6 ) between f a n + 1 f_a^{n+1} f a n + 1 and the basis, using the same machinery already employed for inter-cell pairing (§ 3.5 ). The key conceptual point is that all of this is purely intra-cell – there is no projection back onto neighboring cells, and no operator-coarsening of the kind that must be applied in MC/PIC/NB schemes, where collisions can only be represented as collisions between entire super-particles each of which represents some incredibly large number of individual physical particles (e.g. ∼ 10 60 – 90 \sim10^{60\text{--}90} ∼ 1 0 60 – 90 for common dark matter applications).
Other Collision Models
The hard-sphere BGK example above is intentionally a simple case, but the same intra-cell structure accommodates a wide range of microphysical operators with only minor modification. Dissipative or “hit-and-stick” interactions (relevant e.g. for coagulating dust) differ from elastic scattering only in that kinetic energy is not conserved by the collision, so the trace of T a \mathbf{T}_a T a is reduced (rather than merely isotropized) by the operator; internally-excited or radiatively-decaying states that return their energy to bulk motion appear as a heat-injection term, applied by convolving each basis with a broader Gaussian of the appropriate energy each step. Velocity-dependent cross-sections σ ( v r e l ) \sigma(v_{\mathrm{rel}}) σ ( v rel ) and anisotropic differential kernels are handled by the projection of § 3.10.1 ; and “warm” populations require no special treatment at all, since a finite initial dispersion is simply an initialization of S α \mathbf{S}_{\alpha} S α .
The same locality makes the method a natural fit for weakly-collisional plasmas, where Coulomb collisions are velocity-dependent but local, and quasi-neutrality holds on the scales of interest. The additional ingredient there is the electromagnetic force, which enters as the (generally velocity-dependent) external-force operator of § 3.9 rather than as a collision term; given the local per-cell moments one has the information needed to solve for the fields (e.g. the electron pressure and current), so that the magnetized case can be built on top of the same per-basis representation, a direction we return to in § 6 .
Difference from Monte Carlo/PIC/N-body Methods
It is worth emphasizing how different this is from the treatment of collisions in MC/PIC/NB schemes (e.g. standard SIDM or particulate-collision implementations). There, because the DF is sampled by δ \delta δ -function super-particles with no attached continuum density, the local scattering rate must be estimated from a neighbor-based “overlap” integral or kernel-density estimate – an inherently noisy, resolution-dependent construction with no unique definition – and each scattering event pairs entire super-particles, each of which represents some enormous number of micro-particles. Recovering a smooth, converged collision term then requires drawing many Monte-Carlo scattering realizations per particle per step: the sampling error falls only as the square root of the number of realizations, so beating the underlying MC/PIC/NB noise demands very large particle counts and is correspondingly expensive. At low particle number the result is order-unity wrong in the local velocity DF (the scattering samples the wrong distribution), while at high particle number the pairwise-exchange bookkeeping tends to violate energy conservation. In the method here, by contrast, the collision operator acts on the actual local DF carried in each cell, at high order, with no sampling noise and exact conservation of the collisional invariants by construction (§ 3.10.1 ).
How Collisional Can the Method Go?
The operator-split collision operator above recovers the strongly-collisional (hydrodynamic) limit correctly, as we demonstrate below (§ 5.11 ), because in that limit the intra-cell BGK relaxation drives every cell to a single local Maxwellian each step. There is, however, one regime where the naive operator-split becomes inaccurate: when the collisional mean free path becomes very small compared to the inter-element spacing – equivalently, when the collision frequency greatly exceeds the inverse stream-crossing time set by the CFL condition – the inter-cell Riemann problem, which is solved as if the fluid were collisionless over the face, no longer captures the (now fluid-like) collisions at the face within a single step. The scheme remains stable, but the operator-split can introduce large spurious oscillations. Estimating the collision rate R ≃ ρ / ( μ p ) δ v R \simeq\rho/(\mu_p)\,\delta v R ≃ ρ / ( μ p ) δ v against the CFL step Δ t = C C F L Δ x / v s i g \Delta t = C_{\mathrm{CFL}}\,\Delta x/v_{\mathrm{sig}} Δ t = C CFL Δ x / v sig with Δ x ∼ ( Δ m / ρ ) 1 / 3 \Delta x \sim(\Delta m/\rho)^{1/3} Δ x ∼ ( Δ m / ρ ) 1/3 , this becomes problematic only for extremely large cross-sections,
σ μ p ≫ 2 × 10 4 c m 2 g − 1 ( Δ m 10 3 M ⊙ ) − 1 / 3 ( ρ 10 8 M ⊙ k p c − 3 ) − 2 / 3 , (63) \frac{\sigma}{\mu_p} \gg2 \times10^{4}\,\mathrm{cm}^{2}\,\mathrm{g}^{-1}\left(\frac{\Delta m}{10^{3}\mathrm{M}_{\odot}}\right)^{-1/3}\left(\frac{\rho}{10^{8}\mathrm{M}_{\odot}\,\mathrm{kpc}^{-3}}\right)^{-2/3}, \tag*{(63)} μ p σ ≫ 2 × 1 0 4 cm 2 g − 1 ( 1 0 3 M ⊙ Δ m ) − 1/3 ( 1 0 8 M ⊙ kpc − 3 ρ ) − 2/3 , (63)
for outside the range of interest for e.g. self-interacting dark matter.
Even in that regime, however, the fix is straightforward and requires nothing intrinsic to the method: one simply replaces the collisionless face solution with a Riemann solver that carries the partially-collisional (fluid-like) exchange directly. For a given volume partition and flux definition, this is simply the corresponding “usual” fluid dynamic, single-basis (e.g. hydrodynamic or MHD) flux. For the MFM partition we have adopted as our default, Hopkins (2015) show this has an especially simple form in the HLLC approximation:
G H L L C c = { F 1 c ( v R − v L ≤ c ∗ ) 0 ( v R − v L > c ∗ ) (64) \mathcal{G}_{\mathrm{HLLC}}^{c} =
\begin{cases}
\mathcal{F}_{1}^{c} & (v_{R}-v_{L} \le c^{*}) \\
0 & (v_{R}-v_{L} > c^{*})
\end{cases} \tag*{(64)} G HLLC c = { F 1 c 0 ( v R − v L ≤ c ∗ ) ( v R − v L > c ∗ ) (64)
where c ∗ = max ( c L , c R ) c^{*}=\max(c_{L},c_{R}) c ∗ = max ( c L , c R ) ; v K = v K ⋅ A ^ \mathbf{v}_{K}=\mathbf{v}_{K}\cdot\hat{\mathbf{A}} v K = v K ⋅ A ^ . The non-vacuum solution is:
F 1 c = ( 0 P ∗ Π ( 2 P ∗ S ∗ / D ) A ^ ) , (65) \mathcal{F}_{1}^{c} =
\begin{pmatrix}
0 \\
P^{*}\mathbf{\Pi} \\
(2P^{*}S^{*}/D)\hat{\mathbf{A}}
\end{pmatrix}, \tag*{(65)} F 1 c = 0 P ∗ Π ( 2 P ∗ S ∗ / D ) A ^ , (65)
S ∗ = ( P R − P L ) + ( η L v L − η R v R ) η L − η R , S^{*}=\frac{(P_{R}-P_{L})+(\eta_{L}v_{L}-\eta_{R}v_{R})}{\eta_{L}-\eta_{R}}, S ∗ = η L − η R ( P R − P L ) + ( η L v L − η R v R ) ,
P ∗ = P L η R − P R η L + η L η R ( v R − v L ) η R − η L , P^{*}=\frac{P_{L}\eta_{R}-P_{R}\eta_{L}+\eta_{L}\eta_{R}(v_{R}-v_{L})}{\eta_{R}-\eta_{L}}, P ∗ = η R − η L P L η R − P R η L + η L η R ( v R − v L ) ,
η K = ρ K ( S K − v K ) , \eta_{K}=\rho_{K}(S_{K}-v_{K}), η K = ρ K ( S K − v K ) ,
S L ≈ min ( v L , v R ) − c ∗ , S R ≈ max ( v L , v R ) + c ∗ . S_{L}\approx\min(v_{L},v_{R})-c^{*},\quad S_{R}\approx\max(v_{L},v_{R})+c^{*}. S L ≈ min ( v L , v R ) − c ∗ , S R ≈ max ( v L , v R ) + c ∗ .
Here G H L L C c \mathcal{G}_{\mathrm{HLLC}}^{c} G HLLC c is the standard fluid HLLC solution for the cell-summed (isotropic-pressure) state, with P K = ρ K Tr ( S K c o m ) / D P_{K}=\rho_{K}\operatorname{Tr}(\mathbf{S}_{K}^{\mathrm{com}})/D P K = ρ K Tr ( S K com ) / D the effective pressure, computed on the sum over bases (i.e. from the total cell state rather than per-basis). The S L , R S_{L,R} S L , R are approximate/guesses, others can be used. For intermediate-collisionality cases, one can construct more exact solutions; however since most of the work is being done (correctly) by the actual collision operator on the fluxes, one can (at the desired level of accuracy) simply interpolate between the limiting fluxes based on the local collisionality. In other words, define the per-basis effective flux as
G α e f f ≈ w c G α c o l l i s i o n l e s s + ( 1 − w c ) ( ρ K , α ρ K ) G H L L C c , (66) \mathcal{G}_{\alpha}^{\mathrm{eff}} \approx w_{c}\mathcal{G}_{\alpha}^{\mathrm{collisionless}}+(1-w_{c})\left(\frac{\rho_{K,\alpha}}{\rho_{K}}\right)\mathcal{G}_{\mathrm{HLLC}}^{c}, \tag*{(66)} G α eff ≈ w c G α collisionless + ( 1 − w c ) ( ρ K ρ K , α ) G HLLC c , (66)
w c ≡ exp { − Δ x a b λ M F P } = exp { − Δ x a b ρ σ μ p } , w_{c}\equiv\exp\left\{-\frac{\Delta x_{\mathrm{ab}}}{\lambda_{\mathrm{MFP}}}\right\}=\exp\left\{-\Delta x_{\mathrm{ab}}\frac{\rho\sigma}{\mu_{p}}\right\}, w c ≡ exp { − λ MFP Δ x ab } = exp { − Δ x ab μ p ρ σ } ,
so that w c → 1 w_{c}\to1 w c → 1 recovers the collisionless per-basis solver of § 3.3.1 and w c → 0 w_{c}\to0 w c → 0 the fluid solution. The ρ K , α / ρ K \rho_{K,\alpha}/\rho_{K} ρ K , α / ρ K weight simply distributes the (mass-weighted) collisional flux to each basis in proportion to its fraction of the cell mass; since this weight sums to unity and G H L L C c \mathcal{G}_{\mathrm{HLLC}}^{c} G HLLC c is common to all bases, the blend is manifestly conservative.
Moment Order and the 10- vs. 13-Moment Choice
The default method as tested in this paper evolves, per basis, the full set of second moments (a 10-moment closure in D = 3 D=3 D = 3 : mass, three momenta, and the six independent components of the symmetric T α \mathbf{T}_{\alpha} T α ). As discussed in § 2.4.3 , a natural question of considerable interest for plasma applications in particular, is whether one should instead (or in addition) evolve a per-basis third moment – a heat-flux or skewness vector q α \mathbf{q}_{\alpha} q α – giving a 13-moment closure. We have implemented and experimented with such an extension, and sketch its construction below; here we summarize why the multi-basis second-moment method is our default here, and the regimes in which the 13-moment extension may be useful.
Per § 2.4.3 , a key point is that the multi-basis second-moment method already carries an aggregate heat flux . The cell’s total third moment ∫ ( v − ⟨ v a ⟩ ) ⊗ 3 f a d D v \int(\mathbf{v}-\langle\mathbf{v}_{a}\rangle)^{\otimes3} f_{a}\,\mathrm{d}^{D}v ∫ ( v − ⟨ v a ⟩ ) ⊗ 3 f a d D v is generically nonzero even when every individual basis is symmetric, because it receives a contribution from the distribution of basis mean velocities ⟨ v α ⟩ \langle\mathbf{v}_{\alpha}\rangle ⟨ v α ⟩ about the bulk ⟨ v a ⟩ \langle\mathbf{v}_{a}\rangle ⟨ v a ⟩ ; and because those means are Lagrangian-evolved, this aggregate skewness evolves dynamically. A per-basis q α \mathbf{q}_{\alpha} q α adds a sub-grid skew within each basis , which is a different (and complementary) piece of information. This has a direct consequence for any practical implementation with a finite “budget” of evolved variables. Refining the representation of the DF by adding bases is asymptotically convergent; a sum of many Gaussian or top-hat bases can reproduce any f ( v ) f(\mathbf{v}) f ( v ) (hence any true skew/kurtosis) to arbitrary accuracy in principle (§ 5.6). Refining instead by imposing a per-basis heat-flux term — especially the reduced third moment evolved in 13-moment methods (q i \mathbf{q}_{i} q i which has dimension D D D , not the full third-moment D × D × D D \times D \times D D × D × D tensor G i j k \mathbf{G}_{ijk} G ij k ) — is asymptotically biased: it requires imposing a specific prior or functional form for the shape of the DF (imposing the closure for the reduced third moment, for the un-evolved fourth moment[s], etc.). Even adding arbitrary additional moments (e.g. going to a 26-moment closure) can only converge if the shape of the true DF is one which can be represented by the particular functional form assumed (e.g. if the closure assumption is fundamentally correct).
The multiple-cold stream problems we consider provide simple illustrations of this. Trying to represent these with fewer 13 or higher-moment skew-kurtosis-Gaussian-like bases will intrinsically fail, because the DF is multi-peaked. A more subtle failure appears in the Hernquist sphere test: the shape of the equilibrium DF at r → 0 r \to0 r → 0 fundamentally lies outside of the envelope representable by the usual 13-moment (Grad–Hermite or Pearson-IV) closures, and so naively applying those closures to our method drives the DF towards un-representable states, de-stabilizing the method and forcing it to constantly trigger the “repair” operation. The same failure mode occurs in the harmonic-oscillator test if we try a simple linear or quadratic DF modification to construct a 13-moment version of the top-hat basis.
On the other hand, if the DF is close to Maxwellian and does obey the closure assumptions in the 13-moment model, then it is much more efficient to represent e.g. a mildly-skew Gaussian DF with a single skew-Gaussian (the 13-moment approach) than with a series of 10-moment bases. And in many plasma physics applications, with strong “effective” collisionality or interactions mediated by magnetic fields on the kinetic scale, multi-peaked DFs are strongly unstable, and the physics imposes constraints on the range of stable DF shapes (which the multi-moment method does not automatically respect, unless one adds these as additional constraints).
The upshot is a clean dichotomy in when each choice is preferable, which we summarize in Table 1 . For arbitrary , far-from-thermal, genuinely collisionless distributions — cold dark matter, collisionless or weakly-collisional dust and neutral populations, multi-stream flows — the robust route to the “correct” heat flux is to add second-moment bases ; this is the method we validate and adopt here. For systems held near a Maxwellian by frequent collisions or by self-regulating kinetic instabilities (much of collisional and weakly-collisional plasma physics) the deviation from the shape prior is bounded, a per-basis Grad–Hermite or Pearson-IV 13-moment closure is valid and efficient, and the 13-moment extension is the natural tool.
Table 1. Trade-off between closure choices for the local velocity DF (§ 3.11 ).
Implementation & Public Code
Rather than provide a limited “pseudo-code” example, we make public a full implementation of the scheme above, with documentation and test problems, in the public version of the code GIZMO. GIZMO is modular, so the method for integrating e.g. dark matter or stellar or plasma or particulate dynamics can be enabled (replacing the usual MC/PIC/NB solvers) independently of the other physics in the code. The implementation provides four options at each dimensionality (D = 1 , 2 , 3 D = 1, 2, 3 D = 1 , 2 , 3 ) for the basis-moment closure order (e.g. N m o m e n t s ∈ { 5 , 10 , 13 } N_{\mathrm{moments}} \in\{5, 10, 13\} N moments ∈ { 5 , 10 , 13 } in 3D), corresponding to evolving ( m , p , Tr ( T ) ) (m, \mathbf{p}, \operatorname{Tr}(\mathbf{T})) ( m , p , Tr ( T )) , ( m , p , T ) (m, \mathbf{p}, \mathbf{T}) ( m , p , T ) , ( m , p , T , q ) (m, \mathbf{p}, \mathbf{T}, \mathbf{q}) ( m , p , T , q ) – i.e. the streaming, isotropic-dispersion, and full second-moment limits respectively as well as the 13-moment reduced heat-flux – and a user-selectable N b a s i s N_{\mathrm{basis}} N basis (we have tested N b a s i s N_{\mathrm{basis}} N basis from 1 to 128). The per-element computational cost is dominated by the basis-pairing cost matrix and the per-pair Riemann solve and face-velocity root-find, all of which scale as O ( N b a s i s 2 ) O(N_{\mathrm{basis}}^{2}) O ( N basis 2 ) for the assignment rules above, so the per-element overhead relative to standard MC/PIC/NB is fixed and small for the modest N b a s i s N_{\mathrm{basis}} N basis of interest. The gradient loop reuses the same kernel-moment matrix E a − 1 \mathbf{E}_{a}^{-1} E a − 1 as the face-area construction (Eqs. (19) , (26) ), so adds no additional cost beyond what is already paid by the underlying MFM machinery. We refer interested readers to the public release of GIZMO for further implementation details.
Differences & Similarities with Other Methods
Here we summarize similarities & differences with other methods for treating the Vlasov equation in the weakly-collisional limit. There are many super-families of approaches, so it is impossible to be complete, but these methods are all complementary in different regimes and some discussion is useful.
``Standard'' Monte-Carlo, PIC, or N-body Methods
The method here is fundamentally distinct from “standard” MC/PIC/NB methods, in that we evolve the continuous phase-space DF, rather than sampling it discretely. This has a number of advantages. (1) It has easily defined convergence properties, with a clear convergence order (because the continuous equations are being solved), and can be combined with higher-order spatial or velocity or time reconstruction/evolution methods. (2) The method carries an actual local phase-space DF with each element, giving an enormous increase in the information on the phase-space distribution. In MC/PIC/NB methods this must be computed in ensembles, requiring averaging over many thousands of particles to match (at ∼ 10 % \sim10\% ∼ 10% error-tolerance) the information content carried by a single resolution element in our new method. (3) With a local, well-defined continuous phase-space DF, one can easily and rigorously apply local collision operators smoothly and at high order. This is especially useful for models of complicated particle interactions or scattering, or highly-anisotropic or strongly velocity-dependent interactions which depend on the tails of the velocity DF. (4) The Riemann problem being solved between elements allows for collisional or other fluid-like effects, as well. Crucially, this means the method can interpolate between the weakly and strongly collisional limits smoothly – it reduces to fluid dynamics in the strongly collisional limit, without requiring completely different numerical limits. (5) Mass injection or loss, and particle destruction (e.g. annihilation) can be defined in a rigorous manner without a discontinuous element-creation or splitting on the grid. (6) Force softening becomes a well-defined operation with a specific physical meaning (there is a “correct” formulation), because the mesh-generating points define an actual volume partition with a continuous density reconstruction well-defined over the domain. (7) Some spurious discreteness, collisional and relaxation effects are removed (see e.g. Melott et al. 1997; Binney 2004; Chavanis 2006; Campa et al. 2009; Dehnen & Read 2011). For example, spurious short-range MC/PIC/NB heating is not only suppressed but the sign of the error actually reverses: at too-low resolution, the DF is “too smooth,” i.e. real heating will be suppressed.
The tradeoff for these advantages is primarily twofold. (1) The method entails a significant increase in computational complexity and cost, since the per-element work is multiplicatively larger – each face requires a per-pair Riemann solve and the construction of an N b a s i s × N b a s i s N_{\mathrm{basis}} \times N_{\mathrm{basis}} N basis × N basis pairing cost matrix (plus memory cost of these variables). In the test problems we run, the larger cost is the timestep condition: a CFL-like condition must be enforced for stability because our method includes intercell fluxes, while a strictly collisionless MC/PIC/NB method does not; but this cost difference is much smaller in situations with even weak collisionality. (2) The method introduces numerical diffusivity/dissipation. While not a problem for some situations, and controllable (this decreases with resolution and order of the method in a well-defined manner), this is a challenge for some problems evolved to very long timescales.
“Eulerian” & “Semi-Lagrangian” Direct Vlasov Methods
Among methods which directly numerically evolve the DF in phase-space, by far the most popular methods follow the “splitting algorithm” of Cheng & Knorr (1976) and discretize f f f on a 6+1 dimensional grid. Our algorithm is fundamentally a sub-class of these but with (as implemented) a Lagrangian mesh-free discretization in both configuration and velocity space. Compared to “Eulerian” or “Semi-Lagrangian” or “Integer Lattice” methods (see e.g., Shoucri & Gagne 1978; Syer & Tremaine 1995; Sonnendrücker et al. 1999; Filbet et al. 2001; Umeda 2008; Crouseilles et al. 2010; Yoshikawa et al. 2013; Mocz & Succi 2017, for a few examples), in which there is an explicit, regular mesh in Δ x \Delta x Δ x , Δ v x \Delta v_x Δ v x , etc., the method here has several advantages. (1) Most important, use of a Lagrangian, basis-function representation for the velocity distribution which is independently evolved for each mesh element allows us to achieve good accuracy without an enormous fixed velocity “grid.” This means it is computationally feasible to run large, high-resolution simulations – the method is many orders-of-magnitude less expensive than a “uniform grid” in 6D phase-space as adopted in most Eulerian direct-Vlasov or lattice-Boltzmann methods (compare e.g. Tanaka et al. 2017). (2) Because, as implemented, our grid is Lagrangian in both position and velocity space (the mesh-generating points and velocity basis functions move with the flow in position and velocity space, respectively), we automatically achieve higher resolution in regions of interest (where structure forms and phase-space densities are high). (3) Because we maintain fixed-mass elements moving with the center-of-mass, the scheme couples naturally and accurately to standard (well-studied and efficient) MC/PIC/NB long-range force (e.g. gravity, Coulomb, Lorentz) solvers (maintaining conservative, symplectic and Hermitian properties of those solvers), regardless of their nature or algorithmic structure. (4) The method here ensures machine-accurate mass conservation even under variable/adaptive timestepping.
Our method does share common ground with the RHD approach in Jiang et al. (2014), itself a generalization of “short characteristics” schemes (Olson & Kunaz 1987). There, transport is solved on a set of rays of fixed directions on a fixed grid, for a fixed frequency, via fluxes between finite-volume elements. Our method generalizes this to an arbitrary moving mesh in space, with the “ray” directions (v ^ \hat{v} v ^ ) and “frequency” (∣ v ∣ |\mathbf{v}| ∣ v ∣ or momentum) allowed to vary in a locally-adaptive manner and treated as basis functions of arbitrary order, with additional moments to represent the shape of the DF per-basis (as compared to a δ \delta δ function in d 3 p d^3\mathbf{p} d 3 p ).
Since one can, in principle, make the velocity “grid” as dense as desired in our scheme, there is no inherent tradeoff here, except for a modest increase in complexity of the scheme compared to the most naive Eulerian 6+1D grid schemes. However many practical implementations (e.g. the tests above) use a relatively limited velocity grid, so the “velocity space” resolution at a given spatial position may be more limited, although across the entire simulation it may be much better.
“Exact” Phase-Space (Tessellation & “Waterbag”) Methods
Elegant methods exist which evolve the boundaries of phase-space distributions exactly; these have the advantage over our method here of exactly conserving phase-space density (e.g. they can be exactly dissipationless). However, these have proven either too expensive for applications like cosmological simulations, or too restrictive for the general cases that our method is designed to simulate. For example, the “waterbag” method (DePach 1962; Janin 1971) can treat arbitrary phase-space density distributions by evolving their boundaries geometrically – however, it is super-exponentially more expensive than our method here (and the CPU and memory costs scale super-exponentially with the number of “phase wrappings” and number of phase-space dimensions). This has prohibited its application in all but highly-idealized, one-dimensional problems (see Alard & Colombi 2005; Besse et al. 2008; Colombi & Touma 2014). Abel et al. (2012); Shandarin et al. (2012); Hahn et al. (2013) have developed a specialized application of this method – valid for very specific initial conditions and assumptions about the collisionless fluid – into a much more efficient tessellation method (extended in Hahn & Angulo 2016; Sousbie & Colombi 2016; Kaehler 2017) for adapting traditional N-body methods to evolve phase space “sheets” directly (also adapted as the “simplex-in-cell” or SIC technique in PIC simulations; Kates-Harbeck et al. 2016). However, as these authors caution, their method requires initial conditions which form an infinitesimally thin sheet in phase space (a highly restrictive case) and does not allow general collision/mixing operators.9 In addition, this method requires expensive reconstruction of all intersecting sheets to evaluate phase-space distributions, and again becomes super-exponentially more expensive when multiple phase-wrappings occur in gravitational collapse (prohibiting many applications; adaptive refinement of the phase-space elements, as in Hahn & Angulo 2016; Stücker et al. 2020, can follow strong mixing, but the number of elements and hence the cost still grows rapidly with the number of wraps).
“Moments” & Wavefunction Methods
Obviously there is a significant methods overlap with 10 and 13-moments methods for evolving the DF in plasma physics. We extend and generalize these methods (for the first time, to our knowledge) in several ways including the application to moving meshes, mass-conserving MFM-like grids, new DF shapes (top-hat vs. Gaussian-like), HLLC-like and exact Riemann problem solutions coupled to higher-order reconstruction, etc. But the most important qualitative extension is the key conceptual difference: instead of a single set of moments describing the entire DF (the standard “moments” method approach), we generalize to a set of basis functions. This removes the arbitrary “closure” choice from the moments methods; provided sufficient basis number, any DF can be represented in our method. In contrast, traditional 13-moments methods, by assumption, can only represent a single Gaussian DF (with a single skewness parameter for all directions). This means simple collisionless phenomena modeled here, like cold-stream-crossing, cannot be correctly captured (though to be fair, for a charged, magnetized plasma with “effective” collisionality owing to kinetic effects, those types of DFs are often unstable).
It is worth being more specific about this lineage, since the plasma and multiphase-flow moment-closure literature directly informs our work here. The single-Gaussian-basis closures at the 10/13-moment level are traditionally designed for close-to-thermal-equilibrium DFs, as they descend from Grad’s Hermite expansion (Grad 1949). Historically this has the pathology that thermal-equilibrium does not actually lie in the hyperbolic region (see Cai et al. 2014), which has motivated various hyperbolicity-restoring closures, e.g.: Pearson-IV and related interpolations that make the fourth moment a function of the reduced-third moment (Torrilhon 2010; McDonald & Torrilhon 2013); the 13-moment finite-volume/discontinuous-Galerkin plasma solvers (Miller & Shumlak 2016); and globally-hyperbolic quadrature closures such as HyQ-MOM (Fox et al. 2018). Our multi-basis representation sidesteps the closure-hyperbolicity problem entirely by construction: each basis is individually a realizable DF, so the mixture is realizable, and hyperbolicity is inherited from the single-basis one-sided kinetic fluxes (§ 3.3.1 ) rather than imposed through a moment-inversion closure. The closest relatives to the multi-basis idea are the extended and multi-Gaussian quadrature methods of moments (EQOM/MG-EQOM; Fox et al. 2008; Marchisio & Fox 2013) developed for turbulent disperse multiphase flows, in which the DF is represented as a weighted sum of kernel densities (Gaussians, in the multivariate case) reconstructed from a finite set of moments (Chalons et al. 2017). These are closely related quadrature-moment approaches with different assumptions and applications: they are typically applied on fixed Eulerian grids without spatial reconstruction, at fixed low node count, with isotropic or restricted-anisotropy kernels, and are aimed at the moderate-node-number closure-inversion problem rather than at collisionless multi-streaming. The method here differs in adopting a Lagrangian (moving, mass-conserving MFM) mesh with second-order spatial reconstruction, full arbitrary anisotropy of each S α \mathbf{S}_\alpha S α in D = 3 D = 3 D = 3 , an arbitrary user-set N b a s i s N_{\mathrm{basis}} N basis , a distinct one-sided kinetic Riemann flux and face-velocity construction, and the basis-pairing and empty-basis machinery of § 3.5 that has no analog in the fixed-node quadrature methods. One can therefore regard it as a member of the same broad quadrature-moment family, but generalized to truly collisionless or weakly-collisional, multi-streaming, anisotropic complex flows.
Other “moments” methods in the literature tend to be even simpler single-basis examples. For example, in radiation-hydrodynamics (RHD), a single basis (per frequency, so the DF in ∣ p ∣ |\mathbf{p}| ∣ p ∣ is a δ \delta δ -function) is followed with only 4 moments (energy density and flux) in e.g. M1 (and 1 moment in flux-limited diffusion), so the closure is even more restrictive of the shape of the DF and its anisotropy (Levermore & Pomraning 1981). This type of simple closure has also been applied in “Boltzmann moment methods” for stellar and dark matter systems (Mitchell et al. 2013). But it is well-known that these cannot describe even simple two-stream or anisotropic-DF situations, let alone opposing streams or complicated phase-wrapping.
A number of authors (Widrow & Kaiser 1993; Schaller et al. 2014; Schive et al. 2014; Briscese 2017; Kopp et al. 2017) have also noted that pressure-free fluids can (assuming the local velocity DF is trivial) be represented as complex scalar fields Ψ \Psi Ψ obeying a Schrödinger-Poisson-type set of equations. This makes the density field (ρ ∝ ∣ Ψ ∣ 2 \rho\propto|\Psi|^2 ρ ∝ ∣Ψ ∣ 2 ) smooth and continuous, but again collapses the velocity DF to be single-valued at each x \mathbf{x} x (v ∝ ∇ arg [ Ψ ] \mathbf{v} \propto\nabla\arg[\Psi] v ∝ ∇ arg [ Ψ ] ), akin to the “moments” methods above. This is a good approximation for e.g. Bose-Einstein condensate dark matter, where the system is a true superfluid (the group velocity is single-valued, locally), but for collisionless matter one must extend this with a series of wavefunctions (Schaller et al. 2014) akin to a basis functions (but each evolved globally, requiring vastly larger expense to achieve comparable velocity-space resolution). Moreover these methods do not allow collisions, nor couple easily to standard N-body/Poisson/Lorentz schemes, nor necessarily conserve mass or momentum, and they entail a steep (quadratic) timestep penalty.
Numerical Tests
We now consider a suite of numerical tests of our particular implementation in GIZMO. We stress that different core implementation choices can give significantly different results. Volume partition, spatial reconstruction, slope-limiting, basis-function shape, number-of-moments, number-of-bases, time-integration scheme, pairing cost assignment, etc. – these are not “universal” and there is no single “correct” choice. The purpose here is to highlight qualitative features of the scheme, its ability to handle some situations which are highly non-trivial for 6D Vlasov/Boltzmann or “moments” methods or MC/PIC/NB methods, and to demonstrate that it exhibits the stability and convergence properties expected. Unless otherwise stated all implementation choices follow § 3, and initial conditions (ICs) are constructed with equal-mass cells. Every test in D = 1 D = 1 D = 1 (1D) has also been run in 3D (with a periodic box and uniform ICs along the extra dimensions), and a couple tests in D = 2 D = 2 D = 2 , to validate the method works across dimensions.
Two-Stream and Galilean Invariance
We first consider a simple 2-stream test. In a periodic 1D box of size L = 1 L = 1 L = 1 and total mass M = 1 M = 1 M = 1 , we assign N c e l l s = 64 N_{\mathrm{cells}} = 64 N cells = 64 uniformly-spaced mesh-generating points (so Δ x = L / N c e l l s \Delta x = L/N_{\mathrm{cells}} Δ x = L / N cells ) the initial distribution f ( x , v , t = 0 ) = ( δ [ v − 1 ] + δ [ v + 1 ] ) / 2 f(x, v, t = 0) = \left(\delta[v-1]+\delta[v+1]\right)/2 f ( x , v , t = 0 ) = ( δ [ v − 1 ] + δ [ v + 1 ] ) /2 (N b a s i s = 2 N_{\mathrm{basis}} = 2 N basis = 2 per cell), i.e. uniform density with half the mass moving at v = + 1 v = +1 v = + 1 and half at v = − 1 v = -1 v = − 1 , then boost the entire box by an arbitrary v 0 = 12.37 v_0 = 12.37 v 0 = 12.37 in the x ^ \hat{x} x ^ -direction and evolve for many crossing times (Figure 4 ). The method reproduces the exact solution to integration accuracy: the two streams are preserved with no detectable diffusion in either position or velocity space; total mass, momentum, and kinetic energy are conserved to machine precision; and the element masses m a m_a m a are constant in time to the same precision. The repair operator (§ 3.6.3) is never triggered. The cost per timestep is independent of how far forward in time the integration is run – in particular it does not grow as phase wrappings accumulate.
Figure 4. Two-stream test of § 5.1 , after many crossing times in 1D with N = 64 N = 64 N = 64 mesh-generating points under a Galilean boost v 0 = 12.37 v_0 = 12.37 v 0 = 12.37 . Left: final phase-space distribution f ( x , v x , t e n d ) f(x, v_x, t_{\mathrm{end}}) f ( x , v x , t end ) . The exact solution is two horizontal lines at v = v 0 ± 1 v = v_0 \pm1 v = v 0 ± 1 (blue: + v +v + v , red: − v -v − v ); the two streams are preserved to integration accuracy with no visible diffusion in velocity space. Right: cumulative conservation residuals at the end of the run. The per-cell mass drift ∣ Δ m a / m a ∣ |\Delta m_a/m_a| ∣Δ m a / m a ∣ (red, sampled at every mesh cell) is everywhere below 10 − 11 10^{-11} 1 0 − 11 . The globally-conserved scalars all sit at or below the double-precision floor (machine-precision reference indicated): ∣ Δ M / M 0 ∣ |\Delta M/M_0| ∣Δ M / M 0 ∣ and ∣ Δ K E / K E 0 ∣ |\Delta KE/KE_0| ∣Δ K E / K E 0 ∣ are exactly zero in the floating-point arithmetic, while the momentum drift ∣ Δ P / P 0 ∣ |\Delta P/P_0| ∣Δ P / P 0 ∣ is ∼ 10 − 16 \sim10^{-16} ∼ 1 0 − 16 . The same test repeated in the rest frame is identical at every cell to machine precision after subtracting the boost shift (Galilean invariance; see also Figure 6 ).
For comparison, in MC/PIC/NB methods this is a trivial test if half the particles are assigned v = ± 1 v = \pm1 v = ± 1 (although it is impossible to represent both streams at a single spatial point x \mathbf{x} x , which is the actual physical content of the initial condition; the Monte-Carlo realization spreads the streams across positions). In moments-based or Schrödinger methods (§ 4.4), it is impossible to ever converge to the correct solution for even this simple problem. Tessellation and waterbag methods, in turn, have difficulty evolving this configuration arbitrarily far forward in time as phase-wrappings accumulate in position-space and the sheet topology becomes pathological.
Face Geometry on Irregular Meshes
We turn next to the face geometry. The face-vector construction (Eqs. (17) –(21) ) follows the standard MFM definition (Hopkins (2015)), but it enters the CBE machinery in two non-trivial ways: directly through the per-face unit normal A ^ a b \hat{\mathbf{A}}_{ab} A ^ ab which appears in the Riemann solution and the basis-pairing partition gate, and indirectly through V a V_a V a which sets the Q = U / V Q = U/V Q = U / V primitive variables. On a uniform mesh in 1D, the discrete divergence identity ( 1 / V a ) ∑ b F f a c e ( x a b ) A a b = ∇ F ( x a ) (1/V_a)\sum_b F_{\mathrm{face}}(x_{ab})A_{ab} = \nabla F(x_a) ( 1/ V a ) ∑ b F face ( x ab ) A ab = ∇ F ( x a ) holds to machine precision for any linear F F F , and this antisymmetry A a b = − A b a A_{ab} = -A_{ba} A ab = − A ba and row-sum vanishing ∑ b A a b = 0 \sum_b A_{ab} = 0 ∑ b A ab = 0 both hold identically. On non-uniform meshes – here, sampled from ρ ( x ) = 1 + ϵ cos ( 2 π x / L ) \rho(x) = 1 + \epsilon\cos(2\pi x/L) ρ ( x ) = 1 + ϵ cos ( 2 π x / L ) via inverse-CDF at N c e l l s = 64 N_{\mathrm{cells}} = 64 N cells = 64 (so that the mean cell spacing is Δ x ∼ L / N c e l l s \Delta x \sim L/N_{\mathrm{cells}} Δ x ∼ L / N cells ), the same density-wave configuration we will use below – the local divergence-identity error is at the level of the standard MFM linear-reproduction truncation. We stress that this is purely the local-construction error, not a violation of global or per-cell mass conservation: the row-sum vanishing ∑ b A a b = 0 \sum_b A_{ab} = 0 ∑ b A ab = 0 and the pair-symmetric flux assignment ensure that the cell-integrated mass update remains exactly conservative for any face-area definition with these properties. The error here is the same one which appears in the underlying MFM hydrodynamic method and which converges in the usual way with resolution and kernel breadth, and the limit
is set by the underlying MFM, not by anything specific to the CBE scheme.
Density Wave (& Face Velocity v F v_{\mathrm{F}} v F )
A more demanding test of the per-face mass-flux invariance discussed in § 3.4 is provided by a simple density-wave initial condition. We sample N c e l l s = 64 N_{\mathrm{cells}} = 64 N cells = 64 mesh-generating points from ρ ( x ) = 1 + ϵ cos ( 2 π x / L ) \rho(x) = 1 + \epsilon\cos(2\pi x/L) ρ ( x ) = 1 + ϵ cos ( 2 π x / L ) with ϵ = 0.2 \epsilon= 0.2 ϵ = 0.2 via inverse-CDF in 1D, giving each cell N b a s i s = 2 N_{\mathrm{basis}} = 2 N basis = 2 equally-weighted basis components at v = ± 1 v = \pm1 v = ± 1 , and evolve to t = 1 t = 1 t = 1 in units of the box-crossing time at the stream speed. In the continuum limit the solution is exactly the per-stream advection of the two density waves at v = ± 1 v = \pm1 v = ± 1 ; in the discretization, however, the spatial variation of V a V_a V a drives the integration through the Q = U / V Q = U/V Q = U / V frame (§ 2.2.2), so the test exercises the full reconstruction, Riemann, and pairing machinery non-trivially. We run the test in two configurations identical in every respect except for the face velocity v F v_{\mathrm{F}} v F , set either to the analytic continuum expression of Eq. (41) , or determined per-face by the bracketed Brent root-find on the basis-summed mass flux as described in § 3.4 , and compare to the exact analytic solution (each stream rigidly advecting at v = ± 1 v = \pm1 v = ± 1 ).
The per-stream densities are essentially identical between the two configurations and indistinguishable from the analytic solution (Figure 5 , top). The per-cell mass drift, however, differs dramatically (Figure 5 , bottom): with the analytic v F v_{\rm F} v F the maximum element-mass drift accumulates to a few × 10 − 3 \times10^{-3} × 1 0 − 3 by the end of the run, while with the root-found v F v_{\rm F} v F it stays at the double-precision floor (∼ 10 − 14 \sim10^{-14} ∼ 1 0 − 14 ). The two configurations evolve essentially identical per-stream profiles only because the integration is short enough that the per-cell mass drift has not yet been fed into the gravity or basis-pairing operators in a way that produces visible secondary errors; in a cosmological run with ∼ 10 6 − 7 \sim10^{6-7} ∼ 1 0 6 − 7 steps, the corresponding drift in the analytic configuration would accumulate into a serious source of spurious heating in the gravity solver. We therefore use the root-found v F v_{\rm F} v F by default in all following tests.
Figure 5. Density-wave test of § 5.3, comparing two choices for the face velocity v F v_{\mathrm{F}} v F : the continuum expression (Eq. (41) ) and the per-face root-find on ∑ m F ( v m , v F ) = 0 \sum_m F(v_m,v_{\mathrm{F}}) = 0 ∑ m F ( v m , v F ) = 0 described in § 3.4. Top: per-stream density profiles ρ α ( x , t e n d ) \rho_\alpha(x,t_{\mathrm{end}}) ρ α ( x , t end ) at the end of the run, with the + v +v + v (blue) and − v -v − v (red) streams from the analytic v F v_{\mathrm{F}} v F shown solid, and the corresponding + v , − v +v,-v + v , − v streams from the root-find shown as black dotted and dash-dotted lines on top. The two-stream initial condition has the exact analytic solution ρ ± ( x , t ) = 1 2 [ 1 ± ϵ cos ( 2 π ( x ∓ t ) / L ) ] \rho_\pm(x,t) = \frac{1}{2}[1 \pm\epsilon\cos(2\pi(x \mp t)/L)] ρ ± ( x , t ) = 2 1 [ 1 ± ϵ cos ( 2 π ( x ∓ t ) / L )] (each stream rigidly advecting at v = ± 1 v = \pm1 v = ± 1 ); this is plotted as the heavy grey curve and lies under both numerical curves to within line thickness. Bottom: the per-cell mass drift ∣ m a ( t e n d ) / m a ( 0 ) − 1 ∣ |m_a(t_{\mathrm{end}})/m_a(0)-1| ∣ m a ( t end ) / m a ( 0 ) − 1∣ as a function of position across the mesh, for the two configurations. The analytic v F v_{\mathrm{F}} v F (black) leaves a per-cell mass drift of ∼ 10 − 3 \sim10^{-3} ∼ 1 0 − 3 ; the root-find (red) collapses it to machine precision (∼ 10 − 14 \sim10^{-14} ∼ 1 0 − 14 ), ∼ 11 \sim11 ∼ 11 orders of magnitude lower, while not visibly changing the integrated per-stream solution.
In MC/PIC/NB methods this is mechanically similar to the 2-stream case but much more difficult to represent – equal-mass particles (as typically adopted) mean that representing a wave with fractional ϵ ≪ 1 \epsilon\ll1 ϵ ≪ 1 requires an enormous particle number. Moreover there simply is no unique definition of the ρ \rho ρ reconstruction – since it can only be defined in post-processing via some kernel-density estimator, if one chooses too small/large a kernel the density fluctuations are over-or-under-estimated, and the subtle velocity gradient is noise-dominated. Even for the ideal kernel, convergence in MC/PIC/NB problems requires a kernel neighbor number N n g b → ∞ N_{\rm ngb} \to\infty N ngb → ∞ while particle number N t o t → ∞ N_{\rm tot} \to\infty N tot → ∞ slightly faster, giving best-case convergence rates roughly like N − 1 / 4 N^{-1/4} N − 1/4 , whereas our method scales as N − 2 N^{-2} N − 2 . In moments or Schrödinger methods this configuration is simply impossible to represent, and tessellation or wave-terbag methods break almost immediately (after a couple crossings the cost becomes super-exponential in time; see Hahn & Angulo 2016; Stücker et al. 2020). While conceptually this can be represented just as accurately by “direct” or Eulerian/lattice-Boltzmann or Vlasov methods, the motion over the configuration-space grid produces serious damping (this is hydrodynamically equivalent to a soundwave problem with an infinite-Mach-number boost over the grid), which wipes out the wave in a couple of box-crossing times (Hopkins 2015); our method produces zero damping.
Invariance: Translation, Rotation, Units, Galilean, Equivalence, and More
We validate the invariances our method should exhibit by taking the 2-stream and density wave test ICs, and (1) rotating by a random angle; (2) multiplying by different unit masses and lengths (rescaling the time unit accordingly); (3) adding a large translation/coordinate offset; (4) boosting the velocities by a random O ( 1 ) \mathcal{O}(1) O ( 1 ) vector; (5) adding a uniform different random vector acceleration; (6) increasing the basis function number by 12; (7) adding a constant non-moving background density which is much larger than the moving densities. After shifting back to a comoving frame, the per-stream relative densities agree to a relative L 1 L_1 L 1 error of ∼ 10 − 13 \sim10^{-13} ∼ 1 0 − 13 between the simulations (Figure 6 ). This is consistent with the continuum equations, but not automatic in discretization.
Figure 6. Galilean-invariance test of § 5.4 . We compare the results of the 2-wave test as Figure 5 , to a version which is rotated, has units rescaled, translated, boosted, has a uniform acceleration added, has N b a s i s N_{\rm basis} N basis increased, and adds a constant non-moving background density (the latter is translated and boosted back to the same frame for comparison here). The two are indistinguishable as expected.
MC/PIC/NB methods can also be invariant to 1-6. However many violate (5) because (lacking a well-defined and Galilean-invariant Courant criterion) they use timestep criteria explicitly based on the absolute acceleration scale (see Power et al. 2003; Grudić & Hopkins 2020). They are explicitly not invariant to (7), as adding a background density at fixed particle number directly increases the shot noise in representing a small perturbative velocity flow “on top” of this (the error increases with [7]). Direct/Eulerian/lattice-Boltzmann Vlasov methods fail badly under 1/3/4/5, as these require both a much larger grid, but also involve much stronger advection at oblique angles across both the real and velocity-space grids, dramatically increasing damping. Waterbag/tessellation/moments/wavefunction methods already fail to evolve these problems and that failure becomes more pronounced with these variations.
Convergence with N c e l l s N_{\rm cells} N cells
Figure 7 shows a simple convergence study. Fixing N b a s i s = 2 N_{\rm basis} = 2 N basis = 2 on the two-stream density-wave configuration of § 5.3 (which carries exactly two physical streams, so N b a s i s = 2 N_{\rm basis} = 2 N basis = 2 is already the minimal sufficient basis), we vary N c e l l s ∈ { 16 , 32 , 64 , 128 , 256 , 512 } N_{\rm cells} \in\{16, 32, 64, 128, 256, 512\} N cells ∈ { 16 , 32 , 64 , 128 , 256 , 512 } and integrate to a fixed t = 0.15 t = 0.15 t = 0.15 in box-crossing units. We then compute the L 1 L_1 L 1 error in the per-stream density profiles against a same-kernel, same-scheme reference run at N c e l l s r e f = 1024 N_{\rm cells}^{\rm ref} = 1024 N cells ref = 1024 (rather than against an external semi-Lagrangian reference, whose own kernel and density-reconstruction biases would otherwise dominate the residual at high N c e l l s N_{\mathrm{cells}} N cells and artificially flatten the measured slope; though the results are in fact similar if we just compare to the analytic solution), normalized by the mean density. The measured error decreases as L 1 ∝ N c e l l s − p L_1 \propto N_{\mathrm{cells}}^{-p} L 1 ∝ N cells − p with p p p approaching 2 at the highest resolutions tested (p ≈ 2.1 p \approx2.1 p ≈ 2.1 between N c e l l s = 256 N_{\mathrm{cells}} = 256 N cells = 256 and 512), confirming the formal second-order accuracy of the underlying MFM reconstruction. The slight steepening with N c e l l s N_{\mathrm{cells}} N cells is the expected behavior of a TVD slope limiter (§ 3.2 ): the BJ limiter activates more rarely as the local density profile becomes better-resolved, and the second-order MFM stencil is recovered everywhere away from the limited region.
Figure 7. L 1 L_1 L 1 convergence on the two-stream density-wave test of § 5.3, evaluated at t = 0.15 t = 0.15 t = 0.15 against a same-kernel, same-scheme high-resolution reference run at N c e l l s r e f = 1024 N_{\rm cells}^{\rm ref} = 1024 N cells ref = 1024 . Red circles: measured L 1 L_1 L 1 error in the per-stream density (averaged over the two streams, normalized by the mean density, as a function of N c e l l s N_{\rm cells} N cells at fixed N b a s i s = 2 N_{\rm basis} = 2 N basis = 2 (the minimal-sufficient basis for two physical streams). Dashed and dotted lines mark the formal N c e l l s − 2 N_{\rm cells}^{-2} N cells − 2 (second-order) and N c e l l s − 1 N_{\rm cells}^{-1} N cells − 1 (first-order) slopes for reference; the measured slope steepens from ∼ 1.7 \sim1.7 ∼ 1.7 at low N c e l l s N_{\rm cells} N cells to ∼ 2.1 \sim2.1 ∼ 2.1 over the N c e l l s = 256 N_{\rm cells} = 256 N cells = 256 –512 interval, recovering the formal second-order accuracy of the underlying MFM reconstruction as the TVD slope limiter becomes inactive at finer resolutions.
Convergence with N b a s i s N_{\mathrm{basis}} N basis : Reconstruction of a Non-Trivial Velocity DF
A finite-cardinality Gaussian or top-hat basis is an exact representation of any underlying f ( v ) f(v) f ( v ) that is itself a finite Gaussian or top-hat mixture, respectively. We consider streaming tests below with cold or matched Gaussian/top-hat streams and N s t r e a m s ≤ N b a s i s N_{\mathrm{streams}} \le N_{\mathrm{basis}} N streams ≤ N basis and verify the reconstructed stream agrees at machine-precision with its analytic counterpart. Reconstruction of the DF in space is a question of convergence of the spatial reconstruction order, e.g. § 5.5. So the non-trivial question of convergence in velocity-space is the question of the accuracy with which an arbitrary (non-Gaussian/top-hat) target DF can be reconstructed as a sum of N b a s i s N_{\mathrm{basis}} N basis finite bases.
By definition, the total integrals and desired (n = 1 n=1 n = 1 ) moments of the DFs are exactly represented to machine accuracy by our method. So a more meaningful error is something like the L n L_n L n norm of the velocity DF.10 For top-hat basis functions of variable width
Consider an illustrative (challenging) example, with some numbers in Figure 8 . Let the true DF have the form
Figure 8. Convergence in velocity-space on representation of a deliberately non-trivial target DF f t r u e ( v ) f_{\mathrm{true}}(v) f true ( v ) (Eq. (67) ; two stream functions H s \mathcal{H}_s H s with different DFs themselves plus a broad background component H b \mathcal{H}_b H b ), as a function of N b a s i s N_{\mathrm{basis}} N basis . We plot the rms fit residuals vs. N b a s i s N_{\mathrm{basis}} N basis , assuming either top-hat or Gaussian shaped basis functions in velocity-space, and assuming f t r u e f_{\mathrm{true}} f true is composed of a mix of either: Gaussians + exponential Laplace functions (non-compact, non-differentiable); top-hats+triangle functions (compact but discontinuous and non-differentiable); or different-sloped-triangular wedges (much broader and non-differentiable). Top-hat bases converge as N b a s i s − 1 N_{\mathrm{basis}}^{-1} N basis − 1 as expected. Smooth Gaussian bases converge much faster at low-to-intermediate basis number for smooth f t r u e f_{\mathrm{true}} f true , but slower for truly discontinuous f t r u e f_{\mathrm{true}} f true .
f t r u e ( v ) = 0.35 H s ( μ 1 , σ 1 ) + 0.35 H s ( μ 2 , σ 2 ) + 0.3 H b ( μ 3 , σ 3 ) (67) f_{\mathrm{true}}(v)=0.35\mathcal{H}_s(\mu_1,\sigma_1)+0.35\mathcal{H}_s(\mu_2,\sigma_2)+0.3\mathcal{H}_b(\mu_3,\sigma_3) \tag*{(67)} f true ( v ) = 0.35 H s ( μ 1 , σ 1 ) + 0.35 H s ( μ 2 , σ 2 ) + 0.3 H b ( μ 3 , σ 3 ) (67)
where H s , b ( v ; μ , σ ) \mathcal{H}_{s,b}(v;\mu,\sigma) H s , b ( v ; μ , σ ) are unit-normalized functions with means μ 1 , 2 , 3 = ( 7 / 3 , 0.33 , 0 ) \mu_{1,2,3}=(7/3,0.33,0) μ 1 , 2 , 3 = ( 7/3 , 0.33 , 0 ) and dispersions σ 1 , 2 , 3 = ( 4 / 3 , 0.1 , 1.42 ) \sigma_{1,2,3}=(4/3,0.1,1.42) σ 1 , 2 , 3 = ( 4/3 , 0.1 , 1.42 ) , which we vary. We intentionally consider functions which are non-Gaussian/top-hat, non-differentiable/discontinuous, and non-compact: experimenting with H s \mathcal{H}_s H s as a Gaussian, or top-hat, or triangular wedge function; and letting H b \mathcal{H}_b H b similarly be a Gaussian, top-hat, triangle, smooth exp ( − ∣ v / v 0 ∣ 4 ) \exp(-|v/v_0|^4) exp ( − ∣ v / v 0 ∣ 4 ) function, or exponential Laplace tail function ∝ e − 2 ∣ v ∣ / 3 \propto e^{-2|v|/3} ∝ e − 2∣ v ∣/3 . In every case, the top-hat convergence approaches ∝ N b a s i s − 1 \propto N_{\mathrm{basis}}^{-1} ∝ N basis − 1 as expected over N b a s i s = 1 − 128 N_{\mathrm{basis}}=1-128 N basis = 1 − 128 . As N b a s i s N_{\mathrm{basis}} N basis becomes large, most of the work goes into fitting out the non-compact tails of the distribution. For the Gaussian bases, we confirm exponential convergence if we fit only a restricted domain (say ∣ v ∣ < 5 |v|<5 ∣ v ∣ < 5 ) and pick an infinitely-differentiable f t r u e f_{\mathrm{true}} f true (e.g. Gaussian or exp ( − ∣ v ∣ 4 ) \exp(-|v|^4) exp ( − ∣ v ∣ 4 ) forms). However if we fit the entire domain, then even for these smooth configurations, or for the exponential/Laplace or triangular N \mathcal{N} N (continuous but non-differentiable) cases, the scaling is often rapid or exponential at low-N b a s i s N_{\mathrm{basis}} N basis but becomes ∝ N − 1 \propto N^{-1} ∝ N − 1 at large-N N N (albeit with a lower normalization than the top-hat case), with the residual dominated in the exponential case by the slowly-falling Laplace tails. Not surprisingly (given its simplicity in v v v -space), in this particular reconstruction metric (other measures of “quality” below differ), the only case where top-hat bases outperform smooth Gaussian bases is if the DF is discontinuous (k = 0 k=0 k = 0 , e.g. top-hat H s , b \mathcal{H}_{s,b} H s , b ).
Asymmetric Pairing
We next test the conservation and dissipation properties of the pairing rules described in § 3.5 , on an initial condition designed to expose the case where different pairing rules give qualitatively different behavior. We initialize N c e l l s = 4 N_{\mathrm{cells}}=4 N cells = 4 cells (deliberately small, to make the per-face residuals trivially visualizable) each carrying N b a s i s = 3 N_{\mathrm{basis}}=3 N basis = 3 basis components with v α ∈ { + 1 , 0 , − 1 } v_\alpha\in\{+1,0,-1\} v α ∈ { + 1 , 0 , − 1 } and per-cell mass fractions arranged so that multiple components on side a a a all have the same nearest-velocity component on side b b b —the configuration where “mutual” pairing would freeze some transfers (since not every α \alpha α is reciprocally paired), while the one-sided rules of § 3.5 make all transfers. We run the test under the four pairing rules of § 3.5 (mutual-nearest, one-sided-nearest, Hungarian, and the one-sided vacuum rule), each under both the analytic and root-found v F v_F v F choices of § 3.4 , and measure the resulting drifts in M M M , p p p , K E KE K E , and the per-face ∑ α F m , α \sum_\alpha F_{m,\alpha} ∑ α F m , α residual (Figure 9 ).
Figure 9. Properties of distinct basis-matching/pairing rules (symbols) of § 3.5 on the asymmetric-pairing test of § 5.7 , under either the analytic or the per-face root-found face velocity v F v_{\mathrm{F}} v F (§ 3.4 ). The one-sided+θ \theta θ (vacuum) rule is the default adopted. Top: relative kinetic-energy dissipation ∣ Δ K E / K E 0 ∣ |\Delta KE/KE_0| ∣Δ K E / K E 0 ∣ . The one-sided vacuum assignment combined with the corresponding one-sided collisionless Riemann solution (§ 3.3.2 ) dissipates kinetic energy at roughly 1% of the rate of the symmetric assignments combined with the bilateral solver, independently of the choice of v F v_{\mathrm{F}} v F . Right: maximum per-face residual in the basis-summed mass flux ∑ α F m , α \sum_\alpha F_{m,\alpha} ∑ α F m , α . The continuum v F v_{\mathrm{F}} v F gives a residual at the level of the Riemann diffusion (∼ 10 − 1 \sim10^{-1} ∼ 1 0 − 1 ), while the per-face root-find collapses it to machine precision for every pairing rule. Total mass and momentum are conserved to machine precision in every configuration.
All eight configurations conserve total mass and momentum to machine precision – a useful confirmation of the formal claim
tion information. We can therefore instead measure an “rms-like” Δ n ≡ [ Δ v − 1 ∫ ∣ f ( v ) − g ( v ) ∣ n d v ] 1 / n \Delta_n\equiv[\Delta v^{-1}\int|f(v)-g(v)|^n\,\mathrm{d}v]^{1/n} Δ n ≡ [ Δ v − 1 ∫ ∣ f ( v ) − g ( v ) ∣ n d v ] 1/ n , but on an unbounded domain this requires some sensible Δ v \Delta v Δ v , which here we have taken to be either the size of the interval over which 99% of the integral is contained, or a constant ( − 10 , 10 ) (-10,10) ( − 10 , 10 ) . Testing all these choices for n = 1 , 2 , 4 n=1,2,4 n = 1 , 2 , 4 , none changes the qualitative scalings in Figure 8 , just the normalization. in § 3.5 that the antisymmetric ± F \pm F ± F crediting between source and target basis components is exactly conservative regardless of which pairing rule is used, including non-mutual rules. Under the root-found v F v_{\mathrm{F}} v F , the per-face residual likewise collapses to machine precision for every pairing rule, confirming that the root-find decouples the per-face mass-flux invariance from the pairing-rule choice. The configurations do differ substantially, however, in kinetic-energy dissipation: the one-sided vacuum pairing combined with the corresponding one-sided collisionless Riemann solution dissipates kinetic energy at roughly 1% of the rate of the symmetric assignments combined with the bilateral solver. The interpretation is geometrical – the bilateral solver computes a (nonzero) stabilizing dissipation term at every face, including those where one side has no matched outgoing component, while the one-sided form recognizes that in such cases the upwind side carries the entire signal and no symmetric dissipation is required.
Robustness Against Basis Re-Labelling
A more subtle test of the basis-pairing machinery comes from the fact that the basis index α \alpha α which identifies a particular component within cell a a a does not have any physical meaning across cells – the labelling can be permuted within a given cell without any change in
the underlying phase-space DF. In practice, such re-labellings arise naturally in the merge/split step (§ 3.8.3 ), as well as from the order in which streams happen to enter different cells from the initial conditions, so the pairing rule must be insensitive to them. We test this directly by initializing a three-stream configuration (N c e l l s = 64 N_{\mathrm{cells}}=64 N cells = 64 , N b a s i s = 3 N_{\mathrm{basis}}=3 N basis = 3 ) with sinusoidal density modulation, drawing a random permutation of the three basis indices independently in each cell, and comparing the resulting evolution to an otherwise-identical run without the random permutation. Any of the pairing rules of § 3.5 (mutual-nearest, one-sided-nearest, Hungarian, or one-sided vacuum) recover the unshuffled result to machine precision, as expected. The naive “same-α \alpha α pairs with same-α \alpha α ” rule, in contrast, fails catastrophically – random basis relabelling drives the equivalent of basis aliasing in the flux equation, and the resulting unphysical fluxes cause kinetic energy to diverge until the integration aborts on a timestep floor within a few tens of steps. This is the failure mode the per-pair cost matrix is designed to prevent, and the test verifies that all of the rules considered in § 3.5 successfully do so (Figure 10 ).
Figure 10. Three-stream test with random per-cell basis re-labelling (§ 5.8 ). We show the density profile ρ α ( x , t e n d ) \rho_\alpha(x,t_{\mathrm{end}}) ρ α ( x , t end ) of one of the three physical streams (the others are similar). We compare the unshuffled baseline to the four pairing rules of Figure 9 applied to a configuration where the basis indices are independently random-permuted in each cell. For every stream and every pairing rule, the shuffled and unshuffled runs agree well with the exact solution and each other. A naive “same-index pairs with itself” rule fails catastrophically in the shuffled case, not just mixing all bases incorrectly but breaking the slope-limiting and reconstruction so the system becomes numerically unstable.
Cold-Stream Injection: Testing Basis-Matching and Empty-Basis Assignment
We next consider the “empty-basis test” – an extreme, discontinuous and non-linear test of independent cold streams reaching and crossing new regions in the spatial domain. In a periodic 1D box (size L = 1 L=1 L = 1 , mass M = 1 M=1 M = 1 ), we place N c e l l s ( = 48 N_{\mathrm{cells}} (=48 N cells ( = 48 by default) uniformly-spaced cells, each carrying N b a s i s ( = 4 N_{\mathrm{basis}} (=4 N basis ( = 4 by default) components at v α ∈ { + 1 , 0 , − 1 , − 2 } v_\alpha\in\{+1, 0, -1, -2\} v α ∈ { + 1 , 0 , − 1 , − 2 } . The unperturbed background mass fractions are ω ˉ α b k g = ( 0.49 , 0.02 , 0.49 , ϵ ρ ) \bar{\omega}^{\mathrm{bkg}}_\alpha=(0.49, 0.02, 0.49,\epsilon_\rho) ω ˉ α bkg = ( 0.49 , 0.02 , 0.49 , ϵ ρ ) with ϵ ρ = 10 − 8 \epsilon_\rho=10^{-8} ϵ ρ = 1 0 − 8 (a numerical floor representing the near-empty fourth slot), so that the bulk fluid is dominated by the two streams at ± 1 \pm1 ± 1 , plus a tracer stream at 0 and a near-empty slot at − 2 -2 − 2 . All basis components are initialized with the same isotropic dispersion S α = σ 0 2 I S_\alpha=\sigma_0^2 I S α = σ 0 2 I with σ 0 2 = 10 − 6 \sigma_0^2=10^{-6} σ 0 2 = 1 0 − 6 (this is the same per-basis dispersion floor used in the realizability repair of § 3.8.3 , well below the inter-stream velocity gap, so streams remain distinguishable). We then overlay a localized nonlinear injection of a new stream with mass fraction π ( x ) = π max exp [ − ( ( x − x 0 ) / σ π ) 2 ] \pi(x)=\pi_{\max}\exp[-((x-x_0)/\sigma_\pi)^2] π ( x ) = π m a x exp [ − (( x − x 0 ) / σ π ) 2 ] with π max = 0.5 \pi_{\max}=0.5 π m a x = 0.5 , x 0 = 0.5 x_0=0.5 x 0 = 0.5 , σ π = 0.05 \sigma_\pi=0.05 σ π = 0.05 , which both (i) relabels the v α = 4 v_{\alpha=4} v α = 4 velocity from − 2 -2 − 2 to
The + 2 +2 + 2 in the cells where π ( x ) > 10 − 6 \pi(x) > 10^{-6} π ( x ) > 1 0 − 6 (i.e. ∣ x − x 0 ∣ ≲ 0.18 |x-x_0| \lesssim0.18 ∣ x − x 0 ∣ ≲ 0.18 ; in all other cells this basis keeps v = − 2 v=-2 v = − 2 and a negligible 10 − 8 10^{-8} 1 0 − 8 mass fraction), and (ii) reassigns the per-mass basis densities from those cells to π ‾ = π ( x ) \overline{\pi}=\pi(x) π = π ( x ) and ω ‾ 1 , 2 , 3 = ( 1 − π ( x ) ) ω ‾ 1 , 2 , 3 b k g / ∑ 3 ω ‾ b k g \overline{\omega}_{1,2,3}=(1-\pi(x))\overline{\omega}^{\rm bkg}_{1,2,3}/\sum_3\overline{\omega}^{\rm bkg} ω 1 , 2 , 3 = ( 1 − π ( x )) ω 1 , 2 , 3 bkg / ∑ 3 ω bkg so that the total cell mass remains m a = 1 / N c e l l s m_a=1/N_{\rm cells} m a = 1/ N cells exactly. The total box mass and momentum are therefore unchanged by the injection – it is an internal redistribution of basis mass within each cell. The v = + 2 v=+2 v = + 2 component then propagates across the domain into neighbor cells which have no matching + 2 +2 + 2 basis.
This is a demanding test: the ICs have O ( 1 ) O(1) O ( 1 ) , grid-scale sharp discontinuities in every quantity in the DF, they are highly non-equilibrium/non-time-steady, the new basis must propagate into cells that by construction do not have any well-aligned pre-existing basis functions, and the stream must cross into new cells (re-aligning basis functions and “filling in” an empty basis from nothing before it can move). And all of this at intentionally coarse spatial and velocity resolution.
Empty-Basis Cost/Assignment Comparisons
Figure 11 & Figure 12 illustrate the sensitivity of this test to the empty-basis cost/weighting, comparing our adopted basis-assignment machinery from § 3.5 including the empty-basis assignment weighting (C c e b C^{\rm ceb} C ceb of Eq. 45), to alternatives: (d) C ρ r e w t C^{\rm rewt}_{\rho} C ρ rewt , where we simply multiply the weights by ρ b , β / ( ρ a , α + ρ b , β ) \rho_{b,\beta}/(\rho_{a,\alpha}+\rho_{b,\beta}) ρ b , β / ( ρ a , α + ρ b , β ) (as discussed in § 3.5.2) or (c) C v r e w t C^{\rm rewt}_{v} C v rewt using only velocity-space information to match bases (otherwise keeping our assignment identical) or (b) C W 2 r e w t C^{\rm rewt}_{W^2} C W 2 rewt using the velocity-distance-overlap Wasserstein-2 pairing assignment matrix. Here C W 2 r e w t C^{\rm rewt}_{W^2} C W 2 rewt and C v r e w t C^{\rm rewt}_{v} C v rewt are very similar, because the bases are cold, and both fail in the same way: they identify the dominant v = + 1 v=+1 v = + 1 stream as the closest match in velocity space, routing the new stream into it, which creates a completely different DF (seen in ρ ( x , t ) \rho(x,t) ρ ( x , t ) and f ( v ∣ x , t ) f(v\mid x,t) f ( v ∣ x , t ) ). C ρ r e w t C^{\rm rewt}_{\rho} C ρ rewt also fails but in a different way: it over-routes everything to the lowest-mass basis creating phase mixing between all streams. And these errors for the C r e w t C^{\rm rewt} C rewt variants do not converge away at higher cell count.
Figure 11. The empty-basis test of § 5.9: a non-linear, spatially local v = + 2 v = +2 v = + 2 stream is injected at x = 0.5 x = 0.5 x = 0.5 , t = 0 t = 0 t = 0 , and propagates through cells which carry no matching basis component but do carry some near-empty bases. We plot the per-stream density profiles ρ i ( x ∣ v i , t = t e n d ) \rho_i(x \mid v_i, t = t_{\rm end}) ρ i ( x ∣ v i , t = t end ) (integrating f f f over the cold streams at different velocities, v i = + 2 , + 1 , − 1 v_i = +2,+1,-1 v i = + 2 , + 1 , − 1 ), compared to the exact analytic solution. We contrast four basis-matching cost variants (§ 5.9.1): (a) our default C c e b C^{\rm ceb} C ceb that matches based on the full phase-space sheet information and weights to empty bases when no good match is available; or (b) reweighting based only on Wasserstein-2 cost C W 2 r e w t C^{\rm rewt}_{W^2} C W 2 rewt (matches on distance in ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ and S S S -space), (c) the same but using just ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ (C v r e w t C^{\rm rewt}_{v} C v rewt ); or (d) using our default but always weighting towards the empty bases C ρ r e w t C^{\rm rewt}_{\rho} C ρ rewt . Without using the full phase-space sheet, (b) and (c) assign mass to the wrong bases: the + 2 +2 + 2 injection routes into the + 1 +1 + 1 basis in the direction of propagation, so it never moves forward and instead simply modifies that basis. Always weighting to empty bases (without some threshold for whether there was a good fit or not) leads to the system rapidly distributing the mass from all bases uniformly (so each N b a s i s N_{\rm basis} N basis has equal mass). Our default method captures all the qualitative features correctly. The peaks/valleys are smeared out and lower-amplitude, but this is because of coarse resolution (N = 48 N = 48 N = 48 cells) and converges away rapidly.
Figure 12. Reconstructed per-cell velocity distribution function f ( v ∣ x , t e n d ) f(v \mid x, t_{\rm end}) f ( v ∣ x , t end ) at three positions – each panel a single cell – in the empty-basis test from Figure 11 . Left: x = 1 / 3 x = 1/3 x = 1/3 (behind injection side), no injection has propagated here yet, so all methods agree with exact. Middle: x = 0.6 x = 0.6 x = 0.6 (the position of the v = + 1 v = +1 v = + 1 depression’s analytic centre). The methods agree but all have the v = + 1 v = +1 v = + 1 dip (over-estimate of here) owing to low resolution: the basis needs to spread into adjacent cells to build a resolved stream. Right: x = 0.725 x = 0.725 x = 0.725 (just past the analytic leading edge of the rigid-+ 2 +2 + 2 -advected perturbation). Our default method preserves a substantial v = + 2 v = +2 v = + 2 peak albeit with numerical spreading of the peaks in position-space (lower amplitude here). The velocity-space matching has already merged the v > 0 v > 0 v > 0 peaks together into a spurious new peak.
Resolution and Time-Step Stability
Figure 13 shows the convergence and time-step robustness of the default scheme, comparing the density profile and L 1 L_1 L 1 residual in density vs. the exact analytic solution at fixed time t = t e n d = 0.1 t=t_{\rm end}=0.1 t = t end = 0.1 – purposely chosen so that the injected stream is still reaching new “empty” cells and the system is far from equilibrium – for N c e l l s ∈ { 48 , 128 , 192 } N_{\rm cells}\in\{48,128,192\} N cells ∈ { 48 , 128 , 192 } . We see convergence visually, and measure approximate first-order L 1 ∝ N − 1 L_1\propto N^{-1} L 1 ∝ N − 1 convergence. This is expected: as noted, we intentionally chose a discontinuous DF: f ( v = + 2 , r , t ) f(v=+2,r,t) f ( v = + 2 , r , t ) is spatially-discontinuous at all times t t t we evolve here, akin to a shock propagating across a grid, so our second-order reconstruction necessarily becomes piecewise-constant owing to the slopelimiters around the discontinuities. We also show the L 1 L_1 L 1 error at fixed N c e l l s = 128 N_{\mathrm{cells}}=128 N cells = 128 as a function of the CFL safety factor (timestep size) across the full range C F L s a f e t y ∈ [ 0.05 , 1.0 ] \mathrm{CFL}_{\mathrm{safety}}\in[0.05,1.0] CFL safety ∈ [ 0.05 , 1.0 ] : the variation is ≲ 1 % \lesssim1\% ≲ 1% relative, indicating the solution is fully temporally converged for any C F L s a f e t y ≲ 1 \mathrm{CFL}_{\mathrm{safety}}\lesssim1 CFL safety ≲ 1 and that the error is entirely spatial-truncation-limited even at the largest stable timestep. We adopt C F L s a f e t y = 0.2 \mathrm{CFL}_{\mathrm{safety}}=0.2 CFL safety = 0.2 as the default for the rest of this paper, as standard in the GIZMO MFM implementation.
Figure 13. Convergence and time-step stability on the empty-basis test of § 5.9 (Figure 11 ). Left: Per-stream profile ρ − 1 ( x , t e n d ) \rho_{-1}(x,t_{\mathrm{end}}) ρ − 1 ( x , t end ) for one of the streams (the convergence of the others is similar) vs. N c e l l s N_{\mathrm{cells}} N cells . Centre: The corresponding L 1 L_1 L 1 error vs. N c e l l s N_{\mathrm{cells}} N cells , log-log; the convergence is between first and slightly super-first order in N c e l l s − 1 N_{\mathrm{cells}}^{-1} N cells − 1 , consistent with a Lagrangian scheme advecting a sharp (discontinuous) feature through discrete basis reassignment at its leading edge. Right: L 1 L_1 L 1 error vs. C F L s a f e t y \mathrm{CFL}_{\mathrm{safety}} CFL safety at fixed N c e l l s = 128 N_{\mathrm{cells}}=128 N cells = 128 . The error is constant to ≲ 1 % \lesssim1\% ≲ 1% across the full range, i.e. the solution is fully temporally converged even at C F L s a f e t y = 1 \mathrm{CFL}_{\mathrm{safety}}=1 CFL safety = 1 and the error is entirely spatial-truncation-limited.
Gaussian vs. Top-Hat Basis Functions
Figure 14 compares the results for a top-hat vs. Gaussian basis function assumption. Because the velocity DF is cold in either case, the two solutions agree to within line thickness in the per-stream density profiles (Figure 14 ), and integrated stream mass-fractions for each stream agree to better than 1%. The maximum mass-weighted dispersion of any basis or any cell is σ x r e a l \sigma^{\mathrm{real}}_{x} σ x real 2 times larger with the Gaussian bases (median dispersion is within ∼ 20 % \sim20\% ∼ 20% ), for an understandable reason: the Gaussian admits the warm-thermal flux through receding states (internal u x < − c x u_x<-c_x u x < − c x ), and with a larger conductive weight throughout − c x < u x < c x -c_x<u_x<c_x − c x < u x < c x , which the top-hat solver reduces and, for u x ≤ − c x u_x\leq-c_x u x ≤ − c x , truncates to zero. But the difference is much smaller in a hot or warm basis as we find below for the harmonic oscillator test – here it is accentuated by the very cold bases (both of which remain very cold, they are just slightly differently represented in velocity-space).
Figure 14. Comparison of the top-hat vs. Gaussian basis function solutions for the empty-basis test (as Figure 11 ) at N c e l l s = 128 N_{\mathrm{cells}}=128 N cells = 128 . We show the per-stream density profile at t e n d = 0.1 t_{\mathrm{end}}=0.1 t end = 0.1 for the injected v = + 2 v=+2 v = + 2 component (all streams agree similarly between top-hat and Gaussian). The stream-integrated densities and mass fractions at all x x x , t t t agree to < 1 % <1\% < 1% .
Limiter and Predictor Variants
We further test the robustness of this problem to the slope limiters (§ 3.2 or the choice to apply or omit GIZMO’s default primitive predictor (Hopkins 2015). Turning either on/off, at N c e l l s = 128 N_{\mathrm{cells}}=128 N cells = 128 with our method otherwise default (full basis-matching) we find that all runs complete to t e n d = 0.1 t_{\mathrm{end}}=0.1 t end = 0.1 , conserve mass and momentum and total energy to machine precision, and give almost identical per-stream profiles and bulk physical solutions. So these are not critical for this problem. However without the limiters we do find that realizability in the reconstructed state is frequently (at least in a couple of cells at every timestep) violated (albeit “weakly”) and has to be almost constantly repaired by the post-hoc check we apply to the reconstructed states, which, as discussed in § 3.2 , silently injects O ( ρ S ) \mathcal{O}(\rho S) O ( ρS ) corrections per event into the second moment. This just ends up being a small impact in the final stress total and solution because S S S is small, i.e. because the streams are cold. With our default slope-limiters, this SPD repair never triggers throughout the run, for any cell.
In Other Methods
MC/PIC/NB methods can certainly handle this test, but they carry all the problems discussed for 2-stream tests, like noise in ρ ( x ) \rho(x) ρ ( x ) and f ( v , x , t ) f(v,x,t) f ( v , x , t ) , and the “new stream injection” introduces additional ambiguities. In a volume/subregion of the domain where the number of test MC particles with v = v n e w = + 2 v=v_{\mathrm{new}}=+2 v = v new = + 2 matched to the new stream value is nil, then f ( v n e w , x , t ) f(v_{\mathrm{new}},x,t) f ( v new , x , t ) only has two values: zero or undefined. But saying this (= for any region without a particle at v = v n e w v=v_{\mathrm{new}} v = v new means that if the DF were continuous in v v v but discretely sampled, one would inevitably require that the DF be noisy, jumping between large values and 0 in any subvolume containing a finite particle number. Smoothing over a large enough spatial kernel to sample f ( x , v , t ) f(x,v,t) f ( x , v , t ) at all velocities spanned (the “kernel density estimation in phase space” solution) forces the neighbor kernel in the part of the volume the new stream has not-yet reached to extend to the volume already-reached, introducing an arbitrarily large, acausal forward-propagating “tail” with implied f ( v = v n e w , x , t ) > 0 f(v=v_{\mathrm{new}},x,t)>0 f ( v = v new , x , t ) > 0 . Direct/Eulerian/lattice-Boltzmann Vlasov methods can handle this test but still have the diffusion issues noted above. Wavergab/tessellation/moments/wavefunction methods fail even more severely here than in the steady-state multi-stream problem.
Colliding Streams: The Collisional Limit
The tests so far are purely collisionless. To verify that the collision operator of § 3.10 correctly interpolates between the collisionless and hydrodynamic limits, we use a 1D colliding-stream problem: in a periodic box of unit length we initialize uniform density ρ 0 = 1 \rho_0=1 ρ 0 = 1 with all the mass in the left half moving at v = + 1 v=+1 v = + 1 and all the mass in the right half at v = − 1 v=-1 v = − 1 (represented by two basis components per cell at distinct ± 1 \pm1 ± 1 velocities with the appropriate mass split), a negligible thermal floor, and N c e l l s = 256 N_{\rm cells}=256 N cells = 256 . We run the same initial condition at cross-sections σ / μ p \sigma/\mu_{\rm p} σ / μ p spanning the collisionless and strongly-collisional regimes, and in the strongly-collisional case compare against a matched MFM hydrodynamics run of the moment-matched initial condition (the same density, bulk velocity, and pressure per cell) with adiabatic index γ = 3 \gamma=3 γ = 3 , the effective index of a one-dimensional collisional gas closing at the second moment.
The two limits are recovered cleanly (Figure 15 ). With no collisions (σ / μ p = 0 \sigma/\mu_{\rm p}=0 σ / μ p = 0 ) the two streams interpenetrate freely: the density in the overlap region rises to exactly ρ = 2 \rho=2 ρ = 2 , each basis retains its ± 1 \pm1 ± 1 velocity flat across the box, and the solution is the expected collisionless two-stream interpenetration. In the strongly-collisional limit (σ / μ p \sigma/\mu_{\rm p} σ / μ p large, so the mean-free-path weight w c = e − Δ x / λ M F P → 0 w_{\rm c}=e^{-\Delta x/\lambda_{\rm MFP}}\to0 w c = e − Δ x / λ MFP → 0 ) the same initial condition instead produces a symmetric double-shock: the two streams thermalize at the interface, the basis representation collapses to a single Maxwellian per cell (via the intra-cell relaxation of § 3.10.1 and the merge step of § 3.8.3 ), and a central shocked slab forms at the γ = 3 \gamma=3 γ = 3 strong-shock compression ( γ + 1 ) / ( γ − 1 ) = 2 (\gamma+1)/(\gamma-1)=2 ( γ + 1 ) / ( γ − 1 ) = 2 with v → 0 v\to0 v → 0 . This CBE result matches the matched MFM hydrodynamics run to ∼ 1 % \sim1\% ∼ 1% in the L 1 L_1 L 1 norm of ρ \rho ρ , v v v , and P P P , with co-located shock fronts, confirming that the operator-split scheme reproduces the collisional (fluid) limit of the identical problem it solves collisionlessly.
Figure 15. Colliding-stream test of the collisional limit (§ 5.11 ): two cold streams at v = ± 1 v=\pm1 v = ± 1 meet at the box centre. Profiles of density ρ \rho ρ , bulk velocity v v v , and pressure P P P at fixed time. Collisionless (σ / μ p = 0 \sigma/\mu_{\rm p}=0 σ / μ p = 0 ; blue): the streams interpenetrate, giving ρ = 2 \rho=2 ρ = 2 in the overlap with each basis retaining its ± 1 \pm1 ± 1 velocity (the physically-correct collisionless solution). Strongly collisional (large σ / μ p \sigma/\mu_{\rm p} σ / μ p ; red): the streams thermalize into a symmetric double-shock with a central slab at the γ = 3 \gamma=3 γ = 3 strong-shock compression ρ = ( γ + 1 ) / ( γ − 1 ) = 2 \rho=(\gamma+1)/(\gamma-1)=2 ρ = ( γ + 1 ) / ( γ − 1 ) = 2 and v → 0 v\to0 v → 0 , matching a standard MFM hydrodynamics run of the moment-matched initial condition (grey dashed) to ∼ 1 % \sim1\% ∼ 1% in ρ \rho ρ , v v v , and P P P . The collision operator thus interpolates between free-streaming and fluid dynamics on the same problem.
MC/PIC/NB methods cannot represent this limit. Collisionality and density are ill-defined, but are often represented via MC super-particle scattering with some “overlap kernel” (treating each MC particle as a “cloud” of micro-particles moving at the same speed and uniform density, with size of order the inter-particle separation; (Rocha et al. 2013; Meshkizhe et al. 2022; Arido et al. 2024)), but it is well known that this becomes demonstrably wrong (it converges to an unphysical solution) in the short mean-free-path limit (see those references). The failure is independent of the implementation: fundamentally, MC/PIC/NB discards the internal degrees of freedom of freedom of the DF, so there is no thermal energy (particles can macroscopically scatter, but this means that instead of e.g. a hot, shocked, stationary gas, one has at whatever resolution scale a collection of macro-scopic gas masses moving “left” or “right”), and it is impossible for them to simultaneously conserve momentum and energy in this limit as well. Direct/Eulerian/lattice-Boltzmann Vlasov methods can in principle handle this but it is very sensitive to the form of the operator in collisions: it is not trivial that a Maxwellian DF can be retained (as compared to advecting away). Waterbag/tessellation methods immediately fail (they become ill-posed) in this regime. Moments/wavefunction methods can reproduce the infinitely-collisional limit: indeed this is the one regime where they do work well.
Harmonic Oscillator: Breathing-Mode Damping
The tests above do not directly measure the method’s long-term dynamical dissipation in the presence of self-consistent forces. For that we use the “breathing” mode of a 1D harmonic potential Φ ( x ) = 1 2 Ω 2 x 2 \Phi(x)=\frac{1}{2}\Omega^2x^2 Φ ( x ) = 2 1 Ω 2 x 2 , in which all orbits share the same period (T o r b i t = 2 π / Ω T_{\rm orbit}=2\pi/\Omega T orbit = 2 π /Ω , independent of amplitude), so a collisionless phase-space distribution that is initially Gaussian with mismatched position- and velocity-space widths (σ x , 0 ≠ σ v , 0 / Ω \sigma_{x,0}\ne\sigma_{v,0}/\Omega σ x , 0 = σ v , 0 /Ω ) oscillates forever , with the spatial width breathing between σ x , 0 \sigma_{x,0} σ x , 0 and σ v , 0 / Ω \sigma_{v,0}/\Omega σ v , 0 /Ω at twice the orbital frequency, with no secular change. We take σ x , 0 = 0.7 \sigma_{x,0}=0.7 σ x , 0 = 0.7 , σ v , 0 = 1 \sigma_{v,0}=1 σ v , 0 = 1 (so the envelope oscillates in [ 0.7 , 1.0 ] [0.7,1.0] [ 0.7 , 1.0 ] , with relaxed width σ e q = [ 1 2 ( σ x , 0 2 + σ v , 0 2 ) ] 1 / 2 = 0.863 \sigma_{\rm eq}=[\frac{1}{2}(\sigma_{x,0}^2+\sigma_{v,0}^2)]^{1/2}=0.863 σ eq = [ 2 1 ( σ x , 0 2 + σ v , 0 2 ) ] 1/2 = 0.863 and should make the mode fully damp) and integrate for 20 T o r b i t T_{\rm orbit} T orbit (forty full breaths). Any decay of the breathing envelope is then a direct, physically-normalized measure of numerical dissipation in the method: we fit the envelope to ∝ e − t / τ \propto e^{-t/\tau} ∝ e − t / τ and quote the damping time τ \tau τ in orbital periods, with larger τ \tau τ (slower damping) indicating a less dissipative scheme.
The result is shown in Figure 16 . With the fiducial compact-support top-hat solver (χ = 3 \chi=\sqrt{3} χ = 3 ), the breathing envelope is essentially undamped over the full integration, decaying from 1.00 to ≃ 0.98 \simeq0.98 ≃ 0.98 over forty breaths (at N = 256 N=256 N = 256 shown), corresponding to ∼ 115 T o r b i t \sim115T_{\rm orbit} ∼ 115 T orbit to ∼ 720 T o r b i t \sim720T_{\rm orbit} ∼ 720 T orbit , the exact-Gaussian solver damps roughly 2.5–3× \times × faster (τ ≃ 40 \tau\simeq40 τ ≃ 40 –45T o r b i t T_{\rm orbit} T orbit ) on the identical initial condition, because its heat-conduction flux term (the S x ⊗ S x / σ x S_x\otimes S_x/\sigma_x S x ⊗ S x / σ x term in Eq. (36) ) does not compactly truncate and therefore continues to transfer second-moment energy through weakly-receding faces. That the residual damping is genuinely a property of the inter-cell flux, and not of the leapfrog gravity integration, is already established by the solver comparison itself: the top-hat and Gaussian runs share the identical initial condition and gravity integrator and differ only in the face Riemann solution, yet damp at rates differing by a factor of ∼ 2.5 \sim2.5 ∼ 2.5 –3, so the dissipation must originate in the flux and not the force update. Decomposing the dissipation across the reconstruction and limiting choices of § 3.2 , we find the velocity-slope limiter is the dominant contributor to the residual damping – relaxing it (while retaining the second-moment limiter needed for stability) roughly doubles τ \tau τ – while the density-slope limiter and the realizability-cone tightening are essentially neutral for this diagnostic. Removing slope-limiters entirely makes the dissipation unmeasurable, but destabilizes other problems. Making those limiters much stronger increases the damping. This motivates the small opposite-sign tolerance we adopt in the velocity limiter (§ 3.2 ), which recovers most of the anti-damping benefit while preserving monotonicity and stability. Other choices influence the dissipation as expected. A piecewise-constant reconstruction is much more dissipative, with τ → 10 T o r b i t \tau\to10T_{\rm orbit} τ → 10 T orbit . Replacing our exact Riemann solver with a less-accurate and more-dissipative HLL or global Lax-Friedrichs method similarly damps more strongly. The damping rate decreases (τ \tau τ increases) with resolution (roughly τ ∝ N \tau\propto N τ ∝ N or slightly steeper at higher resolution over N = 128 N=128 N = 128 , 256, 512) consistent with a higher-order method, so it is a controllable truncation error, rather than a fixed property of the method.
Figure 16. Oscillator test (§ 5.12 ): a Gaussian phase-space packet with mismatched widths (σ x , 0 = 0.7 \sigma_{x,0}=0.7 σ x , 0 = 0.7 , σ v , 0 / Ω = 1.0 \sigma_{v,0}/\Omega=1.0 σ v , 0 /Ω = 1.0 ) in a harmonic potential, whose breathing envelope is analytically constant ([0.7, 1.0]; all orbits are isochronous). The mass-weighted spatial width σ x ( t ) \sigma_x(t) σ x ( t ) is plotted (top; thin ) in orbital periods t / T o r b i t t/T_{\rm orbit} t / T orbit (each breath is half an orbital period), with its envelope (thick ). The correct behavior is recovered but numerical dissipation slowly damps the breathing width (still conserving energy), with damping time τ ≃ 115 T o r b i t \tau\simeq115T_{\rm orbit} τ ≃ 115 T orbit for the top-hat bases (top ) at this resolution (the damping decreases rapidly with higher resolution). For the Gaussian bases (bottom ) we find the damping is faster (τ ≃ 41 T o r b i t \tau\simeq41T_{\rm orbit} τ ≃ 41 T orbit ), owing to the larger stress-dissipation/conductivity term in the Riemann problem. Making slope limiters stronger/weaker increases or decreases the damping (removing them gives almost no damping – it is numerical dissipation from the imperfect piecewise-linear reconstruction), but removing the stress+SPD checks entirely makes the problem numerically unstable (result diverges and then crashes). A piecewise-constant reconstruction (“gradients off”) damps much more rapidly. The “cold start” also damps more slowly.
We have also run several variants of this problem. For example, we can vary σ x , 0 \sigma_{x,0} σ x , 0 or σ v , 0 \sigma_{v,0} σ v , 0 but this just rescales the problem units. More interesting, we can consider instead a “cold start” where at every position we initialize half the mass each with v = ± σ x Ω v=\pm\sigma_x\Omega v = ± σ x Ω (or some multiple thereof), so we have an oscillating version of the two-streams problem. We have also approximated the Gaussian σ v , 0 \sigma_{v,0} σ v , 0 as a sum of 4 or 8 independent cold-streams (essentially breaking it up into a simple histogram of cold streams with no dispersion), with equal numbers left-and-right propagating in the initial conditions. All of these oscillate with the same period and produce the same qualitative behaviors. The “cold stream” numerical dissipation first appears as a blurring of the initially-infinitely-cold basis functions with finite N b a s i s N_{\rm basis} N basis , with no envelope damping, then once the bases are non-linearly broadened, the envelope damping appears (so it looks overall like slower damping, but measured just in this fully-non-linear phase, the rates are similar). So the numerical dissipation acts first primarily in velocity-space in our implementation, and only secondarily in configuration space.
This problem is quite sensitive to incorrect basis-pairing (§ 3.5 ), especially for a “cold start” IC with bases moving in different directions and very different masses. If we match bases between neighbors purely in velocity-space or with the Wasserstein-2 weights, especially if we ignore the reconstructed velocities extrapolated to the faces (match only on cell-centered quantities) then the problem is that near the turnaround points at the extrema of the breathing mode (where the velocities all approach zero), the second-order errors from linear gradient extrapolation can lead to incorrectly matching bases moving into vs. out-of the turnaround. But since these can have very different densities, this leads to either excessive dissipation (with strong slope limiters) or large noise that can even destabilize the problem if no slope-limiters or prior-step gradient information is used (see Figure 12 and discussion in § 3.5 ). An accurate and robust second-order reconstruction depends on matching bases in the reconstructed quantities, on the full phase-space sheet. Within the context of our full weights § 3.7 using the gradients, we see much less sensitivity.
In this problem, MC/PIC/NB methods give clean evolution of the orbits/oscillations by-particle (provided an accurate second-order or higher force integration scheme), with zero dissipation, but like the 2-stream problem, the noise is quite severe if one attempts to define the DF or ρ \rho ρ anywhere, the density at the edges of the envelope is especially ill-defined by definition at any resolution, and convergence in these is very slow. Direct/Eu-lerian/lattice-Boltzmann Vlasov methods can integrate this but the variable acceleration in v \mathbf{v} v and x \mathbf{x} x produces much stronger damping, even with a high-order scheme. Waterbag/tessellation and moments/wavefunction methods fail catastrophically everywhere on this problem (it is something of a worst-case scenario).
Relation to Zeldovich/Plane Wave Collapse
Briefly, we note that our harmonic-oscillator test is similar to the collisionless Zel’dovich (1970) pancake test. That follows collapse of a 1D self-gravitating potential ϕ ( x ) = ϕ ˉ cos ( k x ) \phi(x)=\bar{\phi}\cos(kx) ϕ ( x ) = ϕ ˉ cos ( k x ) in a periodic comoving Einstein-de Sitter box with cold initial conditions, as in e.g. Abel et al. (2012); Hahn et al. (2013) and others. Since we have not implemented cosmological integration in 1D in GIZMO (only 3D), we cannot directly compare to those authors. But it is worth briefly noting that the pre-shell crossing evolution in our method is trivially identical to standard N N N -body methods, while the post shell-crossing behavior tests the exact same physics and numerical levers as our oscillator problem (especially for a “cold start”). Indeed in our default case all the cold-start streams intersect at the same time (the system has ∼ O ( N c e l l s ) \sim O(N_{\rm cells}) ∼ O ( N cells ) wraps per period). We can also initialize the oscillator differently to be even more akin to the pancake: if we initialize constant density for − 1 < x < 1 -1 < x < 1 − 1 < x < 1 and initial velocity v 0 = Ω sin ( m π x ) v_0=\Omega\sin(m\pi x) v 0 = Ω sin ( mπ x ) , then for integer m > 0 m>0 m > 0 there will be 2 m + 1 2m+1 2 m + 1 streams overlapping at the origin every half-period. Obviously if N s t r e a m s > N b a s i s N_{\rm streams}>N_{\rm basis} N streams > N basis , our method coarse-grains adjacent streams non-trivially since via the basis function pairing; in our default case this is always happening (there is always finite dispersion) by construction. But the total energy and behavior of the envelope is con-
Jiova served, and of course any method without infinite resolution in the Zel’dovich problem must eventually coarse-grain since the intersecting stream number tends to infinity with more phase-wrapping. Our damping rate measures the rate at which numerical damping blurs the sharp edges in phase-space (again, a phenomenon generic to basically all methods, but usually just shown qualitatively).
Non-Linear Virialization: Self-Gravitating Equilibria with Hot and Cold Starts
A more demanding 3D test is the long-time stability of an isotropic, self-gravitating, spherical collisionless equilibrium. To realize this we initialize a Hernquist (1990) model with isotropic velocities, using gravitational constant, total mass, and scale-length G = M = a = 1 G=M=a=1 G = M = a = 1 . In these units the equilibrium density profile is ρ = ( M / 2 π ) r − 1 ( r + 1 ) − 3 \rho=(M/2\pi)r^{-1}(r+1)^{-3} ρ = ( M /2 π ) r − 1 ( r + 1 ) − 3 , potential ϕ = − 1 / ( r + 1 ) \phi=-1/(r+1) ϕ = − 1/ ( r + 1 ) and the DF f ( v ∣ r ) f(v\mid r) f ( v ∣ r ) as a function of E ≡ − E = − ϕ − v 2 / 2 E\equiv-E=-\phi-v^2/2 E ≡ − E = − ϕ − v 2 /2 at a given r r r is entirely analytic. Self-gravity is integrated using the tree method in GIZMO, operator split as we describe above. We use the standard adaptive individual (unequal) timesteps in GIZMO, which means momentum and energy conservation drops from machine-accurate to integration-accurate, from both gravity and cell-flux operators. We evolve the system to t = 25 ( G M / a 3 ) − 1 / 2 t=25\,(GM/a^3)^{-1/2} t = 25 ( GM / a 3 ) − 1/2 global dynamical times, which for the inner radii (r ≲ 0.1 r\lesssim0.1 r ≲ 0.1 ) on which we focus corresponds to ≳ 250 \gtrsim250 ≳ 250 crossing/phase-wrapping timescales, and if we assume this represents a typical dark matter halo this corresponds to ∼ 5 − 10 G y r \sim5-10\ \mathrm{Gyr} ∼ 5 − 10 Gyr (i.e. roughly a Hubble time). Our fiducial realization uses just N = 1000 N=1000 N = 1000 elements and is shown in Figure 17 , though we have tested up to N = 10 6 N=10^6 N = 1 0 6 .
Figure 17. Collisionless Hernquist self-gravitating orbit mixing and equilibrium test (§ 5.13 ). A set of 1000 particles is initialized with equal masses and infinitely-cold streams from the Poisson-sampled Hernquist DF (total mass+scale-length+gravitational constant M = a = G = 1 M = a = G = 1 M = a = G = 1 ), and allowed to relax for 25 global dynamical times, with top-hat bases. We plot evolution of (1) total energies and momenta; (2) radii r n r_n r n enclosing n n n percent of the mass; (3) density profile averaged in spherical shells; (4) total (integrated) isotropic DF in terms of the specific energy, d M / d ∣ E ∣ dM/d|E| d M / d ∣ E ∣ (thin line shows N = 10 4 N = 10^4 N = 1 0 4 ). The system relaxes to the correct equilibrium, is stable, conserves total energy and momentum (despite some initial transients in potential-kinetic energy). At this (low) resolution there is a very slow numerical-dissipation driven relaxation in the core, causing the tail to slightly lower specific energies and some shrinking of r 10 r_{10} r 10 , but its effects on the density profile are minor even at r ≲ 0.1 a r \lesssim0.1a r ≲ 0.1 a where the system has evolved ∼ 250 \sim250 ∼ 250 dynamical times.
We compare a “hot” and “cold” start. The “cold” start is exactly the IC one would use for traditional MC/PIC/NB methods: we discretize M M M into N N N equal masses of Δ m = 1 / N \Delta m=1/N Δ m = 1/ N , probabilistically assign them radii according to the density profile (drawing a unit random number and equating it to M ( < r ) / M = ( 1 + 1 / r ) − 2 M(<r)/M=(1+1/r)^{-2} M ( < r ) / M = ( 1 + 1/ r ) − 2 to get r r r , then drawing random Euler angles for spherical cos θ \cos\theta cos θ , and ϕ \phi ϕ ), with discrete, single-valued-per-particle, infinitely cold velocities drawn probabilistically from f ( v ∣ r ) f(v\mid r) f ( v ∣ r ) . This is in many ways the “worst case scenario” for a method like ours: the cells begin randomly laid out so the mesh is maximally disordered/anisotropic (maximizing flux errors), the cells are all infinitely cold so immediately begin to flow into each other, and at our tested N = 10 3 − 10 6 N=10^3-10^6 N = 1 0 3 − 1 0 6 element resolution this means there are vastly more “cold streams” initially than there are basis functions (here N b a s i s = 4 , 6 , 8 , 10 N_{\mathrm{basis}}=4,6,8,10 N basis = 4 , 6 , 8 , 10 were tested). The “hot” start uses the same (badly-disordered) cell positions from the start, but initializes a much-closer-to-correct initial f ( v ) f(v) f ( v ) in each cell based on its position (still intentionally over-simplified: we just use one initial basis function but set it to the correct 3D isotropic velocity dispersion from the Jeans second moment of the equilibrium, with zero mean velocity). We have also tried one more case, a “hot and ordered” start – that is much closer to how one would simulate e.g. a self-gravitating fluid, with the initial cells laid out in ordered shells rather than randomly (see Kegerreis et al. 2019). We stress that while the cold start is the standard statistical representation of the system in MC/PIC/NB simulations, it is in fact very far from equilibrium: at every position, the mass is in large bulk motion, and the DF is infinitely cold. This is basically the opposite of the correct behavior: the mass density should be stationary and the DF dispersion-supported. Essentially, our cold-start case is more akin to trying to resolve the initial collapse and virialization of an object from cold initial conditions.
We extract the density profile, DF in concentric shells and in total, ∼ 10 , 50 , 90 % \sim10,50,90\% ∼ 10 , 50 , 90% mass inclusion radii r 10 , 50 , 90 r_{10,50,90} r 10 , 50 , 90 , total and kinetic and potential energies, total bulk momentum, and total mass, at various times. This is a demanding test: the mesh is highly disordered, the reconstruction is anisotropic, timesteps are highly unequal and vary by factors up to ∼ 1000 \sim1000 ∼ 1000 over the system, the initial DF is far-from-equilibrium and even in equilibrium is strongly spatially-varying, shot noise is large at low resolution, the effective “pressure” force is operator-split from gravitational forces, and the system must be evolved for hundreds of shell-crossings and dynamical times per-particle.
With our default method, the results are encouraging even at very low resolution in Figure 17 . Despite unequal timesteps and operator-split tree-gravity, momentum and total energy are conserved to expected integration accuracy, O ( 10 − 4 − 10 − 3 ) \mathcal{O}(10^{-4}-10^{-3}) O ( 1 0 − 4 − 1 0 − 3 ) in the units here over ∼ 100 \sim100 ∼ 100 orbits – comparable in momentum and only slightly larger in total energy than obtained for pure N N N -body evolution. Mass is conserved to machine precision as expected. The equilibrium density profile, DF (integrated and at different radii), and r 10 , 50 , 90 r_{10,50,90} r 10 , 50 , 90 are stable. And it approaches DF from both hot+cold start.
Effects and Convergence in Numerical Dissipation
We find this is a sensitive test of any subtle errors or excess dissipation in the method, as shown in Figure 18 & Figure 19 . Changing the stress terms in the Riemann problem incorrectly (using e.g. a simpler global Lax-Friedrichs-type solution) can over-or-under pressurize the halo, causing it to collapse or blow up. Failure to use a “wakeup” scheme with individual timesteps (as in standard hydrodynamics, for any interacting neighbor cells with very different timesteps) leads to large O ( 1 ) \mathcal{O}(1) O ( 1 ) energy conservation errors. Models without sensible basis-matching fail catastrophically in the cold-start regime. Ignoring standard stability conditions: e.g. removing all slope-limiters or SPD constraints or allowing steps much larger than Courant all lead to catastrophic numerical instability (the total energy changes by orders of magnitude within a percent or so of the total runtime shown here).
Figure 18. As Figure 17 but a maximally-diffusive “worst case” scenario. We initialize with a “hot start,” use Gaussian bases, and (most importantly) use a piecewise-constant reconstruction (1st-order instead of our default 2nd-order). All of these increase the numerical dissipation (see Figure 16 ). The gravothermal relaxation is much more pronounced: the core (r 10 r_{10} r 10 ) shrinks, r 50 r_{50} r 50 grows, ∣ E p o t ∣ |E_{\rm pot}| ∣ E pot ∣ and ∣ E k i n ∣ |E_{\rm kin}| ∣ E kin ∣ increase together as the tail of the DF extends, and the cusp in ρ \rho ρ steepens to r − 3 / 2 r^{-3/2} r − 3/2 after ∼ 100 \sim100 ∼ 100 local dynamical times.
Figure 19. Effects on the relaxation of the Hernquist problem (Figure 17 –Figure 18 ) with different numerical choices. We show the half-mass (r 50 r_{50} r 50 ) and core (r 10 r_{10} r 10 ) radii, kinetic and total energies, as Figure 17 but zoomed-in so the evolution is more clear. All runs here are at N = 1000 N = 1000 N = 1000 unless otherwise noted, and all N = 1000 N = 1000 N = 1000 runs include both a “cold-start” (thick ) and “hot-start” (thin ) variant. We compare the default scheme with Gaussian bases (more diffusive); top-hat bases (Figure 17 ) with the default (χ = 3 \chi= \sqrt{3} χ = 3 ) and larger signal speed (χ = 3 \chi= 3 χ = 3 , so the timesteps are smaller; this has no measurable effect); and Gaussian-basis runs with piecewise-constant (lower-order) reconstruction (Figure 18 , much more diffusive); an artificially modified Riemann pressure (this “fights” the core contraction but is simply incorrect and blows up); and turning off the numerical conductivity term arising from upwinding the stress equation in the Riemann problem when the reconstructions do not match. The latter removes the numerical dissipation entirely without destabilizing the problem. The errors also converge away rapidly with resolution.
But even if one avoids this, the method is sensitive to the dissipation and the conductive flux term: e.g. ω S x ⊗ S x / S x \omega S_x\otimes S_x/S_x ω S x ⊗ S x / S x in Eq. (36) or 38. Because our methods do involve some dissipation/diffusion, there is a potential heat-transport term. Since the system is self-gravitating, it has negative heat capacity, and this produces core contraction, which heats the core further, leading to a potential gravothermal runaway. In our implementation, if we use Gaussian bases with the exact-upwind Gaussian fluxes defined in Eq. (36) (F_G), we see that the core radius r 10 r_{10} r 10 contracts while half-mass r 50 r_{50} r 50 expands, and the central density builds up a steeper-than-Hernquist cusp. The evolution is not catastrophic but it is significant at low resolution: at t = 20 ( G M / a 3 ) − 1 / 2 t=20\,(GM/a^3)^{-1/2} t = 20 ( GM / a 3 ) − 1/2 with N = 1000 N=1000 N = 1000 , r 50 r_{50} r 50 increases by ∼ 30 − 40 % \sim30-40\% ∼ 30 − 40% , while r 10 r_{10} r 10 drops nearly in half (so the density profile steepens from ρ ∝ r − 1 \rho\propto r^{-1} ρ ∝ r − 1 to close to r − 1.2 r^{-1.2} r − 1.2 at r ≪ 1 r\ll1 r ≪ 1 ). The system still conserves total energy to ∼ 10 − 3 \sim10^{-3} ∼ 1 0 − 3 accuracy, so this is a heat-transfer effect, not a conservation error. The dominant term driving this is the conductive (third-moment) term of the Gaussian flux: disabling just this term eliminates the effect entirely (the core radius stays flat, kinetic+potential energy and profile do not change). We can make the evolution worse if we enable a much more dissipative method: using e.g. a piecewise-constant method, consistent with what we saw in the harmonic oscillator test, but for our default method it is really dominated by this conductive term. This means that the compact support top-hat solver, whose conductive term is ∼ 2 × \sim2\times ∼ 2 × smaller at its peak and truncates identically to zero for ∣ u x ∣ ≥ c x |u_x|\ge c_x ∣ u x ∣ ≥ c x (§ 3.3.4 ; \omega' vs. ω \omega ω in Eq. (38) for F T H , 1 F_{\mathrm{TH},1} F TH , 1 ), suppresses this quite significantly: the growth in r 50 r_{50} r 50 or contraction in r 10 r_{10} r 10 is secular, shows no sign of accelerating, and over the full t = 25 ( G M / a 3 ) − 1 / 2 t=25\,(GM/a^3)^{-1/2} t = 25 ( GM / a 3 ) − 1/2 with N = 1000 N=1000 N = 1000 r 50 r_{50} r 50 only increases by ∼ 10 − 15 % \sim10-15\% ∼ 10 − 15% and cusp stays r − 1 r^{-1} r − 1 to high precision as shown. Again, removing that conductive term removes even this small residual.
Note that this arises because of the upwinding of the stress fluxes in the Riemann problem (i.e. numerical dissipation) – it does not appear in the “direct” fluxes F \mathbf{F} F in Eq. (33) . One way to cure this strictly, at any resolution, is to remove the conductive term. While not strictly self-consistent, we actually find this is not destabilizing the same way that removing the upwind terms (e.g. the ω ≠ 0 \omega\ne0 ω = 0 and ζ ≠ 1 / 2 \zeta\ne1/2 ζ = 1/2 terms) in the mass or momentum fluxes are, so it might be that unconditional stability simply does not require this additional dissipation and it can be removed without harm. But we are cautious since we have no proof of this (only the empirical result that it does not cause any detectable errors in our other test problems). One might think that identifying basis functions that better represent the actual DF in more detail would help, but this is a minor effect, since as discussed in § 3.3.4 the dissipation is only weakly sensitive to the form of the basis (top-hat and Gaussian already nearly bracket the maximal range of monotone bases) but reflects inconsistency in the spatial reconstruction at the order of the method. So a better solution would be a higher-order reconstruction.
But even at our (second) order, this means the problematic behavior converges away at higher resolution. In practice, we find a modestly sub-linear decrease in the rate of energy transfer with N N N : consistent with our expectation for a second-order method that the rate scales O ( Δ x 2 ) ∼ O ( N − 2 / 3 ) O(\Delta x^2) \sim O(N^{-2/3}) O ( Δ x 2 ) ∼ O ( N − 2/3 ) . Even by just N ∼ 10 4 N \sim10^4 N ∼ 1 0 4 , it is very difficult to measure any effect on the timescale for which we simulate. We stress that this convergence is not in “particle number at a given radius,” as one typically requires for N N N -body codes: the errors scale as Δ x 2 \Delta x^2 Δ x 2 , so increasing resolution helps everywhere. For example, by the common Power et al. 2003 criterion N N N -body density profiles are “converged” interior to the radii enclosing ∼ 2000 \sim2000 ∼ 2000 particles, but our density profiles are similarly converged at r ∼ 0.1 a r \sim0.1a r ∼ 0.1 a even at N = 1000 N = 1000 N = 1000 total, where this radius encloses just 8 total particles.
Comparison to Other Methods
In MC/PIC/NB methods, the numerical dissipation problem above vanishes for truly collisionless systems – this is a genuine advantage of NB methods. But even on a simple problem like this where NB is by far the most popular approach, there are failure modes. For example, the force softening ϵ 0 \epsilon_0 ϵ 0 must be arbitrarily chosen, and there is no single “optimal” ϵ 0 \epsilon_0 ϵ 0 (it is usually taken to be the inter-particle spacing, but for equal-mass particles here that varies as ρ − 1 / 3 ∝ r 4 / 3 \rho^{-1/3} \propto r^{4/3} ρ − 1/3 ∝ r 4/3 in the outer regions). Under-softening leads to artificial collisional gravitational heating which causes a gravothermal collapse through an entirely different mechanism, while over-softening flattens the cusp artificially and corrupts solutions out to much larger r r r while artificially disrupting real bound structures (Ludlow et al. 2019a, 2021; Dehnen 2001; Zhang et al. 2019; Wilkinson et al. 2023).
And as already noted, convergence in the DF at any given r r r in MC/PIC/NB methods is extremely slow: one must simultaneously increase the size of some averaging kernel while also increasing total N N N . Even a very simple characterization of the DF requires measuring the 10 3D first and second moments, i.e. to characterize the mean velocity, dispersion/stress, and anisotropy in each direction – in NB methods, a meaningful measurement of those moments typically requires an ensemble of thousands of particles (as demonstrated explicitly in Figure 20 , where good measurement of even two lowest-order moments requires hundreds of particles; Necib et al. 2019; Zhang et al. 2026). This is related to cusp/core behavior requiring > 2000 > 2000 > 2000 particles for a robust result (Power et al. 2003; Hopkins et al. 2018; Diemand et al. 2004; Ludlow et al. 2019b). But those 10 moments are the same information contained within a single basis function, for a single resolution element, in our method.
Figure 20. Illustration of the convergence in phase-space for the method here (“default”) compared to traditional N N N -body methods on the Hernquist-sphere problem (Figure 17 ). We randomly select a number of resolution elements N e N_{\rm e} N e within a shell at some radius r 0 = ( 0.1 , 1 ) r_0 = (0.1,1) r 0 = ( 0.1 , 1 ) a a a at the final t = 25 t = 25 t = 25 time (results here for total N = 10 4 N = 10^4 N = 1 0 4 , but at a given N e N_{\rm e} N e they are similar for any N N N ), and build the combined v r , θ , ϕ v_{r,\theta,\phi} v r , θ , ϕ velocity–space DF from them, measuring two simple moments: the mean velocity ⟨ v ⟩ \langle v\rangle ⟨ v ⟩ and velocity anisotropy β \beta β (plotting 1 − β 1-\beta 1 − β so deviations are more symmetric). We repeat the selection 100 times and plot the median (lines) and ± 1 σ \pm1\sigma ± 1 σ range (shaded). Convergence of other moments (e.g. σ r , θ , ϕ \sigma_r,\theta,\phi σ r , θ , ϕ individually, skew, etc.) is similar. The correct equilibrium ∣ ⟨ v ⟩ ∣ = β = 0 \lvert\langle v\rangle\rvert= \beta= 0 ∣⟨ v ⟩∣ = β = 0 . In traditional N N N -body methods, the envelope of β \beta β and mean velocities average-down slowly with Poisson statistics, because it is fundamentally a Monte-Carlo method. In our method, a single cell measures the values of the DF moments at a given position more robustly and more accurately, compared to an average over hundreds of N N N -body particles in a traditional N N N -body simulation.
Direct/Eulerian/lattice-Boltzmann Vlasov methods would likely struggle with this problem in two respects: first, at the resolution we consider, it would simply be too expensive to run, and
second, because the dissipation which is the most severe issue in our method should be much larger from large motion across the fixed phase-space grid. Moments or wavefunction methods could approximately capture the “hot start” version so long as it was started from the true equilibrium DF and is effectively static. Their ability to capture the true DF would depend on the closures imposed. But more importantly they would fail catastrophically with the “cold start” setup.
Potential Applications & Variations
We have outlined a very general method designed to represent, in principle, any weakly-collisional flow. Before concluding, we briefly describe potential applications, together with the modifications each would need. Several of these will be the subject of future studies using the implementation in GIZMO, but this is only a partial “motivational” list, and our hope is that the method will prove useful, and be extended and improved, well beyond it.
In general, it is useful to compare the resolution scale Δ x \Delta x Δ x to three characteristic physical scales. First, the inter-particle separation and/or hard-scattering or Debye-like scale Δ x d i s c r e t e \Delta x_{\rm discrete} Δ x discrete : a method like ours, representing a continuous DF, only makes sense if Δ x ≫ Δ x d i s c r e t e \Delta x \gg\Delta x_{\rm discrete} Δ x ≫ Δ x discrete . Second, the collisional/deflection/isotropization mean-free-path Δ x M F P \Delta x_{\rm MFP} Δ x MFP : if this is everywhere small (Δ x ≫ Δ x M F P \Delta x \gg\Delta x_{\rm MFP} Δ x ≫ Δ x MFP , the strongly-collisional limit), our method formally still works but reduces to the underlying fluid scheme (with extra overhead for unused bases), so is not practically useful there. Third, some physics – most notably magnetization of charged particles (Lorentz forces), though strong self-gravitating clumping can behave similarly – introduces a scale Δ x c o l l > Δ x d i s c r e t e \Delta x_{\mathrm{coll}} > \Delta x_{\mathrm{discrete}} Δ x coll > Δ x discrete (e.g. the gyro-scale) where these forces strongly modify the dynamics. If Δ x c o l l ≫ Δ x \Delta x_{\mathrm{coll}} \gg\Delta x Δ x coll ≫ Δ x this can be treated as just another resolved external force; if Δ x c o l l ≪ Δ x \Delta x_{\mathrm{coll}} \ll\Delta x Δ x coll ≪ Δ x (with Δ x d i s c r e t e ≪ Δ x ≪ Δ x M F P \Delta x_{\mathrm{discrete}} \ll\Delta x \ll\Delta x_{\mathrm{MFP}} Δ x discrete ≪ Δ x ≪ Δ x MFP ), it requires the modifications discussed below.
Dark Matter
An obvious application we have already referred to throughout is dark matter (DM) dynamics & cosmology, for which the implementation here requires essentially no modification. Even in the purely collisionless limit there are many advantages over standard N-body methods (§ 4.1 ) in accuracy, smoothness, convergence, and information content. These advantages grow, and the cost-multiplier shrinks, for models with non-trivial dark-sector interactions (self-interacting [SIDM], excited-state, atomic, mirror, light-mediator, baryon-scattering DM): the method can correctly integrate between weakly- and strongly-collisional limits, capture the “effective conductivity” in the strongly-self-interacting limit, resolve tail effects in strongly velocity-dependent SIDM, and represent the thermal state of the DM needed for DM-baryon exchange – none of which N-body can do directly. Models like warm DM, historically challenging for N-body without artificial fragmentation, become trivial.
Stellar Dynamics
Stellar dynamics in the large-N N N limit shares all the same advantages as DM. Minimizing N-body heating and allowing an explicit DF representation is especially valuable for narrow/cold resonant dynamics, where traditional N-body methods converge painfully slowly. Two caveats apply, both minor. First, since our basis functions exchange mass, “micro-particle state labels” that matter dynamically – stellar abundances, ages, masses, e.g. in simulations with feedback/stellar evolution – must either be advected with the mass flux (as gas-phase metals follow gas) or tracked via independent, separately-exchanged basis sets; this is simply bookkeeping. Second, one must respect the small-N N N /hard-N-body limit: at sufficiently high resolution a DF representation of stars breaks down, just as for any application here, but this limit is reached more easily for stars, particularly when (as in some galactic star-formation models) the “micro-particle” represents an unresolved star cluster rather than a single star – there, N-body is the correct dynamics.
Weakly-Collisional Neutral (Atomic/Molecular) Gas Dynamics
Neutral fluid dynamics in the weakly-collisional regime is similar to the dark matter case, and the implementation here can be applied directly. Like for stars, “tags” for different quantities (e.g. abundances, different species) can be included in fluxes, or tracked in a true multi-fluid fashion via different bases. Collisionality can easily be incorporated according to the methods described in § 3.10.4 (indeed neutral collisions are often specifically approximated as hard-sphere scattering in this limit), with a typical σ n n ∼ 10 − 16 − 10 − 15 c m 2 \sigma_{nn} \sim10^{-16} - 10^{-15}\,\mathrm{cm}^{2} σ nn ∼ 1 0 − 16 − 1 0 − 15 cm 2 – so there are interesting weakly-collisional dynamics on a wide range of scales from Δ x d i s c r e t e ∼ 1 c m ( n n / c m − 3 ) − 1 / 3 \Delta x_{\mathrm{discrete}} \sim1\,\mathrm{cm}\,(n_n/\mathrm{cm}^{-3})^{-1/3} Δ x discrete ∼ 1 cm ( n n / cm − 3 ) − 1/3 to Δ x M F P ∼ 10 16 c m ( n n / c m − 3 ) − 1 \Delta x_{\mathrm{MFP}} \sim10^{16}\,\mathrm{cm}\,(n_n/\mathrm{cm}^{-3})^{-1} Δ x MFP ∼ 1 0 16 cm ( n n / cm − 3 ) − 1 .
Particulate Dynamics (Dust, Pebbles, etc.)
The methods here are especially useful for dust and particulate dynamics, weakly-collisional in almost all regimes of astrophysical, terrestrial, and atmospheric interest. Our method captures the key advantages of the two most popular approaches without their compromises: Monte-Carlo/MHD-PIC methods (“dust as particles”) can represent arbitrarily complicated DFs, self-crossing streams, etc., but at the cost of substantial numerical noise, slow convergence, and ill-defined force-softening and collision operators; fluid methods (“dust as advected scalar”) are smooth but are essentially a 1-basis, 1-moment approximation, unable to capture non-linear dust dynamics, instabilities, or grain-grain collisions. Adding physics like dust-dust collisions or velocity-dependent effects (sputtering, condensation, coagulation, bouncing, shattering) only strengthens this advantage.
Background forces from the gas – drag and Lorentz forces – are straightforward external forces. Drag is especially trivial, a simple operator-split damping of the DF: the velocity-independent drag d v p = t s − 1 ( v g a s − v p ) \mathrm{d}\mathbf{v}_p=t_s^{-1}(\mathbf{v}_{\mathrm{gas}}-\mathbf{v}_p) d v p = t s − 1 ( v gas − v p ) appropriate for subsonic Epstein/Stokes/Coulomb drag, one simply has ⟨ v α ⟩ → ψ ⟨ v α ⟩ + ( 1 − ψ ) v g a s \langle v_\alpha\rangle\rightarrow\psi\langle v_\alpha\rangle+(1-\psi)v_{\mathrm{gas}} ⟨ v α ⟩ → ψ ⟨ v α ⟩ + ( 1 − ψ ) v gas , S α → S α ψ 2 S_\alpha\rightarrow S_\alpha\psi^2 S α → S α ψ 2 with ψ = exp ( − Δ t / t s ) \psi=\exp(-\Delta t/t_s) ψ = exp ( − Δ t / t s ) , and our well-defined volume partition makes assigning the equal-and-opposite back-reaction to the gas no different than in any other two-fluid method. Lorentz forces fall into the resolved/unresolved-gyro-radius dichotomy discussed above: resolved (often true, given particulates’ high mass-to-charge ratios) is again a trivial external force; unresolved requires the anisotropy treatment described for ionized plasmas below. The ability to smoothly follow evolution from weakly- to strongly-collisional regimes is uniquely valuable for e.g. planet(esimal) formation via streaming instabilities or pebble-pile collapse/accretion.
Since particulate dynamics often involve a background “gas” (e.g. MHD-PIC), the volume partition offers a choice: our default is “dust/particulate cells” that move with respect to the “gas cells,” but one could instead anchor the partition to the gas mesh exactly. This only changes the face definition and velocity, and has advantages – no separate particulate grid, perfect co-location for drag/back-reaction, and exact gas-following in the perfect-coupling limit t s → 0 t_s \rightarrow0 t s → 0 – at the cost of no longer being Lagrangian with the particulate, so clumping relative to gas (the standard outcome of resonant drag instabilities; Squire & Hopkins 2018) is always under-resolved, as in “dust as fluid” methods.
Multi-Phase/Polydisperse Flows
Many numerical methods have been proposed which track multi-phase and/or polydisperse flows as essentially akin to either weakly-collisional neutral or particulate dynamics. For example, if there are some condensates/precipitates/droplets/bubbles/clouds (ranging from aerosolized sprays through ISM molecular clouds, e.g. Huang et al. 2022; Butsky et al. 2024), these can be represented as a set of “particles” (MHD-PIC-like) or a “weakly collisional fluid scalar set” (tracking their abundance in each gas cell but flowing through cells), subject to some ambient interactions (e.g. drag and mass exchange from hydrodynamic interactions, collisions/coagulation/etc.). Indeed, the EQMOM-like methods we discuss in § 4.4 , which are closely related to the methods developed here, were developed for these cases. Obviously, the method here is just as advantageous for these multiphase flows as it is for weakly-collisional neutral and particulate dynamics.
Radiation Transport & RHD
The methods here cross-apply very directly to radiation transport (RT) and RHD – mostly a simple change of variables, and in some ways simpler in the ultra-relativistic limit. The DF f ( x , v , t ) = f ( x , p , t ) f(\mathbf{x},\mathbf{v},t)=f(\mathbf{x},\mathbf{p},t) f ( x , v , t ) = f ( x , p , t ) maps directly to the intensity I ν ( x , ν , n , t ) = I ν ( x , p , t ) I_\nu(\mathbf{x},\nu,\mathbf{n},t)=I_\nu(\mathbf{x},\mathbf{p},t) I ν ( x , ν , n , t ) = I ν ( x , p , t ) (p = p γ = h ν n / c \mathbf{p}= \mathbf{p}_\gamma=h\nu\mathbf{n}/c p = p γ = h ν n / c ), with a trivial map from our basis functions in v \mathbf{v} v or p \mathbf{p} p to p γ \mathbf{p}_\gamma p γ . The 10 moments defined here for each basis map directly to the radiation energy density e γ e_\gamma e γ , flux F γ \mathbf{F}_\gamma F γ , and all components of the radiation pressure/Eddington tensor P γ \mathsf{P}_\gamma P γ . Because all speeds are c c c , the upwind flux computation actually simplifies (trivial versions of ours with modified w ^ ′ \hat{w}' w ^ ′ , ζ ′ \zeta' ζ ′ , ω ′ \omega' ω ′ ), and coupling to reducedspeed-of-light (RSOL) methods is trivial: these simply augment the evolution equations for all radiation moments (d t X → ( c / c ~ ) d t X \mathrm{d}_t X \to(c/\tilde{c})\mathrm{d}_t X d t X → ( c / c ~ ) d t X ; Gnedin & Abel 2001; Hopkins & Most 2025). All non-hyperbolic source/sink terms in the intensity equation are simply operator-split. This allows construction of truly general RHD methods that avoid the pitfalls of classical moment (flux-limited-diffusion or M1-type) methods – e.g. mishandling the optically-thin, crossing-beam, or anisotropic-scattering/source limits – while keeping their advantages (smooth, hyperbolic evolution equations, trivial RSOL coupling): we are simply evolving the full intensity equation for an arbitrary DF. Two choices lead to interesting variations. For the basis functions:
General/Spectral Bases: Bases with finite width in ∣ p ∣ |\mathbf{p}| ∣ p ∣ and evolved ⟨ ∣ p ∣ ⟩ \langle|\mathbf{p}|\rangle ⟨ ∣ p ∣ ⟩ , as here, represent a smooth continuum spectrum across all frequencies ν \nu ν (integrating a p-basis over n gives the spectrum). One could adapt the bases to a form more natural for radiation, e.g. g ~ α ( p ) → g ~ α ( ∣ p ∣ = h ν / c , p ^ = n ) = B ν ( ν , T α ) ζ ( n , ⟨ n ⟩ α ) \tilde{g}_{\alpha}(\mathbf{p}) \to\tilde{g}_{\alpha}(|\mathbf{p}|=h\nu/c,\hat{\mathbf{p}}=\mathbf{n})=B^{\nu}(\nu,T_{\alpha})\,\zeta(\mathbf{n},\langle\mathbf{n}\rangle_{\alpha}) g ~ α ( p ) → g ~ α ( ∣ p ∣ = h ν / c , p ^ = n ) = B ν ( ν , T α ) ζ ( n , ⟨ n ⟩ α ) – a Planck function (basis “radiation temperature” T α T_{\alpha} T α encoding ⟨ ∣ p ∣ ⟩ \langle|\mathbf{p}|\rangle ⟨ ∣ p ∣ ⟩ ) times an arbitrarily isotropic or beamed angular function. This resembles adaptive-grey-body M1 methods (Levermore 1984; Grudić et al. 2021), but extended with full anisotropic directionality and collisionless behavior.
Narrow or Fixed-Bin Bases: Alternatively, force bins to fixed ∣ p ∣ |\mathbf{p}| ∣ p ∣ (bases δ ( ∣ p ∣ − ∣ p 0 ∣ ) \delta(|\mathbf{p}|-|\mathbf{p}_0|) δ ( ∣ p ∣ − ∣ p 0 ∣ ) ), free only in direction n \mathbf{n} n . This reduces dimensionality and the moments needed, but discards spectral evolution (absorption/re-emission, blue/redshifts); many existing RHD implementations effectively do this via fixed, narrow ν \nu ν bins.
And the choice of volume partition: our default is effectively Lagrangian with the radiation, so for a pure beam the cells move with c c c (or RSOL c ~ \tilde{c} c ~ ).11 This is analogous to on-the-fly Monte-Carlo RT or ray-tracing, but with all our advantages over pure Monte Carlo. Alternatively, anchoring the partition to the gas mesh (as for particulates above) is more analogous to typical moments-RHD implementations: the direct-ray method of Jiang et al. (2014) is the special case with the partition anchored to a fixed Eulerian gas grid and basis functions fixed in both ν \nu ν and n \mathbf{n} n (f ∝ I ν ∝ δ ( ∣ p ∣ − ∣ p 0 ∣ , n − n 0 , i ) f \propto I_{\nu} \propto\delta(|\mathbf{p}|-|\mathbf{p}_0|,\mathbf{n}-\mathbf{n}_{0,i}) f ∝ I ν ∝ δ ( ∣ p ∣ − ∣ p 0 ∣ , n − n 0 , i ) ), i.e. a multi-basis, 1-moment scheme.
Cosmic Rays & Relativistic Particles
Numerically, cosmic ray (CR) transport and fully-coupled CR-MHD dynamics are basically identical to particulates (Bai et al. 2015, 2019; Ji et al. 2022), with a few added terms involving the Lorentz factor γ \gamma γ ; Lorentz forces are always important here, so again there are two regimes. If CR gyro-radii are resolved (Δ x ≲ Δ x c o l l \Delta x \lesssim\Delta x_{\mathrm{coll}} Δ x ≲ Δ x coll ), our method is an improvement on MHD-PIC methods (Bai et al. 2015, 2019; Ji et al. 2022) evolving the entire DF, in the same way it improves N-body or particulate dynamics: Lorentz forces are simply an external force, and CR scattering and streaming instabilities are explicitly resolved. As with dust, this improves dramatically on the smoothness and information content of PIC/Monte-Carlo methods, whose noise can destroy slow-growing instabilities – the original motivation for the implicit MHD-PIC “δ f \delta f δ f ” formalism (Bai et al. 2019), which is unnecessary here since f f f is evolved directly and is trivially smooth (a δ f \delta f δ f -like scheme is still trivial to construct, if desired, as simply a different basis choice). Collisions/annihilation/spallation/decay and other reactions are easily added as operator-split DF operations, and an RSOL is as trivial to add as for RHD above, in the same way one does for MHD-PIC (Ji & Hopkins 2022).
In the limit of unresolved gyro radii, the method is better thought of as an extension of existing CR-MHD fluid moment methods (Hopkins et al. 2022; Hopkins 2023; Thomas & Pfrommer 2019), in which gyro-averaging projects the transport along field lines, so fluxes become truly 1D (along b ^ \hat{\mathbf{b}} b ^ ) and correspondingly simpler (also simpler in the ultra-relativistic limit, as § 6.6). Those prior methods effectively adopt a 1-basis, 2-moment model at each ∣ p ∣ |\mathbf{p}| ∣ p ∣ , discarding the pitch-angle dimension of the gyro-averaged DF (f ~ ( ∣ p ∣ , μ ) → f ~ ( ∣ p ∣ , ⟨ μ ⟩ ) \tilde{f}(|\mathbf{p}|,\mu)\to\tilde{f}(|\mathbf{p}|,\langle\mu\rangle) f ~ ( ∣ p ∣ , μ ) → f ~ ( ∣ p ∣ , ⟨ μ ⟩) ) in favor of an M1-like closure (Hopkins et al. 2022; Thomas & Pfrommer 2022); our method trivially restores the full pitch-angle DF here. In this limit one cannot explicitly resolve collisionless CR scattering off unresolved field-line fluctuations, so some sub-grid scattering/collision operator is still required – not just for the effective transport parameters (diffusion coefficient, streaming speed), but to regulate the DF itself against kinetically-unstable configurations (e.g. antiparallel streams) that a well-posed effective collision operator should isotropize rapidly.
As with RHD, it may help in both regimes to use different basis functions – e.g. gyro/polar coordinates p → ( ∣ p ∣ , p ^ ⋅ b ^ , ϕ ) \mathbf{p}\to(|\mathbf{p}|,\hat{\mathbf{p}}\cdot\hat{\mathbf{b}},\phi) p → ( ∣ p ∣ , p ^ ⋅ b ^ , ϕ ) , or bases binned in ∣ p ∣ |\mathbf{p}| ∣ p ∣ – and there is the same choice of whether to tie the volume partition to the CRs or to the gas decomposition (the default in the gyro-unresolved case above).
Ionized Plasmas
Akin to charged-particulate (§ 6.4 ) and cosmic-ray (§ 6.7 ) dynamics, applying the methods here to ionized weakly-collisional plasmas (cf. neutral fluids, § 6.3 ) depends on whether the gyro radii are resolved or unresolved – immediately raising the question of which gyro radii (electrons or ions), given their large disparity, a classic practical difficulty in PIC-type simulations that our approach does not resolve.
With that caveat, in the resolved/kinetic limit (Δ x ≲ Δ x c o l l ∼ r g y r o \Delta x\lesssim\Delta x_{\mathrm{coll}}\sim r_{\mathrm{gyro}} Δ x ≲ Δ x coll ∼ r gyro ) the methods here are a straightforward extension of PIC, as throughout: removing Monte-Carlo/discreteness noise, evolving the full DF, resolving kinetic instabilities, with no special tricks needed. Collisionless scattering is resolved, Lorentz forces trivial to add, arbitrary collision operators straightforward, and computing/re-projecting smooth E \mathbf{E} E and B \mathbf{B} B fields (often a technical subtlety in PIC) becomes computationally cleaner. Per § 3.9, a 13- rather than 10-moment basis may converge faster here for speed, but since the instabilities regulating the DF shape are resolved in this regime, the 13-moment closure adds no representational power over 10-moment-with-more-bases (only a convergence/cost tradeoff), and the 10-moment form remains robust arbitrarily far from equilibrium while 13-moment relativistically requires care if not near-Maxwellian. So 13-moment methods converge faster and suppress spurious instabilities (e.g. bump-on-tail) closer to equilibrium, while 10-moment-with-more-bases is more robust far from it. And any existing 13-moment code generalizes almost trivially to our method by adding bases (a super-set of N b a s i s N_{\mathrm{basis}} N basis independent 13-moment sets), the only qualitatively new machinery needed being our basis-matching/pairing operation.
The small-gyro-radius but weakly-collisional (gyrokinetic) limit, as for particulates and CRs, is more conceptually challenging. As usual it helps to decompose the DF into p = ∣ p ∣ \mathbf{p}=|\mathbf{p}| p = ∣ p ∣ , pitch angle μ = p ^ ⋅ b ^ \mu=\hat{\mathbf{p}}\cdot\hat{\mathbf{b}} μ = p ^ ⋅ b ^ , and gyro phase ϕ \phi ϕ ; averaging over ϕ \phi ϕ reduces dimensionality, projects fluxes onto b \mathbf{b} b , and reduces the moments needed, at the cost of (1) simple, trivially-incorporated source terms, and (2) requiring a sub-grid model for the unresolved (gyro-scale) collisionless scattering and instabilities that would otherwise regulate the DF – the latter being the genuinely non-trivial part of the problem.
Discussion
We have presented a new numerical method to directly integrate the Vlasov equation in a Lagrangian, finite-element manner, combining ideas from recent meshless multi-fluid hydrodynamic, radiation-transport, and plasma physics schemes. Where standard MC/PIC/NB methods discretize the underlying DF into δ \delta δ -function “super-particles” – forcing the force softening, continuum field estimators (density, electric/magnetic fields, back-reaction, etc.), and any collisional operators to be ad hoc – the present method directly evolves a continuous DF locally represented in each mesh element by a small set of basis-function components. We present an implementation retaining finite-mass mesh elements that couple to standard MC/PIC/NB machinery (tree or fast multipole or particle-mesh methods, fully-adaptive force-softening, domain decomposition) without modification. The result is a method that solves the continuum collisionless Vlasov/Boltzmann equation but inherits and extends upon the favorable cost scalings and flexibility of MC/PIC/NB, with a modest fixed overhead per element for the per-basis Riemann solve and pairing operations, bringing improved smoothness and accuracy and convergence properties.
We have shown that the method is numerically stable and accurate and manifestly conserves mass, momentum, and energy on a number of controlled test problems in 1D and 3D, and have outlined a set of applications in the 3D GIZMO implementation we make public, including but not limited to: cosmology and dark matter; stellar dynamics; weakly-collisional neutral hydrodynamics; particulate/dust/grain/pebble dynamics; multiphase and polydisperse flows; radiation transport/hydrodynamics; cosmic ray transport and magnetohydrodynamics; and ionized plasma particle physics. Compared to traditional MC/PIC/NB methods (§ 4.1 ), the method here has well-defined formal convergence properties; carries full local phase-space information, which allows arbitrarily-complex local phase-space operators (anisotropic, velocity-dependent, or direction-dependent scattering, annihilation/decay/spallation/destruction/collisions) to be applied trivially and consistently; uses a continuum density reconstruction, which makes force-softening a well-defined operation tied to the same volume partition that produces the inter-cell faces; and eliminates spurious discreteness, two-body, and relaxation effects. The cost is a modest, but not prohibitive, increase in per-element complexity, together with some numerical diffusivity that converges with N b a s i s N_{\mathrm{basis}} N basis and the spatial resolution in the usual finite-volume sense. Compared to Eulerian or semi-Lagrangian direct-Vlasov methods (§ 4.2 ), the present approach is many orders of magnitude less expensive at a given effective velocity resolution because the basis functions are Lagrangian in velocity space and adapt to the local flow, rather than being fixed on a global 6D phase-space grid. Compared to “moments”-based methods or Schrödinger-Poisson reformulations (§ 4.4 ), it correctly represents multiple streams, phase-wrappings, and arbitrary DFs by construction. And compared to tessellation or arbitrary methods (§ 4.3 ), the per-step cost does not grow exponentially with the number of phase-wrappings, so the method remains tractable in the late, highly-mixed, multiply-streaming regimes that arise generically in weakly-collisional dynamics.
We discuss and explore a number of subtle aspects of the scheme, including different implementation choices (like choice of volume partition, basis function definitions, reconstruction and slope-limiters, basis-function matching, number of bases, approximate Riemann solvers, etc.). We also discuss how to smoothly and stably make this method fully-continuous into the strongly-collisional regime (requiring only a small modification to the Riemann problem to “add back” the collisional effects between faces), as well as how to add other types of collision operators to the phase-space DF. But many further natural improvements and generalizations remain, particularly to the simple implementation we describe and test here. The piecewise-linear reconstruction in § 3.2 is straightforwardly extended to quadratic or WENO-type reconstructions, which would reduce the diffusivity further at the cost of additional per-pair operations. The basis functions we consider are just a couple of many possibilities; Hermite-type expansions about the bulk velocity, or mixtures of skew-Gaussians, might represent the same information more compactly in some regimes, at the cost of a more complex closure, and for some problems (e.g. radiation or cosmic-ray dynamics) other spectral functions (e.g. Planck functions or piecewise-power-laws in ∣ p ∣ |p| ∣ p ∣ ) may be more natural. The realizability-repair operator of § 3.8.3 preserves ( m , p , T ) (m,\mathbf{p},T) ( m , p , T ) exactly but discards higher moments; a COMOM- or EQOM-style construction (Fox et al. 2008; Marchisio & Fox 2013) which preserves a finer moment hierarchy is straightforward to implement. The single-basis pairing rules of § 3.5 could be replaced by a fractional / soft assignment based on optimal-transport-style weights (Sinkhorn 1964; Cuturi 2013), although we have not yet found a test problem on which this gives a clear improvement. And the fluxes (already supporting an arbitrarily anisotropic DF) could be made to project that anisotropy along special directions, like the magnetic field direction for convenient representation of cases with unresolved gyro-radii. The core of the method is conceptually quite simple, and as such, while we intend to study some specific applications in GIZMO, our hope is that this class of method can be implemented in many different codes with different choices improving beyond the simple examples here.
Acknowledgments
Support for PFH was provided by a Simons Investigator Grant & NSF-AAG grant #2509270. Numerical calculations were run on Frontera (LRAC AST20016) and the resources of the Texas Advanced Computing Center (TACC), including the Vista GPU system (NAIRR Startup NAIRR260139), and on the Caltech Resnick HPC cluster, under allocations ASTS2016 and AST21010. Generative AI (Claude Opus 4.6-4.8, Fable 5, and GPT Codex 5.5) was used in testing and debugging the code implementation in GIZMO and in the writing and editing of this manuscript.