1 Introduction

Within the standard cold dark matter cosmology (\(\Lambda \)CDM), free electrons and protons cool sufficiently after \(3\times 10^{5}\) years of big-bang to form neutral hydrogen atoms. At the end of recombination (\(z \approx 1100\)), matter decouples from the cosmic microwave background (CMB) photons and the temperature reaches around 3000 K. After that, the dark age begins and the Universe becomes homogeneous. Later during the cosmic dawn era (\(15< z < 35\)), over density grow in the matter perturbations and collapse to form the first star and galaxy in the Universe. During the dark ages, residual electrons from the recombination scatter off the baryons to maintain the thermal equilibrium until \(z\approx 200\). Subsequently, gas cools adiabatically due to the thermal expansion of the Universe and the gas temperature reaches to \(\approx 6.8\) K at \(z=17\).

During the cosmic dawn era, the gas temperature is lower than the CMB temperature hence hyperfine transitions in the neutral hydrogen atoms produce 21 cm absorption spectra. The hyperfine transitions are due to the CMB photons, gas collisions and the Ly-\(\alpha \) radiations from the first star. 21 cm absorption line leaves an imprint of spectral distortion in the low-frequency tail of the CMB spectrum. The observation of the 21 cm line can give logical reason behind the density fluctuations [2], cosmic reionization [3] and X-ray heating of the Inter-Galactic Medium (IGM) [4]. Recently, “Experiment to Detect the Global Epoch of Reionization Signature” (EDGES) collaboration reported the first detection of such absorption signal centered at 78 MHz [5]. The observed absorption dip at \(z \approx 17\) is approximately 2.5 times larger than the standard \(\Lambda \)CDM model prediction [5]. Several attempts have been made in the literature to explain the observed EDGES anomaly.

There are two ways to explain this enhanced 21 cm absorption signal: one is to the heating of CMB photons and another way is to cool the gas in IGM below the standard \(\Lambda \)CDM prediction. The first possibility has been investigated by authors of the Refs. [6,7,8,9]. In the second scenario, IGM gas can be cooled by emitting the photons between the Ly-limit to Ly-\(\gamma \) wavelengths [10, 11]. There are very few mechanisms to cool the gas. Since the dark-matter is colder than the gas, effective cooling of the gas can be obtained by elastic scattering between the dark-matter and baryon particles [12,13,14]. Therefore, a non-standard Coulomb interaction between dark-matter and baryon: \(\sigma = \hat{\sigma } v^{-4}\) can be considered to explain the EDGES signal, where v is the relative velocity between the dark matter and baryon [5, 12, 14, 15]. In these cases, dark-matter considered as millicharge-dark-matter [5, 13]. Using this mechanism 21 cm absorption signal can be explained [5, 12,13,14]. In these scenarios, cooling of the gas, by transferring energy to the dark-matter, is tightly constrained because of constraints on the dark-matter mass and cross-section by cosmological and astrophysical observations [12, 13, 16, 17].

It is observed that the magnetic fields (MFs) are present on all length-scales (i.e. at the length-scales of galaxies and the clusters). These MFs have a strength of the order of few \(\mu \)G in the intergalactic medium [18, 19]. The strength of these MFs is constrained from the structure formation, big bang nucleosynthesis (BBN), temperature anisotropies and polarization of CMB [20,21,22]. Further, individual limits of the order of \(\lesssim \) nG on primordial magnetic fields (PMFs) for various cases has been reported by Planck 2015 results [23]. From the data of Fermi and High Energy Stereoscopic System (HESS) gamma-ray telescopes, the peak strength of the magnetic field at a length scale of 1 Mpc can be the order of few nG [19]. However, the upper bound on the amplitude of the magnetic field, obtained from BBN is \(\sim 10^{-6}\) G at a comoving length scale of \(\sim 100\) pc [24, 25]. If strong MFs were present at the time of nucleosynthesis, the abundance of relic \(^4\)He and other light elements could have different values than we observe today [26, 27]. To satisfy the current observational limits on the light element abundances, the strength of these MFs can have a value of the order of \(\approx 10^{-7}\) G, at present time [22, 28].

In the presence of PMFs, decaying magneto-hydro- dynamics effects can heat the IGM gas [22, 29, 30]. Hence, the thermal evolution of the gas can modify and it can erase the 21 cm absorption signal [1]. Therefore, magnetic heating of the IGM gas can be constrained by the EDGES signal. Energy deposition into the IGM can be done by ambipolar diffusion. To dissipate the energy into IGM gas, for small-scales, can be done by producing decaying magneto-hydrodynamics turbulence [22, 31]. Heating due to the turbulent-decay starts after recombination when radiative viscosity decreases and velocity perturbations are no longer damped [22, 29]. Energy dissipation due to the ambipolar diffusion is important in neutral IGM gas [22], for details see [32]. At the late time, heating of the gas due to the turbulent-decay decreases, but due to the ambipolar diffusion it continues [22, 30]. In the context of EDGES anomaly, this magnetic heating of the IGM gas has been studied by authors of the Ref. [1]. By the constraint on gas temperature during redshift \(15\lesssim z\lesssim 20\) (EDGES result), they put a constraint on the upper limit of the PMFs strength: \(B\lesssim 10^{-10}\) Gauss at the length-scale of 1 Mpc.

