Papers
Topics
Authors
Recent
Search
2000 character limit reached

DM21cm: Inhomogeneous 21-cm Simulation

Updated 8 July 2026
  • DM21cm is a public simulation framework for 21-cm cosmology that integrates 21cmFAST and DarkHistory to model spatially inhomogeneous exotic energy injection.
  • It simulates local variations in dark matter decay, annihilation, and primordial black hole scenarios by accounting for density-dependent energy deposition and photon attenuation.
  • The framework supports extensions to continuous spectra and diverse dark-sector physics, providing field-level 21-cm maps and enhanced power-spectrum predictions.

DM21cm is a public simulation framework for 21-cm cosmology that models the impact of spatially inhomogeneous, time-varying exotic energy injection into the intergalactic medium during cosmic dawn and reionization. It was introduced as a framework that combines 21cmFAST and DarkHistory to account for local density dependence, local ionization and baryon density dependence, and the attenuation of propagating photons, yielding the first completely inhomogeneous treatment of exotic energy injection in the 21-cm power spectrum (Sun et al., 2023). Later work extended the package to arbitrary continuous energy spectra with arbitrary spatial and temporal dependence, so that decays, annihilations, and primordial-black-hole scenarios could be treated within the same public code base (Sun et al., 26 Sep 2025).

1. Scientific background and antecedents

The scientific niche occupied by DM21cm emerged from a broader program in which the redshifted 21-cm signal was used as a probe of non-standard dark-sector physics. In one early example, D-photon mediated interactions between conventional matter and singlet fermions in D-foam were shown to affect baryon cooling, with observations of the hydrogen 21-cm line at redshifts z15z \ge 15 constraining both the interaction strength and the density of D-matter (Ellis et al., 2018). In parallel, analyses of dark-matter decay used the existence of an absorption feature to place conservative, astrophysical-parameter-independent bounds on the decay rate, with limits stronger than CMB bounds in relevant regimes and competitive with indirect detection (Mitridate et al., 2018). Related studies derived $21$-cm lifetime limits for decays to e+ee^+e^-, γγ\gamma\gamma, μ+μ\mu^+\mu^-, and bbˉb\bar b, and also for primordial black holes, by requiring that energy injection not negate the absorption signal (Clark et al., 2018).

A complementary line of work examined annihilation rather than decay. In the Inert Doublet Model, fluctuations in the brightness temperature δT21\delta T_{21} at the dark ages were found to be most sensitive in the dark-matter mass range $70$–$80$ GeV, with derived bounds on σv\langle \sigma v \rangle over $21$0–$21$1 GeV (Basu et al., 2020). These earlier studies established the basic phenomenological principle that extra heating, ionization, excitation, or cooling can leave observable imprints in the 21-cm signal. DM21cm entered this landscape by addressing a specific limitation of many earlier treatments: the assumption that energy injection and deposition could be homogenized without materially affecting the predicted signal morphology (Sun et al., 2023).

2. Core architecture and scope

DM21cm is built by integrating 21cmFAST with DarkHistory. In this arrangement, 21cmFAST supplies the semi-numerical structure-formation calculation, gas fields, and astrophysical source modeling, while DarkHistory computes the deposition of injected energy into heating, ionization, and Ly-$21$2 excitation for arbitrary injected particle spectra (Sun et al., 2023). The framework was designed for cosmic dawn and reionization, with the initial 2023 implementation targeting dark-matter decays to photons and to electron/positron pairs over redshifts $21$3–$21$4 (Sun et al., 2023).

The central physical premise is that dark-matter decay or annihilation is inherently inhomogeneous. The emission rate depends on the local density, and the deposited fraction depends on the local ionization fraction and baryon density; propagating photons also experience attenuation that depends on the intervening medium. DM21cm therefore does not merely rescale homogeneous thermal histories. It evolves three-dimensional fields in which the exotic source term is coupled to the evolving intergalactic medium, producing field-level 21-cm maps and power spectra with explicitly spatial structure (Sun et al., 2023).

