Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
CInterface.h File Reference

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"
+ Include dependency graph for CInterface.h:
+ This graph shows which files directly or indirectly include this file:

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 DiskBinarySystemcreate_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 DiskBinarySystemcreate_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 OrbitSolverevolve_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...
 

Detailed Description

Declare C-style functions for accessing the functionality of the Evolve library.

Definition in file CInterface.h.

Function Documentation

◆ configure_planet()

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.

Parameters
planetThe body to configure.
ageThe age to set the body to.
companion_massThe mass of the second body in the system.
semimajorThe semimajor axis of the orbit in \(R_\odot\).
eccentricityThe eccentricity of the orbit
spin_angmomThe spin angular momenta of the non-locked zones of the body (outermost zone to innermost).
inclinationThe inclinations of the zones of the body (same order as spin_angmom). If NULL, all inclinations are assumed zero.
periapsisThe arguments of periapsis of the zones of the bodies (same order as spin_angmom). If NULL, all periapses are assumed zero.
locked_surfaceIf 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_inclinationIf 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_periapsisIf 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.

◆ configure_star()

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.

Parameters
starThe body to configure.
ageThe age to set the body to.
companion_massThe mass of the second body in the system.
semimajorThe semimajor axis of the orbit in \(R_\odot\).
eccentricityThe eccentricity of the orbit
spin_angmomThe spin angular momenta of the non-locked zones of the body (outermost zone to innermost).
inclinationThe inclinations of the zones of the body (same order as spin_angmom). If NULL, all inclinations are assumed zero.
periapsisThe arguments of periapsis of the zones of the bodies (same order as spin_angmom). If NULL, all periapses are assumed zero.
locked_surfaceIf 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_inclinationIf 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_periapsisIf 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.

◆ configure_system()

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.

Parameters
systemThe system to set the state of.
ageThe age to set the system to.
semimajorThe semimajor axis of the orbit.
eccentricityThe eccentricity of the orbit.
spin_angmomThe spin angular momenta of the zones of the bodies (body 1 first, outermost zone to innermost, followed by body 2).
inclinationThe inclinations of the zones of the bodies (same order as spin_angmom). The surface zone inclination must be omitted for single body systems.
periapsisThe 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_modeThe evolution mode to assume. Must be one of the constants defined.

Definition at line 175 of file CInterface.cpp.

◆ create_star_planet_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.

Parameters
starThe first body in the system. Assumed to always be there, so for a star-planet system this should be the star.
planetThe second body in the system, initially may not be there and later may be engulfed by the first body.
initial_semimajorThe semimajor axis of the orbit at which the secondary forms in \(R_\odot\).
initial_eccentricityThe eccentricity of the orbit at which the secondary forms.
initial_inclinationInclination between surface zone of primary and initial orbit in radians.
disk_lock_frequencyFrequency of the surface spin of the primary when disk is present in rad/day.
disk_dissipation_ageAge when disk dissipates in Gyrs.
secondary_formation_ageAge when the secondary forms.

Definition at line 68 of file CInterface.cpp.

◆ create_star_star_system()

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.

Parameters
primaryThe first body in the system. Assumed to always be there, so for a star-planet system this should be the star.
secondaryThe second body in the system, initially may not be there and later may be engulfed by the first body.
initial_semimajorThe semimajor axis of the orbit at which the secondary forms in \(R_\odot\).
initial_eccentricityThe eccentricity of the orbit at which the secondary forms.
initial_inclinationInclination between surface zone of primary and initial orbit in radians.
disk_lock_frequencyFrequency of the surface spin of the primary when disk is present in rad/day.
disk_dissipation_ageAge when disk dissipates in Gyrs.
secondary_formation_ageAge when the secondary forms.

Definition at line 92 of file CInterface.cpp.

◆ destroy_binary()

LIB_PUBLIC void destroy_binary ( DiskBinarySystem system)

Destroy a previously created binary system.

Parameters
systemThe system to destroy.

Definition at line 116 of file CInterface.cpp.

◆ destroy_solver()

LIB_PUBLIC void destroy_solver ( OrbitSolver solver)

Destroy a solver created by evolve_system.

Parameters
solverThe solver to destroy.

Definition at line 229 of file CInterface.cpp.

◆ evolve_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.

Parameters
systemThe system to evolve.
final_ageThe age at which to stop the evolution in Gyrs. The starting age must be already set for the system.
max_time_stepThe maximum size of the time step allowed in Gyrs.
precisionThe precision to require of the solution.
required_agesAges at which the evolution must stop precisely.
num_required_agesThe number of required ages.
print_progressSee print_progress argument to Evolve::OrbitSolver::OrbitSolver()
max_runtimeThe 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.

◆ get_star_planet_evolution()

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.

