lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
230 stars 285 forks source link

WDM power spectrum oscilations #316

Closed zhichen3 closed 4 years ago

zhichen3 commented 4 years ago

Hi, I am trying to create a warm dark matter power spectrum. However, I'm getting oscillations at small scales. I don't think there should be any oscillations for the warm dark matter, but according to figure 7 in this paper https://arxiv.org/pdf/1104.2935.pdf and https://arxiv.org/pdf/1008.0992.pdf, it seems like there should be some oscillations at small scales. Is this what I should be getting? I'm trying to produce a spectrum without those wiggles, are there any ways to eliminate them? I'm using the following setup for my WDM model:

N_ncdm = 1 m_ncdm = 1000 omega_ncdm = 0.1188 omega_b = 0.0223 omega_cdm = 5.0e-20 h = 0.67556 A_s = 2.441e-9 n_s = 0.9667 tau_reio = 0.066 P_k_max_h/Mpc = 100.0 k_per_decade_for_pk = 100 k_per_decade_for_bao = 20 deg_ncdm = 1.0 Omega_fld = 0 Omega_scf = 0 ksi_ncdm = 0 T_ncdm = 0.71611 ncdm_fluid_approximation = 3 quadrature strategy = 3 maximum q = 15 Number of momentum bins =15 l_max_ncdm = 15 gauge = sync

Screenshot from 2020-03-23 19-06-00

Any suggestion is appreciated! Thanks Zhi

lesgourg commented 4 years ago

Dear Zhi, I am sorry for not answering your query #316. Getting a precise WDM power spectrum at high k is a numerically difficult issue, that we always wished to investigate, but we never had time to do so. So I don't know which precision parameter settings would solve your issue. Did you close becssue you found a solution, or because you gave up? In the first case, I'd be very interested to know what you did to improve the output. Best, Julien

zhichen3 commented 4 years ago

Hi Julien,

Thanks for your clarification on why I am getting those results. I've tried several precision settings, but still unable to eliminate those wiggles. I closed the issue because the ratio of Pk between the WDM and CDM turned out to be reasonably close to what I would expect, where I basically ignore those wiggles.

Another issue that I have is that, is CLASS capable of producing outputs for the nonlinear WDM, e.g. the matter power spectrum and the CMB spectra? Since I'm getting warnings for using hmcode and the halofit model, and the output does not quite match with the figures in some papers that I found. I'm trying to vary eta_0 and c_min for the hmocode model to see if I can make it work. Are there other ways to do it?

Best, Zhi

On Thu, Mar 26, 2020 at 4:16 AM lesgourg notifications@github.com wrote:

Dear Zhi, I am sorry for not answering your query #316 https://github.com/lesgourg/class_public/issues/316. Getting a precise WDM power spectrum at high k is a numerically difficult issue, that we always wished to investigate, but we never had time to do so. So I don't know which precision parameter settings would solve your issue. Did you close becssue you found a solution, or because you gave up? In the first case, I'd be very interested to know what you did to improve the output. Best, Julien

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/lesgourg/class_public/issues/316#issuecomment-604291216, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO5M4LBEOCZUDIO2MAANYYDRJMFPLANCNFSM4LSH3QCA .

lesgourg commented 4 years ago

Hi Zhi,

For the first issue, I hope very much that within the next couple of months, my Class collaborators and I we will find time to sit down, and try to find a solution to this long-standing problem. The solution is probably to change the overall strategy for time sampling when WDM is switched on.

For the second issue, there is nothing existing on the market for estimating non-linear corrections in the WDM case. The authors of Halofit and HMcode never extended the range of validity of their algorithms to WDM. Several groups have performed N-body simulations with WDM, but I am not aware of any of them trying to calibrate an analytic formula for P_NL,WDM(k,z). As long as this has not been done by N-body experts, linear codes like Class or Cabp have no possibility to offer something in this direction. The only thing I can say is that using HMcode to get P_nl in the context of a WDM model with a no-too-small mass must be much better than doing nothing and sticking to P_L, but there is no way to estimate the error.

Best Julien

zhichen3 commented 4 years ago

Thank you so much for the reply!

Zhi

On Mar 27, 2020, at 4:18 AM, lesgourg notifications@github.com wrote:

 Hi Zhi,

For the first issue, I hope very much that within the next couple of months, my Class collaborators and I we will find time to sit down, and try to find a solution to this long-standing problem. The solution is probably to change the overall strategy for time sampling when WDM is switched on.

For the second issue, there is nothing existing on the market for estimating non-linear corrections in the WDM case. The authors of Halofit and HMcode never extended the range of validity of their algorithms to WDM. Several groups have performed N-body simulations with WDM, but I am not aware of any of them trying to calibrate an analytic formula for P_NL,WDM(k,z). As long as this has not been done by N-body experts, linear codes like Class or Cabp have no possibility to offer something in this direction. The only thing I can say is that using HMcode to get P_nl in the context of a WDM model with a no-too-small mass must be much better than doing nothing and sticking to P_L, but there is no way to estimate the error.

Best Julien

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or unsubscribe.

ravi398 commented 2 years ago

Hi,

is the issues mentioned above have been solved in the current version of CLASS ? I have to use class for WDM model.

Regards Ravi Kumar sharma