Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
PolynomialEvolutionZone.cpp
Go to the documentation of this file.
1 
9 
10 namespace Evolve {
11  void PolynomialEvolutionZone::configure(bool initialize,
12  double age,
13  double orbital_frequency,
14  double eccentricity,
15  double orbital_angmom,
16  double spin,
17  double inclination,
18  double periapsis,
19  bool spin_is_frequency)
20  {
21  for(int deriv_order = 0; deriv_order <= 2; ++deriv_order) {
22  __current_radius[deriv_order] = outer_radius(age,
23  deriv_order);
24  __current_mass[deriv_order] = outer_mass(age,
25  deriv_order);
26  __current_inertia[deriv_order] = moment_of_inertia(age,
27  deriv_order);
28  }
29 
30  DissipatingZone::configure(initialize,
31  age,
32  orbital_frequency,
33  eccentricity,
34  orbital_angmom,
35  spin,
36  inclination,
37  periapsis,
38  spin_is_frequency);
39  }
40 
42  const std::valarray<double> &coefficients,
43  double age,
44  int deriv_order
45  ) const
46  {
47  std::valarray<double> gsl_result(deriv_order + 1);
48  gsl_poly_eval_derivs(&(coefficients[0]),
49  coefficients.size(),
50  age,
51  &(gsl_result[0]),
52  deriv_order + 1);
53  return gsl_result[deriv_order];
54  }
55 
56 }//End Evolve namespace.
virtual void configure(bool initialize, double age, double orbital_frequency, double eccentricity, double orbital_angmom, double spin, double inclination, double periapsis, bool spin_is_frequency)
Defines the current orbit, triggering re-calculation of all quantities.
double outer_radius(int deriv_order=0) const
See DissipatingZone::outer_radius(int).
std::valarray< double > __current_radius
The outer radius ofthe zone at the age of the last call to configure() and its first and second deriv...
std::valarray< double > __current_mass
The outer mass ofthe zone at the age of the last call to configure() and its first and second derivat...
Orientations of zones of bodies in a binary system.
virtual void configure(bool initialize, double age, double orbital_frequency, double eccentricity, double orbital_angmom, double spin, double inclination, double periapsis, bool spin_is_frequency)
See DissipatingZone::configure().
virtual double moment_of_inertia(int deriv_order=0) const
See DissipatingZone::moment_of_inertia(int).
Declare a dissipative zone class where the mass and radius evolution are given by a polynomial...
std::valarray< double > __current_inertia
The moment of inertia ofthe zone at the age of the last call to configure() and its first and second ...
double outer_mass(int deriv_order=0) const
See DissipatingZone::outer_mass(int).
double evaluate_polynomial(const std::valarray< double > &coefficients, double age, int deriv_order) const
Evaluate either the given order derivative of either the mass or the radius polynomial.