If one invokes cooling of gas beyond the standard scenario in the presence of baryon dark matter interaction, discussed above, this bound on the strength of PMFs (obtained in the Ref. [1]) may change by transferring energy of the gas to the dark matter (DM) using drag between gas and DM. This transfer of energy depends on the dark-matter mass and cross-section. Therefore, we also get the constraint on DM mass and cross-section to get the 21 cm absorption signal.

There are also several other ways to heat the gas: Heating of the neutral hydrogen in the IGM due to Ly-\(\alpha \) photons has been investigated in some Refs. [10, 33,34,35], annihilation of DM can inject the energy into IGM [36,37,38,39], DM decay can also heat the IGM gas via energy deposition [39,40,41]. In Ref. [42], authors have considered the dark matter viscosity to heat the gas and dark matter in the context of observed 21 cm signal [22, 29, 30]. Here it is to be noted that, we are interested only in the magnetic heating of the gas in the presence of DM-baryon interaction due to the effective cooling of IGM by DM. The origin of these PMFs fields could be due to some high energy process in the very early universe [43,44,45,46,47].

The present work is divided into the following sections: in Sect.  (2), we have revisited the 21 cm observed signal from the EDGES; in Sect. (3), a brief description of the PMFs and it’s decay is discussed; Sect. (4) contains the result obtained and a detailed discussion. In the end, we have summarized and concluded our work in Sect. (6).

2 21 cm signal and EDGES observation

At the end of recombination, the baryon number density of the Universe mostly dominated by the neutral hydrogen, small fraction of helium, residual free electrons and protons. The hyperfine interaction between spin of the electron and proton split the ground state of neutral hydrogen atom into singlet and triplet states with an energy difference of \(E_{21}=5.9 \times 10^{-6}\) eV \(=2 \pi /(21 ~ \text {cm})\). Relative number densities of neutral hydrogen in the singlet and triplet state, define the spin temperature (\(T_S\)) of the gas, and is given by the following relation:

$$\begin{aligned} \frac{n_{1}}{n_{0}} = \frac{g_{1}}{g_{0}}~e^{-\frac{ E_{21}}{T_{S}}} \simeq 3\left( 1 - \frac{ E_{21}}{T_{S}}\right) , \end{aligned}$$
(1)

here, \(n_0\) and \(n_1\) are the number densities in the singlet and triplet states respectively. \(g_0\) and \(g_1\) are statistical degeneracy of singlet and triplet states respectively. Spin temperature depends on gas collision, emission/absorption of CMB photon and Ly-\(\alpha \) radiation from the first star. Equilibrium balance between the populations of singlet and triplet state describes the spin temperature [48, 49]

$$\begin{aligned} T_{S}^{-1} = \frac{T_\mathrm{CMB}^{-1} + x_{c}T_\mathrm{gas}^{-1} + x_{\alpha }T_\mathrm{Ly\alpha }^{-1}}{1 + x_{c} + x_{\alpha } } \,, \end{aligned}$$
(2)

where, \(T_\mathrm{CMB}\) is the CMB temperature, \(T_\mathrm{gas}\) is the kinetic temperature of the gas and \(T_\mathrm{Ly\alpha }\) is the colour temperature of Ly\(\alpha \) radiation from the first star. Here, \(x_c\) and \(x_{\alpha }\) are the collisional and Ly\(\alpha \) coupling respectively [48],

$$\begin{aligned} x_{c} = \frac{E_{21}}{T_\mathrm{CMB}}\frac{C_{10} }{A_{10} },\\ x_{\alpha } = \frac{E_{21}}{T_{CMB}}\frac{P^{w}_{01} }{A_{10}}, \end{aligned}$$

where, \(C_{10}\) is the collision rate between \(H-H,~H-e,~p-H\) and \(P_{01}^{w}\) is the excitation rate due to Ly-\(\alpha \) radiation and \(A_{10}=2.9\times 10^{-15}\,\hbox {s}^{-1}\) is the Einstein coefficient for spontaneous emission. After the first star formation, a large number of Ly\(\alpha \) photons scattered with the gas, and brought the radiation and the gas into a local thermal equilibrium [49]. Hence during the cosmic dawn era \(T_\mathrm{gas} \approx T_{\mathrm{L}y\alpha }\). The 21 cm signal can be described, in terms of the redshifted differential brightness temperature [49]

$$\begin{aligned} T_{21}= \frac{1}{1+z}(T_{S}-T_\mathrm{CMB})(1-\exp ^{-\tau }) \,, \end{aligned}$$
(3)

