10 #ifndef __SATURATING_SKUMANICH_WIND_BODY_H 11 #define __SATURATING_SKUMANICH_WIND_BODY_H 13 #include "../Core/SharedLibraryExportMacros.h" 14 #include "../Evolve/DissipatingBody.h" 15 #include "../Evolve/BinarySystem.h" 39 bool __detected_saturation;
47 double saturation_frequency
49 __wind_strength(wind_strength),
50 __saturation_freq(saturation_frequency)
52 , __detected_saturation(false)
57 double angular_momentum_loss(
67 __saturated = (std::abs(spin_frequency()) > __saturation_freq);
69 __detected_saturation =
true;
86 assert(deriv_sign == (__saturated ? -1 : 1));
88 __saturated = !__saturated;
94 __saturation_evolution.push_back(__saturated);
104 for(
unsigned i = 0; i < nsteps; ++i)
105 __saturation_evolution.pop_back();
112 __saturation_evolution.clear();
130 {
return __saturation_evolution;}
SaturatingSkumanichWindBody(double wind_strength, double saturation_frequency)
double saturation_frequency()
The frequency at which the wind loss saturates in rad/day.
virtual void rewind_evolution(unsigned nsteps)
Discards the last steps from the evolution.
virtual void reset_evolution()
Discards all evolution.
virtual void add_to_evolution()
Appends the state defined by last configure(), to the evolution.
virtual void add_to_evolution()
Appends the state defined by last configure(), to the evolution.
void saturation_freq_crossed(short deriv_sign)
Called by the stopping condition monitoring wind saturation.
void detect_saturation()
Sets the saturation based on the currently configured spin frequency.
A base class for any body contributing to tidal dissipation.
double __wind_strength
The strength of the magnetic wind.
void spin_jumped()
Resets its saturation state after a discontinous spin jump.
const std::list< bool > & wind_saturation_evolution() const
The tabulated wind saturation states so far.
virtual void reset_evolution()
Discards all evolution.
virtual void spin_jumped()
Notifies the body that its spin just discontinously jumped.
virtual void rewind_evolution(unsigned nsteps)
Discards the last steps from the evolution.
NO_DERIV
The quantity itself, undifferentiated.
std::list< bool > __saturation_evolution
The saturation states recorded by add_to_evolution() so far.
bool saturated()
Is the wind loss currently saturated?
A class combining the the outputs of multiple stopping conditions.
A DissipatingBody which loses angular momentum at a rate .
bool __saturated
Is the wind currently saturated?
Describes a system of two bodies orbiting each other.