9 #include "../Core/SharedLibraryExportMacros.h" 12 #include "../Star/CInterface.h" 13 #include "../Planet/CInterface.h" 32 LIB_PUBLIC
extern const double NaN;
53 unsigned num_tidal_frequency_breaks,
56 unsigned num_spin_frequency_breaks,
60 double *tidal_frequency_breaks,
64 double *spin_frequency_breaks,
70 double *tidal_frequency_powers,
76 double *spin_frequency_powers,
80 double reference_phase_lag,
85 double inertial_mode_enhancement,
89 double inertial_mode_sharpness
104 double initial_semimajor,
107 double initial_eccentricity,
111 double initial_inclination,
115 double disk_lock_frequency,
118 double disk_dissipation_age,
121 double secondary_formation_age
136 double initial_semimajor,
139 double initial_eccentricity,
143 double initial_inclination,
147 double disk_lock_frequency,
150 double disk_dissipation_age,
153 double secondary_formation_age
174 double companion_mass,
184 const double *spin_angmom,
188 const double *inclination,
193 const double *periapsis,
202 bool zero_outer_inclination,
207 bool zero_outer_periapsis
222 double companion_mass,
232 const double *spin_angmom,
236 const double *inclination,
241 const double *periapsis,
250 bool zero_outer_inclination,
255 bool zero_outer_periapsis
274 const double *spin_angmom,
279 const double *inclination,
284 const double *periapsis,
301 double max_time_step,
307 double *required_ages,
310 unsigned num_required_ages,
349 const CPlanet *planet,
361 double *eccentricity,
365 double *envelope_inclination,
369 double *core_inclination,
373 double *envelope_periapsis,
377 double *core_periapsis,
381 double *envelope_angmom,
390 double *planet_inclination,
394 double *planet_periapsis,
398 double *planet_angmom,
406 bool *wind_saturation,
410 double *semimajor_rate,
414 double *eccentricity_rate,
418 double *envelope_inclination_rate,
422 double *core_inclination_rate,
426 double *envelope_periapsis_rate,
430 double *core_periapsis_rate,
434 double *envelope_angmom_rate,
438 double *core_angmom_rate,
443 double *planet_inclination_rate,
448 double *planet_periapsis_rate,
452 double *planet_angmom_rate
483 double *eccentricity,
487 double *primary_envelope_inclination,
491 double *primary_core_inclination,
495 double *primary_envelope_periapsis,
499 double *primary_core_periapsis,
503 double *primary_envelope_angmom,
507 double *primary_core_angmom,
511 double *secondary_envelope_inclination,
515 double *secondary_core_inclination,
519 double *secondary_envelope_periapsis,
523 double *secondary_core_periapsis,
527 double *secondary_envelope_angmom,
531 double *secondary_core_angmom,
539 bool *primary_wind_saturation,
544 bool *secondary_wind_saturation,
548 double *semimajor_rate,
552 double *eccentricity_rate,
556 double *primary_envelope_inclination_rate,
560 double *primary_core_inclination_rate,
564 double *primary_envelope_periapsis_rate,
568 double *primary_core_periapsis_rate,
572 double *primary_envelope_angmom_rate,
576 double *primary_core_angmom_rate,
580 double *secondary_envelope_inclination_rate,
584 double *secondary_core_inclination_rate,
588 double *secondary_envelope_periapsis_rate,
592 double *secondary_core_periapsis_rate,
596 double *secondary_envelope_angmom_rate,
600 double *secondary_core_angmom_rate
619 const CPlanet *planet,
631 double *eccentricity,
635 double *envelope_inclination,
639 double *core_inclination,
643 double *envelope_periapsis,
647 double *core_periapsis,
651 double *envelope_angmom,
660 double *planet_inclination,
664 double *planet_periapsis,
668 double *planet_angmom,
676 bool *wind_saturation
707 double *eccentricity,
711 double *primary_envelope_inclination,
715 double *primary_core_inclination,
719 double *primary_envelope_periapsis,
723 double *primary_core_periapsis,
727 double *primary_envelope_angmom,
731 double *primary_core_angmom,
735 double *secondary_envelope_inclination,
739 double *secondary_core_inclination,
743 double *secondary_envelope_periapsis,
747 double *secondary_core_periapsis,
751 double *secondary_envelope_angmom,
755 double *secondary_core_angmom,
763 bool *primary_wind_saturation,
768 bool *secondary_wind_saturation
LIB_PUBLIC const double NaN
Not a number.
LIB_PUBLIC void set_zone_dissipation(BrokenPowerlawPhaseLagZone *zone, unsigned num_tidal_frequency_breaks, unsigned num_spin_frequency_breaks, double *tidal_frequency_breaks, double *spin_frequency_breaks, double *tidal_frequency_powers, double *spin_frequency_powers, double reference_phase_lag, double inertial_mode_enhancement, double inertial_mode_sharpness)
LIB_PUBLIC void configure_system(DiskBinarySystem *system, double age, double semimajor, double eccentricity, const double *spin_angmom, const double *inclination, const double *periapsis, int evolution_mode)
Sets the current state of a system.
LIB_PUBLIC OrbitSolver * evolve_system(DiskBinarySystem *system, double final_age, double max_time_step, double precision, double *required_ages, unsigned num_required_ages, bool print_progress, double max_runtime)
Calculate the evolution of a previously configured binary system.
LIB_PUBLIC void configure_planet(CPlanet *planet, double age, double companion_mass, double semimajor, double eccentricity, const double *spin_angmom, const double *inclination, const double *periapsis, bool locked_surface, bool zero_outer_inclination, bool zero_outer_periapsis)
Defines the orbit a planet is in.
struct LIB_PUBLIC BrokenPowerlawPhaseLagZone
Opaque struct to cant to/from Evolve::BrokenPowerlawPhasLagZone.
struct LIB_PUBLIC OrbitSolver
Opaque struct to cast to/from Evolve::OrbitSolver.
LIB_PUBLIC void get_star_star_evolution(const OrbitSolver *solver, const DiskBinarySystem *system, const EvolvingStar *primary, const EvolvingStar *secondary, double *age, double *semimajor, double *eccentricity, double *primary_envelope_inclination, double *primary_core_inclination, double *primary_envelope_periapsis, double *primary_core_periapsis, double *primary_envelope_angmom, double *primary_core_angmom, double *secondary_envelope_inclination, double *secondary_core_inclination, double *secondary_envelope_periapsis, double *secondary_core_periapsis, double *secondary_envelope_angmom, double *secondary_core_angmom, int *evolution_mode, bool *primary_wind_saturation, bool *secondary_wind_saturation, double *semimajor_rate, double *eccentricity_rate, double *primary_envelope_inclination_rate, double *primary_core_inclination_rate, double *primary_envelope_periapsis_rate, double *primary_core_periapsis_rate, double *primary_envelope_angmom_rate, double *primary_core_angmom_rate, double *secondary_envelope_inclination_rate, double *secondary_core_inclination_rate, double *secondary_envelope_periapsis_rate, double *secondary_core_periapsis_rate, double *secondary_envelope_angmom_rate, double *secondary_core_angmom_rate)
Fill C-style arrays with the calculated evolution of a binary star system.
LIB_PUBLIC void destroy_solver(OrbitSolver *solver)
Destroy a solver created by evolve_system.
LIB_PUBLIC const int BINARY_EVOL_MODE
Evolution mode ID for when the two bodies orbit each other.
Defines the OrbitSolver class, the various stopping conditions and a number of other classes used whi...
struct LIB_PUBLIC DiskBinarySystem
Opaque struct to cast to/from Evolve::DiskBinarySystem.
LIB_PUBLIC void get_star_planet_evolution(const OrbitSolver *solver, const DiskBinarySystem *system, const EvolvingStar *star, const CPlanet *planet, double *age, double *semimajor, double *eccentricity, double *envelope_inclination, double *core_inclination, double *envelope_periapsis, double *core_periapsis, double *envelope_angmom, double *core_angmom, double *planet_inclination, double *planet_periapsis, double *planet_angmom, int *evolution_mode, bool *wind_saturation, double *semimajor_rate, double *eccentricity_rate, double *envelope_inclination_rate, double *core_inclination_rate, double *envelope_periapsis_rate, double *core_periapsis_rate, double *envelope_angmom_rate, double *core_angmom_rate, double *planet_inclination_rate, double *planet_periapsis_rate, double *planet_angmom_rate)
Fill C-style arrays with the calculated evolution of a star-planet system.
LIB_PUBLIC void destroy_binary(DiskBinarySystem *system)
Destroy a previously created binary system.
LIB_PUBLIC const int LOCKED_SURFACE_SPIN_EVOL_MODE
Evolution mode ID for when the surface rotation of one of the bodies is locked to a prescribed value...
LIB_PUBLIC DiskBinarySystem * create_star_star_system(EvolvingStar *primary, EvolvingStar *secondary, double initial_semimajor, double initial_eccentricity, double initial_inclination, double disk_lock_frequency, double disk_dissipation_age, double secondary_formation_age)
Create a binary system out of two stars.
LIB_PUBLIC unsigned num_evolution_steps(OrbitSolver *solver)
At how many points was the evolution saved.
LIB_PUBLIC void read_eccentricity_expansion_coefficients(const char *filename)
Read eccentricity expansion coefficients from a file.
LIB_PUBLIC const int TABULATION_EVOL_MODE
Evolution mode ID used as the mode to transform to from all other modes when storing the computed evo...
LIB_PUBLIC const int SINGLE_EVOL_MODE
Evolution mode ID for when there is only one body in the system (only its rotation evolves)...
Declares a class of binary systems which start with a disk-locked star which is then released and at ...
LIB_PUBLIC void get_star_star_final_state(const OrbitSolver *solver, const DiskBinarySystem *system, const EvolvingStar *primary, const EvolvingStar *secondary, double *age, double *semimajor, double *eccentricity, double *primary_envelope_inclination, double *primary_core_inclination, double *primary_envelope_periapsis, double *primary_core_periapsis, double *primary_envelope_angmom, double *primary_core_angmom, double *secondary_envelope_inclination, double *secondary_core_inclination, double *secondary_envelope_periapsis, double *secondary_core_periapsis, double *secondary_envelope_angmom, double *secondary_core_angmom, int *evolution_mode, bool *primary_wind_saturation, bool *secondary_wind_saturation)
Fill destiantions with the calculated final state of a binary star system.
LIB_PUBLIC DiskBinarySystem * create_star_planet_system(EvolvingStar *star, CPlanet *planet, double initial_semimajor, double initial_eccentricity, double initial_inclination, double disk_lock_frequency, double disk_dissipation_age, double secondary_formation_age)
Create a binary system out of a star and a planet.
LIB_PUBLIC void get_star_planet_final_state(const OrbitSolver *solver, const DiskBinarySystem *system, const EvolvingStar *star, const CPlanet *planet, double *age, double *semimajor, double *eccentricity, double *envelope_inclination, double *core_inclination, double *envelope_periapsis, double *core_periapsis, double *envelope_angmom, double *core_angmom, double *planet_inclination, double *planet_periapsis, double *planet_angmom, int *evolution_mode, bool *wind_saturation)
Fill destiantions with the calculated final state of a star-planet system.
LIB_PUBLIC void configure_star(EvolvingStar *star, double age, double companion_mass, double semimajor, double eccentricity, const double *spin_angmom, const double *inclination, const double *periapsis, bool locked_surface, bool zero_outer_inclination, bool zero_outer_periapsis)
Defines the orbit a star is in.
struct LIB_PUBLIC EvolvingStar
Opaque struct to cast to/from Star::InterpolatedEvolutionStar.