GraviDy
1.0
Gravitational Dynamics N-body integrator
|
Class in charge of the different properties of the system. More...
#include <NbodyUtils.hpp>
Public Member Functions | |
NbodyUtils (NbodySystem *ns) | |
Constructor. More... | |
~NbodyUtils () | |
Destructor. More... | |
void | nbody_attributes () |
General method to get many N-body attributes. More... | |
void | get_radii () |
Radii respect the center of density calculation, to be able to calculate the layers of the Lagrange radii. More... | |
void | get_layers () |
Layers of the Lagrange radii calculation. More... | |
void | lagrange_radii () |
Lagrange radii calculation. More... | |
double | get_virial_radius (double energy) |
Virial radius calculation. More... | |
double | get_close_encounter_radius (double r_virial) |
Close encounter radius calculation. More... | |
double | get_close_encounter_timestep (double r_cl) |
Close encounter timestep calculation. More... | |
double | get_core_radius () |
Core radius calculation using CORE_MASS as limit point, and respect the center of mass of the system. More... | |
double | get_half_mass_relaxation_time () |
Half mass relaxation time calculation. More... | |
double | get_crossing_time (double r_virial) |
Crossing time calculation. More... | |
double | get_halfmass_radius () |
Half mass radius calculation. More... | |
double | get_magnitude (double x, double y, double z) |
Vector magnitude calculation. More... | |
double | get_timestep_normal (unsigned int i, float ETA) |
Time step calculation. More... | |
double | normalize_dt (double new_dt, double old_dt, double t, unsigned int i) |
Normalization of the timestep. More... | |
double | get_potential () |
Potential energy calculation. More... | |
double | get_kinetic () |
Kinetic energy calculation. More... | |
double | get_energy (double ext=0) |
Kinetic and Potential energy calculation. More... | |
double3 | get_center_of_density () |
Center of density calculation. More... | |
Public Attributes | |
NbodySystem * | ns |
float | ratio |
double3 | cod |
Center of density. More... | |
std::vector< Distance > | radii |
Radii array related to the center of density, and related to the percentage distribution that we want to obtain. More... | |
std::vector< double > | layers_radii |
values of the radii of the different layers More... | |
Class in charge of the different properties of the system.
All the calculation of radii, times, energy, density, etc plus some utilities for the code, like the normalization of the timesteps.
NbodyUtils::NbodyUtils | ( | NbodySystem * | ns | ) |
Constructor.
NbodyUtils::~NbodyUtils | ( | ) |
Destructor.
double3 NbodyUtils::get_center_of_density | ( | ) |
Center of density calculation.
double NbodyUtils::get_close_encounter_radius | ( | double | r_virial | ) |
Close encounter radius calculation.
double NbodyUtils::get_close_encounter_timestep | ( | double | r_cl | ) |
Close encounter timestep calculation.
double NbodyUtils::get_core_radius | ( | ) |
Core radius calculation using CORE_MASS as limit point, and respect the center of mass of the system.
double NbodyUtils::get_crossing_time | ( | double | r_virial | ) |
Crossing time calculation.
double NbodyUtils::get_energy | ( | double | ext = 0 | ) |
Kinetic and Potential energy calculation.
double NbodyUtils::get_half_mass_relaxation_time | ( | ) |
Half mass relaxation time calculation.
Please note that this method uses a lot of empirical values and approximations.
double NbodyUtils::get_halfmass_radius | ( | ) |
Half mass radius calculation.
double NbodyUtils::get_kinetic | ( | ) |
Kinetic energy calculation.
This method is auxiliary and use only for verification procedures
void NbodyUtils::get_layers | ( | ) |
Layers of the Lagrange radii calculation.
This method consider the distribution in LAGRANGE_RADII to select the % of mass for each layer
double NbodyUtils::get_magnitude | ( | double | x, |
double | y, | ||
double | z | ||
) |
Vector magnitude calculation.
double NbodyUtils::get_potential | ( | ) |
Potential energy calculation.
This method is auxiliary and use only for verification procedures
void NbodyUtils::get_radii | ( | ) |
Radii respect the center of density calculation, to be able to calculate the layers of the Lagrange radii.
double NbodyUtils::get_timestep_normal | ( | unsigned int | i, |
float | ETA | ||
) |
Time step calculation.
double NbodyUtils::get_virial_radius | ( | double | energy | ) |
Virial radius calculation.
void NbodyUtils::lagrange_radii | ( | ) |
Lagrange radii calculation.
void NbodyUtils::nbody_attributes | ( | ) |
General method to get many N-body attributes.
Virial radius, Crossing time, Close encounter radus, close encounter timestep, core radius and half mass relaxation time.
double NbodyUtils::normalize_dt | ( | double | new_dt, |
double | old_dt, | ||
double | t, | ||
unsigned int | i | ||
) |
Normalization of the timestep.
This method take care of the limits conditions to avoid large jumps between the timestep distribution
double3 NbodyUtils::cod |
Center of density.
std::vector<double> NbodyUtils::layers_radii |
values of the radii of the different layers
NbodySystem* NbodyUtils::ns |
std::vector<Distance> NbodyUtils::radii |
Radii array related to the center of density, and related to the percentage distribution that we want to obtain.
float NbodyUtils::ratio |