Planetary Orbital Evolution due to Tides
Orbital evolution of two objects experiencing tides
CInterface.cpp
Go to the documentation of this file.
1 
8 #define BUILDING_LIBRARY
9 #include "CInterface.h"
10 #include "../Evolve/CInterface.h"
11 
12 CPlanet *create_planet(double mass, double radius)
13 {
14  return reinterpret_cast<CPlanet*>(
15  new Planet::Planet(mass, radius)
16  );
17 }
18 
19 void destroy_planet(CPlanet *planet)
20 {
21  delete reinterpret_cast<Planet::Planet*>(planet);
22 }
23 
24 LIB_PUBLIC void set_planet_dissipation(CPlanet *planet,
25  unsigned num_tidal_frequency_breaks,
26  unsigned num_spin_frequency_breaks,
27  double *tidal_frequency_breaks,
28  double *spin_frequency_breaks,
29  double *tidal_frequency_powers,
30  double *spin_frequency_powers,
31  double reference_phase_lag,
32  double inertial_mode_enhancement,
33  double inertial_mode_sharpness)
34 {
36  reinterpret_cast<Planet::Planet*>(planet)->zone()
37  );
38 
40  reinterpret_cast<BrokenPowerlawPhaseLagZone*>(zone),
41  num_tidal_frequency_breaks,
42  num_spin_frequency_breaks,
43  tidal_frequency_breaks,
44  spin_frequency_breaks,
45  tidal_frequency_powers,
46  spin_frequency_powers,
47  reference_phase_lag,
48  inertial_mode_enhancement,
49  inertial_mode_sharpness
50  );
51 }
void destroy_planet(CPlanet *planet)
Destroy a planet previously allocated using create_planet.
Definition: CInterface.cpp:19
Declare C-style functions for accessing the functionality of the Evolve library.
Single zone non-evolving planets with huge dissipation, so they always remain locked to the disk...
Definition: Planet.h:21
CPlanet * create_planet(double mass, double radius)
Create a planet to use in a evolution calculation.
Definition: CInterface.cpp:12
A DissipatingZone where the phase lag is described by a broken powerlaw.
LIB_PUBLIC void set_planet_dissipation(CPlanet *planet, 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)
Set the dissipative properties of the planet.
Definition: CInterface.cpp:24
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)
Definition: CInterface.cpp:22