The SKIRT project
advanced radiative transfer for astrophysics
FlatUniverseCosmology Class Reference

#include <FlatUniverseCosmology.hpp>

Inheritance diagram for FlatUniverseCosmology:

Public Member Functions

double angularDiameterDistance () const override
double luminosityDistance () const override
double matterDensityFraction () const
double modelRedshift () const override
double redshift () const
double reducedHubbleConstant () const
double relativeExpansionRate () const override
Public Member Functions inherited from SimulationItem
template<class T>
T * find (bool setup=true) const
template<class T>
T * interface (int levels=-999999, bool setup=true) const
virtual string itemName () const
void setup ()
string typeAndName () const
Public Member Functions inherited from Item
 Item (const Item &)=delete
virtual ~Item ()
void addChild (Item *child)
const vector< Item * > & children () const
virtual void clearItemListProperty (const PropertyDef *property)
void destroyChild (Item *child)
virtual bool getBoolProperty (const PropertyDef *property) const
virtual vector< double > getDoubleListProperty (const PropertyDef *property) const
virtual double getDoubleProperty (const PropertyDef *property) const
virtual string getEnumProperty (const PropertyDef *property) const
virtual int getIntProperty (const PropertyDef *property) const
virtual vector< Item * > getItemListProperty (const PropertyDef *property) const
virtual ItemgetItemProperty (const PropertyDef *property) const
virtual string getStringProperty (const PropertyDef *property) const
int getUtilityProperty (string name) const
virtual void insertIntoItemListProperty (const PropertyDef *property, int index, Item *item)
Itemoperator= (const Item &)=delete
Itemparent () const
virtual void removeFromItemListProperty (const PropertyDef *property, int index)
virtual void setBoolProperty (const PropertyDef *property, bool value)
virtual void setDoubleListProperty (const PropertyDef *property, vector< double > value)
virtual void setDoubleProperty (const PropertyDef *property, double value)
virtual void setEnumProperty (const PropertyDef *property, string value)
virtual void setIntProperty (const PropertyDef *property, int value)
virtual void setItemProperty (const PropertyDef *property, Item *item)
virtual void setStringProperty (const PropertyDef *property, string value)
void setUtilityProperty (string name, int value)
virtual string type () const

Protected Member Functions

 FlatUniverseCosmology ()
Protected Member Functions inherited from Cosmology
 Cosmology ()
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfAfter ()
virtual void setupSelfBefore ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

double _matterDensityFraction
double _redshift
double _reducedHubbleConstant

Friends

class ItemRegistry

Detailed Description

An instance of the FlatUniverseCosmology class represents a cosmology where the simulated model resides at a given redshift \(z\) in a standard spatially-flat \(\Lambda\mathrm{CDM}\) universe. The allowed redshift range is \(0\le z\le 15\), i.e. including the epoch of reionization. If \(z=0\), the behavior is the same as that of a LocalUniverseCosmology.

In addition to the redshift, this cosmology has two parameters, namely the reduced Hubble constant \(h=H_0/(100\,\mathrm{km}\,\mathrm{s}^{-1}\,\mathrm{Mpc}^{-1})\) and the matter density fraction \(\Omega_\mathrm{m}\). The default values for these parameters are compatible with the latest observations and close to the values used by many recent cosmological simulations.

For a spatially-flat cosmology, the line-of-sight and transverse comoving distances are identical. We further ignore the radiation density, which is justified for the allowed redshift range \(z\le15\). With these assumptions, the comoving distance \(d_\mathrm{M}(z)\) corresponding to redshift $z$ can be obtained from the matter density fraction \(\Omega_\mathrm{m}\) and the Hubble constant \(H_0=h \times 100\,\mathrm{km}\,\mathrm{s}^{-1}\,\mathrm{Mpc}^{-1}\) using

\[ d_\mathrm{M}(z) = \frac{c}{H_0} \int_0^z \frac{\mathrm{d}z'}{\sqrt{\Omega_\mathrm{m}(1+z')^3 + (1-\Omega_\mathrm{m})}} \]

where \(c\) is the speed of light.

The angular-diameter distance \(d_\mathrm{A}(z)\) and the luminosity distance \(d_\mathrm{L}(z)\) are then obtained from

\[ d_\mathrm{A}(z) = (1+z)^{-1} \, d_\mathrm{M}(z) \]

and

\[ d_\mathrm{L}(z) = (1+z) \, d_\mathrm{M}(z). \]

Finally, the relative expansion rate of the universe \(H=\dot{a}/a\), usually called the Hubble parameter, is given by

\[ H(z) = H_0 \sqrt{\Omega_\mathrm{m}(1+z')^3 + (1-\Omega_\mathrm{m})}. \]

Constructor & Destructor Documentation

◆ FlatUniverseCosmology()

FlatUniverseCosmology::FlatUniverseCosmology ( )
inlineprotected

Default constructor for concrete Item subclass FlatUniverseCosmology: "the model is at a given redshift in a flat universe".

When a value is entered for this property, the names provided by the conditional value expression "redshift:NonZeroRedshift" are inserted into the name sets used for evaluating Boolean expressions.

Member Function Documentation

◆ angularDiameterDistance()

double FlatUniverseCosmology::angularDiameterDistance ( ) const
overridevirtual

This function returns the angular-diameter distance \(d_\mathrm{A}(z)\), calculated from the user-configured cosmology parameters as described in the class header. The integral is evaluated numerically. We don't worry about performance because this function is called just once during simulation setup.

Implements Cosmology.

◆ luminosityDistance()

double FlatUniverseCosmology::luminosityDistance ( ) const
overridevirtual

This function returns the luminosity distance. For this class, calculated from the user-configured cosmology parameters as described in the class header. The integral is evaluated numerically. We don't worry about performance because this function is called just once during simulation setup.

Implements Cosmology.

◆ matterDensityFraction()

double FlatUniverseCosmology::matterDensityFraction ( ) const
inline

This function returns the value of the discoverable double property matterDensityFraction: "the cosmological matter density fraction Ω_m".

The minimum value for this property is "0.1".

The maximum value for this property is "0.9".

The default value for this property is given by the conditional value expression "0.310".

This property is relevant only if the Boolean expression "redshift" evaluates to true after replacing the names by true or false depending on their presence.

◆ modelRedshift()

double FlatUniverseCosmology::modelRedshift ( ) const
overridevirtual

This function returns the redshift at which the model resides.

Implements Cosmology.

◆ redshift()

double FlatUniverseCosmology::redshift ( ) const
inline

This function returns the value of the discoverable double property redshift: "the redshift z of the model coordinate frame".

The minimum value for this property is "[0".

The maximum value for this property is "15]".

The default value for this property is given by the conditional value expression "1".

◆ reducedHubbleConstant()

double FlatUniverseCosmology::reducedHubbleConstant ( ) const
inline

This function returns the value of the discoverable double property reducedHubbleConstant: "the reduced Hubble constant h".

The minimum value for this property is "0.3".

The maximum value for this property is "1".

The default value for this property is given by the conditional value expression "0.675".

This property is relevant only if the Boolean expression "redshift" evaluates to true after replacing the names by true or false depending on their presence.

◆ relativeExpansionRate()

double FlatUniverseCosmology::relativeExpansionRate ( ) const
overridevirtual

This function returns the relative expansion rate of the universe, \(H=\dot{a}/a\), often called the Hubble parameter. The function returns the value in SI units, i.e. \(\mathrm{s}^{-1}\).

Implements Cosmology.


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