Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
disc_galaxy.hpp
Go to the documentation of this file.
1#pragma once
2
68
71#include "orrery/core/types.hpp"
72#include "orrery/core/vec3.hpp"
73
74namespace orrery::initial_conditions {
75
87
89 core::Real disc_mass = 1;
90
98 core::Real bulge_mass = static_cast<core::Real>(0.2);
99
101 core::Real scale_length = 1;
102
109 core::Real scale_height = static_cast<core::Real>(0.1);
110
112 core::Real bulge_radius = static_cast<core::Real>(0.2);
113
121 core::Real mass_fraction_cutoff = static_cast<core::Real>(0.99);
122
128 core::Real softening = 0;
129
136 core::Real inclination = 0;
137
144 core::Real position_angle = 0;
145};
146
160 core::RandomSource& random);
161
171
176[[nodiscard]] core::Real disc_galaxy_particle_mass(const DiscGalaxyParameters& parameters);
177
184[[nodiscard]] core::Real disc_galaxy_total_mass(const DiscGalaxyParameters& parameters);
185
192[[nodiscard]] core::Real disc_galaxy_enclosed_mass(const DiscGalaxyParameters& parameters,
193 core::Real radius);
194
201[[nodiscard]] core::Real disc_galaxy_circular_speed(const DiscGalaxyParameters& parameters,
202 core::Real radius);
203
210
211} // namespace orrery::initial_conditions
Storage for a set of point masses in structure-of-arrays layout.
Definition particle_data.hpp:43
A seeded stream of random numbers.
Definition random.hpp:46
core::Real disc_galaxy_particle_mass(const DiscGalaxyParameters &parameters)
The mass every particle in the galaxy carries.
core::Index disc_galaxy_disc_count(const DiscGalaxyParameters &parameters)
How many of the sampled particles belong to the disc.
core::Real disc_galaxy_total_mass(const DiscGalaxyParameters &parameters)
The total mass the sample actually has, which is the particle mass times the count.
core::Real disc_galaxy_enclosed_mass(const DiscGalaxyParameters &parameters, core::Real radius)
The mass inside cylindrical radius radius, as the model computes it.
core::Real disc_galaxy_circular_speed(const DiscGalaxyParameters &parameters, core::Real radius)
The speed of a circular orbit at cylindrical radius radius, in the plane of the disc.
core::ParticleData make_disc_galaxy(const DiscGalaxyParameters &parameters, core::RandomSource &random)
Sample the model, in its own centre-of-mass frame at the origin.
core::Vec3 disc_galaxy_spin_axis(const DiscGalaxyParameters &parameters)
The unit vector the galaxy spins about.
The particle store: one contiguous array per component.
The project's source of randomness, and the only one.
A vector in three-dimensional Euclidean space.
Definition vec3.hpp:26
A disc galaxy to sample.
Definition disc_galaxy.hpp:77
core::Real softening
The Plummer softening length the run will use.
Definition disc_galaxy.hpp:128
core::Real inclination
The angle between the disc's spin axis and the z axis, in radians.
Definition disc_galaxy.hpp:136
core::Real scale_length
The exponential scale length of the disc, R_d.
Definition disc_galaxy.hpp:101
core::Real mass_fraction_cutoff
The fraction of the exponential disc's mass the sample is drawn from.
Definition disc_galaxy.hpp:121
core::Real bulge_radius
The Plummer scale radius of the bulge.
Definition disc_galaxy.hpp:112
core::Real scale_height
The exponential scale height of the disc.
Definition disc_galaxy.hpp:109
core::Real position_angle
The angle the tilted disc is then rotated by about the z axis, in radians.
Definition disc_galaxy.hpp:144
core::Index count
The number of particles in the whole galaxy, disc and bulge together.
Definition disc_galaxy.hpp:86
core::Real disc_mass
The mass of the exponential disc.
Definition disc_galaxy.hpp:89
core::Real bulge_mass
The mass of the Plummer bulge, which may be zero for a pure disc.
Definition disc_galaxy.hpp:98
The scalar and index types that every layer of the project agrees on.
std::size_t Index
The type of a particle index and of any count of particles.
Definition types.hpp:45
A three-component vector for interfaces, not for storage.