pith. sign in

arxiv: 2606.28197 · v1 · pith:UGJ5WX7Qnew · submitted 2026-06-26 · 🌌 astro-ph.SR · astro-ph.EP· astro-ph.IM

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

classification 🌌 astro-ph.SR astro-ph.EPastro-ph.IM
keywords smoothed particle magnetohydrodynamicsdivergence-free constraintprojection methodadjoint gradientnumerical MHDmagnetized collapsedivergence error
0
0 comments X

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.

The paper introduces a projection method to enforce the divergence-free condition on the magnetic field in smoothed particle magnetohydrodynamics after each MHD update. The method solves an elliptic problem built from the discrete divergence operator, employing the adjoint gradient tied to a volume-weighted metric to ensure the correction minimizes energy and produces a symmetric positive semidefinite system solvable by conjugate gradient. Tests demonstrate that repeated iterations bring the divergence error down to floating-point roundoff in both idealized divergence tests and magnetized collapse simulations. In practical applications, stopping criteria keep errors lower than those from divergence cleaning, at a small fraction of the update cost, while preserving consistent density and plasma beta structures.

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

These are editorial extensions of the paper, not claims the author makes directly.

  • 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

Figures reproduced from arXiv: 2606.28197 by Yusuke Tsukamoto.

Figure 1
Figure 1. Figure 1: Dedner-type projection test on a Cartesian particle lattice with a random displacement of 10 per cent of the grid spacing in each coordinate. The upper panels show the mean-free discrete divergence at the particle positions before and after projection; black contours show the contours of |𝐷𝑩| = 2, 4, 6, 8, 10. The lower panels show the magnetic-field strength and magnetic field lines before and after the c… view at source ↗
Figure 2
Figure 2. Figure 2: Same Dedner-type divergence test as in [PITH_FULL_IMAGE:figures/full_fig_p014_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Residual convergence of the projection calculations for the Dedner-type divergence tests. The figure shows the volume-weighted mean-free residual norm ‖𝑟𝑚‖ = ‖𝑃c𝐷𝑩(𝑚)‖𝑉 as a function of the PCG cycle. The blue and orange curves show the 10 per cent displaced lattice and the random particle distribution, respectively. The upper-right zoomed panel shows the first 50 PCG cycles. For the divergence-cleaning ca… view at source ↗
Figure 4
Figure 4. Figure 4: Time evolution of the dimensionless divergence error in the magnetized collapse calculation. The figure compares the run with divergence cleaning and the run with the projection applied every MHD update (𝑁interval = 1). The plotted quantities are 10-step moving averages of the RMS and top 1% RMS of ℎ|∇ ⋅ 𝑩|∕|𝑩|. For the projection run, solid curves show the values immediately after projection, while dotted… view at source ↗
Figure 5
Figure 5. Figure 5: Dependence of the normalized divergence RMS error on the projection interval. The colored curves show projection runs with 𝑁interval = 1, 10, and 100, while the gray curve shows the divergence-cleaning run. All plotted curves are 10-step moving averages. For the projection runs, dotted and solid curves show the values immediately before and after projection, respectively [PITH_FULL_IMAGE:figures/full_fig_… view at source ↗
Figure 6
Figure 6. Figure 6: Number of PCG iterations required by the projection runs with different projection intervals. All plotted numbers are 10-step moving averages. calculation, the present projection scheme can in principle remove numerical divergence error down to the floating￾point roundoff level [PITH_FULL_IMAGE:figures/full_fig_p017_6.png] view at source ↗
Figure 7
Figure 7. Figure 7: Ratio of the projection wall time to the MHD wall time for different projection intervals. All plotted ratios are 10-step moving averages [PITH_FULL_IMAGE:figures/full_fig_p018_7.png] view at source ↗
Figure 8
Figure 8. Figure 8: Divergence-error convergence test for the magnetized collapse simulation. The calculation was restarted from a snapshot of the 𝑁interval = 1 run at 𝑡 ≃ 4.2 × 104 yr, and only the projection module was iterated until the RMS normalized divergence error reached the roundoff-level target. lower in the divergence-cleaning run. Similar quantitative differences between constrained-transport and divergence￾cleani… view at source ↗
Figure 9
Figure 9. Figure 9: Density and plasma 𝛽 maps in the 𝑥-𝑧 plane of the gravitational collapse calculations at 𝑡 ≃ 4.3 × 104 yr. The rows compare the divergence-cleaning run with projection runs using 𝑁interval = 1, 10, and 100. The columns show density and plasma 𝛽. Y. Tsukamoto: Preprint submitted to Elsevier Page 21 of 20 [PITH_FULL_IMAGE:figures/full_fig_p021_9.png] view at source ↗
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.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 2 minor

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)
  1. [§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.
  2. [§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)
  1. [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.
  2. [§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

2 responses · 0 unresolved

We thank the referee for their careful reading and constructive comments. We address each major comment below.

read point-by-point responses
  1. 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

  2. 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

0 steps flagged

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

0 free parameters · 2 axioms · 0 invented entities

The method rests on domain assumptions about discrete operators in SPMHD and the properties of the adjoint construction; no free parameters or invented entities are identifiable from the abstract.

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.
    Stated as key ingredient enabling the projection properties.
  • domain assumption The same discrete divergence operator used to measure error can be used to construct the elliptic projection problem.
    Core construction step of the method.

pith-pipeline@v0.9.1-grok · 5794 in / 1336 out tokens · 29550 ms · 2026-06-29T02:17:20.078390+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

13 extracted references · 11 canonical work pages · 5 internal anchors

  1. [1]

    doi:10.1086/166684

    C.R.Evans,J.F.Hawley, Simulationofmagnetohydrodynamicflows:Aconstrainedtransportmethod, TheAstrophysicalJournal332(1988) 659–677. doi:10.1086/166684

  2. [2]

    doi:10.1006/jcph.2001.6961

    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. [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. [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

  5. [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

  6. [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

  7. [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...

  8. [8]

    D., Giannios, D., & Mimica, P

    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

  9. [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...

  10. [10]

    Tomida, K

    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

  11. [11]

    doi:10.1006/jcph.2000.6519

    G.Toth, Thedivergenceconstraintinshock-capturingmagnetohydrodynamicscodes, JournalofComputationalPhysics161(2000)605–652. doi:10.1006/jcph.2000.6519

  12. [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. [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 ...