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>
99 Eigen::Matrix<long double, 3, 1> secondary_position =
107 long double z_rotated_secondary_x = (
112 long double z_rotated_secondary_y = (
119 Eigen::Matrix<long double, 3, 1>
120 transformed_secondary_position(
126 z_rotated_secondary_y,
134 long double center_to_secondary =
135 transformed_secondary_position.norm();
136 long double position_to_secondary = (
139 transformed_secondary_position
141 long double result = (
147 position.dot(transformed_secondary_position)
149 std::pow(center_to_secondary, 3)
151 1.0 / position_to_secondary
153 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.
Eigen::Matrix< long double, 3, 1 > secondary_position(double orbital_phase) const
Secondary position vector in a coordinate system centered on the primary, with and ...
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.
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.