where, optical depth \(\tau =\frac{3 \lambda _{21}^2A_{10}n_H}{16 T_S H(z)}\), \(n_H\) is the hydrogen number density, \(\lambda _{21}= 21~\hbox {cm}\) and H(z) is the Hubble rate. Depending on the spin and the CMB temperature, three scenarios arise: (i) when \(T_S~=T_\mathrm{CMB}\), then no signal is observed; (ii) if \(T_S< T_\mathrm{CMB}\), photon get absorbed by the gas and absorption spectra is observed; and (iii) if \(T_S> T_\mathrm{CMB}\), then it leaves an imprint of emission spectra.

Evolution of the 21 cm signal is as follows: after recombination at \(z \sim 1100\) down to \(z \sim 200\), the residual free electrons undergo Compton scattering to maintain thermal equilibrium between the gas and CMB, and collisions among the gas is dominant, i.e. \(x_c \gg 1,x_{\alpha }\) [12, 49], which set \(T_S=T_\mathrm{CMB}\). Hence, 21 cm signal is not observed during this era. Below \(z \sim 200\) until \(z \sim 40\), the gas cools adiabatically and it falls below CMB temperature, which implies the early 21 cm absorption signal. The sensitivity of radio antennas below 50 MHz falls dramatically and collisional absorption signal can not be observed. Below \(z\sim 40 \) down to the first star formation, gas cools sufficiently due to the expansion and the collisional coupling becomes very small due to the dilution, i.e. \(x_{c},~ x_{\alpha } \rightarrow 0\) [12, 49]. This implies, \(T_S= T_\mathrm{CMB}\), hence no 21 cm signal during this period. After the first star formation, a transition between the singlet and triplet states occurs due to the Ly\(\alpha \) photons emitted from the first stars via Wouthuysen-Field (WF) effect [50, 51]. Ly\(\alpha \) photons couple the spin temperature to the gas temperature. In this era, \(x_{\alpha } \gg 1\), hence spin temperature and the gas temperature become equal to each other i.e., \(T_S=T_\mathrm{gas}< T_\mathrm{CMB}\). Thus an imprint of the 21 cm absorption signal can be seen at the low-frequency tail of the CMB spectrum. Below \(z\sim 15\) until \(z \sim 7\), X-ray from the active galactic nuclei heats the gas above the CMB temperature and we observe an emission signal [49]. Below \(z\sim 7 \) neutral hydrogen became ionized and the signal disappears.

Recently, the EDGES collaboration reported the global brightness temperature at \(z=17\)

$$\begin{aligned} T_{21}^\mathrm{obs}(z=17)= -500^{+200}_{-500}~ \mathrm{mK}\ , \end{aligned}$$
(4)

and corresponding gas temperature is \(3.26^{+1.94}_{-1.58}\) K [5]. On the contrary, standard \(\Lambda \)CDM predicts the gas temperature 6.8 K at \(z=17\) and corresponding brightness temperature \(T_{21} \ge -220\) mK [12]. In order to explain the EDGES absorption signal, the gas temperature needs to be cooler than the \(\Lambda \)CDM prediction. During the Cosmic dawn era, the Universe was at its coldest phase, and the relative velocity between the DM and baryon was very small [\(\mathcal {O}(10^{-6})\)]. Also, the temperature of the dark matter is colder than the baryon temperature during this period, so an interaction of the baryon with dark matter can cool the gas temperature. Since the relative velocity is small, scattering cross section of the type \(\sigma = \hat{\sigma } v^{-4}\) can enhance the interaction rate and cool the gas sufficiently to explain EDGES absorption dip [14, 15]. In this work, we consider magnetic heating of the gas and the DM via ambipolar and turbulent decay.

3 Primordial magnetic fields after the recombination era

In this section, we present the evolution of PMFs via two processes i.e. ambipolar diffusion and decaying turbulent. We assume that, due to some early Universe process, tangled magnetic fields were present at a sufficiently large length scale after the recombination era [43,44,45,46,47]. We also consider a very small velocity induced by the PMFs to avoid any dissipations of the initial magnetic fields due to viscosity and other dissipation [52, 53]. This is applicable in linear regime and magnetic fields evolve adiabatically as \(\mathbf{B}(t, \mathbf{x})=\tilde{\mathbf{B}}(\mathbf{x})/a(t)^2\), where \(\mathbf{x}\) is the comoving coordinate, \(\tilde{\mathbf{B}}\) is the comoving strength of the magnetic fields and a(t) is the scale factor. Since plasma in the early Universe remains highly conductive, the adiabatic evolution of the magnetic fields is true. However, at a sufficiently small scale, when non-linear effects operate, adiabatic decay no longer satisfy. In this case, it is needed to consider Euler Eqs. along with the magnetic induction equation and Maxwell’s Eqs. to understand the dynamics of the fluid. We consider an isotropic and homogeneous Gaussian random magnetic field, whose power spectrum is given by the following equation

