SERiF v0.0.1a
Stellar Evolution and Rotation in Four Dimensions
Loading...
Searching...
No Matches
serif::equations::PointMassCompanion Class Referencefinal

The potential -G M_c/|x - x_c| of a point-mass companion outside the star. More...

#include <companion.hpp>

Collaboration diagram for serif::equations::PointMassCompanion:
[legend]

Public Types

using Vector = RigidRotation::Vector
 

Public Member Functions

 PointMassCompanion (const double gravitational_mass, const Vector &position, const bool tidal_only=false)
 gravitational_mass is G M_c in the model's units; position is the companion's fixed location.
 
double potential (const Vector &x) const
 Evaluate -G M_c/|x - x_c|, plus G M_c x.x_c/|x_c|^3 when only the tide acts.
 
Vector potential_gradient (const Vector &x) const
 Evaluate G M_c (x - x_c)/|x - x_c|^3, plus G M_c x_c/|x_c|^3 when only the tide acts.
 
double gravitational_mass () const noexcept
 Inspect G M_c.
 
const Vector & position () const noexcept
 Inspect the companion's location.
 
bool tidal_only () const noexcept
 Whether the companion's uniform pull is removed, leaving only its tide.
 

Private Member Functions

double uniform_scale () const
 G M_c/|x_c|^3, the coefficient of the uniform pull at the origin.
 

Private Attributes

double m_gravitational_mass
 
Vector m_position
 
bool m_tidal_only
 

Detailed Description

The potential -G M_c/|x - x_c| of a point-mass companion outside the star.

Member Typedef Documentation

◆ Vector

Constructor & Destructor Documentation

◆ PointMassCompanion()

serif::equations::PointMassCompanion::PointMassCompanion ( const double gravitational_mass,
const Vector & position,
const bool tidal_only = false )
inline

gravitational_mass is G M_c in the model's units; position is the companion's fixed location.

Member Function Documentation

◆ gravitational_mass()

double serif::equations::PointMassCompanion::gravitational_mass ( ) const
inlinenodiscardnoexcept

Inspect G M_c.

◆ position()

const Vector & serif::equations::PointMassCompanion::position ( ) const
inlinenodiscardnoexcept

Inspect the companion's location.

◆ potential()

double serif::equations::PointMassCompanion::potential ( const Vector & x) const
inlinenodiscard

Evaluate -G M_c/|x - x_c|, plus G M_c x.x_c/|x_c|^3 when only the tide acts.

◆ potential_gradient()

Vector serif::equations::PointMassCompanion::potential_gradient ( const Vector & x) const
inlinenodiscard

Evaluate G M_c (x - x_c)/|x - x_c|^3, plus G M_c x_c/|x_c|^3 when only the tide acts.

◆ tidal_only()

bool serif::equations::PointMassCompanion::tidal_only ( ) const
inlinenodiscardnoexcept

Whether the companion's uniform pull is removed, leaving only its tide.

◆ uniform_scale()

double serif::equations::PointMassCompanion::uniform_scale ( ) const
inlinenodiscardprivate

G M_c/|x_c|^3, the coefficient of the uniform pull at the origin.

Member Data Documentation

◆ m_gravitational_mass

double serif::equations::PointMassCompanion::m_gravitational_mass
private

◆ m_position

Vector serif::equations::PointMassCompanion::m_position
private

◆ m_tidal_only

bool serif::equations::PointMassCompanion::m_tidal_only
private

The documentation for this class was generated from the following file: