An Adjoint Projection Formulation for Enforcing the divergence-free Constraint in Smoothed Particle Magnetohydrodynamics
Pith reviewed 2026-06-29 02:17 UTC · model grok-4.3
The pith
A projection method using an adjoint gradient with volume-weighted metric enforces the divergence-free constraint in smoothed particle magnetohydrodynamics.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The projection method corrects the magnetic field after an MHD update by solving an elliptic projection problem constructed from the same discrete divergence operator used to measure the error. A key ingredient is to use the adjoint gradient associated with a volume-weighted metric. With this choice, the projection gives an energy-minimizing correction, does not increase the discrete magnetic energy, and leads to a symmetric positive semidefinite linear system that can be solved by the conjugate-gradient method without explicitly assembling the matrix. With sufficiently many iterations, the projection reduces the divergence error to the floating-point roundoff level in both test problems. In
What carries the argument
Adjoint gradient associated with a volume-weighted metric, which constructs the elliptic projection problem to produce an energy-minimizing correction.
If this is right
- With sufficient iterations the projection reduces divergence error to floating-point roundoff in test problems.
- Practical stopping criteria suppress normalized divergence error below divergence-cleaning levels at 1-10 percent of the SPMHD update cost.
- Density and plasma-beta structures remain consistent when the projection interval is varied.
- The method provides a robust alternative to divergence cleaning for SPMHD and related particle or meshless MHD schemes.
Where Pith is reading between the lines
- The same volume-weighted adjoint construction could be tested on other constrained fields such as velocity divergence in incompressible flow solvers.
- Because the added cost is low, the method may allow particle MHD runs to maintain higher magnetic fidelity over longer evolutionary times than cleaning permits.
- If the energy-minimizing property generalizes to non-uniform particle distributions, similar projections might reduce errors in other meshless astrophysical codes.
Load-bearing premise
The assumption that the adjoint gradient associated with a volume-weighted metric produces an energy-minimizing correction that does not increase the discrete magnetic energy and yields a symmetric positive semidefinite linear system.
What would settle it
A run in which the projection step increases the discrete magnetic energy or the resulting linear system is not positive semidefinite would show the mechanism does not hold.
Figures
read the original abstract
We present a projection method for controlling numerical \(\nabla\cdot\B\) errors in smoothed particle magnetohydrodynamics (SPMHD). The method corrects the magnetic field after an MHD update by solving an elliptic projection problem constructed from the same discrete divergence operator used to measure the error. A key ingredient is to use the adjoint gradient associated with a volume-weighted metric. With this choice, the projection gives an energy-minimizing correction, does not increase the discrete magnetic energy, and leads to a symmetric positive semidefinite linear system that can be solved by the conjugate-gradient method without explicitly assembling the matrix. We test the method using two-dimensional Dedner-type divergence tests and three-dimensional magnetized collapse calculations. With sufficiently many iterations, the projection reduces the divergence error to the floating-point roundoff level in both test problems. In realistic collapse runs, practical stopping criteria designed to reduce the divergence error generated by the underlying SPMHD update suppress the normalized divergence error well below that obtained in the divergence-cleaning run, with a projection cost of only about \(1\)--\(10\%\) of the SPMHD update cost. The density and plasma-\(\beta\) structures remain consistent when the projection interval is varied, whereas the divergence-cleaning run shows quantitative differences. These results indicate that the projection method is a robust and attractive alternative to divergence cleaning for controlling \(\nabla\cdot\B\) errors in SPMHD and related particle or meshless MHD schemes.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The manuscript presents an adjoint projection method to enforce the divergence-free constraint in smoothed particle magnetohydrodynamics (SPMHD). The projection is constructed from the existing discrete divergence operator using the adjoint gradient with a volume-weighted metric; this choice is asserted to yield an energy-minimizing correction that does not increase discrete magnetic energy and produces a symmetric positive-semidefinite linear system solvable by conjugate gradient without matrix assembly. Tests on two-dimensional Dedner-type problems and three-dimensional magnetized collapse calculations show that sufficient iterations reduce the divergence error to floating-point roundoff, while practical stopping criteria in collapse runs suppress normalized divergence error below that of a divergence-cleaning comparison at 1--10% of the SPMHD update cost, with consistent density and plasma-beta structures.
Significance. If the adjoint property and energy non-increase hold exactly in the discrete setting, the method provides a principled, low-cost alternative to divergence cleaning for controlling numerical ∇·B errors in SPMHD and related meshless schemes. The reported ability to reach roundoff-level errors and maintain structural consistency across projection intervals would represent a practical advance for astrophysical particle MHD simulations.
major comments (2)
- [§3] §3 (formulation): The central claim that the volume-weighted metric makes the discrete gradient and divergence operators exactly adjoint (hence guaranteeing an energy-minimizing correction, non-increasing magnetic energy, and a symmetric PSD operator) is load-bearing. With variable particle volumes and smoothing lengths, the kernel sums must be shown to satisfy the discrete adjoint relation exactly; an explicit verification or counter-example check under the paper's discretization is required.
- [§5.3] §5.3 (collapse tests): The practical stopping criteria used to achieve the reported suppression of normalized divergence error below the cleaning run are not specified (e.g., tolerance on the residual or maximum iterations). Without these details the comparative performance claim cannot be reproduced or assessed for robustness.
minor comments (2)
- [Abstract] Abstract and §5: The phrase 'floating-point roundoff level' should be quantified (e.g., typical |div B| / |B| values achieved) to allow direct comparison with other methods.
- [§3] Notation: The definition of the volume-weighted inner product and the precise form of the adjoint gradient operator should be stated once in a single equation block for clarity.
Simulated Author's Rebuttal
We thank the referee for their careful reading and constructive comments. We address each major comment below.
read point-by-point responses
-
Referee: §3 (formulation): The central claim that the volume-weighted metric makes the discrete gradient and divergence operators exactly adjoint (hence guaranteeing an energy-minimizing correction, non-increasing magnetic energy, and a symmetric PSD operator) is load-bearing. With variable particle volumes and smoothing lengths, the kernel sums must be shown to satisfy the discrete adjoint relation exactly; an explicit verification or counter-example check under the paper's discretization is required.
Authors: We agree that an explicit verification of the adjoint relation strengthens the central claim. In the revised manuscript we will add a direct check (numerical or algebraic) confirming that the volume-weighted inner product yields <∇φ, B> = <φ, ∇·B> exactly for the kernel sums and variable volumes/smoothing lengths used in our SPMHD discretization. This will substantiate the symmetry, positive-semidefiniteness, and energy-nonincrease properties without relying solely on the continuous analogy. revision: yes
-
Referee: §5.3 (collapse tests): The practical stopping criteria used to achieve the reported suppression of normalized divergence error below the cleaning run are not specified (e.g., tolerance on the residual or maximum iterations). Without these details the comparative performance claim cannot be reproduced or assessed for robustness.
Authors: We acknowledge the omission. The revised manuscript will specify the exact stopping criteria applied in the collapse runs (residual tolerance and iteration limits) together with the rationale for their selection, allowing readers to reproduce the reported error suppression and cost figures. revision: yes
Circularity Check
No significant circularity; projection constructed from discrete operators with adjoint property by design
full rationale
The paper defines the projection from the existing discrete divergence operator and selects the volume-weighted metric specifically to enforce the adjoint relation between gradient and divergence. This choice directly yields symmetry, positive-semidefiniteness, and the energy-minimizing property as a mathematical consequence of the inner-product definition, which is the intended construction rather than a reduction to inputs. Results are validated by direct comparison to an independent divergence-cleaning method on the same test problems, with no load-bearing self-citations or fitted parameters renamed as predictions. The derivation chain is self-contained against external benchmarks.
Axiom & Free-Parameter Ledger
axioms (2)
- domain assumption The adjoint gradient associated with a volume-weighted metric produces an energy-minimizing correction that does not increase discrete magnetic energy and yields a symmetric positive semidefinite system.
- domain assumption The same discrete divergence operator used to measure error can be used to construct the elliptic projection problem.
Reference graph
Works this paper leans on
-
[1]
C.R.Evans,J.F.Hawley, Simulationofmagnetohydrodynamicflows:Aconstrainedtransportmethod, TheAstrophysicalJournal332(1988) 659–677. doi:10.1086/166684
-
[2]
A.Dedner,F.Kemm,D.Kröner,C.-D.Munz,T.Schnitzer,M.Wesenberg, HyperbolicDivergenceCleaningfortheMHDEquations, Journal of Computational Physics 175 (2002) 645–673. doi:10.1006/jcph.2001.6961
-
[3]
D. J. Price, J. J. Monaghan, Smoothed Particle Magnetohydrodynamics - III. Multidimensional tests and the∇⋅𝐁= 0con- straint, Monthly Notices of the Royal Astronomical Society 364 (2005) 384–406. doi:10.1111/j.1365-2966.2005.09576.x. arXiv:arXiv:astro-ph/0509083
-
[4]
D. J. Price, Smoothed particle hydrodynamics and magnetohydrodynamics, Journal of Computational Physics 231 (2012) 759–794. doi:10.1016/j.jcp.2010.12.011.arXiv:1012.1885
work page internal anchor Pith review Pith/arXiv arXiv doi:10.1016/j.jcp.2010.12.011.arxiv:1012.1885 2012
-
[5]
Constrained Hyperbolic Divergence Cleaning for Smoothed Particle Magnetohydrodynamics
T.S.Tricco,D.J.Price, Constrainedhyperbolicdivergencecleaningforsmoothedparticlemagnetohydrodynamics, JournalofComputational Physics 231 (2012) 7214–7236. doi:10.1016/j.jcp.2012.06.039.arXiv:1206.6159
work page internal anchor Pith review Pith/arXiv arXiv doi:10.1016/j.jcp.2012.06.039.arxiv:1206.6159 2012
-
[6]
T. S. Tricco, D. J. Price, M. R. Bate, Constrained hyperbolic divergence cleaning in smoothed particle magnetohydrodynamics with variable cleaning speeds, Journal of Computational Physics (2016). doi:10.1016/j.jcp.2016.06.053.arXiv:1607.02394
work page internal anchor Pith review Pith/arXiv arXiv doi:10.1016/j.jcp.2016.06.053.arxiv:1607.02394 2016
-
[7]
Phantom: A smoothed particle hydrodynamics and magnetohydrodynamics code for astrophysics
D.J.Price,J.Wurster,T.S.Tricco,C.Nixon,S.Toupin,A.Pettitt,C.Chan,D.Mentiplay,G.Laibe,S.Glover,C.Dobbs,R.Nealon,D.Liptai, H.Worpel,C.Bonnerot,G.Dipierro,G.Ballabio,E.Ragusa,C.Federrath,R.Iaconi,T.Reichardt,D.Forgan,M.Hutchison,T.Constantino, B. Ayliffe, K. Hirsh, G. Lodato, Phantom: A Smoothed Particle Hydrodynamics and Magnetohydrodynamics Code for Astrop...
work page internal anchor Pith review Pith/arXiv arXiv doi:10.1017/pasa.2018.25.arxiv:1702.03930 2018
-
[8]
K.Iwasaki,S.Inutsuka, SmoothedparticlemagnetohydrodynamicswithaRiemannsolverandthemethodofcharacteristics, MonthlyNotices of the Royal Astronomical Society 418 (2011) 1668–1688. doi:10.1111/j.1365-2966.2011.19588.x.arXiv:1106.3389
work page doi:10.1111/j.1365-2966.2011.19588.x.arxiv:1106.3389 2011
-
[9]
Iwasaki, S
K. Iwasaki, S. Inutsuka, Hyperbolic Divergence Cleaning Method for Godunov Smoothed Particle Magnetohydrodynamics, in: N. V. Pogorelov,E.Audit,G.P.Zank(Eds.),NumericalModelingofSpacePlasmaFlows(ASTRONUM2012),volume474ofAstronomicalSociety of the Pacific Conference Series, 2013, p. 239. Y. Tsukamoto:Preprint submitted to ElsevierPage 19 of 20 Adjoint Proje...
2013
-
[10]
K. Tomida, K. E. Sadanari, S. Takasao, K. Iwasaki, Systematic Comparison between Constrained Transport and Mixed Divergence Cleaning Methods for Astrophysical Magnetohydrodynamic Simulations, arXiv e-prints (2026) arXiv:2605.07928.arXiv:2605.07928
Pith/arXiv arXiv 2026
-
[11]
G.Toth, Thedivergenceconstraintinshock-capturingmagnetohydrodynamicscodes, JournalofComputationalPhysics161(2000)605–652. doi:10.1006/jcph.2000.6519
-
[12]
doi:10.1093/pasj/psad040.arXiv:2303.10419
Y.Tsukamoto,M.N.Machida,S.-i.Inutsuka, Co-evolutionofdustgrainsandprotoplanetarydisks, PublicationsoftheAstronomicalSociety of Japan 75 (2023) 835–852. doi:10.1093/pasj/psad040.arXiv:2303.10419
-
[13]
P. F. Hopkins, M. J. Raives, Accurate, meshless methods for magnetohydrodynamics, Monthly Notices of the Royal Astronomical Society 455 (2016) 51–88. doi:10.1093/mnras/stv2180.arXiv:1505.02783. Y. Tsukamoto:Preprint submitted to ElsevierPage 20 of 20 Adjoint Projection for SPMHD density plasma𝛽 cleaning 𝑁interval = 1 𝑁interval = 10 𝑁interval = 100 Figure ...
work page internal anchor Pith review Pith/arXiv arXiv doi:10.1093/mnras/stv2180.arxiv:1505.02783 2016
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.