$$\begin{aligned} \langle \tilde{\mathbf{B}}_i (\mathbf{k}) \, \tilde{\mathbf{B}}^*_j (\mathbf{q})\rangle = \frac{(2\pi )^3}{2}\delta _D^3(\mathbf{k}-\mathbf{q})\left( \delta _{ij}-\frac{k_i k_j}{k^2}\right) \mathcal {P}_B(k), \nonumber \\ \end{aligned}$$
(5)

where, \(\mathcal {P}_B(k)\) is the magnetic power spectrum and \(k=|\mathbf{k}|\) is the comoving wave number. For simplicity, we consider a power law spectrum of the magnetic fields \(\mathcal {P}_B(k)= A\, k^{n_B}\) for \(k< k_\mathrm{max}\) (\(k_\mathrm{max}\) is calculated by the damping at recombination due to the viscosity) [52, 53]. Here \(n_B\) and A are spectral index and the normalization constants respectively. In particular, \(n_B=2\) for white noise [54], \(n_B=4\) for Batchelor spectrum [55] and \(n_B=-2.9\) for nearly scale invariant spectrum [22]. The amplitude (A) can be obtained by demanding the magnetic fields are smooth over the cut off scale, and after that \(\mathcal {P}_B(k)=0\). Once the recombination period end, baryons and CMB photons decouple and their velocity start to increase. Eventually, these particles achieve a common velocity, determined by the equipartition between the magnetic field and kinetic energy of the baryon gas. This velocity is given by the Alf\(\acute{\mathrm{v}}\)en velocity \(v_A=c\, B_0/\sqrt{4\pi \rho _{b_0} a(t)}\), here \(\rho _{b_0}\) is the present baryon density and \(B_0\) is the currently observed strength of the magnetic field at Mpc scale. The cut off scale is defined as \(k_{\mathrm{max}}\approx 2\pi \frac{H a}{v_A}\). Therefore, the cut off value from this relation can be written as [22, 56]:

$$\begin{aligned} \frac{k_\mathrm{max}}{2 \pi \,\mathrm{Mpc}^{-1}} {=} \left[ 1.32{\times } 10^{-3} \left( \frac{B_0}{1 \mathrm{nG}}\right) ^2 \left( \frac{\Omega _b h^2}{0.02}\right) ^{-1}\left( \frac{\Omega _m h^2}{0.15}\right) \right] ^{\frac{-1}{(n_B+5)}}, \nonumber \\ \end{aligned}$$
(6)

here, \(\Omega _b\), \(\Omega _m\), and h are the cosmological parameters and have the mathematical value \(h=0.674\) (\(H_0=100\,h\) Km/s/Mpc), \(h^2\Omega _b=0.0224\,\pm \, 0.0001\), \(h^2\Omega _m=0.143\) [57].

3.1 Dissipation of magnetic energy

After recombination, any present magnetic field dissipates its energy and heats the gas through two mechanisms, namely the ambipolar diffusion and the turbulent decay [22, 56]. The heating of the gas gives a considerable change in the thermal evolution of neutral atoms. The velocity difference in the ionized and neutral particles after the recombination leads to the ambipolar diffusion of the magnetic energy. Direct cascade happens due to the non-linear processes, which couples the different modes and the cascading of magnetic energy from large to small scale. This happens through the breaking of the larger eddy into the smaller eddies, when eddy turn over time \(t_\mathrm{eddy}\) is equal to the Hubble time i.e. (\(t_\mathrm{eddy}\sim H^{-1}\)). The energy dissipation due to ambipolar and direct cascade can be given by [32, 58],

$$\begin{aligned} \Gamma _{\mathrm{ambi}}= & {} \frac{\rho _n}{16\pi ^2\gamma \rho _b^2 \rho _i} |(\nabla \times \mathbf{B})\times \mathbf{B}|^2\,, \end{aligned}$$
(7)
$$\begin{aligned} \Gamma _{\mathrm{decay}}= & {} \frac{B_0^2(t)}{8\pi }\frac{3m}{2}\frac{\left[ \ln \left( 1+t_\mathrm{eddy}/t_i\right) \right] ^m\, H(t)}{\left[ \ln \left( 1+t_\mathrm{eddy}/t_i\right) +\ln (t/t_i)\right] ^{m+1}}\,, \end{aligned}$$
(8)

where, \(\rho _n\) and \(\rho _i\) are the mass densities of neutral and the ionized atoms respectively, t is the cosmological time at a generic red shift z, \(t_\mathrm{eddy}\) is the physical decay time scale for the turbulent and \(t_i\) is initial time at which decay starts. \(m= 2(n_B+3)/(n_B+5)\). For the present scenario \(\gamma \) is given by [29, 32, 59, 60],

