Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
Evolve::DissipatingZone Class Referenceabstract

A layer of a system body for which the tidal bulge is not exactly in phase with the tidal potential. More...

#include <DissipatingZone.h>

+ Inheritance diagram for Evolve::DissipatingZone:
+ Collaboration diagram for Evolve::DissipatingZone:

Public Member Functions

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)
 Defines the current orbit, triggering re-calculation of all quantities. More...
 
void set_evolution_rates (double angular_momentum, double inclination, double periapsis)
 Set evolution rates for this zone's properties for storing in the eveloution. More...
 
double forcing_frequency (int orbital_frequency_multiplier, int spin_frequency_multiplier, double orbital_frequency) const
 The tidal forcing frequency for the given term and orbital frequency. More...
 
void set_reference_zone_angmom (double reference_angmom)
 Defines the angular momentum of the reference zone for single body evolution. More...
 
double periapsis_evolution (const Eigen::Vector3d &orbit_torque, const Eigen::Vector3d &zone_torque, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV, const Eigen::Vector3d &orbit_torque_deriv=Eigen::Vector3d(), const Eigen::Vector3d &zone_torque_deriv=Eigen::Vector3d())
 The rate at which the periapsis of the orbit/reference zone in this zone's equatorial plane is changing. More...
 
double inclination_evolution (const Eigen::Vector3d &orbit_torque, const Eigen::Vector3d &zone_torque, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV, const Eigen::Vector3d &orbit_torque_deriv=Eigen::Vector3d(), const Eigen::Vector3d &zone_torque_deriv=Eigen::Vector3d())
 The rate at which the inclination between this zone and the orbit is changing. More...
 
virtual bool locked (int orbital_frequency_multiplier, int spin_frequency_multiplier) const
 Should return true iff the given term is presently locked. More...
 
virtual bool locked () const
 Should return true iff any tidal term is locked. More...
 
const SpinOrbitLockInfolock_held () const
 The currntly held lock. More...
 
void release_lock ()
 Update the zone as necessary when the held lock disappears from the expansion. More...
 
void release_lock (short direction)
 Update the zone as necessary when the held lock is broken. More...
 
void set_lock (int orbital_frequency_multiplier, int spin_frequency_multiplier)
 Locks the zone spin to the orbit in the given ratio. More...
 
virtual double modified_phase_lag (int orbital_frequency_multiplier, int spin_frequency_multiplier, double forcing_frequency, Dissipation::QuantityEntry entry, double &above_lock_value) const =0
 Should return the tidal phase lag time the love number for the given tidal term (or one of its derivatives). More...
 
virtual double love_coefficient (int orbital_frequency_multiplier, int spin_frequency_multiplier, Dissipation::QuantityEntry entry) const =0
 Should return the corresponding component of the love coefficient (Lai 2012 Equation 24). More...
 
virtual double moment_of_inertia (int deriv_order=0) const =0
 Moment of inertia of the zone or its age derivative at the age of last configure() call. More...
 
virtual double moment_of_inertia (double age, int deriv_order=0) const =0
 The moment of inertia of the zone or its age derivative at a specified age (no configure necessary). More...
 
double spin_frequency () const
 The spin frequency of the given zone. More...
 
double angular_momentum () const
 The angular momentum of the given zone in \(M_\odot R_\odot^2\). More...
 