Parameters
solverThe solver which was used to calculate the orbital evolution.
systemThe system which was evolved.
starThe star which was evolved.
planetThe planet which was evolved,
ageAn array to fill with the ages at which the evolution was calculated.
semimajorAn array to fill with the semimajor axis at the saved evolution steps.
eccentricityAn array to fill with the orbital eccentricity at the saved evolution steps.
envelope_inclinationAn array to fill with the angle between the stellar convective envelope and the orbital angular momenta.
core_inclinationAn array to fill with the angle between the stellar radiative core and the orbital angular momenta.
envelope_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope.
core_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core.
envelope_angmomAn array to fill with the angular momentum of the stellar convective envelope.
core_angmomAn array to fill with the angular momentum of the stellar radiative core.
planet_inclinationAn array to fill wit the angle between the planet's and the orbital angular momentum (pass NULL if the planet is not dissipative).
planet_periapsisAn 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_angmomAn array to fill wit the angular momentum of the planet (pass NULL if the planet is not dissipative).
evolution_modeAn array to fill with the evolution mode of the system.
wind_saturationAn 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_rateAn array to fill with the rate at which the semimajor axis changes at the saved evolution steps.
eccentricity_rateAn array to fill with the rate the orbital eccentricity changes at the saved evolution steps.
envelope_inclination_rateAn array to fill with the rate at which the angle between the stellar convective envelope and the orbital angular momenta changes.
core_inclination_rateAn array to fill with the rate of change of the angle between the stellar radiative core and the orbital angular momenta.
envelope_periapsis_rateAn 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_rateAn 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_rateAn array to fill with the rate of change of the angular momentum of the stellar convective envelope.
core_angmom_rateAn array to fill with the rate of change of the angular momentum of the stellar radiative core.
planet_inclination_rateAn 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_rateAn 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_rateAn 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.

◆ get_star_planet_final_state()

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.

Parameters
solverThe solver which was used to calculate the orbital evolution.
systemThe system which was evolved.
starThe star which was evolved.
planetThe planet which was evolved.
ageAn array to fill with the ages at which the evolution was calculated.
semimajorAn array to fill with the semimajor axis at the saved evolution steps.
eccentricityAn array to fill with the orbital eccentricity at the saved evolution steps.
envelope_inclinationTo overwrite with the angle between the stellar convective envelope and the orbital angular momenta.
core_inclinationTo overwrite with the angle between the stellar radiative core and the orbital angular momenta.
envelope_periapsisTo overwrite with the periapsis of the orbit in the equatorial plane of the stellar convective envelope.
core_periapsisTo overwrite with the periapsis of the orbit in the equatorial plane of the stellar radiative core.
envelope_angmomTo overwrite with the angular momentum of the stellar convective envelope.
core_angmomTo overwrite with the angular momentum of the stellar radiative core.
planet_inclinationTo overwrite with the angle between the planet's and the orbital angular momentum (pass NULL if the planet is not dissipative).
planet_periapsisTo overwrite with the periapsis of the orbit in the equatorial plane of the planet (pass NULL if the planet is not dissipative).
planet_angmomTo overwrite with the angular momentum of the planet (pass NULL if the planet is not dissipative).
evolution_modeAn array to fill with the evolution mode of the system.
wind_saturationAn 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.

◆ get_star_star_evolution()

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.

Parameters
solverThe solver which was used to calculate the orbital evolution.
systemThe system which was evolved.
primaryThe primary star which was evolved.
secondaryThe secondary star which was evolved.
ageAn array to fill with the ages at which the evolution was calculated.
semimajorAn array to fill with the semimajor axis at the saved evolution steps.
eccentricityAn array to fill with the orbital eccentricity at the saved evolution steps.
primary_envelope_inclinationAn array to fill with the angle between the stellar convective envelope and the orbital angular momenta.
primary_core_inclinationAn array to fill with the angle between the stellar radiative core and the orbital angular momenta.
primary_envelope_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope.
primary_core_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core.
primary_envelope_angmomAn array to fill with the angular momentum of the stellar convective envelope.
primary_core_angmomAn array to fill with the angular momentum of the stellar radiative core.
secondary_envelope_inclinationAn array to fill with the angle between the stellar convective envelope and the orbital angular momenta.
secondary_core_inclinationAn array to fill with the angle between the stellar radiative core and the orbital angular momenta.
secondary_envelope_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope.
secondary_core_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core.
secondary_envelope_angmomAn array to fill with the angular momentum of the stellar convective envelope.
secondary_core_angmomAn array to fill with the angular momentum of the stellar radiative core.
evolution_modeAn array to fill with the evolution mode of the system.
primary_wind_saturationAn 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_saturationAn 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_rateAn array to fill with the rate of change of the semimajor axis at the saved evolution steps.
eccentricity_rateAn array to fill with the rate of change of the orbital eccentricity at the saved evolution steps.
primary_envelope_inclination_rateAn array to fill with the rate of change of the angle between the stellar convective envelope and the orbital angular momenta.
primary_core_inclination_rateAn array to fill with the rate of change of the angle between the stellar radiative core and the orbital angular momenta.
primary_envelope_periapsis_rateAn 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_rateAn 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_rateAn array to fill with the rate of change of the angular momentum of the stellar convective envelope.
primary_core_angmom_rateAn array to fill with the rate of change of the angular momentum of the stellar radiative core.
secondary_envelope_inclination_rateAn array to fill with the rate of change of the angle between the stellar convective envelope and the orbital angular momenta.
secondary_core_inclination_rateAn array to fill with the rate of change of the angle between the stellar radiative core and the orbital angular momenta.
secondary_envelope_periapsis_rateAn 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_rateAn 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_rateAn array to fill with the rate of change of the angular momentum of the stellar convective envelope.
secondary_core_angmom_rateAn 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.