$$\begin{aligned} \gamma =\frac{\frac{1}{2}n_H\langle \sigma v\rangle _{\mathrm{H}^+, \mathrm{H}}+\frac{4}{5}n_{\mathrm{He}}\langle \sigma v\rangle _{\mathrm{H}^+,\mathrm{He}}}{m_H[n_H+4n_{\mathrm{He}}]}\,, \end{aligned}$$
(9)

where, \(m_H\) is the mass of the hydrogen and \(n_\mathrm{He}\) is the number density of the helium atom. The absolute values of the Lorentz force and magnetic energy in Eqs. (7) and (8) can be obtained by considering a suitable power law spectrum of the magnetic field. This can be done using following correlation integrals: \(|(\nabla \times \mathbf{B})\times \mathbf{B}|^2= \int (dk/2\pi )^3\int (dq/2\pi )^3\, k^2\, \mathcal {P_B}(t, k)\mathcal {P_B}(t, q)(1+z)^{10}\) and \(|\mathbf{B}|^2 =\int (dk/2\pi )^3 \mathcal {P_B}(t, k) (1+z)^4\). However, in the present work, we have taken approximate value of the ambipolar diffusion term, which is [61]

$$\begin{aligned} \Gamma _{\mathrm{ambi}}\sim \frac{\rho _n}{16\pi ^2\gamma \rho _b^2\rho _i}\, \frac{B^4}{L^2}\,, \end{aligned}$$
(10)

here, L is a typical length scale. To sum up, the time evolution of the magnetic energy can be written as [22, 53]

$$\begin{aligned} \frac{d}{dt}\left( \frac{|\mathbf{B}|^2}{8\pi }\right) = -4 H(t)\left( \frac{|\mathbf{B}|^2}{8\pi }\right) -\Gamma _{\mathrm{ambi}}-\Gamma _{\mathrm{decay}}\,. \end{aligned}$$
(11)

4 Baryon and dark matter interaction in presence of magnetic field

In this section, we discuss the effects of magnetic field on the baryon and DM temperature when they are interacting with each other. Temperature evolutions of the DM and baryon, having relative velocity, in the presence of the magnetic field are given below

$$\begin{aligned} \frac{dT_\mathrm{gas}}{dz}= & {} \frac{2T_\mathrm{gas}}{(1+z)} + \frac{\Gamma _{C}}{(1+z)H} (T_\mathrm{gas}-T_\mathrm{CMB}) \nonumber \\&- \frac{2}{3(1+z)H}\frac{d{Q_{gas}}}{dt}- \frac{2\Gamma _\mathrm{heat}}{3n_b(1+z)H}\,, \end{aligned}$$
(12)
$$\begin{aligned} \frac{dT_{d}}{dz}= & {} \frac{2T_{d}}{(1+z)} - \frac{2}{3(1+z)H}\frac{d{Q_{d}}}{dt} \,, \end{aligned}$$
(13)
$$\begin{aligned} \frac{dv}{dz}= & {} \frac{v}{(1+z)} + \frac{D(v)}{(1+z)H}\,, \end{aligned}$$
(14)

where, \(T_{d}\) and \(m_d\) are temperature and mass of the DM respectively, H is the Hubble expansion rate, \(n_b\) is the baryon number density and \(\Gamma _C\) is the Compton scattering rate, defined as

$$\begin{aligned} \Gamma _{C}= \frac{8 \sigma _T a_r T_\mathrm{CMB}^4 x_e}{3\,(1+x_e+x_{He})m_e}\,. \end{aligned}$$

Here, \(x_e=n_e/n_H\) is the electron fraction, \(x_{He}\) is the helium fraction, \(a_r\) is the Stefan-Boltzmann radiation constant and \(\sigma _T\) is the Thomson scattering cross section. Drag term D(v) is given by

$$\begin{aligned} D(v) \equiv \frac{\rho _{m}\hat{\sigma }}{m_{H} + m_{d}}\frac{1}{v^{2}}F(r) \ , \end{aligned}$$
(15)

where, \( \rho _{M} \) is matter density and

$$\begin{aligned} F(r) \equiv \mathrm {erf}\left( \frac{r}{\sqrt{2}}\right) - \sqrt{\frac{2}{\pi }}r e^{-r^{2}/2} , \end{aligned}$$

with \(r = \frac{v}{u_{\mathrm {th} }}\) and \(u_{\mathrm {th} } =\sqrt{ \frac{T_\mathrm{gas}}{m_{H}} + \frac{T_{d}}{m_{d}}}~. \) Heat transfer of the gas per unit time is given by [62]

$$\begin{aligned}&\frac{d{Q_{gas}}}{dt} = \frac{2 m_H\rho _{d}\hat{\sigma }e^{-r^2/2}}{\sqrt{2 \pi }(m_{H} + m_{d})^2 u_{\mathrm {th}}^3} \left( T_\mathrm{d} - T_{gas}\right) \nonumber \\&\qquad \qquad \quad + \frac{\mu \rho _{d} }{\rho _{M}} v D(v)~, \end{aligned}$$
(16)

