darkmatter 0.0.1

Dark matter simulation engine — gravitational fields, particle dynamics, halo stability, and cosmological constants
Documentation
  • Coverage
  • 0%
    0 out of 978 items documented0 out of 781 items with examples
  • Size
  • Source code size: 246.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 33.01 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 1m 34s Average build duration of successful builds.
  • all releases: 1m 37s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • celestial4498-prog

DarkMatter

Part of the Celestial project

Crates.io docs.rs License: MIT

A comprehensive Rust library for dark matter physics — covering candidate models, halo profiles, cosmological observables, detection channels, N-body dynamics, and large-scale structure.


Scope

DarkMatter provides 12 modules spanning the full breadth of dark matter research:

Module Description
candidates WIMPs, axions, fuzzy DM, warm DM, asymmetric DM, primordial black holes
clusters Galaxy cluster dynamics, ICM, mass functions
constants Physical and cosmological constants
cosmology Boltzmann solver, CMB, relic abundance, reionization, structure formation, 21 cm
detection Direct, indirect, collider, gravitational waves, spectra, EFT, dark sector
dynamics Barnes-Hut tree, N-body, dynamical friction, tidal stripping, stability
galaxy Formation, mergers, rotation curves
halos NFW/Einasto/Burkert profiles, contraction, spikes, substructure
large_scale Correlation functions, filaments, voids
physics Gravity, lensing, SIDM, Sommerfeld enhancement, phase space, thermodynamics
solar_system Capture, local density, orbital perturbations
utils Unit conversions, ODE solvers, special functions, statistics

Quick Start

Add to your Cargo.toml:

[dependencies]
darkmatter = "*"
use darkmatter::halos::profiles;
use darkmatter::constants::physical;

let r = 8.0 * physical::KPC;
let rho = profiles::nfw_density(r, 1e12 * physical::SOLAR_MASS, 10.0);

Stats

  • 69 source files across 12 modules
  • 781+ public items (functions, structs, enums)
  • ~6 900 lines of physics code
  • 87 integration tests in 7 test files
  • 7 runnable examples

Examples

Run any example with:

cargo run --example fuzzy_dm_example
cargo run --example sommerfeld_example
cargo run --example barnes_hut_example
cargo run --example boltzmann_example
cargo run --example gravitational_waves_example
cargo run --example phase_space_example
cargo run --example spectra_example

Dependencies

  • sciforge — scientific computing foundation

License

MIT — see LICENSE