Declare C-style functions for accessing the functionality of the Evolve library. More...
#include "../Core/SharedLibraryExportMacros.h"
#include "DiskBinarySystem.h"
#include "OrbitSolver.h"
#include "../Star/CInterface.h"
#include "../Planet/CInterface.h"
Go to the source code of this file.
Functions | |
LIB_PUBLIC void | read_eccentricity_expansion_coefficients (const char *filename) |
Read eccentricity expansion coefficients from a file. More... | |
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 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. More... | |
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. More... | |
LIB_PUBLIC void | destroy_binary (DiskBinarySystem *system) |
Destroy a previously created binary system. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
LIB_PUBLIC void | destroy_solver (OrbitSolver *solver) |
Destroy a solver created by evolve_system. More... | |
LIB_PUBLIC unsigned | num_evolution_steps (OrbitSolver *solver) |
At how many points was the evolution saved. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Variables | |
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. More... | |
LIB_PUBLIC const int | BINARY_EVOL_MODE |
Evolution mode ID for when the two bodies orbit each other. More... | |
LIB_PUBLIC const int | SINGLE_EVOL_MODE |
Evolution mode ID for when there is only one body in the system (only its rotation evolves). More... | |
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 evolution. More... | |
LIB_PUBLIC const double | NaN |
Not a number. More... | |
struct LIB_PUBLIC | DiskBinarySystem |
Opaque struct to cast to/from Evolve::DiskBinarySystem. More... | |
struct LIB_PUBLIC | OrbitSolver |
Opaque struct to cast to/from Evolve::OrbitSolver. More... | |
struct LIB_PUBLIC | BrokenPowerlawPhaseLagZone |
Opaque struct to cant to/from Evolve::BrokenPowerlawPhasLagZone. More... | |
Declare C-style functions for accessing the functionality of the Evolve library.
Definition in file CInterface.h.
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.
The inclinations and arguments of periapsis must be already set for all zones.
planet | The body to configure. |
age | The age to set the body to. |
companion_mass | The mass of the second body in the system. |
semimajor | The semimajor axis of the orbit in \(R_\odot\). |
eccentricity | The eccentricity of the orbit |
spin_angmom | The spin angular momenta of the non-locked zones of the body (outermost zone to innermost). |
inclination | The inclinations of the zones of the body (same order as spin_angmom). If NULL, all inclinations are assumed zero. |
periapsis | The arguments of periapsis of the zones of the bodies (same order as spin_angmom). If NULL, all periapses are assumed zero. |
locked_surface | If true, the outermost zone's spin is assumed locked to a disk and spin_angmom is assumed to start from the next zone. |
zero_outer_inclination | If true, the outermost zone's inclination is assumed to be zero and the inclination argument is assumed to start from the next zone. |
zero_outer_periapsis | If true, the outermost zone's periapsis is assumed to be zero and the inclination argument is assumed to start from the next zone. |
Definition at line 148 of file CInterface.cpp.
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.
The inclinations and arguments of periapsis must be already set for all zones.
star | The body to configure. |
age | The age to set the body to. |
companion_mass | The mass of the second body in the system. |
semimajor | The semimajor axis of the orbit in \(R_\odot\). |
eccentricity | The eccentricity of the orbit |
spin_angmom | The spin angular momenta of the non-locked zones of the body (outermost zone to innermost). |
inclination | The inclinations of the zones of the body (same order as spin_angmom). If NULL, all inclinations are assumed zero. |
periapsis | The arguments of periapsis of the zones of the bodies (same order as spin_angmom). If NULL, all periapses are assumed zero. |
locked_surface | If true, the outermost zone's spin is assumed locked to a disk and spin_angmom is assumed to start from the next zone. |
zero_outer_inclination | If true, the outermost zone's inclination is assumed to be zero and the inclination argument is assumed to start from the next zone. |
zero_outer_periapsis | If true, the outermost zone's periapsis is assumed to be zero and the inclination argument is assumed to start from the next zone. |
Definition at line 121 of file CInterface.cpp.
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.
system | The system to set the state of. |
age | The age to set the system to. |
semimajor | The semimajor axis of the orbit. |
eccentricity | The eccentricity of the orbit. |
spin_angmom | The spin angular momenta of the zones of the bodies (body 1 first, outermost zone to innermost, followed by body 2). |
inclination | The inclinations of the zones of the bodies (same order as spin_angmom). The surface zone inclination must be omitted for single body systems. |
periapsis | The arguments of periapsis of the zones of the bodies (same order as spin_angmom, but not including the surface zone of the first body). |
evolution_mode | The evolution mode to assume. Must be one of the constants defined. |
Definition at line 175 of file CInterface.cpp.
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.
star | The first body in the system. Assumed to always be there, so for a star-planet system this should be the star. |
planet | The second body in the system, initially may not be there and later may be engulfed by the first body. |
initial_semimajor | The semimajor axis of the orbit at which the secondary forms in \(R_\odot\). |
initial_eccentricity | The eccentricity of the orbit at which the secondary forms. |
initial_inclination | Inclination between surface zone of primary and initial orbit in radians. |
disk_lock_frequency | Frequency of the surface spin of the primary when disk is present in rad/day. |
disk_dissipation_age | Age when disk dissipates in Gyrs. |
secondary_formation_age | Age when the secondary forms. |
Definition at line 68 of file CInterface.cpp.
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.
primary | The first body in the system. Assumed to always be there, so for a star-planet system this should be the star. |
secondary | The second body in the system, initially may not be there and later may be engulfed by the first body. |
initial_semimajor | The semimajor axis of the orbit at which the secondary forms in \(R_\odot\). |
initial_eccentricity | The eccentricity of the orbit at which the secondary forms. |
initial_inclination | Inclination between surface zone of primary and initial orbit in radians. |
disk_lock_frequency | Frequency of the surface spin of the primary when disk is present in rad/day. |
disk_dissipation_age | Age when disk dissipates in Gyrs. |
secondary_formation_age | Age when the secondary forms. |
Definition at line 92 of file CInterface.cpp.
LIB_PUBLIC void destroy_binary | ( | DiskBinarySystem * | system | ) |
Destroy a previously created binary system.
system | The system to destroy. |
Definition at line 116 of file CInterface.cpp.
LIB_PUBLIC void destroy_solver | ( | OrbitSolver * | solver | ) |
Destroy a solver created by evolve_system.
solver | The solver to destroy. |
Definition at line 229 of file CInterface.cpp.
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.
system | The system to evolve. |
final_age | The age at which to stop the evolution in Gyrs. The starting age must be already set for the system. |
max_time_step | The maximum size of the time step allowed in Gyrs. |
precision | The precision to require of the solution. |
required_ages | Ages at which the evolution must stop precisely. |
num_required_ages | The number of required ages. |
print_progress | See print_progress argument to Evolve::OrbitSolver::OrbitSolver() |
max_runtime | The maximum time in seconds the evolutions is allowed to run. Partially calculated evolution can be queried. Any non-positive |
Definition at line 197 of file CInterface.cpp.
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.
All return arrays must either be allocated to the correct size or be NULL. In the latter case, the corresponding quantity is not returned.
solver | The solver which was used to calculate the orbital evolution. |
system | The system which was evolved. |
star | The star which was evolved. |
planet | The planet which was evolved, |
age | An array to fill with the ages at which the evolution was calculated. |
semimajor | An array to fill with the semimajor axis at the saved evolution steps. |
eccentricity | An array to fill with the orbital eccentricity at the saved evolution steps. |
envelope_inclination | An array to fill with the angle between the stellar convective envelope and the orbital angular momenta. |
core_inclination | An array to fill with the angle between the stellar radiative core and the orbital angular momenta. |
envelope_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
core_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
envelope_angmom | An array to fill with the angular momentum of the stellar convective envelope. |
core_angmom | An array to fill with the angular momentum of the stellar radiative core. |
planet_inclination | An array to fill wit the angle between the planet's and the orbital angular momentum (pass NULL if the planet is not dissipative). |
planet_periapsis | An array to fill wit the periapsis of the orbit in the equatorial plane of the planet (pass NULL if the planet is not dissipative). |
planet_angmom | An array to fill wit the angular momentum of the planet (pass NULL if the planet is not dissipative). |
evolution_mode | An array to fill with the evolution mode of the system. |
wind_saturation | An array to fill with a flag indicating whether the angular momentum loss due to stellar wind is in the satured state (true) or not (false). |
semimajor_rate | An array to fill with the rate at which the semimajor axis changes at the saved evolution steps. |
eccentricity_rate | An array to fill with the rate the orbital eccentricity changes at the saved evolution steps. |
envelope_inclination_rate | An array to fill with the rate at which the angle between the stellar convective envelope and the orbital angular momenta changes. |
core_inclination_rate | An array to fill with the rate of change of the angle between the stellar radiative core and the orbital angular momenta. |
envelope_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
core_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
envelope_angmom_rate | An array to fill with the rate of change of the angular momentum of the stellar convective envelope. |
core_angmom_rate | An array to fill with the rate of change of the angular momentum of the stellar radiative core. |
planet_inclination_rate | An array to fill wit the rate of change of the angle between the planet's and the orbital angular momentum (pass NULL if the planet is not dissipative). |
planet_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the planet (pass NULL if the planet is not dissipative). |
planet_angmom_rate | An array to fill with the range of change of the angular momentum of the planet (pass NULL if the planet is not dissipative). |
Definition at line 391 of file CInterface.cpp.
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.
All return variables must either be allocated or be NULL. In the latter case, the corresponding quantity is not returned.
solver | The solver which was used to calculate the orbital evolution. |
system | The system which was evolved. |
star | The star which was evolved. |
planet | The planet which was evolved. |
age | An array to fill with the ages at which the evolution was calculated. |
semimajor | An array to fill with the semimajor axis at the saved evolution steps. |
eccentricity | An array to fill with the orbital eccentricity at the saved evolution steps. |
envelope_inclination | To overwrite with the angle between the stellar convective envelope and the orbital angular momenta. |
core_inclination | To overwrite with the angle between the stellar radiative core and the orbital angular momenta. |
envelope_periapsis | To overwrite with the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
core_periapsis | To overwrite with the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
envelope_angmom | To overwrite with the angular momentum of the stellar convective envelope. |
core_angmom | To overwrite with the angular momentum of the stellar radiative core. |
planet_inclination | To overwrite with the angle between the planet's and the orbital angular momentum (pass NULL if the planet is not dissipative). |
planet_periapsis | To overwrite with the periapsis of the orbit in the equatorial plane of the planet (pass NULL if the planet is not dissipative). |
planet_angmom | To overwrite with the angular momentum of the planet (pass NULL if the planet is not dissipative). |
evolution_mode | An array to fill with the evolution mode of the system. |
wind_saturation | An array to fill with a flag indicating whether the angular momentum loss due to stellar wind is in the satured state (true) or not (false). |
Definition at line 637 of file CInterface.cpp.
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.
All return arrays must either be allocated to the correct size or be NULL. In the latter case, the corresponding quantity is not returned.
solver | The solver which was used to calculate the orbital evolution. |
system | The system which was evolved. |
primary | The primary star which was evolved. |
secondary | The secondary star which was evolved. |
age | An array to fill with the ages at which the evolution was calculated. |
semimajor | An array to fill with the semimajor axis at the saved evolution steps. |
eccentricity | An array to fill with the orbital eccentricity at the saved evolution steps. |
primary_envelope_inclination | An array to fill with the angle between the stellar convective envelope and the orbital angular momenta. |
primary_core_inclination | An array to fill with the angle between the stellar radiative core and the orbital angular momenta. |
primary_envelope_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
primary_core_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
primary_envelope_angmom | An array to fill with the angular momentum of the stellar convective envelope. |
primary_core_angmom | An array to fill with the angular momentum of the stellar radiative core. |
secondary_envelope_inclination | An array to fill with the angle between the stellar convective envelope and the orbital angular momenta. |
secondary_core_inclination | An array to fill with the angle between the stellar radiative core and the orbital angular momenta. |
secondary_envelope_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
secondary_core_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
secondary_envelope_angmom | An array to fill with the angular momentum of the stellar convective envelope. |
secondary_core_angmom | An array to fill with the angular momentum of the stellar radiative core. |
evolution_mode | An array to fill with the evolution mode of the system. |
primary_wind_saturation | An array to fill with a flag indicating whether the angular momentum loss due to stellar wind is in the satured state (true) or not (false). |
secondary_wind_saturation | An array to fill with a flag indicating whether the angular momentum loss due to stellar wind is in the satured state (true) or not (false). |
semimajor_rate | An array to fill with the rate of change of the semimajor axis at the saved evolution steps. |
eccentricity_rate | An array to fill with the rate of change of the orbital eccentricity at the saved evolution steps. |
primary_envelope_inclination_rate | An array to fill with the rate of change of the angle between the stellar convective envelope and the orbital angular momenta. |
primary_core_inclination_rate | An array to fill with the rate of change of the angle between the stellar radiative core and the orbital angular momenta. |
primary_envelope_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
primary_core_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
primary_envelope_angmom_rate | An array to fill with the rate of change of the angular momentum of the stellar convective envelope. |
primary_core_angmom_rate | An array to fill with the rate of change of the angular momentum of the stellar radiative core. |
secondary_envelope_inclination_rate | An array to fill with the rate of change of the angle between the stellar convective envelope and the orbital angular momenta. |
secondary_core_inclination_rate | An array to fill with the rate of change of the angle between the stellar radiative core and the orbital angular momenta. |
secondary_envelope_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
secondary_core_periapsis_rate | An array to fill with the rate of change of the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
secondary_envelope_angmom_rate | An array to fill with the rate of change of the angular momentum of the stellar convective envelope. |
secondary_core_angmom_rate | An array to fill with the rate of change of the angular momentum of the stellar radiative core. |
Definition at line 454 of file CInterface.cpp.
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.
All return variables must either be allocated or be NULL. In the latter case, the corresponding quantity is not returned.
solver | The solver which was used to calculate the orbital evolution. |
system | The system which was evolved. |
primary | The primary star in the system. |
secondary | The secondary star in the system. |
age | An array to fill with the ages at which the evolution was calculated. |
semimajor | An array to fill with the semimajor axis at the saved evolution steps. |
eccentricity | An array to fill with the orbital eccentricity at the saved evolution steps. |
primary_envelope_inclination | An array to fill with the angle between the stellar convective envelope and the orbital angular momenta. |
primary_core_inclination | An array to fill with the angle between the stellar radiative core and the orbital angular momenta. |
primary_envelope_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
primary_core_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
primary_envelope_angmom | An array to fill with the angular momentum of the stellar convective envelope. |
primary_core_angmom | An array to fill with the angular momentum of the stellar radiative core. |
secondary_envelope_inclination | An array to fill with the angle between the stellar convective envelope and the orbital angular momenta. |
secondary_core_inclination | An array to fill with the angle between the stellar radiative core and the orbital angular momenta. |
secondary_envelope_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope. |
secondary_core_periapsis | An array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core. |
secondary_envelope_angmom | An array to fill with the angular momentum of the stellar convective envelope. |
secondary_core_angmom | An array to fill with the angular momentum of the stellar radiative core. |
evolution_mode | An array to fill with the evolution mode of the system. |
primary_wind_saturation | An array to fill with a flag indicating whether the angular momentum loss due to stellar wind is in the satured state (true) or not (false). |
secondary_wind_saturation | An array to fill with a flag indicating whether the angular momentum loss due to stellar wind is in the satured state (true) or not (false). |
Definition at line 675 of file CInterface.cpp.
LIB_PUBLIC unsigned num_evolution_steps | ( | OrbitSolver * | solver | ) |
At how many points was the evolution saved.
solver | The solver used to follow the evolution. |
Definition at line 234 of file CInterface.cpp.
LIB_PUBLIC void read_eccentricity_expansion_coefficients | ( | const char * | filename | ) |
Read eccentricity expansion coefficients from a file.
Definition at line 17 of file CInterface.cpp.
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 | ||
) |
zone | The zone to set the dissipation of. |
num_tidal_frequency_breaks | The number of breaks in the tidal frequency dependence. |
num_spin_frequency_breaks | The number of breaks in the spin frequency dependence. |
tidal_frequency_breaks | The locations of the breaks in tidal frequency in rad/day. Entries should be sorted. |
spin_frequency_breaks | The locations of the breaks in spin frequency in rad/day. Entries should be sorted. |
tidal_frequency_powers | The powerlaw indices for the tidal frequency dependence. Should be indexed in the same order as tidal_frequency_breaks, but must contain an additional starting entry for the powerlaw index before the first break. |
spin_frequency_powers | The powerlaw indices for the spin frequency dependence. Should be indexed in the same order as spin_frequency_breaks, but must contain an additional starting entry for the powerlaw index before the first break. |
reference_phase_lag | The phase lag at the first tidal and first spin frequency break. The rest are calculated by imposing continuity. |
inertial_mode_enhancement | Factor by which the dissipation in the inertial mode range is enhanced relative to what is defined by all other parameters. Must be greater than 1. |
inertial_mode_sharpness | Parameter controlling how sharp the transition between inertial mode non-enhanced and inertial mode enhanced dissipation is. |
Definition at line 22 of file CInterface.cpp.
LIB_PUBLIC const int BINARY_EVOL_MODE |
Evolution mode ID for when the two bodies orbit each other.
Definition at line 12 of file CInterface.cpp.
struct LIB_PUBLIC BrokenPowerlawPhaseLagZone |
Opaque struct to cant to/from Evolve::BrokenPowerlawPhasLagZone.
Definition at line 41 of file CInterface.h.
struct LIB_PUBLIC DiskBinarySystem |
Opaque struct to cast to/from Evolve::DiskBinarySystem.
Definition at line 35 of file CInterface.h.
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.
Definition at line 11 of file CInterface.cpp.
struct LIB_PUBLIC OrbitSolver |
Opaque struct to cast to/from Evolve::OrbitSolver.
Definition at line 38 of file CInterface.h.
LIB_PUBLIC const int SINGLE_EVOL_MODE |
Evolution mode ID for when there is only one body in the system (only its rotation evolves).
Definition at line 13 of file CInterface.cpp.
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 evolution.
Definition at line 14 of file CInterface.cpp.