Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Modules Pages
Oblique10LinearQuantity.cpp
Go to the documentation of this file.
1 
9 
10 double Oblique10LinearQuantity::indefinite_integral(double star_angmom) const
11 {
12  double t2minus1 = std::pow(__total_angmom, 2) - 1.0;
13  return (
14  (2.0 * star_angmom) / (t2minus1 - std::pow(star_angmom, 2))
15  +
16  (1.0 / __total_angmom - 1.0) * std::atanh((__total_angmom - 1.0)
17  /
18  star_angmom)
19  -
20  2.0 * atanh(star_angmom / std::sqrt(t2minus1)) / std::sqrt(t2minus1)
21  +
22  (0.5 / __total_angmom + 0.5) * (
23  std::log((1.0 + __total_angmom) / star_angmom + 1.0)
24  -
25  std::log((1.0 + __total_angmom) / star_angmom - 1.0)
26  )
27  );
28 }
29 
30 Oblique10LinearQuantity::Oblique10LinearQuantity(double total_angmom,
31  double orbital_angmom,
32  double initial_star_angmom) :
33  __total_angmom(total_angmom / orbital_angmom),
34  __initial_star_angmom(initial_star_angmom / orbital_angmom),
35  __angmom_scale(orbital_angmom),
37 {
38  assert(total_angmom > 0);
39  assert(orbital_angmom > 0);
40  assert(initial_star_angmom > 0);
41  assert(total_angmom <= orbital_angmom + initial_star_angmom);
42  assert(orbital_angmom <= total_angmom + initial_star_angmom);
43  assert(initial_star_angmom <= orbital_angmom + total_angmom);
44  assert(std::pow(total_angmom, 2) - std::pow(orbital_angmom, 2)
45  >
46  std::pow(initial_star_angmom, 2));
47  assert(!std::isnan(__initial_indefinite_integral));
48 }
49 
50 double Oblique10LinearQuantity::operator()(double star_angmom) const
51 {
52  return (indefinite_integral(star_angmom / __angmom_scale)
53  -
55 }
56 
58  double star_angmom
59 ) const
60 {
61  star_angmom /= __angmom_scale;
62  double s2 = std::pow(star_angmom, 2),
63  t2 = std::pow(__total_angmom, 2);
65  operator()(star_angmom),
66  (
67  (__total_angmom + star_angmom - 1.0)
68  *
69  (1.0 + star_angmom - __total_angmom)
70  *
71  (1.0 + __total_angmom - star_angmom)
72  *
73  (1.0 + __total_angmom + star_angmom)
74  *
75  std::pow(1.0 + s2 - t2, 2)
76  /
77  std::pow(4.0 * s2, 2)
78  ) * __angmom_scale,
79  (
80  (1.0 - s2 - t2)
81  *
82  (1.0 + s2 - t2)
83  *
84  (1.0 + s2 * s2 - 2.0 * (1.0 + s2) * t2 + t2 * t2)
85  /
86  (4.0 * s2 * s2 * star_angmom)
87  ) * __angmom_scale
88  );
89 }
double indefinite_integral(double star_angmom) const
Return the real part of the indefinite integral of the inverse of the rate of change of the stellar a...
double __angmom_scale
The initial orbital angular momentum (everything is scaled by this quantity).
double operator()(double star_angmom) const
The value of the function at the given abscissa.
double __initial_indefinite_integral
The value of indefinite integral(__initial_star_angmom)
double __total_angmom
The Magnitude of the total angular momentum in the system in units of the orbital angular momentum (c...
const Core::FunctionDerivatives * deriv(double star_angmom) const
Returns a pointer to the derivative of the function.
double __initial_star_angmom
The Magnitude of the initial stellar spin angular momentum in.
A class representing arbitrary order derivatives of a function.
Definition: Functions.h:66
A class for the derivatives of a cubic spline (=0 for order>2).
Definition: Functions.h:77
Declares a function of the stellar angular momentum that evolves linearly with time when only the m =...