Orrery
A GPU-accelerated N-body gravitational simulator
Toggle main menu visibility
Loading...
Searching...
No Matches
kepler.hpp
Go to the documentation of this file.
1
#pragma once
2
24
25
#include "
orrery/core/particle_data.hpp
"
26
#include "
orrery/core/types.hpp
"
27
28
namespace
orrery::initial_conditions {
29
38
struct
KeplerParameters
{
39
core::Real primary_mass = 1;
40
core::Real secondary_mass = 1;
41
45
core::Real
semi_major_axis
= 1;
46
54
core::Real
eccentricity
= 0;
55
};
56
69
[[nodiscard]]
core::ParticleData
make_kepler_orbit
(
const
KeplerParameters
& parameters);
70
75
[[nodiscard]] core::Real
kepler_period
(
const
KeplerParameters
& parameters);
76
82
[[nodiscard]] core::Real
kepler_energy
(
const
KeplerParameters
& parameters);
83
90
[[nodiscard]] core::Real
kepler_angular_momentum
(
const
KeplerParameters
& parameters);
91
94
[[nodiscard]] core::Real
kepler_periapsis_distance
(
const
KeplerParameters
& parameters);
95
96
}
// namespace orrery::initial_conditions
orrery::core::ParticleData
Storage for a set of point masses in structure-of-arrays layout.
Definition
particle_data.hpp:43
orrery::initial_conditions::kepler_periapsis_distance
core::Real kepler_periapsis_distance(const KeplerParameters ¶meters)
The separation at periapsis, a(1 - e), which is where the generated configuration starts.
orrery::initial_conditions::make_kepler_orbit
core::ParticleData make_kepler_orbit(const KeplerParameters ¶meters)
Two particles at periapsis, in the centre-of-mass frame at rest.
orrery::initial_conditions::kepler_energy
core::Real kepler_energy(const KeplerParameters ¶meters)
The total energy, -G m1 m2 / 2a.
orrery::initial_conditions::kepler_period
core::Real kepler_period(const KeplerParameters ¶meters)
The orbital period, from Kepler's third law.
orrery::initial_conditions::kepler_angular_momentum
core::Real kepler_angular_momentum(const KeplerParameters ¶meters)
The magnitude of the total angular momentum, mu sqrt(G M a (1 - e^2)), where mu is the reduced mass a...
particle_data.hpp
The particle store: one contiguous array per component.
orrery::initial_conditions::KeplerParameters
A bound two-body orbit, described by its elements.
Definition
kepler.hpp:38
orrery::initial_conditions::KeplerParameters::eccentricity
core::Real eccentricity
Zero for a circle, approaching one for an orbit that grazes the centre.
Definition
kepler.hpp:54
orrery::initial_conditions::KeplerParameters::semi_major_axis
core::Real semi_major_axis
The semi-major axis of the relative orbit, that is, of the separation between the two bodies rather t...
Definition
kepler.hpp:45
types.hpp
The scalar and index types that every layer of the project agrees on.
orrery
initial_conditions
kepler.hpp
Generated by
1.17.0