Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
ExternalStoppingConditions.cpp
1 #define BUILDING_LIBRARY
3 
4 namespace Evolve {
5 
6  std::valarray<double> RotFastCondition::operator()(
8  const std::valarray<double> &,
9  const std::valarray<double> &,
10  std::valarray<double> &stop_deriv
11  ) const
12  {
13  if(!std::isfinite(__spin_thres)) return std::valarray<double>(-1, 1);
14  double spin_freq = __zone.spin_frequency();
15  stop_deriv.resize(1, Core::NaN);
16  return std::valarray<double>(
17  (spin_freq - __spin_thres) / __spin_thres,
18  1
19  );
20  }
21 
22  std::string RotFastCondition::describe(int ) const
23  {
24  std::ostringstream description;
25  description << "Critical spin of " << __spin_thres << " rad/day";
26  return description.str();
27  }
28 
29 } //End Evolve namespace.
Users can define any stopping condition they wish the evolution to search for in this file...
virtual std::string describe(int index=0) const
See StoppingCondition::describe().
Orientations of zones of bodies in a binary system.
double __spin_thres
The spin threshold in rad/day.
EvolModeType
The various evolution modes.
Definition: Common.h:42
std::valarray< double > operator()(Core::EvolModeType evol_mode, const std::valarray< double > &orbit, const std::valarray< double > &derivatives, std::valarray< double > &stop_deriv) const
Returns the difference between the convective zone spin and the threshold divided by the latter...
DissipatingZone & __zone
Which zone&#39;s rotation to monitor.
double spin_frequency() const
The spin frequency of the given zone.