Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
TidalPotentialExpansion.cpp
Go to the documentation of this file.
1 
9 
10 namespace Evolve {
11 
13  double radial_distance,
14  double azimuthal_angle,
15  double polar_angle,
16  double orbital_phase) const
17  {
18  double result = 0.0;
19  for(int m=-2; m<=2; ++m) {
20  std::complex<double> no_deriv,
21  inclination_deriv,
22  eccentricity_deriv,
23  error;
25  m,
26  mprime,
27  no_deriv,
28  inclination_deriv,
29  eccentricity_deriv,
30  error);
31  assert(std::isfinite(no_deriv.real()));
32  result += (
33  no_deriv
34  *
35  std::pow(radial_distance, 2)
36  *
37  boost::math::spherical_harmonic(
38  2,
39  m,
40  polar_angle,
41  azimuthal_angle
42  )
43  *
44  std::complex<double>(std::cos(mprime * orbital_phase),
45  -std::sin(mprime * orbital_phase))
46  ).real();
47  assert(std::isfinite(result));
48  }
49  return result;
50  }
51 
53  double radial_distance,
54  double azimuthal_angle,
55  double polar_angle,
56  double time
57  )
58  {
59  assert(radial_distance >= 0);
60  assert(azimuthal_angle >= 0);
61  assert(azimuthal_angle < 2 * M_PI);
62  assert(polar_angle >= 0);
63  assert(polar_angle <= M_PI);
64 
66 
67  double orbital_phase = (
68  2.0 * M_PI * time
69  /
74  );
75 
76  double potential_norm = -(
78  *
80  /
81  std::pow(__semimajor, 3)
83 
84  double result = 0.0;
85  int mprime_range = (static_cast<int>(__expansion_coef.current_e_order())
86  +
87  2);
88  for(
89  int mprime = -mprime_range;
90  mprime <= mprime_range;
91  ++mprime
92  ) {
93  result += tidal_term(mprime,
94  radial_distance,
95  azimuthal_angle,
96  polar_angle,
97  orbital_phase);
98  }
99  return potential_norm * result;
100  }
101 
102 }//End Evolve namespace
Basic description of two bodies in an eccentric orbit.
double __semimajor
The semimajor axis of the orbit in solar radii.
double __eccentricity
The eccentricity of the orbit.
Declare an interface for evaluating the expansion of the tidal potential.
Orientations of zones of bodies in a binary system.
const double solar_radius
Radius of the sun [m].
void configure(double inclination, double arg_of_periapsis=0)
Set the inclination relative to the orbit.
TidalPotentialTerms __expansion_coef
The coefficients of the expansion of the tidal potential. ( )
const double solar_mass
Mass of the sun [kg].
double evaluate_spherical_coords(double radial_distance, double azimuthal_angle, double polar_angle, double time)
double __secondary_mass
The mass of the perturber object in solar masses.
double tidal_term(int mprime, double radial_distance, double azimuthal_angle, double polar_angle, double orbital_phase) const
Return a single tidal term: .
double __primary_mass
The mass of the tidally perturbed object in solar masses.
double orbital_period() const
The orbital period of the system in days.
const double G
Gravitational constant in SI.