Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
TidalPotentialTerms.h
Go to the documentation of this file.
1 
9 #ifndef __TIDAL_POTENTIAL_TERMS_H
10 #define __TIDAL_POTENTIAL_TERMS_H
11 
12 #include <cmath>
13 #include <valarray>
15 #include "../Core/Common.h"
16 
17 //TODO: No longer need to worry about e-order
18 
19 namespace Evolve {
20  class LIB_PUBLIC TidalPotentialTerms {
21  private:
24 
30  static const double __Umm_coef[][3];
31 
34 
37 
38  std::valarray< std::valarray<double> >
40  __Ummp,
41 
45 
46  public:
47 
49 
51  static void prepare(const std::string &tabulated_pms_fname,
52  double precision,
53  bool pre_load,
54  bool disable_precision_fail)
55  {
56  __pms.prepare(tabulated_pms_fname,
57  precision,
58  pre_load,
59  disable_precision_fail);
60  }
61 
62 
67  //\mathrm{precision}\f$. The reasoning is that if \f$p_{m,s}\f$ will
69  static unsigned required_expansion_order(
71  double e
72  )
73  {
74  return std::max(
75  std::max(
76  __pms.required_expansion_order(e, -2),
77  __pms.required_expansion_order(e, 0)
78  ),
79  __pms.required_expansion_order(e, 2)
80  );
81  }
82 
84  inline double get_expansion_precision() const
85  {return __pms.get_expansion_precision();}
86 
97  static std::pair<double,double> get_expansion_range(int max_mp);
98 
100  void configure(double inclination, double arg_of_periapsis = 0);
101 
107  void operator()(
109  double e,
110 
112  int m,
113 
115  int mp,
116 
118  std::complex<double> &no_deriv,
119 
121  std::complex<double> &inclination_deriv,
122 
124  std::complex<double> &eccentricity_deriv
125  ) const;
126 
129  void operator()(
131  double e,
132 
134  int m,
135 
137  int mp,
138 
140  double &no_deriv,
141 
143  double &inclination_deriv,
144 
146  double &eccentricity_deriv
147  ) const;
148 
151  static unsigned max_expansion_order()
152  {return __pms.max_expansion_order();}
153 
155  static const EccentricityExpansionCoefficients &
157  {return __pms;}
158  }; //End TidalPotentialTerms class.
159 } //End Evolve namespace
160 
161 #endif
double get_expansion_precision() const
Return the expansion precision set by the last call to prepare()
double __Ummp_inclination
The inclination with which __Ummp was last filled.
double __arg_of_periapsis
The argument of periaspsis set by the last call to configure().
static EccentricityExpansionCoefficients __pms
The eccentricity expansion of .
int max_expansion_order() const
The largest s for which is known.
Declares a class which provides the [ coefficients]{InclinationEccentricity_pms1}.
static void prepare(const std::string &tabulated_pms_fname, double precision, bool pre_load, bool disable_precision_fail)
See EccentricityExpansionCoefficients::prepare()
Orientations of zones of bodies in a binary system.
static const EccentricityExpansionCoefficients & expansion_coefficient_evaluator()
Provide direct access to the eccentircity expansion coefficients.
std::valarray< std::valarray< double > > __Ummp_deriv
The derivatives of the quantities w.r.t. the inclination.
static unsigned max_expansion_order()
The maximum eccentricity expansion order (orbital frequency multiplier for which the expansion is kno...
void prepare(const std::string &tabulated_pms_fname, double precision, bool pre_load, bool disable_precision_fail=false)
Reads in tabulated expansion coefficients, making this object useable.
static unsigned required_expansion_order(double e)
The maximum orbital frequency multiplier to include in the potential Fourier expansion in order to ac...
double get_expansion_precision() const
Return the expansion precision target for the expansion terms.
int required_expansion_order(double e, int m) const
Return the smallest s value such that all for.
A class which reads-in and provides a convenient interface to the coefficients.