image thumbnail

Cosmological N-Body Initial Condition Maker

version 1.0.01 (2.68 KB) by Gatech AE
Given a power spectrum, generate the 3D coordinates for a lattice of perturbed particles and their velocities.


Updated 17 Dec 2019

View License

For computational cosmology and N-Body simulations that want a MATLAB initial condition generator. Given the number of softwares, no particular parameter file is generated other than two saved MAT files for position and velocity in cgs unit system.

Cosmological parameters used from
"Planck 2018 results. VI. Cosmological parameters"

Practical Zel'Dovich Approximation from
Brian W. O'Shea (April 15, 2003)
University of California San Diego

Default Analytic Power Spectrum from
"The Statistics of Peaks of Gaussian Random Fields" (Bardeen et al 1986)

Cite As

Gatech AE (2022). Cosmological N-Body Initial Condition Maker (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!