REVIEW 2 major objections 4 minor 1 cited by
Sapphire++: A particle transport code combining a spherical harmonic expansion and the discontinuous Galerkin method
T0 review · 2 major / 4 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read By rewriting the Vlasov–Fokker–Planck equation as a hyperbolic advection-reaction system and solving it with the discontinuous Galerkin method, Sapphire++ reproduces the analytic shock-acceleration spectrum $p^{-4}$ to within 0.15 percent.
desk verdict Solid open-source VFP solver with honest validation; the steady-state DSA benchmark is the strong part, the time-dependent benchmark is weaker but openly acknowledged. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central object is the advection-reaction form of the Vlasov–Fokker–Planck system, $\partial_t f + (\beta\cdot\tilde\nabla)f + R f = 0$, in the reduced phase space $(x,p)$, where the vector $f$ collects the spherical-harmonic expansion coefficients $f_{lms}$ and the symmetric matrices $\beta$ encode spatial advection, momentum advection, gyration, and the elastic-scattering operator $\nu\, l(l+1)/2$. The dG method with tensor-product Lagrange polynomials of degree $k$ on each cell, together with an upwind numerical flux built from the eigenvalues and eigenvectors of $n\cdot\beta$, carries the discretization. The key algorithmic trick is that for faces normal to a spatial axis, $(n\cdot\beta) = U_x\mathbb{1} + V A_x$, so the eigenstructure of $A_x$ alone supplies the flux at all such faces, while momentum-direction faces need a numerical eigensolve.
What would settle it
Run the parallel-shock benchmark with a momentum-dependent scattering frequency (e.g., $\nu(p)\propto p^{-1/2}$) and compare the resulting spectrum and time-dependent rise against an independent Monte Carlo or PIC solution; if the spectrum deviates by more than the stated few-permille level, the validity claim would not survive.
Extended reading notes
Core claim
On its own terms, the paper establishes that the Vlasov–Fokker–Planck equation for test particles in a prescribed plasma flow can be written as a linear hyperbolic advection-reaction system for the spherical-harmonic coefficients, and that this system is efficiently and accurately solvable with the discontinuous Galerkin method. Because the advection matrices are symmetric, the upwind flux at each spatial cell face can be built from a single eigendecomposition of the matrix $A_x$, computed once, rather than from a new eigenproblem at every interface and time step; only faces normal to the momentum direction require a full factorization. The validation that carries the claim is the parallel-shock test: with the expansion truncated at $l_{\max}=1$, a smoothed tanh velocity profile, and continuous downstream outflow, Sapphire++ yields a downstream spectrum whose index differs from the analytic test-particle value $-3r/(r-1)=-4$ by $1.5\times 10^{-3}$, an upstream exponential profile matching the analytic solution, and a time-dependent spectrum that tracks the approximate Drury (1991) formula. The paper also demonstrates expected dG convergence orders in space and time and shows that truncation artifacts (negative phase-space densities from insufficient $l_{\max}$) are controlled when either the expansion order or the scattering rate is high enough.
Load-bearing premise
The code's correctness is shown by comparison with analytic solutions whose assumptions—zero-inflow boundaries and smooth data for the dG convergence theory, an infinitesimally thin shock and momentum-independent diffusion for the shock benchmarks—the simulations only approximate, so the comparisons would be misleading if those idealizations mattered more than expected.
Editorial extensions
If this is right
- Because $l_{\max}$ is not fixed at 1, the code can in principle handle oblique shocks and strongly anisotropic distributions where the diffusion approximation fails.
- Users can switch between explicit and implicit ($\Theta$-method) time stepping, giving control over stability versus wall-clock cost for stiff scattering or long integration times.
- Momentum-dependent scattering frequencies are supported, so realistic cosmic-ray diffusion coefficients can be implemented, at the cost of longer acceleration times.
- The locality of the dG method is expected to make adaptive mesh refinement straightforward in future releases.
- Avoiding particle sampling removes Poisson noise that limits PIC and Monte Carlo approaches at high energies.
Reading between the lines
- If the upwind-flux shortcut extends to higher $l_{\max}$ without loss of stability, the cost per cell in oblique-shock simulations would scale more gently than an $n\times n$ eigendecomposition at each interface; a test at $l_{\max}=3$ or $4$ with a perpendicular shock would show this directly.
- The agreement in the shock test despite the finite-width velocity profile and continuous outflow boundary suggests the code is robust to mild regularization; a sharper benchmark would shrink the shock width toward the analytic discontinuity and verify that the spectral-index error shrinks accordingly.
- The claimed flexibility also points toward applications the paper only mentions in passing: photon and neutrino transport could be tackled with the same code by swapping the scattering operator, and coupling to an MHD module would enable studies of cosmic-ray feedback on the background flow.
- An immediate stress test is momentum-dependent $\nu(p)$: the paper validates against an analytic time-dependent solution that is exact only for momentum-independent diffusion, so agreement with a Monte Carlo reference in that regime remains unshown.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper presents Sapphire++, an open-source C++ code that solves the Vlasov–Fokker–Planck equation in a mixed-coordinate system by expanding the distribution function in real spherical harmonics and discretizing the resulting advection-reaction system with the discontinuous Galerkin method. The authors derive the system of PDEs, describe the dG formulation, the upwind numerical flux, boundary conditions, and time-stepping options (explicit and implicit), and validate the code with four examples: a convergence study against an analytic lmax=1 solution, advection in a constant magnetic field, a closure/angular-resolution study, and diffusive shock acceleration at a parallel shock compared with analytic steady-state and approximate time-dependent solutions. The shock simulation matches the steady-state power law with spectral index error 1.5e-3 and normalization offset 1.2%, and the code is released as open source with reproducible examples.
Significance. If the validation is accepted, Sapphire++ fills a useful niche: it combines a spherical-harmonic expansion with the discontinuous Galerkin method, giving flexible spatial and temporal accuracy for kinetic particle transport in astrophysical plasmas. The paper's strengths are the machine-checked convergence study (ERK4 -> O(dt^4), forward/backward Euler -> O(dt), Crank–Nicolson -> O(dt^2), and spatial order O(dx^(k+1))), the steady-state shock comparison to external analytic solutions with no fitted parameters, and the availability of the code and examples. The steady-state shock test is strong evidence of correctness for the spatial and momentum transport in that regime. However, the time-dependent shock validation is weaker, because the analytic benchmark is only approximate under the simulation's conditions, and the lmax>1 validation is mostly qualitative.
major comments (2)
- [Section 4.4, Eqs. (68)–(72), Fig. 11] The time-dependent validation is not a sharp test of the code's momentum-direction transport. The analytic expression (68)–(70) is exact only for momentum-independent diffusion coefficients satisfying κ1/U1^2 = κ2/U2^2, as the paper itself states. The simulation instead uses ν*=1, so κ(p)=p^2/[3(1+p^2)] varies by about 25% between the injection momentum p0*=2 and the comparison momentum p*=59.9, and κ1/U1^2 differs from κ2/U2^2 by a factor r^2=16. Because the two-cumulant formula is used as an approximation, a close visual match in Fig. 11 could hide errors in the p-direction advection or the p-upwind flux. Please either add a quantitative error metric for this comparison, or better, run a time-dependent test in a regime where the analytic solution is exact (e.g., momentum-independent κ with κ1/U1^2=κ2/U2^2), or demonstrate through a sensitivity study that the conclusion is robust to the violation of those conditions.
- [Section 4.2, Figs. 3–4] The validation of the code's distinguishing feature, the higher-order spherical-harmonic expansion, is only qualitative. The residual plots and the lmax=3 vs lmax=5 comparison show improvement, and the closure example with lmax=11 visually matches the analytic solution, but there is no quantitative error as a function of lmax. Since the central claim includes flexibility in the expansion order, a quantitative lmax-convergence test (e.g., L2 error versus lmax for a known anisotropic solution) would substantially strengthen the paper.
minor comments (4)
- [Section 3.2, Eq. (29)] The text says 'we introduce a novel way to compute the upwind flux at the cell interfaces,' but Eq. (29) is the standard upwind flux. The actual contribution is the reuse of the eigendecomposition of A_x through Eq. (31), which avoids solving an eigenproblem at every interface. Please reword to avoid overclaiming and to present the optimization as the new element.
- [Section 4.4, Fig. 10] The 1.2% normalization offset is attributed to the Gaussian source approximation, but this is presented as speculation. A short quantitative check, such as integrating the source profile over x and p, would make the explanation more convincing.
- [Section 3.4, Eq. (38)] The method is called 'Crank–Nicholson' in one place and 'Crank–Nicolson' elsewhere; the standard spelling is Crank–Nicolson.
- [Section 4.1, Eq. (52)] The CFL condition is quoted as an approximation with '≈'; please state the precise condition used in the code or clarify that it is an empirical stability limit.
Circularity Check
No significant circularity: the code is validated against external analytic and semi-analytic benchmarks, and the self-citations to the companion paper are not load-bearing.
full rationale
The central claim is that Sapphire++ correctly solves the Vlasov-Fokker-Planck equation by combining a spherical harmonic expansion with the discontinuous Galerkin method. The validation chain is not circular. In the convergence study, numerical results are compared with the exact solution of the reduced lmax=1 system (eqs. 43-49); this is a self-contained manufactured-solution test rather than a fit to the code's output. The advection-in-constant-field test checks return to the initial condition after a gyroperiod, a physically known property independent of the code. The closure test compares against the method-of-characteristics solution (eq. 57). The diffusive shock acceleration test compares the steady-state spectrum and spatial profile to the Drury (1983) analytic solutions (eqs. 65-67), and the time evolution to the Drury (1991) / Toptyghin approximate expression (eqs. 68-72). All simulation parameters (U1, r, nu, Q, p0) are physical inputs; none are inferred from the numerical results. The paper explicitly flags validation limitations, e.g. Section 4.4 states that the time-dependent analytic expression is exact only for momentum-independent diffusion satisfying kappa1/U1^2 = kappa2/U2^2 and that the setup 'does not match exactly the equations used to derive the analytical solution.' These are honest correctness and benchmark-fidelity concerns, not circular reasoning. The only self-citations are to the companion paper [2] for the operator-based derivation of the PDE system and for matrix eigenvalue properties; that derivation is independently published, explicitly stated, and not parameterized by the present numerical results. Therefore the self-citation is minor and not load-bearing. Score 2 reflects that minor self-citation while confirming that the central validation is self-contained against external benchmarks.
Assumptions & free parameters
assumptions (6)
- domain assumption The Vlasov-Fokker-Planck equation in mixed coordinates, truncated to first order in U/c and then dropping the U.V'/c^2 time-derivative term, is the correct model.
- domain assumption Test-particle limit: the background velocity U and magnetic field B' are prescribed and there is no feedback from energetic particles to the plasma.
- domain assumption Collisions are elastic, isotropic scattering in the local fluid frame with rate nu(p), modeled by (nu/2) Delta_{theta',phi'}.
- domain assumption Ideal MHD applies, so E' = -U' x B' = 0 in the local frame.
- domain assumption The spherical harmonic truncation is made after computing the matrix elements, requiring matrices built for L = lmax+1 and then reduced.
- domain assumption The dG convergence and uniqueness results of Di Pietro and Ern (2012) apply to the SH-VFP system and to the boundary conditions used in the tests.
Cite this review
Pith. "Pith review of Sapphire++: A particle transport code combining a spherical harmonic expansion and the discontinuous Galerkin method." pith.science (2026). https://pith.science/paper/VXFJZW7U
@misc{pith2026250105110,
author = {Pith},
title = {Pith review of: Sapphire++: A particle transport code combining a spherical harmonic expansion and the discontinuous Galerkin method},
year = {2026},
howpublished = {\url{https://pith.science/paper/VXFJZW7U}},
note = {Machine review of arXiv:2501.05110}
}
read the original abstract
We present Sapphire++, an open-source code designed to numerically solve the Vlasov-Fokker-Planck equation for astrophysical applications. Sapphire++ employs a numerical algorithm based on a spherical harmonic expansion of the distribution function, expressing the Vlasov-Fokker-Planck equation as a system of partial differential equations governing the evolution of the expansion coefficients. The code utilises the discontinuous Galerkin method in conjunction with implicit and explicit time stepping methods to compute these coefficients, providing significant flexibility in its choice of spatial and temporal accuracy. We showcase the code's validity using examples. In particular, we simulate the acceleration of test particles at a parallel shock and compare the results to analytical predictions. The Sapphire++ code (https://github.com/sapphirepp/sapphirepp) is available as a free and open-source tool for the community.
Figures
Figures from the paper (9 more)
Forward citations
Cited by 1 Pith paper
-
Ultra-High-Energy Particle Production in Binary Mergers Endowed with Magnetic Fields
Using a magnetized Kerr spacetime, the authors compute that binary merger remnants can yield proton collision energies up to 10^20 eV, proposing them as UHECR sources.
Reference graph
Works this paper leans on
-
[2]
N. W. Schween, B. Reville, Using spherical harmonics to solve the Boltzmann equation: an operator based approach, MNRAS doi:10. 1093/mnras/stae596
-
[1]
A. Achterberg, C. A. Norman, Relativistic theory of particles in a scattering flow - i. basic equations, di ffusion, and drift, MNRAS 479 (2) (2018) 1747–1770. doi:10.1093/mnras/sty1449
-
[3]
B. Reville, A. R. Bell, Universal behaviour of shock precursors in the presence e fficient cosmic ray acceleration, MNRAS 430 (4) (2013) 2873–2884. doi:10.1093/mnras/stt100. URL http://dx.doi.org/10.1093/mnras/stt100
-
[4]
A. R. Bell, K. M. Schure, B. Reville, Cosmic ray acceleration at oblique shocks, MNRAS 418 (2) (2011) 1208–1216. arXiv: https://academic.oup.com/mnras/article-pdf/418/2/1208/3710802/mnras0418-1208.pdf , doi:10.1111/j.1365-2966. 2011.19571.x. URL https://doi.org/10.1111/j.1365-2966.2011.19571.x
-
[5]
V . L. Ginzburg, S. I. Syrovatskii, The Origin of Cosmic Rays, Pergamon Press Ltd., 1964
work page 1964
-
[6]
E. N. Parker, The passage of energetic charged particles through interplanetary space, P&SS 13 (1) (1965) 9–49. doi:10.1016/ 0032-0633(65)90131-5
work page 1965
-
[7]
J. Skilling, Cosmic ray streaming–i effect of alfv´en waves on particles, MNRAS 172 (3) (1975) 557–566.doi:10.1093/mnras/172.3.557. URL http://dx.doi.org/10.1093/mnras/172.3.557
-
[8]
G. M. Webb, The di ffusion approximation and transport theory for cosmic rays in relativistic flows, The Astrophysical Journal 340 (1989)
work page 1989
Show all 40 references
-
[9]
J. G. Kirk, R. Schlickeiser, P. Schneider, Cosmic-Ray Transport in Accelerating Flows, Astrophysical Journal 328 (1988) 269. doi:10. 1086/166290. 28
1988
-
[10]
A. R. Bell, A. P. L. Robinson, M. Sherlock, R. J. Kingham, W. Rozmus., Fast electron transport in laser-produced plasmas and the kalos code for solution of the vlasov–fokker–planck equation, Plasma Physics and Controlled Fusion 48 (3) (2006) R37. doi:10.1088/0741-3335/ 48/3/R0...
2006 doi
-
[11]
R. J. Kingham, A. R. Bell, An implicit Vlasov-Fokker-Planck code to model non-local electron transport in 2-D with magnetic fields, Journal of Computational Physics 194 (1) (2004) 1–34. doi:10.1016/j.jcp.2003.08.017
2004 doi
-
[12]
Tzoufras, A
M. Tzoufras, A. Bell, P. Norreys, F. Tsung, A vlasov–fokker–planck code for high energy density physics, Journal of Computational Physics 230 (17) (2011) 6475–6494. doi:10.1016/j.jcp.2011.04.034. URL http://dx.doi.org/10.1016/j.jcp.2011.04.034
2011 doi
-
[13]
S. T. Zhang, X. M. Li, D. J. Liu, X. X. Li, R. J. Cheng, S. Y . Lv, Z. M. Huang, B. Qiao, Z. J. Liu, L. H. Cao, C. Y . Zheng, X. T. He, Vlasov- Fokker-Planck-Maxwell simulations for plasmas in inertial confinement fusion, Computer Physics Communications 294 (2024) 108932. doi:...
2024
-
[14]
A. R. Bell, M. Sherlock, The fastVFP code for solution of the Vlasov–Fokker–Planck equation, Plasma Physics and Controlled Fusion 66 (3) (2024) 035014. doi:10.1088/1361-6587/ad2278
2024 doi
-
[15]
Hakim, J
A. Hakim, J. Juno, Alias-free, matrix-free, and quadrature-free discontinuous galerkin algorithms for (plasma) kinetic equations, in: SC20: International Conference for High Performance Computing, Networking, Storage and Analysis, 2020, pp. 1–15. doi:10.1109/SC41405. 2020.00077
2020
-
[16]
Arndt, W
D. Arndt, W. Bangerth, D. Davydov, T. Heister, L. Heltai, M. Kronbichler, M. Maier, J.-P. Pelteret, B. Turcksin, D. Wells, The deal.II finite element library: Design, features, and insights, Computers & Mathematics with Applications 81 (2021) 407–422. doi:10.1016/j.camwa. 2020...
2021 arXiv
-
[17]
Arndt, W
D. Arndt, W. Bangerth, M. Bergbauer, M. Feder, M. Fehling, J. Heinz, T. Heister, L. Heltai, M. Kronbichler, M. Maier, P. Munch, J.-P. Pelteret, B. Turcksin, D. Wells, S. Zampini, The deal.II library, version 9.5, Journal of Numerical Mathematics 31 (3) (2023) 231–246. doi:10.1...
2023 doi
-
[18]
C. H. Choi, J. Ivanic, M. S. Gordon, K. Ruedenberg, Rapid and stable determination of rotation matrices between spherical harmonics by direct recursion, The Journal of Chemical Physics 111 (19) (1999) 8825–8831. doi:10.1063/1.480229. URL http://dx.doi.org/10.1063/1.480229
1999 doi
-
[19]
D. A. Di Pietro, A. Ern, Mathematical Aspects of Discontinuous Galerkin Methods, V ol. 69 of Math ´ematiques et Applications, Springer- Verlag, Berlin Heidelberg, 2012. doi:10.1007/978-3-642-22980-0 . URL https://hal.archives-ouvertes.fr/hal-01820185
2012 doi
-
[20]
R. J. LeVeque, Finite V olume Methods for Hyperbolic Problems, Cambridge University Press, 2002. doi:10.1017/cbo9780511791253
2002 doi
-
[21]
Shu, High order weighted essentially nonoscillatory schemes for convection dominated problems, SIAM Review 51 (1) (2009) 82–126
C.-W. Shu, High order weighted essentially nonoscillatory schemes for convection dominated problems, SIAM Review 51 (1) (2009) 82–126. doi:10.1137/070679065. URL http://dx.doi.org/10.1137/070679065
2009 doi
-
[22]
Munch, K
P. Munch, K. Kormann, M. Kronbichler, hyper.deal: An e fficient, matrix-free finite-element library for high-dimensional partial di fferential equations. URL https://github.com/hyperdeal/hyperdeal
-
[23]
Milton, I
A. Milton, I. A. Stegun, Handbook of Mathematical Functions with Formulas Graphs and Mathematical Tables, 10th Edition, U.S. Dept. of Commerce National Bureau of Standards, 1964
1964
-
[24]
J. S. Hesthaven, T. Warburton, Nodal Discontinuous Galerkin Methods, 1st Edition, V ol. 54 of Texts in Applied Mathematics, Springer-Verlag, New York, 2008. doi:10.1007/978-0-387-72067-8
2008 doi
-
[25]
Hairer, G
E. Hairer, G. Wanner, S. P. Nørsett, Solving Ordinary Di fferential Equations I, 2nd Edition, V ol. 8 of Springer Series in Computational Mathematics, Springer-Verlag Berlin, Heidelberg, 1993. doi:10.1007/978-3-540-78862-1
1993 doi
-
[26]
Cockburn, An introduction to the Discontinuous Galerkin method for convection-dominated problems, Springer, Berlin, Heidelberg, 1998, pp
B. Cockburn, An introduction to the Discontinuous Galerkin method for convection-dominated problems, Springer, Berlin, Heidelberg, 1998, pp. 150–268. doi:10.1007/BFb0096353
1998 doi
-
[27]
L. O. Drury, An introduction to the theory of di ffusive shock acceleration of energetic particles in tenuous plasmas, Reports on Progress in Physics 46 (8) (1983) 973–1027. doi:10.1088/0034-4885/46/8/002
1983 doi
-
[28]
L. O. Drury, Time-dependent di ffusive acceleration of test particles at shocks, Monthly Notices of the Royal Astronomical Society 251 (2) (1991) 340–350. doi:10.1093/mnras/251.2.340. URL http://dx.doi.org/10.1093/mnras/251.2.340
1991 doi
-
[29]
I. N. Toptyghin, Acceleration of particles by shocks in a cosmic plasma, Space Science Reviews 26 (2) (1980) 157–213. doi:10.1007/ bf00167370. URL http://dx.doi.org/10.1007/bf00167370
1980 doi
-
[30]
M. A. Forman, L. O. Drury, Time-dependent shock acceleration: Approximations and exact solutions, in: Proceedings from the 18th Interna- tional Cosmic Ray Conference, V ol. 2, 1983, pp. 267–270
1983
-
[31]
L. O. Drury, W. I. Axford, D. Summers, Particle acceleration in modified shocks, MNRAS 198 (1982) 833–841. doi:10.1093/mnras/ 198.3.833
1982 doi
-
[32]
Achterberg, K
A. Achterberg, K. M. Schure, A more accurate numerical scheme for di ffusive shock acceleration, MNRAS 411 (4) (2011) 2628–2636. arXiv:1103.3049, doi:10.1111/j.1365-2966.2010.17868.x
2011 arXiv
-
[33]
C. K. Birdsall, A. B. Langdon, Plasma Physics via Computer Simulation, Taylor & Francis, 1991
1991
-
[34]
Blandford, D
R. Blandford, D. Eichler, Particle acceleration at astrophysical shocks: A theory of cosmic ray origin, Phys. Rep. 154 (1) (1987) 1–75. doi:10.1016/0370-1573(87)90134-7
1987 doi
-
[35]
F. C. Jones, D. C. Ellison, The plasma physics of shock acceleration, Space Science Reviews 58 (1) (1991) 259–346. doi:10.1007/ BF01206003. 29
1991
-
[36]
J. G. Kirk, Particle acceleration, in: A. O. Benz, T. J.-L. Courvoisier (Eds.), Plasma Astrophysics, 1st Edition, V ol. 24 of Saas-Fee Advanced Course, Springer-Verlag, Berlin, Heidelberg, 1994, Ch. 3, pp. 225–314. doi:10.1007/3-540-31627-2_3
1994 doi
-
[37]
Takamoto, J
M. Takamoto, J. G. Kirk, Rapid Cosmic-ray Acceleration at Perpendicular Shocks in Supernova Remnants, ApJ 809 (1) (2015) 29. arXiv: 1506.04354, doi:10.1088/0004-637X/809/1/29
2015 arXiv
-
[38]
A. R. Bell, K. M. Schure, B. Reville, G. Giacinti, Cosmic-ray acceleration and escape from supernova remnants, MNRAS 431 (1) (2013) 415–429. arXiv:1301.7264, doi:10.1093/mnras/stt179
2013 arXiv
-
[39]
Thomas, M
A. Thomas, M. Tzoufras, A. Robinson, R. Kingham, C. Ridgers, M. Sherlock, A. Bell, A review of vlasov–fokker–planck numerical modeling of inertial confinement fusion plasma, Journal of Computational Physics 231 (3) (2012) 1051–1079. doi:10.1016/j.jcp.2011.09.028. URL http://dx...
2012 doi
- [1112]
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.