9 #ifndef __TEST_ORBIT_SOLVER_H 10 #define __TEST_ORBIT_SOLVER_H 19 #include "../../Evolve/OrbitSolver.h" 20 #include "../../Star/EvolvingStar.h" 21 #include "../../Planet/Planet.h" 22 #include "../../Evolve/DiskBinarySystem.h" 23 #include "../../Core/AstronomicalConstants.h" 24 #include "../shared/PolynomialEvolution.h" 25 #include "../shared/Common.h" 26 #include "../shared/MakeStar.h" 68 double phase_lag = 1.0e-5
84 double coupling_timescale,
98 double phase_lag = 1.0e-5
106 const double *initial_Lstar,
107 double initial_incl = 0.0,
108 double secondary_mass = 1.0,
110 double tsecondary = Core::NaN,
112 double secondary_radius = 1.0,
113 double precision = 1e-8,
114 double max_step_factor = 1e-3,
115 const std::list<double> required_ages = std::list<double>()
119 std::vector< const std::list<double> *>
get_evolution()
const;
124 const std::vector<
const std::list<double> * > &
125 tabulated_real_quantities,
126 std::vector<const Core::OneArgumentDiffFunction *>
127 expected_real_quantities,
133 bool debug_mode =
false 140 double *initial_Lstar,
142 double wind_sat_freq,
143 double core_env_coupling_time,
144 std::vector<const Core::OneArgumentDiffFunction *>
148 bool debug_mode =
false 153 std::vector<const Core::OneArgumentDiffFunction *>
159 double secondary_mass,
168 std::vector<const Core::OneArgumentDiffFunction *>
169 calculate_expected_disklocked_to_fast_to_locked(
186 bool include_disk_lock=
true 191 std::vector<const Core::OneArgumentDiffFunction *>
192 calculate_expected_polar_1_0(
205 std::vector<const Core::OneArgumentDiffFunction *>
206 calculate_expected_polar_2_0(
221 double &lconv_decay_rate,
230 std::vector<const Core::OneArgumentDiffFunction *>
231 calculate_expected_oblique_m_0(
245 double initial_wstar,
267 void test_disk_locked_no_stellar_evolution();
271 void test_disk_locked_with_stellar_evolution();
278 void test_no_planet_evolution();
290 void test_unlocked_evolution();
295 void test_locked_evolution();
300 void test_disklocked_to_locked_to_noplanet();
305 void test_disklocked_to_fast_to_noplanet();
310 void test_disklocked_to_fast_to_locked();
315 void test_disklocked_to_locked_to_fast();
321 void test_polar_1_0_evolution();
329 void test_polar_2_0_evolution();
347 void test_oblique_1_0_evolution();
351 void test_oblique_2_0_evolution();
Declare & define a class tracking flags indicating the expected state of the evolution (e...
Star::InterpolatedEvolutionStar * __star
The star used in the current test (NULL if primary is planet).
The test suite that exercises the OrbitSolver class.
Single zone non-evolving planets with huge dissipation, so they always remain locked to the disk...
void test_no_planet_scenario(const StellarEvolution::Interpolator &stellar_evol, double *initial_Lstar, double windK, double wind_sat_freq, double core_env_coupling_time, std::vector< const Core::OneArgumentDiffFunction *> &expected_evolution, const ExpectedEvolutionMode< bool > &expected_wind_mode, double max_age=MAX_AGE, bool debug_mode=false)
Test a planet-less scenario computed in 3 different ways: 1) withou a planet 2) without dissipation 3...
void make_single_component_star(const StellarEvolution::Interpolator &evolution, double wind_strength, double wind_sat_freq, double coupling_timescale, double min_frequency, double max_frequency, double decay_scale, double phase_lag=1.0e-5)
Create __star with constant dissipation in a range, quickly decaying outside of that.
Evolve::DiskBinarySystem * __system
The system being evolved by the current test.
const double MAX_AGE
Most tests end at this age in Gyr.
Orientations of zones of bodies in a binary system.
Planet::Planet * __primary_planet
The primary planet in the current test (NULL if primary is star).
A class that interpolates among stellar evolution tracks.
Declare an inumeration for the various quantities tracked by the evolution and checked.
void set_single_component_dissipation(double min_frequency, double max_frequency, double decay_scale, double phase_lag=1.0e-5)
Set the dissipation of the primary to only a single tidal.
void evolve(double wdisk, double tdisk, double initial_a, const double *initial_Lstar, double initial_incl=0.0, double secondary_mass=1.0, double tsecondary=Core::NaN, double max_age=MAX_AGE, double secondary_radius=1.0, double precision=1e-8, double max_step_factor=1e-3, const std::list< double > required_ages=std::list< double >())
Add a planet to the given star and evolve, returning the solver.
Declares a OneArgumentDiffFunction sub-class giving the evolution of the stellar convective zone angu...
std::vector< const Core::OneArgumentDiffFunction * > calculate_expected_unlocked_evolution(double phase_lag, double secondary_mass, bool decaying=true)
Calculate the predicted evolution for the test_unlocked_evolution() case.
Declares a OneArgumentDiffFunction sub-classes giving the evolution of the core and envelope obliquit...
void test_solution(const std::vector< const std::list< double > * > &tabulated_real_quantities, std::vector< const Core::OneArgumentDiffFunction *> expected_real_quantities, const ExpectedEvolutionMode< Core::EvolModeType > &expected_evol_mode, const ExpectedEvolutionMode< bool > &expected_wind_mode, double min_age, double max_age, bool debug_mode=false)
Tests the latest evolution calculated by the solver against the given tracks.
std::vector< const Core::OneArgumentDiffFunction *> __temp_functions
A list of functions allocated during a test to delete at the end.
Solves the system of ODEs describing the evolution of a single planet around a single star...
Evolve::OrbitSolver * __solver
The solver used for the current test.
Declares a function of the stellar angular momentum that evolves linearly with time when only the m =...
Declares a function of the stellar angular momentum that evolves linearly with time when only the m =...
std::vector< const std::list< double > * > get_evolution() const
Return the last calculated evolution.
Some evolution mode that changes at specified ages.
For some prescribed amount of time the surface of the pramary spins at a prescribed rate...