This design places DM21cm in a distinct methodological category within 21-cm software. It is not primarily a global-signal code, nor only a Boltzmann-initialized semi-numerical code. Its specialization is the self-consistent propagation of exotic energy injection through a fluctuating medium, with deposition channels evaluated as local functions of the thermodynamic state (Sun et al., 2023).

3. Inhomogeneous injection, transport, and deposition

In the original decay implementation, the local injection rate is written as

$21$5

where $21$6 is the mean dark-matter density, $21$7 is the density contrast, $21$8 is the lifetime, and $21$9 is the dark-matter mass (Sun et al., 2023). For electrons, the deposited effects are encoded באמצעות transfer functions of overdensity, neutral fraction, and timestep,

e+ee^+e^-0

while for photons the framework uses a lightcone construction,

e+ee^+e^-1

so that the local deposition depends on emission history as well as spatial transport (Sun et al., 2023).

The code precomputes transfer functions e+ee^+e^-2 from DarkHistory on a grid of redshift, overdensity, and ionization fraction (Sun et al., 2023). Electrons and sufficiently short-lived particles are treated “on-the-spot,” while photons are separated into three regimes: instantaneously absorbed photons, locally propagating X-rays, and high-energy photons that form a homogenized bath (Sun et al., 2023). The implementation uses redshift subcycling to balance temporal and spatial resolution and employs an efficient GPU/JAX strategy for handling deposition histories and photon baths (Sun et al., 2023).

The 2025 extension generalized the injection layer itself. Instead of assuming only narrow or simple injected spectra, DM21cm now accepts

e+ee^+e^-3

with e+ee^+e^-4 allowed to depend on local properties and e+ee^+e^-5 allowed to be a continuum and time-dependent spectrum (Sun et al., 26 Sep 2025). Deposition is then propagated through transfer functions for outgoing photons and for gas response,

e+ee^+e^-6

This formulation made it possible to model processes whose emissivity is intrinsically structure-aware, such as e+ee^+e^-7-wave annihilation and PBH accretion (Sun et al., 26 Sep 2025).

4. Signal morphology and inference

The principal phenomenological result of DM21cm is that inhomogeneous injection produces field-level and power-spectrum signatures not present in homogenized models. For decays to electrons, which deposit energy nearly “on-the-spot,” the inhomogeneous treatment sharply enhances spatial fluctuations. For decays to photons, the effect is softer because the photon mean free path allows partial spatial averaging, although the local gas state still matters (Sun et al., 2023). These features appear in both simulated 21-cm maps and the frequency-resolved 21-cm power spectrum.

The original forecast study used 21cmfish together with realistic HERA sensitivity, foregrounds, and marginalized astrophysical uncertainties. It found that projected HERA constraints on decays to photons outperform Lyman-e+ee^+e^-8 and CMB bounds for all considered masses and exceed X-ray line search constraints for e+ee^+e^-9, while for decays to electrons the 21-cm constraints surpass Ly-γγ\gamma\gamma0 and CMB limits over all mass ranges and become the leading bounds for sub-GeV dark matter, reaching lifetimes of γγ\gamma\gamma1 (Sun et al., 2023). The forecast statistic was written as

γγ\gamma\gamma2

A common misunderstanding is that the main purpose of the inhomogeneous treatment is simply to tighten exclusion limits. The 2023 analysis states that the improved treatment does not dramatically alter the absolute reach compared to homogenized approaches, with differences at most γγ\gamma\gamma3. Its stronger claim is different: field-level predictions and the small-scale structure of the 21-cm power spectrum are qualitatively different, which matters for signal discrimination, model interpretation, and any future detection claim (Sun et al., 2023).

5. Extension to continuum spectra, annihilation, and primordial black holes