where, \(\mu \) is the reduced mass of DM and baryon, \(\hat{\sigma }\) is DM-gas scattering cross-section and \(\rho _d\) is the DM energy density. In Eq. (16), the first term represents the baryonic cooling due to its interaction with the DM and second term represents the heating due to drag term. Relative velocity between DM and gas generates friction between two fluid which is responsible for the drag term. Heat transfer rate for dark matter \(\left( \frac{d{Q_{d}}}{dt}\right) \) can be obtained by interchanging \(gas \leftrightarrow d\) in Eq. (16). Temperature evolution of the DM and gas require electron ionization fraction [63]:

$$\begin{aligned} \frac{dx_e}{dz}= & {} \frac{1}{H(1+z)} \frac{\frac{3}{4}R_{Ly\alpha } + \frac{1}{4} \Lambda _{2s,1s}}{\beta _{B}+\frac{3}{4}R_{Ly\alpha }+\frac{1}{4}\Lambda _{2s,1s}}\nonumber \\&\times \,\Big (n_H x_e^2\alpha _{B}-4(1-x_e)\beta _{B}e^{-E_{21}/T_\mathrm{CMB}} \Big )\,, \end{aligned}$$
(17)

where, \(\beta _{B}\) and \(\alpha _{B}\) are the photo-ionization rate and case-B recombination coefficient respectively. \(E_{21}\) is energy of Ly\(\alpha \) wavelength photon and \(\Lambda _{2s,1s}=8.22~ \mathrm{s}^{-1}\) is the hydrogen two photon decay rate. The escape rate of Ly\(\alpha \) is given by: \(R_{\text {Ly}\alpha }=\frac{8 \pi H}{3 n_H (1-x_e)\lambda _{\text {Ly}\alpha }^3}\), \(\lambda _\mathrm{Ly\alpha }\) is the rest wavelength of Ly\(\alpha \) photon. As it has been confirmed in Ref. [1], that cooling due to effects like Lyman-\(\alpha \) emission, Bremsstrahlung and recombination does not have that much effects on the dynamics of the gas and DM, therefore, we have not considered these effects in our present work.

Fig. 1
figure 1

Temperature evolution of baryon and DM in the presence of magnetic field and baryon-DM interaction. Blue line corresponds to temperature evolution of gas in the absence of both magnetic heating and baryon-DM interaction. The red (green) solid lines represents the variation of the gas temperature and the dotted red (green) line shows the variation of the DM temperature in presence of magnetic field and the baryon-DM interaction

5 Results and discussion

Solving Eqs. (11-14) and Eq. (17) with initial conditions \(T_\mathrm{gas}(1010)=T_\mathrm{CMB}(1010)=2749.92\) K, \(T_d(1010)\sim 0\) K, \(x_e(1010)=0.057\) and \(B(z)=B_0\, (1+z)^2|_{z=1010}\) initial magnetic field strength, we get the temperature evolution of the DM and gas for different DM masses, DM-baryon interaction cross-sections and MF’s strengths. Figure 1 shows the evolution of the gas and DM temperature with redshift (z). The solid blue line in Fig. 1 corresponds to gas temperature when both the magnetic field and DM-baryon interaction are zero. In this case, gas temperature falls as \(T_\mathrm{gas} \propto (1+z)^2\) and reaches 6.8 K at \(z=17\). In Fig. 1a, temperature evolution of the gas and DM is given for different MFs at constant \(\hat{\sigma } = 10^{-41} ~ \mathrm{cm}^2\) and \(m_d=0.1\) GeV. For \(B_0 = 10^{-5} ~ (10^{-6})\) G, gas temperature falls down due to Hubble expansion and DM-baryon interaction till \(z \approx 30 ~ (z \approx 20)\), then temperature rises due to magnetic heating. For \(B_0= 10^{-5}\) G, temperature of the DM also increases due to the coupling between DM and baryons at lower redshift. Larger the strength of MFs, earlier the heating begins. Although dark matter temperature at \(z \sim 1010\) is taken to be zero, it heats up due to the heat transfer from baryons to DM. By increasing \(B_0\), magnetic-heating of the gas rises. Thus, DM temperature grows due to the drag term in Eq. (15) and it can be seen in Fig. 1, temperature of DM for \(B_0=10^{-5}\) G is larger compared to \(B_0=10^{-6}\) G. Figure 1b shows the temperature evolution of gas and DM for different DM-baryon interaction cross-section when magnetic field \(B_0=10^{-6}\) G and DM mass \(m_d=0.1\) GeV are fixed. Larger the \({\hat{\sigma }}\) between gas and DM, more heat transfers from gas to the DM and cools the gas efficiently. For \(B_0=10^{-6}\) G and \(\hat{\sigma } = 10^{-41} ~\mathrm{cm}^2\), temperature evolution for different dark matter mass is shown in Fig. 1c. As we increase the DM mass from 0.1 GeV to 1 GeV, temperature of both the DM and gas increases and becomes more efficient for large dark matter mass [62]. This drag heating is important when mass of DM is comparable or greater than 1 GeV [62]. Below \(z \sim 50\), in addition to heating due to the drag term, magnetic heating also contribute to the gas temperature, hence the gas temperature for \(m_d=1 \) GeV is higher than \(m_d=0.1\) GeV.

