Dark Matter Computational Programs
Interactive Python and Fortran programs exploring dark matter physics โ rotation curves, halo profiles, thermal freeze-out, direct detection, gravitational lensing, N-body simulations, and the halo mass function. All programs run server-side with adjustable parameters.
Galaxy Rotation Curve Decomposition
PythonDecompose a galaxy rotation curve into disk, bulge, gas, and NFW dark matter halo contributions. Uses Freeman (1970) disk model and Hernquist bulge.
Parameters
Stellar disk mass
Exponential disk scale
NFW central density
NFW scale radius
rotation_curve.py118 lines
Click Run to execute the Python code
Code will be executed with Python 3 on the server
Key Equations
The total circular velocity at radius r:
$$v_{\text{tot}}^2(r) = v_{\text{disk}}^2 + v_{\text{bulge}}^2 + v_{\text{gas}}^2 + v_{\text{halo}}^2$$
NFW enclosed mass:
$$M_{\text{NFW}}(<r) = 4\pi\rho_0 r_s^3\left[\ln(1+r/r_s) - \frac{r/r_s}{1+r/r_s}\right]$$