Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
PolynomialEvolutionZone.h
Go to the documentation of this file.
1 
9 #ifndef __POLYNOMIAL_EVOLUTION_ZONE_H
10 #define __POLYNOMIAL_EVOLUTION_ZONE_H
11 
12 #include "../../Evolve/DissipatingZone.h"
13 
14 #include <gsl/gsl_poly.h>
15 
16 namespace Evolve {
17 
19  private:
20  std::valarray<double>
23 
26 
30 
31  std::valarray<double>
35 
39 
43 
46  double evaluate_polynomial(
48  const std::valarray<double> &coefficients,
49 
51  double age,
52 
54  int deriv_order
55  ) const;
56  public:
60  const std::valarray<double> &mass_coefficients,
61 
63  const std::valarray<double> &radius_coefficients,
64 
67  const std::valarray<double> &inertia_coefficients
68  ):
69  __mass_coefficients(mass_coefficients),
70  __radius_coefficients(radius_coefficients),
71  __inertia_coefficients(inertia_coefficients),
72  __current_mass(Core::NaN, 3),
73  __current_radius(Core::NaN, 3),
74  __current_inertia(Core::NaN, 3)
75  {}
76 
78  virtual void configure(bool initialize,
79  double age,
80  double orbital_frequency,
81  double eccentricity,
82  double orbital_angmom,
83  double spin,
84  double inclination,
85  double periapsis,
86  bool spin_is_frequency);
87 
89  double outer_mass(int deriv_order=0) const
90  {return __current_mass[deriv_order];}
91 
93  double outer_mass(double age, int deriv_order=0) const
94  {return evaluate_polynomial(__mass_coefficients, age, deriv_order);}
95 
97  double outer_radius(int deriv_order=0) const
98  {return __current_radius[deriv_order];}
99 
101  double outer_radius(double age, int deriv_order=0) const
102  {return evaluate_polynomial(__radius_coefficients, age, deriv_order);}
103 
105  virtual double moment_of_inertia(int deriv_order=0) const
106  {return __current_inertia[deriv_order];}
107 
109  virtual double moment_of_inertia(double age, int deriv_order=0) const
110  {return evaluate_polynomial(__inertia_coefficients, age, deriv_order);}
111 
113  double love_coefficient(int, int, Dissipation::QuantityEntry) const
114  {return 0.0;}
115  };//End PolynomialEvolutionZone class.
116 
117 } //End Evolve namespace.
118 
119 #endif
virtual double moment_of_inertia(double age, int deriv_order=0) const
See DissipatingZone::moment_of_inertia(double, int).
double love_coefficient(int, int, Dissipation::QuantityEntry) const
See DissipatingZone::love_coefficient()
double periapsis(bool evolution_rate=false) const
The argument of periapsis of this zone minus the reference zone&#39;s.
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.
double outer_mass(double age, int deriv_order=0) const
See DissipatingZone::outer_mass(double, int).
A layer of a system body for which the tidal bulge is not exactly in phase with the tidal potential...
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().
PolynomialEvolutionZone(const std::valarray< double > &mass_coefficients, const std::valarray< double > &radius_coefficients, const std::valarray< double > &inertia_coefficients)
Construct a polynomial evolution zone with the given coefficients.
std::valarray< double > __inertia_coefficients
The coefficients of the polynomial for the moment of inertia evolution.
std::valarray< double > __radius_coefficients
The coefficients of the polynomial for the radius evolution.
virtual double moment_of_inertia(int deriv_order=0) const
See DissipatingZone::moment_of_inertia(int).
double outer_radius(double age, int deriv_order=0) const
See DissipatingZone::outer_radius(double, int).
double inclination(bool evolution_rate=false) const
The angle between the angular momenta of the zone and the orbit.
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.
std::valarray< double > __mass_coefficients
The coefficients of the polynomial for the mass evolution.