Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
WindSaturationCondition.h
Go to the documentation of this file.
1 
9 #ifndef __WIND_SATURATION_CONDITION_H
10 #define __WIND_SATURATION_CONDITION_H
11 
12 #include "../Core/SharedLibraryExportMacros.h"
13 #include "../Evolve/StoppingCondition.h"
15 
16 namespace Star {
22  private:
25 
28 
31 
33  bool __primary;
34  public:
38 
40  const Evolve::DissipatingBody &other_body,
41 
43  bool primary,
44 
46  bool saturated
47  ) :
48  StoppingCondition((saturated ? -1 : 1)),
49  __saturation_freq(body.saturation_frequency()),
50  __body(body),
51  __other_body(other_body),
52  __primary(primary)
53  {}
54 
57  std::valarray<double> operator()(
58  Core::EvolModeType evol_mode,
59  const std::valarray<double> &orbit,
60  const std::valarray<double> &derivatives,
61  std::valarray<double> &stop_deriv
62  ) const;
63 
66  {return Evolve::WIND_SATURATION;}
67 
69  void reached(short deriv_sign, unsigned index=0)
70  {
71  Evolve::StoppingCondition::reached(deriv_sign, index);
72  __body.saturation_freq_crossed(deriv_sign);
73  }
74 
76  virtual std::string describe(int index = -1) const;
77 
78  };//End WindSaturationCondition class.
79 
80 }//End Star namespace.
81 #endif
void saturation_freq_crossed(short deriv_sign)
Called by the stopping condition monitoring wind saturation.
Satisfied when the surface zone of a body is spinning at exactly the wind saturation frequency...
A base class for any body contributing to tidal dissipation.
StoppingConditionType
The reasons for stopping the evolution currently supported.
Decrales a body subject to angular momentum loss .
double __saturation_freq
The frequency at which the wind saturates.
void reached(short deriv_sign, unsigned index=0)
See StoppingCondition::reached().
Evolve::StoppingConditionType type(unsigned=0) const
Identify this as a WIND_SATURATION condition.
A base class for all stopping conditions.
WindSaturationCondition(SaturatingSkumanichWindBody &body, const Evolve::DissipatingBody &other_body, bool primary, bool saturated)
bool __primary
Is __body we are the primary in the system?
EvolModeType
The various evolution modes.
Definition: Common.h:42
A DissipatingBody which loses angular momentum at a rate .
SaturatingSkumanichWindBody & __body
The body this condition is monitoring.
const Evolve::DissipatingBody & __other_body
The primary body in the system if not __body.
virtual void reached(short deriv_sign, unsigned index=0)
Called when a stopping condition has been reached by the evolution.