Recompute the warm cutoff, the fuzzy cutoff and the soliton
Sandbox Physics ·
Three fitting formulas used throughout this course can be checked on a laptop in a few seconds. Against a saved CLASS calculation, the Viel warm dark matter fit puts the half-mode 4 to 12 per cent too low in wavenumber. A direct growth calculation puts the fuzzy dark matter half-power point 11 to 17 per cent below the Hu fit. Against an exact ground state, the Schive soliton fit stays within 6 per cent inside three core radii. This chapter gives the files, the commands, the outputs and the ways each check can fail.
The cosmology is the Planck 2018 combination TT,TE,EE+lowE+lensing+BAO, last column of Table 2 in Planck Collaboration 2020, arXiv:1807.06209v4: h=0.6766, ωb=0.02242, ωc=0.11933, As=2.105×10−9, ns=0.9665, τ=0.0561. Neutrinos are massless, a stated simplification. The grid has 141 wavenumbers spaced evenly in logarithm from 0.05 to 300hMpc−1. Units are hMpc−1 for k and (h−1Mpc)3 for P. The warm runs give all the dark matter to a thermal relic of 2, 3 or 6.5 keV, with its temperature tuned so that its density equals the cold value.
The versions used for the saved outputs were Python 3.9.6, NumPy 2.0.2 and SciPy 1.13.1. We have run the scripts with these versions only. Check that you have the same grid first. Its SHA-256 digest begins with 04e1c5d5 and ends with 3bd48e.
The flag that follows python3 runs each script in isolated mode, so a stray file in the current folder cannot be imported in place of NumPy. Regenerating the grid itself needs the classy wrapper for CLASS.
The Viel fit gives the amplitude ratio T(k)=[1+(αk)2ν]−5/ν with ν=1.12 and α from the particle mass. Viel et al. 2005, equations 6 and 7 The half-mode has a closed form, khm=(2ν/5−1)1/(2ν)/α. From CLASS we take the stored ratio T=PWDM/PCDM and find where it first drops below 1/2, interpolating linearly in logk and logT between grid points. The half-mode mass then follows from
Table 5.1 Warm half-mode wavenumber and mass, Viel fit against CLASS, same cosmology.
Particle mass
Fit khm
CLASS khm
Fit over CLASS
Fit Mhm
CLASS Mhm
2 keV
20.61
21.51
0.958
1.88×109
1.66×109
3 keV
32.33
34.58
0.935
4.88×108
3.99×108
6.5 keV
76.26
86.22
0.884
3.72×107
2.57×107
Wavenumbers are in hMpc−1 and masses in solar masses. Because the mass goes as khm−3, a 12 per cent shift in wavenumber becomes a 45 per cent shift in mass at 6.5 keV. The gap grows with particle mass, and the CLASS calculation always cuts at smaller scales than the fit. Viel and collaborators chose ν=1.12 as the best fit to Boltzmann-code output for k<5hMpc−1. These half-modes lie at 20 to 86, outside that range, so per cent agreement was never promised.
A second comparison is with a number someone else published. Nadler and collaborators write Mhm=5×108M⊙(mWDM/3keV)−10/3. Nadler et al. 2021, equation 5 Their simulations use h=0.7 and Ωm=0.286. Putting that cosmology and a warm density of 0.24 into the Viel fit gives 4.81×108M⊙ at 3 keV, 4 per cent below their value. The warm density of 0.24 is our own assumption for their setup.
Check two: the fuzzy cutoff against a direct growth calculation
Hu, Barkana and Gruzinov fitted the fuzzy amplitude ratio as T=cosx3/(1+x8) with x=1.61m221/18k/kJ,eq and kJ,eq=9m221/2Mpc−1, and stated that the power falls to one half near k1/2≈4.5m224/9Mpc−1. Hu, Barkana and Gruzinov 2000, equations 8 and 9 Here m22 is the particle mass in units of 10−22eV, and these wavenumbers are in Mpc−1 without the factor h.
The independent check integrates the linear growth of one wave. In the fluid form of the wave equation the particle's wavelength acts as a pressure. With δ the density contrast and lna as time,
Ωcl(a) is the fraction of the critical density in matter that clusters at that time. The script lets only dark matter cluster before recombination at a=1/1100 and all matter afterwards, on a background of radiation, matter and a cosmological constant. Each wave starts at horizon entry with δ=1 and dδ/dlna=1, and the same wave is run again without the quantum term. The ratio of the two final values is the amplitude ratio, and the script finds where its square crosses 1/2.
Table 5.2 Fuzzy half-power wavenumber, in Mpc−1.
m22
Growth equation
Hu fit, solved exactly
Hu equation 9
Growth over fit
1
3.80
4.58
4.5
0.830
4
7.25
8.49
8.33
0.854
20
15.48
17.36
17.04
0.892
The growth equation cuts power at 11 to 17 per cent smaller wavenumber than the fit. This calculation is a simplified model: it has no baryon pressure, no photon coupling and a sharp switch at recombination. So the table says the fit and this model differ by that much. It does not say which is closer to a full Boltzmann code for fuzzy dark matter. The next section shows that the result also depends on the starting slope, which is part of why.
Check three: the soliton as an exact ground state
The core of a fuzzy halo is the lowest-energy, self-gravitating state of the wave. In units where ℏ/m=1 and G=1 it satisfies
ψ′′+r2ψ′=2uψ,u′′+r2u′=4πψ2,
where ρ=ψ2 and u is the gravitational potential minus the energy. The script fixes ψ(0)=1 and adjusts u(0) by bisection until ψ falls to zero without crossing it. The equations keep their form under r→r/λ, ρ→λ4ρ, so ρ0rc4 is the same number for every ground state, with rc the radius where the density falls to half.
Schive and collaborators fitted their simulated cores with ρ0=1.9(m/10−23eV)−2(rc/kpc)−4M⊙pc−3 and the shape [1+0.091(r/rc)2]−8. Schive et al. 2014, PRL, equation 3 Converted to these units, their prefactor is 0.2223.
Table 5.3 The exact ground state against the Schive fit and the numbers stated beside it.
Quantity
Exact ground state
Schive 2014
ρ0rc4 in code units
0.2268
0.2223
Largest shape error inside 3rc
5.9 per cent
accurate to 2 per cent
Mass inside 3rc over total
0.957
about 95 per cent
Half-mass radius over rc
1.465
about 1.45
Mass inside rc over total
0.236
about 25 per cent
Both tolerances, 10−7 and 10−10, give the same numbers to six figures. A shape that halves exactly at rc needs the coefficient 21/8−1=0.0905, so 0.091 is that value rounded, and the central part matches well. The error grows outward: 0.4 per cent at rc, 4.0 per cent at 2rc, and the largest, 5.9 per cent, at 2.7rc. The Letter's sentence about 2 per cent does not say what the fit was compared with. Our 5.9 per cent is against the exact ground state, and we have not tested the fit against their simulated cores.
The mass inside the core radius times that radius is fixed by the same scaling. For m=10−23eV the exact state gives Mcrc=5.41×109M⊙kpc. Integrating the Schive formula from 0 to rc gives 5.30×109, 2 per cent lower, about the same as the gap in the prefactor.
The same script checks the isothermal sphere used in the self-interacting model. Its numerical solution agrees with the series x2/6−x4/120+x6/1890 to 2.4×10−8 for x≤0.4. Far out, the density times x2/2 should approach one, and it reads 1.016, 1.049 and 0.997 at x=200, 600 and 2000. That slow, swinging approach is expected for the isothermal sphere. The density halves at x=2.2746.
How each check can fail
Every one of these failures is saved in linear-output.json, so you can confirm you reproduce it.
The fuzzy fit changes sign. The factor cosx3 turns negative above x=(π/2)1/3, which is k=6.50Mpc−1 at m22=1. The fit is a cutoff shape, and only T2 should be used beyond that point. Code that takes logT there will stop with an error.
A fixed-step integrator blows up. At k=30Mpc−1 and m22=1 the quantum term is huge at early times, and the equation becomes stiff. An adaptive solver returns an amplitude ratio of 3.69×10−4. A fourth-order Runge–Kutta solver with 40 fixed steps returns −1.86×1026. A result that large or negative means the step is too long, not that the physics changed.
The starting condition matters. With the default start, the half-power point at m22=1 is 3.80Mpc−1. Starting with zero initial slope gives 3.22. Starting ten times earlier in scale factor gives 3.31. A 15 per cent spread from the start alone is one more reason not to call Table 5.2 a precision result.
The warm fit fails deep in the tail. At the first grid point where CLASS has fallen to T≈0.017, the Viel fit is already at 0.0027 for 2 keV, 0.0019 for 3 keV and 0.0011 for 6.5 keV, six to seventeen times lower. Even while T is above 0.25, the fit is off by up to 16, 23 and 31 per cent for the three masses. Read CLASS directly when the tail matters.
A checklist for your own run
Confirm the grid digest before you start.
Run the three scripts and compare your output files with the saved ones. Agreement to four significant figures is the target.
Change one input at a time. Try a 4 keV particle in the generator or m22=2 in the growth benchmark, and predict the direction of the change before running it.
Rerun with a tighter tolerance and report the number of digits that did not move.
Write down what each comparison does not test. A fit can agree with a calculation that shares its simplifications.
Lab tasks
Predict. Set the halo Lab to warm dark matter at 3 keV and read the half-mode mass. Is it the fit value or the CLASS value from Table 5.1?
Change one condition. Move the fuzzy particle mass from m22=1 to m22=4 and read the soliton core radius. At fixed halo mass it should shrink by a factor of 4, because rc∝m−1.
Explain. Using Table 5.3, explain why the Lab can draw the soliton with the Schive formula without visibly misplacing the core.
Exercises
Show from the closed form that the warm half-mode wavenumber scales as mWDM1.11 at fixed cosmology, and that the half-mode mass scales as mWDM−3.33.
Using Table 5.2, fit a power law to the growth-equation half-power points. Does it keep the exponent 4/9 of Hu equation 9?
The 40-step solver fails at k=30Mpc−1. Estimate the early-time value of the quantum term relative to the gravity term, and explain why a fixed step in lna is too long there.
AnswersShow the answer
α∝m−1.11 and khm∝1/α, so khm∝m1.11. The mass goes as khm−3, giving m−3.33, the exponent −10/3 that Nadler and collaborators use.
From m22=1 to 20 the half-power point grows by 15.48/3.80=4.07. The exponent is ln4.07/ln20≃0.47, close to 4/9≃0.44, so the scaling holds roughly while the prefactor differs.
The quantum term goes as k4/(a4H2). During radiation domination H∝a−2, so a2H is constant, about 0.65kms−1Mpc−1 here, and so is the term, while the gravity term is tiny. Its square root, ℏk2/(2ma2H)≃13, is the oscillation rate in lna. The wave enters the horizon near lna≃−16.4, so the 40 grid points leave 39 steps of about 0.42 each, and rate times step is about 5.6. Classical fourth-order Runge–Kutta is stable for oscillations only below about 2.8, so the solution grows without bound.