double tidal_power (bool above, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 The dimensionless tidal power or one of its derivatives. More...
 
double tidal_power (double above_fraction, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 Same as tidal_power(bool, Dissipation::QuantityEntry), but using the predefined mix of below/above contributions. More...
 
double tidal_torque_x (bool above, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 The dimensionless tidal torque along x. More...
 
double tidal_torque_x (double above_fraction, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 Same as tidal_torque_x(bool, Dissipation::QuantityEntry) but below and above contributions mixed. More...
 
double tidal_torque_y (bool above, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 The dimensionless torque along y. More...
 
double tidal_torque_y (double above_fraction, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 Same as tidal_torque_y(bool, Dissipation::QuantityEntry) but below and above contributions mixed. More...
 
double tidal_torque_z (bool above, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 The dimensionless tidal torque along z. More...
 
double tidal_torque_z (double above_fraction, Dissipation::QuantityEntry entry=Dissipation::NO_DERIV) const
 Same as tidal_torque_z(bool, Dissipation::QuantityEntry) but below and above contributions mixed. More...
 
virtual double outer_radius (int deriv_order=0) const =0
 Outer radius of the zone or its derivative (per last. More...
 
virtual double outer_radius (double age, int deriv_order=0) const =0
 Same as outer_radius(int) but may be evaluated at a different age than for last confgure(). More...
 
virtual double outer_mass (int deriv_order=0) const =0
 Mass coordinate of the zone's outer ouboundary or its derivative. More...
 
virtual double outer_mass (double age, int deriv_order=0) const =0
 Same as outer_mass(int), but may be evaluated at a different age than last configure(). More...
 
virtual unsigned eccentricity_order () const
 
virtual void change_e_order (unsigned new_e_order, BinarySystem &system, bool primary, unsigned zone_index)
 Changes the order of the eccentricity expansion performed. More...
 
virtual void add_to_evolution ()
 Appends the state defined by last configure(), to the evolution. More...
 
virtual void rewind_evolution (unsigned nsteps)
 Discards the last steps from the evolution. More...
 
virtual void reset_evolution ()
 Discards all evolution. More...
 
const std::list< double > & get_evolution_real (ZoneEvolutionQuantities quantity) const
 The tabulated evolution of a real valued quantity so far. More...
 
const std::list< int > & get_evolution_integer (ZoneEvolutionQuantities quantity) const
 The tabulated evolution of an integer quantity so far. More...
 
unsigned locked_zone_index () const
 The index of this zone in the list of locked zones (valid only if locked). More...
 
unsigned & locked_zone_index ()
 Reference to the locked_zone_index() of this zone. More...
 
virtual bool dissipative () const =0
 Should return true iff the zone has some non-zero dissipation. More...
 
virtual bool can_lock () const =0
 Should return true iff the zone's dissipation is discontinuous at zero frequency. More...
 
virtual CombinedStoppingConditionstopping_conditions (BinarySystem &system, bool primary, unsigned zone_index)
 Conditions detecting the next possible discontinuities in the evolution due to this zone. More...
 
virtual void spin_jumped ()
 Notifies the zone that its spin just jumped discontinously. More...
 
virtual void reached_critical_age (double)
 Change the body as necessary at the given age. More...
 
virtual double next_stop_age () const
 The next age when the evolution needs to be stopped for a change in one of the bodies. More...
 
const SpinOrbitLockInfolock_monitored (bool other=false) const
 Useful for debugging. More...
 
- Public Member Functions inherited from Evolve::ZoneOrientation
 ZoneOrientation (double inclination=Core::NaN, double periapsis=Core::NaN)
 
void configure (double inclination, double periapsis)
 Changes the zone orientation. More...
 
void set_evolution_rates (double inclination, double periapsis)
 
double inclination (bool evolution_rate=false) const
 The angle between the angular momenta of the zone and the orbit. More...
 
double periapsis (bool evolution_rate=false) const
 The argument of periapsis of this zone minus the reference zone's. More...
 

Protected Member Functions

void initializing (bool flag)
 Notify the zone that it is in the process of initializing or not. More...
 
void configure_spin (double spin, bool spin_is_frequency)
 Configures only the spin of the zone. More...
 

Private Member Functions

void fix_forcing_frequency (const SpinOrbitLockInfo &limit, int orbital_frequency_multiplier, int spin_frequency_multiplier, double &forcing_frequency) const
 Ensure the forcing frequency has the correct sign per the given constraint. More...
 
void update_lock_to_lower_e_order (SpinOrbitLockInfo &lock)
 Updates a SpinOrbitLockInfo variable as appropriate when decreasing the eccentricity expansion order. More...
 
void limit_above_lock_per_expansion_order (int proposed_orbital_multiplier, int proposed_spin_multiplier)
 Set up __other_lock to the closest term above, given the term that would be used without limit to the orbital multiplier. More...
 
void set_faster_spin_lock (int proposed_orbital_multiplier, int proposed_spin_multiplier)
 Set up the lock that would be triggered if the spin increased by absolute value, given the closest term from an infinite expansion. More...
 
void initialize_locks ()
 Initializes the locks the first time the zone is configure() -ed. More...
 
void add_tidal_term (int m, int mp, double tidal_frequency, const TidalTermTriplet &U_value, const TidalTermTriplet &U_i_deriv, const TidalTermTriplet &U_e_deriv, const TidalTermTriplet &U_error)
 Add a term to the tidal torque and power arrays. More...
 
virtual void check_locks_consistency () const
 Runs a bunch of asserts to check the consistency of __lock and __other_lock. More...
 

Private Attributes

unsigned __e_order
 The expansion order in eccentricity to use. More...
 
TidalPotentialTerms __potential_term
 The expansion of the tidal potential in series. More...
 
double __angular_momentum
 The current angular momentum of the zone. More...
 
double __angular_momentum_evolution_rate
 The current rate of angular momentum evolution of the zone. More...
 
double __spin_frequency
 The current spin frequency of the zone. More...
 
double __orbital_frequency
 The orbital frequency (rad/day). More...
 
double __orbital_angmom
 The absolute value of the angular momentum of the orbit. More...
 
std::valarray< double > __power
 The dimensionless tidal power and its error and derivatives. More...
 
std::valarray< double > __torque_x
 The dimensionless tidal torque in the x direction and its derivatives. More...
 
std::valarray< double > __torque_y
 The dimensionless tidal torque in the y direction and its derivatives. More...
 
std::valarray< double > __torque_z
 The dimensionless tidal torque in the z direction and its derivatives. More...
 
SpinOrbitLockInfo __lock
 The lock the zone is currently held at (disabled if not locked). More...
 
SpinOrbitLockInfo __other_lock
 The term closest matched by the current spin-orbit ratio in the other direction from __lock. More...
 
std::vector< std::list< double > > __evolution_real
 The floating point quantities whose evolution is tracked. More...
 
std::vector< std::list< int > > __evolution_integer
 The integer quantities whose evolution is tracked. More...
 
unsigned __locked_zone_index
 If this zone is locked, this is its index in the list of locked zones in the system. More...
 
bool __initializing
 Is the zone in the middle of initializing (disable lock check)? More...
 

Static Private Attributes

static const double __torque_x_plus_coef []
 \(\kappa_{m,m'}^+/\kappa_{m,m'}\) as a function of \(m=-2 \ldots 2\). More...
 
static const double __torque_x_minus_coef []
 \(\kappa_{m,m'}^-/\kappa_{m,m'}\) as a function of \(m=-2 \ldots 2\). More...
 

Detailed Description

A layer of a system body for which the tidal bulge is not exactly in phase with the tidal potential.

Definition at line 132 of file DissipatingZone.h.

Member Function Documentation

◆ add_tidal_term()

void DissipatingZone::add_tidal_term ( int  m,
int  mp,
double  tidal_frequency,
const TidalTermTriplet U_value,
const TidalTermTriplet U_i_deriv,
const TidalTermTriplet U_e_deriv,
const TidalTermTriplet U_error 
)
private

Add a term to the tidal torque and power arrays.

Parameters
mThe azimuthal number of the term to add.
mpThe time frequnecy number of the term to add.
tidal_frequencyThe tidal frequency of the term to add.
U_valueThe \(\mathcal{U}_{m-1, m'}\), \(\mathcal{U}_{m, m'}\), and \(\mathcal{U}_{m+1, m'}\) terms
U_i_derivThe derivative with respect to inclination of U_value.
U_e_derivThe derivative with respect to eccentricity of U_value.
U_errorEstimate of the error in U_value due to truncating the eccentricity expansion.

Definition at line 290 of file DissipatingZone.cpp.

◆ add_to_evolution()

void DissipatingZone::add_to_evolution ( )
virtual

Appends the state defined by last configure(), to the evolution.

Definition at line 954 of file DissipatingZone.cpp.

◆ angular_momentum()

double Evolve::DissipatingZone::angular_momentum ( ) const
inline

The angular momentum of the given zone in \(M_\odot R_\odot^2\).

Definition at line 587 of file DissipatingZone.h.

◆ can_lock()

virtual bool Evolve::DissipatingZone::can_lock ( ) const
pure virtual

Should return true iff the zone's dissipation is discontinuous at zero frequency.

Implemented in Evolve::BrokenPowerlawPhaseLagZone, Evolve::SingleTidalTermZone, and Evolve::ConstPhaseLagZone.

◆ change_e_order()

void DissipatingZone::change_e_order ( unsigned  new_e_order,
BinarySystem system,
bool  primary,
unsigned  zone_index 
)
virtual

Changes the order of the eccentricity expansion performed.

Parameters
new_e_orderThe new eccentricity expansion order.
systemThe system being evolved.
primaryIs the body this zone is part of, the primary in the system.
zone_indexThe index of the zone in the body.

Reimplemented in Evolve::BrokenPowerlawPhaseLagZone.

Definition at line 902 of file DissipatingZone.cpp.

◆ check_locks_consistency()

void DissipatingZone::check_locks_consistency ( ) const
privatevirtual

Runs a bunch of asserts to check the consistency of __lock and __other_lock.

Definition at line 113 of file DissipatingZone.cpp.

◆ configure()

void DissipatingZone::configure ( bool  initialize,
double  age,
double  orbital_frequency,
double  eccentricity,
double  orbital_angmom,
double  spin,
double  inclination,
double  periapsis,
bool  spin_is_frequency 
)
virtual

Defines the current orbit, triggering re-calculation of all quantities.

Parameters
initializeIs this the first time the zone is configure() -ed?
ageThe age to set the zone to.
orbital_frequencyThe angular velocity of the orbit in rad/day.
eccentricityThe eccentricity of the orbit
orbital_angmomThe absolute value of the angular momentum of the orbit.
spinThe angular momentum or spin frequency of the zone if the zone is not in a spin–orbit lock (ignored it if is).
inclinationThe inclination of the zone relative to the orbit.
periapsisThe argument of periapsis of the orbit in the equatorial planet of the zone.
spin_is_frequencyShould the spin argument be interpreted as an angular momentum or a spin frequency?

Reimplemented in Evolve::BrokenPowerlawPhaseLagZone, Planet::PlanetZone, Evolve::PolynomialEvolutionZone, and Star::EvolvingStellarZone.

Definition at line 485 of file DissipatingZone.cpp.

◆ configure_spin()

void DissipatingZone::configure_spin ( double  spin,
bool  spin_is_frequency 
)
protected

Configures only the spin of the zone.

Parameters
spinSee same name argument to configure().
spin_is_frequencySee same name argument to configure().

Definition at line 461 of file DissipatingZone.cpp.

◆ dissipative()

virtual bool Evolve::DissipatingZone::dissipative ( ) const
pure virtual

Should return true iff the zone has some non-zero dissipation.

Implemented in Evolve::BrokenPowerlawPhaseLagZone, Evolve::SingleTidalTermZone, and Evolve::ConstPhaseLagZone.

◆ eccentricity_order()

virtual unsigned Evolve::DissipatingZone::eccentricity_order ( ) const
inlinevirtual

To what order should eccentricity expansion be performed for the given value of the eccentricity.

Definition at line 805 of file DissipatingZone.h.

◆ fix_forcing_frequency()

void DissipatingZone::fix_forcing_frequency ( const SpinOrbitLockInfo limit,
int  orbital_frequency_multiplier,
int  spin_frequency_multiplier,
double &  forcing_frequency 
) const
private

Ensure the forcing frequency has the correct sign per the given constraint.

If the forcing frequency has the opposite sign of what is expected based on the given lock information it is set to the smallest possible value with the correct sign.

Parameters
limitA tidal term for which the sign is known.
orbital_frequency_multiplierThe multiplier of the orbital frequency in the expression for the forcing frequency.
spin_frequency_multiplierThe multiplier of the spin frequency in the expression for the forcing frequency.
forcing_frequencyThe current forcing frequency to be updated if it violates the limit.

Definition at line 48 of file DissipatingZone.cpp.

◆ forcing_frequency()

double DissipatingZone::forcing_frequency ( int  orbital_frequency_multiplier,
int  spin_frequency_multiplier,
double  orbital_frequency 
) const

The tidal forcing frequency for the given term and orbital frequency.

Makes sure the forcing frequency has the correct sign regardless of numerical round-off.

Parameters
orbital_frequency_multiplierThe multiplier of the orbital frequency in the expression for the forcing frequency.
spin_frequency_multiplierThe multiplier of the spin frequency in the expression for the forcing frequency.
orbital_frequencyThe orbital frequency.

Definition at line 607 of file DissipatingZone.cpp.

◆ get_evolution_integer()

const std::list<int>& Evolve::DissipatingZone::get_evolution_integer ( ZoneEvolutionQuantities  quantity) const
inline

The tabulated evolution of an integer quantity so far.

Definition at line 845 of file DissipatingZone.h.

◆ get_evolution_real()

const std::list<double>& Evolve::DissipatingZone::get_evolution_real ( ZoneEvolutionQuantities  quantity) const
inline

The tabulated evolution of a real valued quantity so far.

Definition at line 835 of file DissipatingZone.h.

◆ inclination_evolution()

double DissipatingZone::inclination_evolution ( const Eigen::Vector3d &  orbit_torque,
const Eigen::Vector3d &  zone_torque,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV,
const Eigen::Vector3d &  orbit_torque_deriv = Eigen::Vector3d(),
const Eigen::Vector3d &  zone_torque_deriv = Eigen::Vector3d() 
)

The rate at which the inclination between this zone and the orbit is changing.

configure() must already have been called, and inclination() and spin_frequency() must be current.

Parameters
orbit_torqueThe torque on the orbit or reference zone due all zones (including this one) in this zone's coordinate system.
zone_torqueAll torques acting on this zone (i.e. tidal, angular momentum loss due to wind for the surface zone and coupling to neightboring zones due to differential rotation).
entryIf:
  • Dissipation::NO_DERIV - the value of the inclination evolution is returned,
  • Dissipation::EXPANSION_ERROR - the orbit_torque and zone_torque arguments must be error estemates and the error estimate of the inclination evolution rate is returned.
  • all other values - the derivative of the rate with respect to the given quantity is returned. For zone-specific quantities, derivative with respect to this zone's quantity is computed. If derivatives with respect to other zone's quantities are required, those only come in through the orbit torque and zone torque, so pass the corresponding derivative instead of the actual torques, and ignore this and subsequent arguments.
orbit_torque_derivThis argument is required if deriv is neither NO_DERIV nor PERIAPSIS, and should contain the derivative of the orbital torque relative to the quantity identified by deriv.
zone_torque_derivThis argument is required if dervi is neither NO_DERIV nor PERIAPSIS, and shoul contain the derivative of the zone torque relative to the quantity identified by deriv.

Definition at line 762 of file DissipatingZone.cpp.

◆ initialize_locks()

void DissipatingZone::initialize_locks ( )
private

Initializes the locks the first time the zone is configure() -ed.

The spin frequency and orbital frequency must already be set.

Definition at line 222 of file DissipatingZone.cpp.

◆ initializing()

void Evolve::DissipatingZone::initializing ( bool  flag)
inlineprotected

Notify the zone that it is in the process of initializing or not.

Definition at line 310 of file DissipatingZone.h.

◆ limit_above_lock_per_expansion_order()

void Evolve::DissipatingZone::limit_above_lock_per_expansion_order ( int  proposed_orbital_multiplier,
int  proposed_spin_multiplier 
)
private

Set up __other_lock to the closest term above, given the term that would be used without limit to the orbital multiplier.

◆ lock_held()

const SpinOrbitLockInfo& Evolve::DissipatingZone::lock_held ( ) const
inline

The currntly held lock.

Definition at line 488 of file DissipatingZone.h.

◆ lock_monitored()

const SpinOrbitLockInfo& Evolve::DissipatingZone::lock_monitored ( bool  other = false) const
inline

Useful for debugging.

Definition at line 910 of file DissipatingZone.h.

◆ locked() [1/2]

virtual bool Evolve::DissipatingZone::locked ( int  orbital_frequency_multiplier,
int  spin_frequency_multiplier 
) const
inlinevirtual

Should return true iff the given term is presently locked.

Definition at line 478 of file DissipatingZone.h.

◆ locked() [2/2]

virtual bool Evolve::DissipatingZone::locked ( ) const
inlinevirtual

Should return true iff any tidal term is locked.

Definition at line 484 of file DissipatingZone.h.

◆ locked_zone_index() [1/2]

unsigned Evolve::DissipatingZone::locked_zone_index ( ) const
inline

The index of this zone in the list of locked zones (valid only if locked).

Definition at line 857 of file DissipatingZone.h.

◆ locked_zone_index() [2/2]

unsigned& Evolve::DissipatingZone::locked_zone_index ( )
inline

Reference to the locked_zone_index() of this zone.

Definition at line 865 of file DissipatingZone.h.

◆ love_coefficient()

virtual double Evolve::DissipatingZone::love_coefficient ( int  orbital_frequency_multiplier,
int  spin_frequency_multiplier,
Dissipation::QuantityEntry  entry 
) const
pure virtual

Should return the corresponding component of the love coefficient (Lai 2012 Equation 24).

Parameters
orbital_frequency_multiplierThe multiplier of the orbital frequency in the expression for the forcing frequency.
spin_frequency_multiplierThe multiplier of the spin frequency in the expression for the forcing frequency.
entryThe return value should be either the phase lag itself (NO_DERIV) or its derivative w.r.t. the specified quantity. Usually there will be no error due to truncating the eccentricity expansion coefficient.

Implemented in Evolve::BrokenPowerlawPhaseLagZone, and Evolve::PolynomialEvolutionZone.

◆ modified_phase_lag()

virtual double Evolve::DissipatingZone::modified_phase_lag ( int  orbital_frequency_multiplier,
int  spin_frequency_multiplier,
double  forcing_frequency,
Dissipation::QuantityEntry  entry,
double &  above_lock_value 
) const
pure virtual

Should return the tidal phase lag time the love number for the given tidal term (or one of its derivatives).

In case the forcing frequency is exactly zero, it should return the phase lag for the case of the spin frequency approaching the term from below. The lag for spin frequency approaching from above should be written to above_lock_value. If the forcing frequency is non-zero, leave above_lock_value untouched.

Parameters
orbital_frequency_multiplierThe multiplier of the orbital frequency in the expression for the forcing frequency.
spin_frequency_multiplierThe multiplier of the spin frequency in the expression for the forcing frequency.
forcing_frequencyThe current forcing frequency in rad/day.
entryThe return value should be either the phase lag itself (NO_DERIV) or its derivative w.r.t. the specified quantity. Usually there will be no error due to truncating the eccentricity expansion coefficient.
above_lock_valueIf the lag of a locked term is calculated this should be set to the lag assuming the spin frequency is just above the lock. Otherwise, leave untouched.

Implemented in Evolve::BrokenPowerlawPhaseLagZone, Evolve::SingleTidalTermZone, and Evolve::ConstPhaseLagZone.

◆ moment_of_inertia() [1/2]

virtual double Evolve::DissipatingZone::moment_of_inertia ( int  deriv_order = 0) const
pure virtual

Moment of inertia of the zone or its age derivative at the age of last configure() call.

Parameters
deriv_orderWhat to return:
  • 0 The moment of inertia in \(M_\odot R_\odot^2\)
  • 1 The rate of change of the moment of inertia in \(M_\odot R_\odot^2/Gyr\)
  • 2 The second derivative in \(M_\odot R_\odot^2/Gyr^2\)

Implemented in Evolve::PolynomialEvolutionZone, Planet::PlanetZone, Star::EvolvingStellarCore, and Star::EvolvingStellarEnvelope.

◆ moment_of_inertia() [2/2]

virtual double Evolve::DissipatingZone::moment_of_inertia ( double  age,
int  deriv_order = 0 
) const
pure virtual

The moment of inertia of the zone or its age derivative at a specified age (no configure necessary).

Parameters
ageThe age at which to evaluate the moment of inertia.
deriv_orderWhat to return:
  • 0 The moment of inertia in \(M_\odot R_\odot^2\)
  • 1 The rate of change of the moment of inertia in \(M_\odot R_\odot^2/Gyr\)
  • 2 The second derivative in \(M_\odot R_\odot^2/Gyr^2\)

Implemented in Evolve::PolynomialEvolutionZone, Planet::PlanetZone, Star::EvolvingStellarCore, and Star::EvolvingStellarEnvelope.

◆ next_stop_age()

virtual double Evolve::DissipatingZone::next_stop_age ( ) const
inlinevirtual

The next age when the evolution needs to be stopped for a change in one of the bodies.

Reimplemented in Star::EvolvingStellarZone.

Definition at line 906 of file DissipatingZone.h.

◆ outer_mass() [1/2]

virtual double Evolve::DissipatingZone::outer_mass ( int  deriv_order = 0) const
pure virtual

Mass coordinate of the zone's outer ouboundary or its derivative.

The outermost zone's boundary is considered to be the mass of the body and should be constant.

Parameters
deriv_orderWhat to return:
  • 0 The boundary in \(M_\odot\)
  • 1 The rate of change of the boundary in \(M_\odot/Gyr\)
  • 2 The second derivative in \(M_\odot/Gyr^2\)

Implemented in Evolve::PolynomialEvolutionZone, Planet::PlanetZone, Star::EvolvingStellarCore, and Star::EvolvingStellarEnvelope.

◆ outer_mass() [2/2]

virtual double Evolve::DissipatingZone::outer_mass ( double  age,
int  deriv_order = 0 
) const
pure virtual

Same as outer_mass(int), but may be evaluated at a different age than last configure().

Implemented in Evolve::PolynomialEvolutionZone, Planet::PlanetZone, Star::EvolvingStellarCore, and Star::EvolvingStellarEnvelope.

◆ outer_radius() [1/2]

virtual double Evolve::DissipatingZone::outer_radius ( int  deriv_order = 0) const
pure virtual

Outer radius of the zone or its derivative (per last.

The outermost zone's outer radius is considered to be the radius of the body.

Parameters
deriv_orderWhat to return:
  • 0 The boundary in \(R_\odot\)
  • 1 The rate of change of the boundary in \(R_\odot/Gyr\)
  • 2 The second derivative in \(R_\odot/Gyr^2\)

Implemented in Evolve::PolynomialEvolutionZone, Planet::PlanetZone, Star::EvolvingStellarCore, and Star::EvolvingStellarEnvelope.

◆ outer_radius() [2/2]

virtual double Evolve::DissipatingZone::outer_radius ( double  age,
int  deriv_order = 0 
) const
pure virtual

Same as outer_radius(int) but may be evaluated at a different age than for last confgure().

Implemented in Evolve::PolynomialEvolutionZone, Planet::PlanetZone, Star::EvolvingStellarCore, and Star::EvolvingStellarEnvelope.

◆ periapsis_evolution()

double DissipatingZone::periapsis_evolution ( const Eigen::Vector3d &  orbit_torque,
const Eigen::Vector3d &  zone_torque,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV,
const Eigen::Vector3d &  orbit_torque_deriv = Eigen::Vector3d(),
const Eigen::Vector3d &  zone_torque_deriv = Eigen::Vector3d() 
)

The rate at which the periapsis of the orbit/reference zone in this zone's equatorial plane is changing.

Either configure() or set_reference_zone_angmom() must already have been called, and inclination() and spin_frequency() must be current.

Parameters
orbit_torqueThe torque on the orbit due to all other zones in this zone's coordinate system.
zone_torqueAll torques acting on this zone (i.e. tidale, angular momentum loss due to wind for the surface zone and coupling to neightboring zones due to differential rotation).
entryIf not Dissipation::NO_DERIV, the corresponding entry of the rate is returned. For zone-specific quantities, derivative with respect to this zone's quantity is computed. If derivatives with respect to other zone's quantities are required, those only come in through the orbit torque and external torque, so pass the corresponding derivative instead of the actual torques, and ignore this and subsequent arguments.
orbit_torque_derivThis argument is required if dervi is neither NO_DERIV nor PERIAPSIS, and should contain the derivative of the orbital torque relative to the quantity identified by deriv.
zone_torque_derivThis argument is required if deriv is neither NO_DERIV nor PERIAPSIS, and shoul contain the derivative of the zone torque relative to the quantity identified by deriv.

Definition at line 658 of file DissipatingZone.cpp.

◆ reached_critical_age()

virtual void Evolve::DissipatingZone::reached_critical_age ( double  )
inlinevirtual

Change the body as necessary at the given age.

Handles things like interpolation discontinuities.

Reimplemented in Star::EvolvingStellarZone.

Definition at line 901 of file DissipatingZone.h.

◆ release_lock() [1/2]

void DissipatingZone::release_lock ( )

Update the zone as necessary when the held lock disappears from the expansion.

Definition at line 855 of file DissipatingZone.cpp.

◆ release_lock() [2/2]

void DissipatingZone::release_lock ( short  direction)

Update the zone as necessary when the held lock is broken.

Parameters
directionThe direction that the spin will evolve toward in the future.

Definition at line 879 of file DissipatingZone.cpp.

◆ reset_evolution()

void DissipatingZone::reset_evolution ( )
virtual

Discards all evolution.

Definition at line 1004 of file DissipatingZone.cpp.

◆ rewind_evolution()

void DissipatingZone::rewind_evolution ( unsigned  nsteps)
virtual

Discards the last steps from the evolution.

Parameters
nstepsHow many steps of evolution to discard.

Definition at line 1012 of file DissipatingZone.cpp.

◆ set_evolution_rates()

void Evolve::DissipatingZone::set_evolution_rates ( double  angular_momentum,
double  inclination,
double  periapsis 
)
inline

Set evolution rates for this zone's properties for storing in the eveloution.

Parameters
angular_momentumThe rate at which the magnitude of the angular momentum changes
inclinationThe rate at which the obliquity changes
periapsisThe rate at which the periapsis changes

Definition at line 360 of file DissipatingZone.h.

◆ set_faster_spin_lock()

void Evolve::DissipatingZone::set_faster_spin_lock ( int  proposed_orbital_multiplier,
int  proposed_spin_multiplier 
)
private

Set up the lock that would be triggered if the spin increased by absolute value, given the closest term from an infinite expansion.

Parameters
proposed_orbital_multiplierThe proposed coefficient for the orbital frequency for the closest term to the current combination of orbital and spin frequencies that would lock if the spin got larger by absolute value, if the tidal potential expansion was calculated up to infinitely large s. Should be negative if the spin of the zone is negative.
proposed_spin_multiplierThe proposed coefficient of the zone spin frequency for the closest term to the current combination of orbital and spin frequencies that would lock if the spin got larger by absolute value, if the tidal potential expansion was calculated up to infinitely large s.

◆ set_lock()

void Evolve::DissipatingZone::set_lock ( int  orbital_frequency_multiplier,
int  spin_frequency_multiplier 
)
inline

Locks the zone spin to the orbit in the given ratio.

Definition at line 501 of file DissipatingZone.h.

◆ set_reference_zone_angmom()

void Evolve::DissipatingZone::set_reference_zone_angmom ( double  reference_angmom)
inline

Defines the angular momentum of the reference zone for single body evolution.

Definition at line 395 of file DissipatingZone.h.

◆ spin_frequency()

double Evolve::DissipatingZone::spin_frequency ( ) const
inline

The spin frequency of the given zone.

Definition at line 584 of file DissipatingZone.h.

◆ spin_jumped()

virtual void Evolve::DissipatingZone::spin_jumped ( )
inlinevirtual

Notifies the zone that its spin just jumped discontinously.

Definition at line 895 of file DissipatingZone.h.

◆ stopping_conditions()

CombinedStoppingCondition * DissipatingZone::stopping_conditions ( BinarySystem system,
bool  primary,
unsigned  zone_index 
)
virtual

Conditions detecting the next possible discontinuities in the evolution due to this zone.

Must be deleted when no longer necessary.

Parameters
systemThe system being evolved.
primaryIs the body this zone is part of, the primary in the system.
zone_indexThe index of the zone in the body.

Reimplemented in Evolve::BrokenPowerlawPhaseLagZone.

Definition at line 1022 of file DissipatingZone.cpp.

◆ tidal_power() [1/2]

double Evolve::DissipatingZone::tidal_power ( bool  above,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

The dimensionless tidal power or one of its derivatives.

Parameters
aboveIf a spin-orbit lock is in effect and the time-lag is discontinuous near zero forcing frequency, two possible values can be calculated, assuming that the zone spin frequency approaches the lock from below (false) or from above (true).
entryWhat to return

Definition at line 590 of file DissipatingZone.h.

◆ tidal_power() [2/2]

double Evolve::DissipatingZone::tidal_power ( double  above_fraction,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

Same as tidal_power(bool, Dissipation::QuantityEntry), but using the predefined mix of below/above contributions.

Parameters
above_fractionThe fraction of the timestep to assume to have spin above the lock.
entryWhat to return

Definition at line 612 of file DissipatingZone.h.

◆ tidal_torque_x() [1/2]

double Evolve::DissipatingZone::tidal_torque_x ( bool  above,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

The dimensionless tidal torque along x.

See tidal_power() for a description of the arguments.

Definition at line 639 of file DissipatingZone.h.

◆ tidal_torque_x() [2/2]

double Evolve::DissipatingZone::tidal_torque_x ( double  above_fraction,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

Same as tidal_torque_x(bool, Dissipation::QuantityEntry) but below and above contributions mixed.

Parameters
above_fractionThe fraction of the timestep to assume to have spin above the lock.
entryThe entry required (ignores the derivative of above_fraction if derivative is required).

Definition at line 655 of file DissipatingZone.h.

◆ tidal_torque_y() [1/2]

double Evolve::DissipatingZone::tidal_torque_y ( bool  above,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

The dimensionless torque along y.

See tidal_power() for a description of the arguments.

Definition at line 686 of file DissipatingZone.h.

◆ tidal_torque_y() [2/2]

double Evolve::DissipatingZone::tidal_torque_y ( double  above_fraction,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

Same as tidal_torque_y(bool, Dissipation::QuantityEntry) but below and above contributions mixed.

Parameters
above_fractionThe fraction of the timestep to assume to have spin above the lock.
entryThe torque entry required (ignores the derivative of above_fraction for derivatives).

Definition at line 706 of file DissipatingZone.h.

◆ tidal_torque_z() [1/2]

double Evolve::DissipatingZone::tidal_torque_z ( bool  above,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

The dimensionless tidal torque along z.

See tidal_power() for a description of the arguments.

Definition at line 731 of file DissipatingZone.h.

◆ tidal_torque_z() [2/2]

double Evolve::DissipatingZone::tidal_torque_z ( double  above_fraction,
Dissipation::QuantityEntry  entry = Dissipation::NO_DERIV 
) const
inline

Same as tidal_torque_z(bool, Dissipation::QuantityEntry) but below and above contributions mixed.

Parameters
above_fractionThe fraction of the timestep to assume to have spin above the lock.
entryThe entry required (ignores the derivative of above_fraction for derivatives).

Definition at line 747 of file DissipatingZone.h.

◆ update_lock_to_lower_e_order()

void DissipatingZone::update_lock_to_lower_e_order ( SpinOrbitLockInfo lock)
private

Updates a SpinOrbitLockInfo variable as appropriate when decreasing the eccentricity expansion order.

__e_order must already be updated to the new value.

Definition at line 179 of file DissipatingZone.cpp.

Member Data Documentation

◆ __angular_momentum

double Evolve::DissipatingZone::__angular_momentum
private

The current angular momentum of the zone.

Definition at line 150 of file DissipatingZone.h.

◆ __angular_momentum_evolution_rate

double Evolve::DissipatingZone::__angular_momentum_evolution_rate
private

The current rate of angular momentum evolution of the zone.

Definition at line 150 of file DissipatingZone.h.

◆ __e_order

unsigned Evolve::DissipatingZone::__e_order
private

The expansion order in eccentricity to use.

Definition at line 135 of file DissipatingZone.h.

◆ __evolution_integer

std::vector< std::list<int> > Evolve::DissipatingZone::__evolution_integer
private

The integer quantities whose evolution is tracked.

Definition at line 208 of file DissipatingZone.h.

◆ __evolution_real

std::vector< std::list<double> > Evolve::DissipatingZone::__evolution_real
private

The floating point quantities whose evolution is tracked.

Definition at line 205 of file DissipatingZone.h.

◆ __initializing

bool Evolve::DissipatingZone::__initializing
private

Is the zone in the middle of initializing (disable lock check)?

Definition at line 215 of file DissipatingZone.h.

◆ __lock

SpinOrbitLockInfo Evolve::DissipatingZone::__lock
private

The lock the zone is currently held at (disabled if not locked).

If the zone is not locked, this is one of the two terms closest to the current spin-orbit ratio and its sign is correct.

Definition at line 198 of file DissipatingZone.h.

◆ __locked_zone_index

unsigned Evolve::DissipatingZone::__locked_zone_index
private

If this zone is locked, this is its index in the list of locked zones in the system.

Definition at line 212 of file DissipatingZone.h.

◆ __orbital_angmom

double Evolve::DissipatingZone::__orbital_angmom
private

The absolute value of the angular momentum of the orbit.

Definition at line 150 of file DissipatingZone.h.

◆ __orbital_frequency

double Evolve::DissipatingZone::__orbital_frequency
private

The orbital frequency (rad/day).

Definition at line 150 of file DissipatingZone.h.

◆ __other_lock

SpinOrbitLockInfo Evolve::DissipatingZone::__other_lock
private

The term closest matched by the current spin-orbit ratio in the other direction from __lock.

Definition at line 198 of file DissipatingZone.h.

◆ __potential_term

TidalPotentialTerms Evolve::DissipatingZone::__potential_term
private

The expansion of the tidal potential in series.

Definition at line 138 of file DissipatingZone.h.

◆ __power

std::valarray<double> Evolve::DissipatingZone::__power
private

The dimensionless tidal power and its error and derivatives.

Consists of pairs of numbers one for each derivative. The first number of each pair is always filled and if the zone is in a lock it is the tidal power calculated assuming the zone spin frequency approaches the lock from below. The second number is filled only if the zone is in a spin-orbit lock and is the tidal power assuming the zone spin frequency approaches the lock from above. After all derivatives the final pair of numbers give the error in the undifferentiated value.

Definition at line 174 of file DissipatingZone.h.

◆ __spin_frequency

double Evolve::DissipatingZone::__spin_frequency
private

The current spin frequency of the zone.

Definition at line 150 of file DissipatingZone.h.

◆ __torque_x

std::valarray<double> Evolve::DissipatingZone::__torque_x
private

The dimensionless tidal torque in the x direction and its derivatives.

See description of __power for details on the content.

Definition at line 174 of file DissipatingZone.h.

◆ __torque_x_minus_coef

const double DissipatingZone::__torque_x_minus_coef
staticprivate
Initial value:
={0.0,
1.0,
std::sqrt(1.5),
std::sqrt(1.5),
1.0}

\(\kappa_{m,m'}^-/\kappa_{m,m'}\) as a function of \(m=-2 \ldots 2\).

Definition at line 146 of file DissipatingZone.h.

◆ __torque_x_plus_coef

const double DissipatingZone::__torque_x_plus_coef
staticprivate
Initial value:
={1.0,
std::sqrt(1.5),
std::sqrt(1.5),
1.0,
0.0}

\(\kappa_{m,m'}^+/\kappa_{m,m'}\) as a function of \(m=-2 \ldots 2\).

Definition at line 142 of file DissipatingZone.h.

◆ __torque_y

std::valarray<double> Evolve::DissipatingZone::__torque_y
private

The dimensionless tidal torque in the y direction and its derivatives.

See description of __power for details on the content.

Definition at line 174 of file DissipatingZone.h.

◆ __torque_z

std::valarray<double> Evolve::DissipatingZone::__torque_z
private

The dimensionless tidal torque in the z direction and its derivatives.

See description of __power for details on the content.

Definition at line 174 of file DissipatingZone.h.


The documentation for this class was generated from the following files: