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-6,
114 double max_step_factor = 1e-3
118 std::vector< const std::list<double> *>
get_evolution()
const;
123 const std::vector<
const std::list<double> * > &
124 tabulated_real_quantities,
125 std::vector<const Core::OneArgumentDiffFunction *>
126 expected_real_quantities,
132 bool debug_mode =
false 139 double *initial_Lstar,
141 double wind_sat_freq,
142 double core_env_coupling_time,
143 std::vector<const Core::OneArgumentDiffFunction *>
147 bool debug_mode =
false 152 std::vector<const Core::OneArgumentDiffFunction *>
158 double secondary_mass,
167 std::vector<const Core::OneArgumentDiffFunction *>
168 calculate_expected_disklocked_to_fast_to_locked(
185 bool include_disk_lock=
true 190 std::vector<const Core::OneArgumentDiffFunction *>
191 calculate_expected_polar_1_0(
204 std::vector<const Core::OneArgumentDiffFunction *>
205 calculate_expected_polar_2_0(
220 double &lconv_decay_rate,
229 std::vector<const Core::OneArgumentDiffFunction *>
230 calculate_expected_oblique_m_0(
244 double initial_wstar,
266 void test_disk_locked_no_stellar_evolution();
270 void test_disk_locked_with_stellar_evolution();
277 void test_no_planet_evolution();
289 void test_unlocked_evolution();
294 void test_locked_evolution();
299 void test_disklocked_to_locked_to_noplanet();
304 void test_disklocked_to_fast_to_noplanet();
309 void test_disklocked_to_fast_to_locked();
314 void test_disklocked_to_locked_to_fast();
320 void test_polar_1_0_evolution();
328 void test_polar_2_0_evolution();
346 void test_oblique_1_0_evolution();
350 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.
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-6, double max_step_factor=1e-3)
Add a planet to the given star and evolve, returning the solver.
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.
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...