5.1 Correlation between mass of DM and baryon-DM cross section from EDGES observation

In this subsection, we analyze the effect of \(B_0\), \(m_d\) and \({\hat{\sigma }}\) on gas and dark-matter temperature. In Fig. 2, we study constraints on \(m_d\) and \({\hat{\sigma }}\) for \(T_{21}\simeq -500\) mK (\(T_\mathrm{gas}\simeq 3.26\) K) and \(-300\) mK (\(T_\mathrm{gas}\simeq 5.2\) K). Here, to calculate \(T_{21}\) we have taken \(x_\alpha \gg 1\). Thus, from Eq.  (2), \(T_S\approx T_\mathrm{gas}\) and one can calculate \(T_{21}\) from Eq. (3). Here note that, we do not include heating due to the Ly\(\alpha \) background and the effect of this additional heating become significant for redshift \(z\lesssim \)17 for the fiducial model considered in Refs. [64, 66, 67]. We discuss this point in the next subsection. In Fig. 2, we consider cases \(B_0=3.48\times 10^{-6}\) G, \(2.67\times 10^{-6}\) G, \(10^{-6}\) G and \(10^{-9}\) G and solve Eqs.  (11-17) for \(T_\mathrm{gas}\simeq 3.26\) and 5.2 K at \(z=17\) to get \(m_d\) vs \(\hat{\sigma }\) plots. The solid and dashed lines represent the cases when \(T_{21}\simeq -500\) mK and \(-300\) mK respectively. The gold and green regions respectively show the CMB-S4 (forecast) and Planck 2015 upper constraint on \({\hat{\sigma }}-m_d\) with 95% C.L. [64, 65]. The magenta, black, blue and red lines corresponds to \(B_0=3.48\times 10^{-6}\) G, \(2.67\times 10^{-6}\) G, \(10^{-6}\) G and \(10^{-9}\) G. As we increase the magnetic field strength from \(10^{-9}\) G to \(\sim 10^{-6}\) G, larger value of \({\hat{\sigma }}\) is required for \(m_d \in \{10^{-6},~ 1\}\) GeV to maintain \(T_{21}\simeq -500\) or \(-300\) mK at z=17. To get EDGES upper limit on \(T_{21}\) (i.e. \(-300\) mK), required \(\hat{\sigma }\) is smaller compared to the case when \(T_{21}=-500\) mK. This is because we need to transfer less energy from gas to the DM to obtain EDGES upper limit on \(T_{21}\). We get the upper limit on magnetic field strength \(2.67\times 10^{-6}\) G by CMB-S4 (forecast) constraint on \(\hat{\sigma }-m_d\) and maintaining \(T_{21}\simeq -300\) mK at z=17. For \(B_0=2.67\times 10^{-6}\) G, \(m_d \gtrsim 10^{-2}\) GeV is excluded. By Planck 2015 constraint on \(\hat{\sigma }-m_d\), the allowed maximum strength of magnetic field is \(3.48\times 10^{-6}\) G by requiring EDGES upper constraint on \(T_{21}\) at z=17. For \(B_0=3.48\times 10^{-6}\) G, mass of dark-matter \(\gtrsim 1\times 10^{-2}\) GeV is excluded. Similarly, for the \(B_0=10^{-6}\) G, \(m_d\gtrsim 8\times 10^{-1}\) GeV is excluded by CMB-S4 forecast. When the DM mass approaches mass of hydrogen, the drag term in Eq.  (15) also starts to contribute in heating of the gas in addition to the magnetic heating. Therefore, higher mass of dark matter is excluded for higher magnetic field. As discussed in [62], when \(m_d\gg 1\) GeV, the drag term heat up both the gas and DM in such a way that we can not obtain \(T_\mathrm{gas}= 3.26\) K at \(z=17\) as required for the EDGES signal. There is a independent bound on the primordial magnetic field from CMB of the order of \(\lesssim \) nG [20, 21]. This constraint, in our analysis, restricts value of \({\hat{\sigma }}\). Here, we note that in our analysis further decreasing value of \(B_0\) below \(10^{-9}\) G, does not change our result in significant way.

Fig. 2
figure 2

Constrains on \({\hat{\sigma }}\) and \(m_d\) for different magnetic field strengths by requiring \(T_{21}\simeq -500\) mK (solid lines) and \(T_{21}\simeq -300\) mK (dashed line) at \(z=17\). The solid (dashed) magenta, black, blue and red line correspond to \(B_0=3.48\times 10^{-6}\) G, \(2.67\times 10^{-6}\) G, \(10^{-6}\) G and \(10^{-9}\) G respectively. The CMB-S4 (forecast) and Planck 2015 constraints on \({\hat{\sigma }}\) and \(m_d\) with 95% C.L. have been taken from the Refs. [64, 65]. The green and gold regions are excluded by Planck 2015 and CMB-S4 forecast respectively. (\(1\ \hbox {GeV}^{-2}=3.89 \times 10^{-28}\ \hbox {cm}^2\))

