Table of Contents
Fetching ...

$\nabla\cdot{B}=0$ versus the Universe

Ulrich P. Steinwandel, Daniel J. Price

TL;DR

The paper addresses the challenge of maintaining $\nabla\cdot\mathbf{B}=0$ in cosmological MHD simulations by implementing the constrained divergence-cleaning method of Tricco et al. into the OpenGadget3 code. It combines energy-conserving, comoving discretization with a variable cleaning speed and demonstrates substantial reductions in divergence errors, while revealing enhanced magnetic-field amplification in cluster outskirts and smoother field geometries. The authors validate the approach against standard MHD tests and apply it to a massive galaxy cluster, comparing to a Powell 8-wave scheme to show improved physical fidelity. The work provides a practical, efficient tool for more reliable cosmological MHD simulations and highlights the importance of divergence control for accurately modeling magnetic-field amplification in low-density regions.

Abstract

We implement the constrained divergence cleaning algorithm of \citet{Tricco2016} into the cosmological smoothed particle magnetohydrodynamics (SPMHD) code OpenGadget3. Our implementation modifies the governing equations of SPMHD to allow the constrained hyperbolic/parabolic cleaning scheme to be applied consistently in an expanding cosmological framework. This ensures that divergence errors in the magnetic field are actively propagated away and damped, rather than merely being advected with the flow or partially controlled by source terms. To validate our implementation, we perform a series of standard test problems, including the advection of divergence errors, the Orszag-Tang vortex, the Brio-Wu shock tube, and magnetised Zeldovich pancakes. These tests confirm that our scheme successfully reduces divergence errors while preserving the correct physical evolution of the system. We then apply the method to a fully cosmological simulation of a massive galaxy cluster, comparing the results to those obtained using the previously employed Powell eight-wave divergence preserving scheme. We find that the overall density structure of the cluster is largely unaffected by the choice of divergence cleaning method, and the magnetic field geometry and strengths in the cluster core remain similar. However, in the cluster outskirts ($r \approx$~1-3~$h^{-1}$~Mpc), the magnetic field is amplified by a factor of $\sim$ 5 compared to the Powell-only approach. Moreover, the constrained divergence cleaning algorithm reduces the divergence error by 2-3 orders of magnitude throughout the cluster volume, demonstrating its effectiveness in maintaining the solenoidal condition of the magnetic field in large-scale cosmological simulations. Our results suggest that accurate divergence control is essential for modeling magnetic field amplification in low-density regions of galaxy clusters.

$\nabla\cdot{B}=0$ versus the Universe

TL;DR

The paper addresses the challenge of maintaining in cosmological MHD simulations by implementing the constrained divergence-cleaning method of Tricco et al. into the OpenGadget3 code. It combines energy-conserving, comoving discretization with a variable cleaning speed and demonstrates substantial reductions in divergence errors, while revealing enhanced magnetic-field amplification in cluster outskirts and smoother field geometries. The authors validate the approach against standard MHD tests and apply it to a massive galaxy cluster, comparing to a Powell 8-wave scheme to show improved physical fidelity. The work provides a practical, efficient tool for more reliable cosmological MHD simulations and highlights the importance of divergence control for accurately modeling magnetic-field amplification in low-density regions.

Abstract

We implement the constrained divergence cleaning algorithm of \citet{Tricco2016} into the cosmological smoothed particle magnetohydrodynamics (SPMHD) code OpenGadget3. Our implementation modifies the governing equations of SPMHD to allow the constrained hyperbolic/parabolic cleaning scheme to be applied consistently in an expanding cosmological framework. This ensures that divergence errors in the magnetic field are actively propagated away and damped, rather than merely being advected with the flow or partially controlled by source terms. To validate our implementation, we perform a series of standard test problems, including the advection of divergence errors, the Orszag-Tang vortex, the Brio-Wu shock tube, and magnetised Zeldovich pancakes. These tests confirm that our scheme successfully reduces divergence errors while preserving the correct physical evolution of the system. We then apply the method to a fully cosmological simulation of a massive galaxy cluster, comparing the results to those obtained using the previously employed Powell eight-wave divergence preserving scheme. We find that the overall density structure of the cluster is largely unaffected by the choice of divergence cleaning method, and the magnetic field geometry and strengths in the cluster core remain similar. However, in the cluster outskirts (~1-3~~Mpc), the magnetic field is amplified by a factor of 5 compared to the Powell-only approach. Moreover, the constrained divergence cleaning algorithm reduces the divergence error by 2-3 orders of magnitude throughout the cluster volume, demonstrating its effectiveness in maintaining the solenoidal condition of the magnetic field in large-scale cosmological simulations. Our results suggest that accurate divergence control is essential for modeling magnetic field amplification in low-density regions of galaxy clusters.

Paper Structure

This paper contains 15 sections, 17 equations, 13 figures.

Figures (13)

  • Figure 1: Top row: Column density projections for our cluster for three of our runs, nifty-noclean (left), nifty-clean (centre) and nifty-clean2 (right). The central density in the run nifty-noclean is higher than in the runs nifty-clean and nifty-clean2. Bottom row: Internal energy of the different clusters, the thermal structure is remains very similar in the three runs.
  • Figure 2: Top row: Magnetic field strength for the simulations nifty-noclean (left), nifty-clean (centre) and nifty-clean2 (right). The magnetic field strength in the runs with active cleaning is more spread out than in the run without cleaning. We will discuss the reason for this in more detail in Sec. \ref{['sec:discussion']}. Bottom row: Normalized divergence within the cluster for the three models. We finds divergence errors reduced by up to three orders of magnitude in the central regions of the cluster in the nifty-clean and nifty-clean2 calculations.
  • Figure 3: Mean divergence error as a function of scale factor for the magnetized nifty cluster. The solid lines represent the mean over the whole volume, while the dashed lines show the field mean over the particles that possess a field that is higher than the initial (physical) seed field of $10^{-8}$G. The black lines show the results without cleaning, the red lines with the new fiducial cleaning approach, and the golden lines a cleaning approach that adopts faster cleaning than the fastest wave speed by a factor of two.
  • Figure 4: Radial profiles of the magnetic field (left), the relative divergence error (center) and the entropy (left) for the magnetized version of the nifty cluster in runs without cleaning (black), the new fiducial constrained cleaning scheme (red) as well as in a simulation with $2\times$ faster cleaning than the fastest wave speed.
  • Figure 5: Radial entropy profiles of our simulated clusters. The entropy profile is quite sensitive to the adopted cleaning method, which is important to point out. The entropy core in the cluster can actually be stabilized with higher cleaning speed, when we convert the energy stored in the cleaning field into heat, i.e. following eq. 21 of Tricco2016. If we exclude this term the entropy core settles at a lower value. Removing the advection term from the cleaning scheme has a rather little impact on the entropy profile.
  • ...and 8 more figures