Orrery
A GPU-accelerated N-body gravitational simulator
Loading...
Searching...
No Matches
orrery::sim::InitialConditionSettings Struct Reference

What the run starts from. More...

#include <orrery/sim/configuration.hpp>

Public Attributes

InitialConditionKind kind = InitialConditionKind::kPlummer
core::Index count = 0
 The number of particles, for the two sampled models.
core::Real total_mass = 1
 Shared equally among the particles of a sampled model.
core::Real scale_radius = 0
 The Plummer scale radius.
core::Real radius = 1
 The radius of the uniform sphere.
core::Real mass_fraction_cutoff = static_cast<core::Real>(0.999)
 The fraction of a Plummer model's mass the sample is drawn from.
core::Real primary_mass = 1
 The two masses of the Kepler configuration.
core::Real secondary_mass = 1
core::Real semi_major_axis = 1
core::Real eccentricity = 0
core::Real bulge_fraction = static_cast<core::Real>(0.2)
 The share of a galaxy's mass held by its bulge rather than its disc.
core::Real scale_length = 1
 The exponential scale length of the disc.
core::Real scale_height = static_cast<core::Real>(0.1)
core::Real bulge_radius = static_cast<core::Real>(0.2)
 The Plummer scale radius of the bulge.
core::Real inclination = 0
 The tilt of the disc's spin axis away from the z axis, in radians, and the angle it is then turned by about that axis.
core::Real position_angle = 0
core::Real mass_ratio = static_cast<core::Real>(0.5)
 The mass of the second galaxy of a collision as a fraction of the first.
core::Real secondary_inclination = 1
 The orientation of the second galaxy's disc.
core::Real secondary_position_angle = 0
core::Real separation = 20
 The initial separation of the two galaxies along the x axis, and the offset along y that makes the encounter grazing rather than head on.
core::Real impact_parameter = 2
core::Real approach_speed = static_cast<core::Real>(0.8)
 The relative speed of the two galaxies, as a multiple of the escape speed at their initial separation.

Friends

bool operator== (const InitialConditionSettings &, const InitialConditionSettings &)=default

Detailed Description

What the run starts from.

One structure with the union of every generator's parameters rather than a variant. The generators share most of their parameters, the total is small, and a flat record is what a key-and-value configuration file already is: a variant would make the parser decide which alternative it was building before it had read the key that says so.

A field the chosen generator does not use is ignored rather than rejected, since a file that describes several configurations and selects between them with one kind line is a reasonable thing to write. The exception is count beside kepler, which problems_with reports: a particle count is the field most likely to be believed, and a two-body configuration is the one case where the number of particles is fixed by the physics rather than chosen.

Member Data Documentation

◆ count

core::Index orrery::sim::InitialConditionSettings::count = 0

The number of particles, for the two sampled models.

Ignored by the Kepler configuration, which is two bodies by definition.

◆ scale_radius

core::Real orrery::sim::InitialConditionSettings::scale_radius = 0

The Plummer scale radius.

Defaults to the value that puts a unit-mass sphere into standard N-body units, as initial_conditions/plummer.hpp describes.

◆ bulge_fraction

core::Real orrery::sim::InitialConditionSettings::bulge_fraction = static_cast<core::Real>(0.2)

The share of a galaxy's mass held by its bulge rather than its disc.

The two galaxy configurations describe a galaxy's mass through total_mass and this, rather than through a disc mass and a bulge mass, so that count and total_mass mean for a galaxy exactly what they mean for the two spheres: the particles the run has and the mass they share.

◆ mass_ratio

core::Real orrery::sim::InitialConditionSettings::mass_ratio = static_cast<core::Real>(0.5)

The mass of the second galaxy of a collision as a fraction of the first.

One is a pair of equals, which is the classic major merger. A half, the default, is still a major merger by the usual definition and produces the more legible picture: the larger disc survives long enough to be recognisable while the smaller one is visibly torn apart.

◆ secondary_inclination

core::Real orrery::sim::InitialConditionSettings::secondary_inclination = 1

The orientation of the second galaxy's disc.

Separate from the first galaxy's, because an encounter between two discs tilted the same way is the one case where the picture is symmetric and so the least informative one to look at.

◆ approach_speed

core::Real orrery::sim::InitialConditionSettings::approach_speed = static_cast<core::Real>(0.8)

The relative speed of the two galaxies, as a multiple of the escape speed at their initial separation.

Below one they are bound and merge.


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