◆ get_star_star_final_state()

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.

Parameters
solverThe solver which was used to calculate the orbital evolution.
systemThe system which was evolved.
primaryThe primary star in the system.
secondaryThe secondary star in the system.
ageAn array to fill with the ages at which the evolution was calculated.
semimajorAn array to fill with the semimajor axis at the saved evolution steps.
eccentricityAn array to fill with the orbital eccentricity at the saved evolution steps.
primary_envelope_inclinationAn array to fill with the angle between the stellar convective envelope and the orbital angular momenta.
primary_core_inclinationAn array to fill with the angle between the stellar radiative core and the orbital angular momenta.
primary_envelope_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope.
primary_core_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core.
primary_envelope_angmomAn array to fill with the angular momentum of the stellar convective envelope.
primary_core_angmomAn array to fill with the angular momentum of the stellar radiative core.
secondary_envelope_inclinationAn array to fill with the angle between the stellar convective envelope and the orbital angular momenta.
secondary_core_inclinationAn array to fill with the angle between the stellar radiative core and the orbital angular momenta.
secondary_envelope_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar convective envelope.
secondary_core_periapsisAn array to fill with the periapsis of the orbit in the equatorial plane of the stellar radiative core.
secondary_envelope_angmomAn array to fill with the angular momentum of the stellar convective envelope.
secondary_core_angmomAn array to fill with the angular momentum of the stellar radiative core.
evolution_modeAn array to fill with the evolution mode of the system.
primary_wind_saturationAn 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_saturationAn 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.

◆ num_evolution_steps()

LIB_PUBLIC unsigned num_evolution_steps ( OrbitSolver solver)

At how many points was the evolution saved.

Parameters
solverThe solver used to follow the evolution.

Definition at line 234 of file CInterface.cpp.

◆ read_eccentricity_expansion_coefficients()

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.

◆ set_zone_dissipation()

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 
)
Parameters
zoneThe zone to set the dissipation of.
num_tidal_frequency_breaksThe number of breaks in the tidal frequency dependence.
num_spin_frequency_breaksThe number of breaks in the spin frequency dependence.
tidal_frequency_breaksThe locations of the breaks in tidal frequency in rad/day. Entries should be sorted.
spin_frequency_breaksThe locations of the breaks in spin frequency in rad/day. Entries should be sorted.
tidal_frequency_powersThe 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_powersThe 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_lagThe phase lag at the first tidal and first spin frequency break. The rest are calculated by imposing continuity.
inertial_mode_enhancementFactor 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_sharpnessParameter controlling how sharp the transition between inertial mode non-enhanced and inertial mode enhanced dissipation is.

Definition at line 22 of file CInterface.cpp.

Variable Documentation

◆ BINARY_EVOL_MODE

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.

◆ BrokenPowerlawPhaseLagZone

struct LIB_PUBLIC BrokenPowerlawPhaseLagZone

Opaque struct to cant to/from Evolve::BrokenPowerlawPhasLagZone.

Definition at line 41 of file CInterface.h.

◆ DiskBinarySystem

struct LIB_PUBLIC DiskBinarySystem

Opaque struct to cast to/from Evolve::DiskBinarySystem.

Definition at line 35 of file CInterface.h.

◆ LOCKED_SURFACE_SPIN_EVOL_MODE

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.

◆ NaN

LIB_PUBLIC const double NaN

Not a number.

Definition at line 33 of file Common.h.

◆ OrbitSolver

struct LIB_PUBLIC OrbitSolver

Opaque struct to cast to/from Evolve::OrbitSolver.

Definition at line 38 of file CInterface.h.

◆ SINGLE_EVOL_MODE

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.

◆ TABULATION_EVOL_MODE

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.