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
use super::Model;
use crate::orbit::calc::potentials::{miyamoto_nagai, navarro_frenk_white, plummer};
use crate::{F, PI};
const M_B: F = 460.0;
const B_B: F = 0.3;
const M_THIN_D: F = 1700.0;
const A_THIN_D: F = 5.3;
const B_THIN_D: F = 0.25;
const M_THICK_D: F = 1700.0;
const A_THICK_D: F = 2.6;
const B_THICK_D: F = 0.8;
const M_H: F = 4.0 * PI * (1.06 * 1e7) * (14.8 * 14.8 * 14.8) / (2.325 * 1e7);
const A_H: F = 14.8;
pub struct M2 {}
impl Model for M2 {
fn phi(&self, r: F, z: F) -> F {
plummer::phi(r, z, M_B, B_B)
+ miyamoto_nagai::phi(r, z, M_THIN_D, A_THIN_D, B_THIN_D)
+ miyamoto_nagai::phi(r, z, M_THICK_D, A_THICK_D, B_THICK_D)
+ navarro_frenk_white::phi(r, z, M_H, A_H)
}
fn phi_dr(&self, r: F, z: F) -> F {
plummer::phi_dr(r, z, M_B, B_B)
+ miyamoto_nagai::phi_dr(r, z, M_THIN_D, A_THIN_D, B_THIN_D)
+ miyamoto_nagai::phi_dr(r, z, M_THICK_D, A_THICK_D, B_THICK_D)
+ navarro_frenk_white::phi_dr(r, z, M_H, A_H)
}
fn phi_dz(&self, r: F, z: F) -> F {
plummer::phi_dz(r, z, M_B, B_B)
+ miyamoto_nagai::phi_dz(r, z, M_THIN_D, A_THIN_D, B_THIN_D)
+ miyamoto_nagai::phi_dz(r, z, M_THICK_D, A_THICK_D, B_THICK_D)
+ navarro_frenk_white::phi_dz(r, z, M_H, A_H)
}
}