An Adjoint Projection Formulation for Enforcing the โ โ ๐ = 0 \nabla\cdot\mathbf{B}=0 Constraint in Smoothed Particle Magnetohydrodynamics
Yusuke Tsukamoto ยท 2026
Read An Adjoint Projection Formulation for Enforcing the โ โ ๐ = 0 \nabla\cdot\mathbf{B}=0 Constraint in Smoothed Particle Magnetohydrodynamics by Yusuke Tsukamoto (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2606-28197.txt.
Introduction
Yusuke Tsukamoto, writing alone, tackles a numerical headache in smoothed particle magnetohydrodynamics, a method that simulates magnetized fluids as moving particles. Simulations must keep the magnetic field free of divergence, a quantity that physics requires to be exactly zero but that computer errors keep making nonzero.
Tsukamoto corrects the field after each update by solving a projection problem built from the very operator that measures the error. Choosing the adjoint gradient, matched to a volume-weighted measure, makes the correction shrink magnetic energy rather than add to it, and yields a system solvable by a standard iterative method. In collapse calculations the projection pushed the normalized error far below a rival cleaning method, while costing only a small share of the update time.
Catalog record
| CREATOR | Yusuke Tsukamoto |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 53 KB |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2606.28197
Browse the full library ยท About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
An Adjoint Projection Formulation for Enforcing the โ โ
๐ = 0 \nabla\cdot\mathbf{B}=0 Constraint in Smoothed Particle Magnetohydrodynamics Yusuke Tsukamoto Abstract We present a projection method for controlling numerical โ โ
๐ฉ \nabla\cdot\bm{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 1 โ 10 % 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\bm{B} errors in SPMHD and related particle or meshless MHD schemes. keywords magnetohydrodynamics (MHD) ,numerical methods ,smoothed particle hydrodynamics ,divergence cleaning ,projection methods โ โ corresponding: Corresponding author 1 Introduction The solenoidal constraint on the magnetic field, \nabla\cdot\bm{B}=0, (1) is a central numerical issue in magnetohydrodynamics (MHD). In mesh-based MHD codes, constrained transport (CT) has been the most promising and widely used approach because it preserves the discrete divergence through the topological pairing of face-centered magnetic fluxes and edge-centered electromotive forces [ 2 ] . In meshless methods, however, this CT construction is not straightforward to apply because particles do not define clear control-volume boundaries or a natural faceโedge topology on which magnetic fluxes and electromotive forces can be evolved. Divergence cleaning, which evolves a cell- or particle-centered auxiliary scalar field through hyperbolic propagation and parabolic damping of divergence errors [ 1 ] , is therefore the mainstream approach in smoothed particle magnetohydrodynamics (SPMHD) and closely related meshless MHD schemes. Modern SPMHD commonly uses constrained hyperbolic/parabolic cleaning [ 6 , 7 , 11 , 12 , 8 ] , and Godunov-type SPMHD (GSPMHD) also uses Dedner-type hyperbolic divergence cleaning [ 4 , 5 ] . Dedner-type cleaning, however, contains two parameters with physical dimensions: the propagation speed of the auxiliary cleaning field and the damping length scale, or equivalently the damping timescale associated with that length. These parameters determine how rapidly divergence errors are transported and damped. In simulations with a large dynamical range, the appropriate values can depend on position and on the evolutionary stage of the system. The original Dedner formulation assumes these parameters to be spatially and temporally constant; if they are varied without a consistent treatment, their variation can instead become a source term for \nabla\cdot\bm{B} . The choice of cleaning speed and damping timescale can affect astrophysical MHD calculations, as recently pointed out by 9 . Projection methods instead solve an elliptic problem after a time update and map the magnetic field back to a discrete divergence-free subspace. Such projection ideas are well established in grid-based MHD divergence control [ 10 , e.g.] . In SPMHD, 6 tested a projection approach based on a gravity-like direct O(N^{2}) summation discretization for the scalar correction. They found that the method was reasonably effective for divergence errors with wavelengths larger than the smoothing length, but was less effective for short-wavelength, \sim h , noise because the SPH operator used to estimate \nabla\cdot\bm{B} smooths such noise. This behavior may be attributed to a discretization-level inconsistency between the divergence operator used to measure the error and the gravity-like operator used to compute the scalar correction. To our knowledge, however, an SPMHD projection formulation that keeps divergence and gradient operators mutually consistent by constructing the gradient correction as the adjoint of the chosen discrete \nabla\cdot\bm{B} operator has not yet been examined. This gap motivates the projection method developed in this paper. This paper is organized as follows. Section 2 presents the formulation and discretization of the projection method: Section 2.1 formulates the residual projection problem, Section 2.2 introduces the SPH divergence operator and its volume-metric adjoint gradient, Section 2.3 summarizes the mathematical properties of the projection, and Section 2.4 describes the numerical implementation and pseudocode. Section 3 presents numerical tests, and Section 4 summarizes the results and discusses their implications. 2 Formulation and Discretization 2.1 Projection as Residual Reduction 2.1.1 Unprojected magnetic field Let \bm{B}(\bm{x},t) denote the continuum magnetic field, and let \bm{B}_{i}^{n} be its value carried by particle i at time t_{n} . To distinguish a continuum field from the finite-dimensional particle vector, we write the stacked particle field as \bm{B}_{[N_{\rm p}]}^{n}=(\bm{B}_{1}^{n},\bm{B}_{2}^{n},\ldots,\bm{B}_{N_{\rm p}}^{n})^{T}\in\mathbb{R}^{3N_{\rm p}}. (2) The bracketed subscript [N_{\rm p}] labels the number of particles in the stacked vector and is not a particle index. We first apply an arbitrary induction update before projection and define the resulting unprojected particle vector as \bm{B}_{[N_{\rm p}]}^{*}=T_{B}^{n}\bm{B}_{[N_{\rm p}]}^{n}. (3) Here T_{B}^{n} denotes the induction operator used by the underlying SPMHD code. It may correspond to the induction update of standard SPMHD [ 6 , 7 ] or Godunov-type SPMHD [ 4 , 5 ] , with or without additional dissipative terms. The projection method described below does not require specifying T_{B}^{n} , except through the unprojected particle values in \bm{B}_{[N_{\rm p}]}^{*} . Let D be the discrete SPH divergence operator selected for the solenoidal constraint. For a fixed particle distribution and fixed SPH derivative coefficients during one projection step, D is a linear map D:\mathbb{R}^{3N_{\rm p}}\rightarrow\mathbb{R}^{N_{\rm p}} from the stacked particle vector field to the particle scalar field. Its explicit SPH form is given below. The unprojected divergence residual is the N_{\rm p} -dimensional vector r\in\mathbb{R}^{N_{\rm p}} defined by r=D\bm{B}_{[N_{\rm p}]}^{*},\qquad r_{i}=(D\bm{B}_{[N_{\rm p}]}^{*})_{i}. (4) Equations involving D , \mathcal{G} , \pi , and r below are written in this stacked-vector notation unless otherwise stated. The goal of the projection is to reduce this residual to zero, or to the tolerance of the elliptic solver. 2.1.2 Residual correction and the roles of \mathcal{G} and \pi We seek the corrected field in the form \bm{B}_{[N_{\rm p}]}^{n+1}=\bm{B}_{[N_{\rm p}]}^{*}-\mathcal{G}\pi. (5) Here \pi is the scalar Lagrange-multiplier field associated with the constraint D\bm{B}_{[N_{\rm p}]}=0 . The stacked vector \mathcal{G}\pi\in\mathbb{R}^{3N_{\rm p}} is the projection correction generated from this scalar multiplier. The operator \mathcal{G}:\mathbb{R}^{N_{\rm p}}\rightarrow\mathbb{R}^{3N_{\rm p}} will be defined as the adjoint gradient associated with the selected divergence operator D . It should not be replaced by an arbitrary SPH gradient. The constraint is D\bm{B}_{[N_{\rm p}]}^{n+1}=0. (6) Substituting equation ( 5 ) gives D(\bm{B}_{[N_{\rm p}]}^{*}-\mathcal{G}\pi)=0, (7) or D\mathcal{G}\pi=D\bm{B}_{[N_{\rm p}]}^{*}=r. (8) Thus the projection step is the solution of the residual equation L\pi=r,\qquad L\equiv D\mathcal{G}. (9) In practice, an iterative method constructs \bm{B}_{[N_{\rm p}]}^{(m)}=\bm{B}_{[N_{\rm p}]}^{*}-\mathcal{G}\pi^{(m)} (10) and reduces D\bm{B}_{[N_{\rm p}]}^{(m)} until it is sufficiently small. 2.1.3