DarkMatter
Part of the Celestial project
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:
[]
= "*"
use profiles;
use physical;
let r = 8.0 * KPC;
let rho = nfw_density;
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:
Dependencies
- sciforge — scientific computing foundation
License
MIT — see LICENSE