Skip to content

Adding routines for matter Pk using AMReX FFT#110

Draft
nataraj2 wants to merge 4 commits intoAMReX-Astro:developmentfrom
nataraj2:matter_pk
Draft

Adding routines for matter Pk using AMReX FFT#110
nataraj2 wants to merge 4 commits intoAMReX-Astro:developmentfrom
nataraj2:matter_pk

Conversation

@nataraj2
Copy link
Copy Markdown

@nataraj2 nataraj2 commented Apr 24, 2026

This PR adds the routines to compute the matter power spectrum using AMReX FFT feature. As FFT is involved, only a single level mesh is supported.

Use amr.derive_plot_vars = particle_mass_density in the inputs. During the run, a directory named MatterPk will be created with the power spectrum written (at the same frequency as the plot files) into text files (.txt) that contain two columns - k [h/Mpc] and Pk [(Mpc/h)^3].

The images show the comparison of power spectrum at $z=200$ (initial condition) - theoretical, Gimlet and Nyx, for cold, warm, and fuzzy dark matter. The domain size is $20~\text{Mpc h}^{-1}$ with $512^3$ mesh cells

Screen Shot 2026-04-24 at 3 15 29 PM

The images below show the comparison of the spectrum for CDM and WDM, and CDM and FDM.

Screen Shot 2026-04-24 at 4 07 34 PM

@nataraj2 nataraj2 marked this pull request as draft April 25, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant