9 #ifndef __UNIT_TESTS_TIDAL_POTENTIAL_H 10 #define __UNIT_TESTS_TIDAL_POTENTIAL_H 37 double primary_mass=Core::NaN,
40 double secondary_mass=Core::NaN,
43 double semimajor=Core::NaN,
46 double eccentricity=Core::NaN,
54 __orbit(primary_mass, secondary_mass, semimajor, eccentricity),
78 template<
class POSITION_TYPE>
87 const POSITION_TYPE &position,
95 template<
class POSITION_TYPE>
106 double z_rotated_secondary_x = (
111 double z_rotated_secondary_y = (
118 Eigen::Vector3d transformed_secondary_position(
124 z_rotated_secondary_y,
132 double center_to_secondary = transformed_secondary_position.norm();
133 double position_to_secondary = (
136 transformed_secondary_position
144 position.dot(transformed_secondary_position)
146 std::pow(center_to_secondary, 3)
148 1.0 / position_to_secondary
150 1.0 / center_to_secondary
Basic description of two bodies in an eccentric orbit.
double & inclination()
A mutable reference to the inclination of the system.
double inclination() const
See __inclination attribute.
double arg_of_periapsis() const
The argument of periapsis of the system.
double operator()(const POSITION_TYPE &position, double time) const
Return the tidal potential at a specific position and time in SI.
Orientations of zones of bodies in a binary system.
double & arg_of_periapsis()
A mutable reference to the argument of periapsis of the system.
const double solar_radius
Radius of the sun [m].
TidalPotential(double primary_mass=Core::NaN, double secondary_mass=Core::NaN, double semimajor=Core::NaN, double eccentricity=Core::NaN, double inclination=Core::NaN, double arg_of_periapsis=Core::NaN)
Define the boundary for which to calculate the tidal potential.
const double solar_mass
Mass of the sun [kg].
double __arg_of_periapsis
Calculate the tidal potential over one component of an eccentric binary.
const EccentricOrbit & orbit() const
An unmutable reference to the binary orbit.
double orbital_period() const
The orbital period of the system in days.
EccentricOrbit __orbit
The binary orbit.
Declare an interface for working with eccentric orbits.
Eigen::Vector3d secondary_position(double orbital_phase) const
Secondary position vector in a coordinate system centered on the primary, with and ...
EccentricOrbit & orbit()
Mutable reference to the binary orbit.
double secondary_mass() const
The semimajor axis of the system.
const double G
Gravitational constant in SI.