Fig. 3
figure 3

a 21 cm differential brightness temperature (assuming infinite Ly\(\alpha \) coupling) vs redshift when their is no X-ray heating. The dotted black (orange) color represents standard \(\Lambda \)CDM (EDGES) predictions for the global \(T_{21}\) signal. Green, red and blue solid curves correspond to \(B_0= 1\times 10^{-6}\), \(1.35 \times 10^{-6}\) and \( 1.65\times 10^{-6}\) G respectively. b \(T_{21}\) plot with redshift when X-ray heating is included. Black, blue, green and red solid curves correspond to \(B_0= 2\times 10^{-6}\), \(1 \times 10^{-6}\), \( 8\times 10^{-7}\) and \( 6\times 10^{-7}\) G respectively. The magenta dashed line is corresponds to the EDGES upper bound on \(T_{21}: -300\) mK. For both cases, \(m_d=0.1\) GeV and \(\hat{\sigma }=6.22\times 10^{-15}~\hbox {GeV}^{-2}\)

5.2 Effect of strong magnetic field on brightness temperature

We have discussed above that, as we increase the strength of the magnetic field, for a fix DM mass and interaction cross section, temperature of the gas increases. In Fig. 3, we plot 21 cm differential brightness temperature with redshift for different magnetic field strengths. This figure is obtained by keeping \(m_d=0.1\) GeV and \(\hat{\sigma }=6.22\times 10^{-15}~\hbox {GeV}^{-2}\) constant. In Fig. 3a, to plot \(T_{21}\) we assume infinite Ly\(\alpha \) coupling (\(x_\alpha \rightarrow \infty \Rightarrow T_S\simeq T_\mathrm{gas}\)) and do not include the X-ray heating. For \(B_0=1\times 10^{-6}\) G, the 21 cm line absorption signal reported by EDGES (i.e. \(-500\) mK) can be explained. In Fig. 3b, we include the X-ray heating and consider finite Ly\(\alpha \) coupling (\(x_\alpha \)) [64, 66,67,68]. As we decrease \(B_0\) from \(2\times 10^{-6}\) G, the minimum value of \(T_{21}\) profile decreases. For the case when \(B_0=1\times 10^{-6}\) G (blue solid line), minimum of \(T_{21}\) profile is well below the EDGES upper limit on \(T_{21}\) (i.e. \(-300\) mK—magenta dashed line). In Fig. 3a, when there is no effect of X-ray heating, \(T_{21}=-300\) mK corresponds to \(B_0=1.35\times 10^{-6}\) G. Thus, we need to lower \(B_0\) values when the X-ray heating is included to get desired value of \(T_{21}\). As shown in Fig. 3, brightness temperature is suppressed by the increase of the strength of the magnetic field and it can even erase the standard 21 cm signal when the magnetic field strength increases above \(\sim 1 \times 10^{-6}\) G. This sets the upper limit on the strength of the magnetic field for \(m_d=0.1\) GeV and \(\hat{\sigma }=6.22\times 10^{-15}~\mathrm{GeV}^{-2}\).

6 Conclusion

Magnetic field in [1] have shown to heat the cosmic gas during the cosmic dawn era by the ambipolar diffusion and the turbulence decay. Since, it could erase the observed 21 cm absorption signal, one can calculate the upper bound on the magnetic field. One of the promising mechanism to explain the absorption signal of the 21 cm line is to have interaction between the dark-matter and baryons [12, 13]. In this work, we have shown that in the presence of such an interaction the upper bound on the strength of magnetic fields can significantly be altered. The magnetic-energy converted to the thermal energy, heat both the gas and dark matter. This is an extra heating effect in addition to the drag heating. The drag term heats the DM and baryons, but in the lower range of dark-matter mass (\(\ll 1\) GeV) it favors cooling of gas compared to heating due to the relative motion between DM and gas. To explain the observed anomaly in the 21 cm signal by the EDGES, a large baryon-DM scattering cross-section is required to balance the magnetic heating effect. An earlier saturation occurs in baryon-DM cross-section with respect to the DM mass in the presence of the strong magnetic fields. Considering upper bound on \(\hat{\sigma }-m_d\) by Planck 2015 [65] and EDGES upper constraint on \(T_{21}\) (-300 mK) at \(z=17\) [5], we found upper bound on the magnetic field strength: \(B_0=3.48\times 10^{-6}\) G, while considering CMB-S4 forecast constraint [64] we get \(B_0=2.67\times 10^{-6}\) G for the dark matter mass \(\lesssim 10^{-2}\) GeV.