PeTar
N-body code for collisional gravitational systems
FRWModel Class Reference

FRW cosmological model for calculating scale factor (redshift) More...

#include <galpy_interface.h>

Public Member Functions

double getMatterDensity (const double _a) const
 
double getRadiationDensity (const double _a) const
 
double getEnergyDensity (const double _a) const
 
double getCurvatureDensity () const
 
double getDensity (const double _a) const
 
void calcH0Myr ()
 
double calcAdot (const double _a) const
 calculate da/dt More...
 
void updateA (const double _dt)
 update scale factor by time step _dt (first order Euler method) More...
 
void updateAwithDtmin (const double _dt)
 update scale factor with maximum time step dt_max (first order Euler method) More...
 
double getH () const
 get Hubble constant at current a More...
 

Public Attributes

double time
 
double dt_max
 
double a
 
double H0
 
double H0_myr
 
double omega_energy
 
double omega_radiation
 
double omega_matter
 
double dt_scale
 

Detailed Description

FRW cosmological model for calculating scale factor (redshift)

Member Function Documentation

◆ calcAdot()

double FRWModel::calcAdot ( const double  _a) const
inline

calculate da/dt

Parameters
[in]_ascale factor
Returns
da/dt
Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcH0Myr()

void FRWModel::calcH0Myr ( )
inline
Here is the caller graph for this function:

◆ getCurvatureDensity()

double FRWModel::getCurvatureDensity ( ) const
inline
Here is the caller graph for this function:

◆ getDensity()

double FRWModel::getDensity ( const double  _a) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getEnergyDensity()

double FRWModel::getEnergyDensity ( const double  _a) const
inline
Here is the caller graph for this function:

◆ getH()

double FRWModel::getH ( ) const
inline

get Hubble constant at current a

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMatterDensity()

double FRWModel::getMatterDensity ( const double  _a) const
inline
Here is the caller graph for this function:

◆ getRadiationDensity()

double FRWModel::getRadiationDensity ( const double  _a) const
inline
Here is the caller graph for this function:

◆ updateA()

void FRWModel::updateA ( const double  _dt)
inline

update scale factor by time step _dt (first order Euler method)

Iterate 10 times to get high accuracy for small a

Parameters
[in]_dttime step
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateAwithDtmin()

void FRWModel::updateAwithDtmin ( const double  _dt)
inline

update scale factor with maximum time step dt_max (first order Euler method)

Iterate 10 times to get high accuracy for small a

Parameters
[in]_dttime step
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ a

double FRWModel::a

◆ dt_max

double FRWModel::dt_max

◆ dt_scale

double FRWModel::dt_scale

◆ H0

double FRWModel::H0

◆ H0_myr

double FRWModel::H0_myr

◆ omega_energy

double FRWModel::omega_energy

◆ omega_matter

double FRWModel::omega_matter

◆ omega_radiation

double FRWModel::omega_radiation

◆ time

double FRWModel::time

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