The 2025 upgrade broadened DM21cm from a decay-focused framework to a generic engine for spatially inhomogeneous energy injection with arbitrary spectra and arbitrary spatial and temporal dependence (Sun et al., 26 Sep 2025). Three benchmark applications were emphasized: γγ\gamma\gamma4-wave dark-matter annihilation, Hawking radiation from light primordial black holes, and energetic emission from accreting solar-mass primordial black holes. In all three cases, the morphology of the 21-cm response is jointly set by the time dependence of emission, the spatial dependence of the source, and the local-state dependence of absorption and deposition (Sun et al., 26 Sep 2025).

For γγ\gamma\gamma5-wave annihilation, the luminosity is structure-tracing and velocity-sensitive, so the relevant emissivity peaks later than in γγ\gamma\gamma6-wave scenarios and is well matched to the cosmic-dawn sensitivity of 21-cm measurements (Sun et al., 26 Sep 2025). For Hawking radiation, HERA was projected to set the strongest constraints on PBHs with masses γγ\gamma\gamma7–γγ\gamma\gamma8 g, with abundance down to γγ\gamma\gamma9 (Sun et al., 26 Sep 2025). For PBH accretion, the projected reach depends strongly on the accretion model and environmental assumptions, which motivated the addition of arbitrary continuum spectra and explicit coupling to local halo environments (Sun et al., 26 Sep 2025).

These extensions preserved the code’s original emphasis on feedback. Heating and ionization generated by exotic sources modify later absorption efficiencies, so the source term and the medium cannot be cleanly factorized. This suggests that DM21cm is best understood not as a library of static deposition kernels, but as a feedback-coupled semi-numerical framework for exotic radiative transfer in 21-cm cosmology (Sun et al., 26 Sep 2025).

6. Derived applications, ecosystem, and limitations

DM21cm has also been used as a simulation backend for downstream inference strategies. A 2025 SKA-Low study employed DM21cm-generated three-dimensional μ+μ\mu^+\mu^-0 maps to train convolutional neural networks to distinguish spatially homogeneous from inhomogeneous dark-matter annihilation scenarios. For the μ+μ\mu^+\mu^-1 channel, the inhomogeneous models remained distinguishable from homogeneous scenarios for μ+μ\mu^+\mu^-2 MeV and annihilation cross-sections μ+μ\mu^+\mu^-3, and for μ+μ\mu^+\mu^-4 MeV at μ+μ\mu^+\mu^-5, under moderate SKA-Low noise. For the μ+μ\mu^+\mu^-6 channel, discrimination was weaker because the larger mean free path produces more uniform deposition (Natwariya et al., 11 Aug 2025).

Within the broader 21-cm software ecosystem, DM21cm is complementary to other public tools. 21cmFirstCLASS was designed to start from recombination, evolve the signal through the dark ages, and correct the μ+μ\mu^+\mu^-7 and homogeneous-μ+μ\mu^+\mu^-8-initialization approximations of standard 21cmFAST, reaching sub-percent agreement with CAMB at μ+μ\mu^+\mu^-9 on relevant scales (Flitter et al., 2023, Flitter et al., 2023). Beyond21 is a fully open-source Python package for the global 21-cm signal, UV luminosity functions, ionization history, and the cosmic X-ray background, with a modular example implementation of millicharged dark matter (Katz, 4 Mar 2026). A plausible implication is that DM21cm occupies the subdomain where three-dimensional, inhomogeneous exotic energy deposition is the dominant modeling challenge, whereas 21cmFirstCLASS emphasizes Boltzmann-consistent initial conditions and Beyond21 emphasizes rapid global evolution and source-population flexibility.

The current limitations of DM21cm are explicitly identified in the literature. The transfer-function interpolation grid is limited by GPU memory, producing interpolation errors at the few-percent level; photon propagation below bbˉb\bar b0 eV is not modeled; the code does not yet include DM annihilation in halos or scenarios requiring more subgrid structure; and the astrophysical modeling can be refined further as 21cmFAST and DarkHistory evolve (Sun et al., 2023). Those constraints are methodological rather than conceptual. The framework’s core contribution is the demonstration that a fully inhomogeneous treatment of exotic energy injection is both computationally tractable and scientifically consequential for 21-cm cosmology (Sun et al., 2023).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to DM21cm.