1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! This module provides models for
//! components of the Galactic potential
//!
//! Here's a list of available potentials and their R and Z derivatives.
//! Note that $ r^2 = X^2 + Y^2 + Z^2 = R^2 + Z^2 $.
//!
//! 1. Plummer (P) potential with parameters $ (M, b) $:
//!
//! $$
//! \Phi(r(R, Z)) = - \frac{M}{(r^2 + b^2)^{1/2}};
//! $$
//!
//! $$
//! \frac{\partial \Phi(R, Z)}{\partial R} =
//! \frac{M R}{(R^2 + Z^2 + b^2)^{3/2}};
//! $$
//!
//! $$
//! \frac{\partial \Phi(R, Z)}{\partial Z} =
//! \frac{M Z}{(R^2 + Z^2 + b^2)^{3/2}}.
//! $$
//!
//! 2. Miyamoto & Nagai (MN) potential with parameters $ (M, a, b) $:
//!
//! $$
//! \Phi(R, Z) = - \frac{M}{\left[ R^2 +
//! \left( a + \sqrt{Z^2 + b^2} \right)^2 \right]^{1/2}};
//! $$
//!
//! $$
//! \frac{\partial \Phi(R, Z)}{\partial R} =
//! \frac{M R}{\left[ R^2 + \left( a +
//! \sqrt{Z^2 + b^2} \right)^2 \right]^{3/2}};
//! $$
//!
//! $$
//! \frac{\partial \Phi(R, Z)}{\partial Z} =
//! \frac{M Z \left( a + \sqrt{b^2 + Z^2} \right)}{
//! \sqrt{b^2 + Z^2} \left( R^2 + \left( a +
//! \sqrt{b^2 + Z^2} \right)^2 \right)^{3/2}}.
//! $$
//!
//! 3. Navarro-Frenk-White (NFW) potential with parameters $ (M, a) $:
//!
//! $$
//! \Phi(r(R, Z)) = - \frac{M}{r} \ln{\left( 1 +
//! \frac{r}{a} \right)};
//! $$
//!
//! $$
//! \frac{\partial \Phi(R, Z)}{\partial R} =
//! \frac{M R \ln{\left( \sqrt{R^2 + Z^2} / a
//! + 1 \right)}}{\left( R^2 + Z^2 \right)^{3/2}} -
//! \frac{M R}{\left( R^2 + Z^2 \right) \left(
//! \sqrt{R^2+ Z^2} + a \right)};
//! $$
//!
//! $$
//! \frac{\partial \Phi(R, Z)}{\partial Z} =
//! \frac{M Z \ln{\left( \sqrt{R^2 + Z^2} / a
//! + 1 \right)}}{\left( R^2 + Z^2 \right)^{3/2}} -
//! \frac{M Z}{\left( R^2 + Z^2 \right) \left(
//! \sqrt{R^2+ Z^2} + a \right)};
//! $$

pub mod miyamoto_nagai;
pub mod navarro_frenk_white;
pub mod plummer;