criptic v1
Cosmic Ray Interstellar Propagation Tool using Itô Calculus
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
criptic::gas::GasData Class Reference

Trivial class to hold gas data. More...

#include <GasData.H>

Public Member Functions

Real UB () const
 Compute magnetic energy density.
 
constexpr Real xH2 () const
 Compute H2 abundance.
 
constexpr Real xHe () const
 Compute total He abundance across all ionization states.
 
constexpr Real X () const
 Compute H abundance by mass.
 
constexpr Real Y () const
 Compute He abundance by mass.
 
constexpr Real AxZ () const
 Return heavy element abundance times mean atomic mass.
 
constexpr Real muH () const
 Compute mean mass per H nucleon.
 
constexpr Real mue () const
 Compute mean mass per electron.
 
constexpr Real nH () const
 Compute number density of H nuclei.
 
constexpr Real neTot () const
 Compute total number density of electrons.
 
constexpr Real neFree () const
 Compute number density of free electrons.
 
void setAtomicComposition ()
 Set reasonable abundances for atomic ISM.
 
void setMolecularComposition ()
 Set reasonable abundances for molecular ISM.
 
void setIonizedComposition ()
 Set reasonable abundances for fully ionized ISM.
 
GasData operator* (const Real &w) const
 Multiply by a scalar.
 
GasData operator+ (const GasData &gd) const
 Add two GasData objects.
 

Public Attributes

Real dx
 
Real den
 
Real ionDen
 
RealVec v
 
RealVec B
 
RealVec denGrad
 
RealVec ionDenGrad
 
RealTensor2 vGrad
 
RealTensor2 BGrad
 
Real xH0
 
Real xHp
 
Real xHe0
 
Real xHep
 
Real xHep2
 
Real xe
 
Real Z
 
std::vector< RealTBB
 
std::vector< RealWBB
 

Detailed Description

Trivial class to hold gas data.

This class holds information about the gas density, velocity, magnetic field, and their gradients. It provides some trivial utility methods.

Member Function Documentation

◆ AxZ()

constexpr Real criptic::gas::GasData::AxZ ( ) const
inlineconstexpr

Return heavy element abundance times mean atomic mass.

Returns
A_mean * x_Z

This routine returns the mean atomic mass A_mean of heavy elements multiplied by the heavy element abundance per H, x_Z

◆ mue()

constexpr Real criptic::gas::GasData::mue ( ) const
inlineconstexpr

Compute mean mass per electron.

Returns
Mass per electron, in units of the H atom mass

This calculation assumes heavy elements have a number of electrons equal to half their atomic mass

◆ muH()

constexpr Real criptic::gas::GasData::muH ( ) const
inlineconstexpr

Compute mean mass per H nucleon.

Returns
Mass per H nucleon, in units of the H atom mass

◆ neFree()

constexpr Real criptic::gas::GasData::neFree ( ) const
inlineconstexpr

Compute number density of free electrons.

Returns
Number density of free electrons

◆ neTot()

constexpr Real criptic::gas::GasData::neTot ( ) const
inlineconstexpr

Compute total number density of electrons.

Returns
Total number density of electrons

Here "total" means the number density of all electrons, free or bound.

◆ nH()

constexpr Real criptic::gas::GasData::nH ( ) const
inlineconstexpr

Compute number density of H nuclei.

Returns
Number density of H nuclei

◆ operator*()

criptic::gas::GasData::operator* ( const Real w) const
inline

Multiply by a scalar.

Parameters
wThe scalar
Returns
A GasData object with every field multiplied by w

For the blackbody radiation field, the dilution factor is multiplied by w, but the temperature is left unchanged.

◆ operator+()

criptic::gas::GasData::operator+ ( const GasData gd) const
inline

Add two GasData objects.

Parameters
gdThe GasData object to add
Returns
A GasData object consisting of the sum of the two inputs

For the blackbody radiation components, the dilution factors are added, and the blackbody temperatures are unchanged. If the blackbody temperatures of the two objects being added are not elementwise identical, the outcome is undefined.

◆ setAtomicComposition()

void criptic::gas::GasData::setAtomicComposition ( )
inline

Set reasonable abundances for atomic ISM.

He and metal abundances taken from Asplund+ (2009)

◆ setIonizedComposition()

void criptic::gas::GasData::setIonizedComposition ( )
inline

Set reasonable abundances for fully ionized ISM.

He and metal abundances taken from Asplund+ (2009)

◆ setMolecularComposition()

void criptic::gas::GasData::setMolecularComposition ( )
inline

Set reasonable abundances for molecular ISM.

He and metal abundances taken from Asplund+ (2009)

◆ UB()

Real criptic::gas::GasData::UB ( ) const
inline

Compute magnetic energy density.

Returns
Magnetic energy density

This method correctly computes the magnetic energy density in either Gaussian or SI units, depending on which are selected at compile-time.

◆ X()

constexpr Real criptic::gas::GasData::X ( ) const
inlineconstexpr

Compute H abundance by mass.

Returns
H abundance by mass

◆ xH2()

constexpr Real criptic::gas::GasData::xH2 ( ) const
inlineconstexpr

Compute H2 abundance.

Returns
H2 abundance

This method deduces the H2 abundance from the HI and HII abundances.

◆ xHe()

constexpr Real criptic::gas::GasData::xHe ( ) const
inlineconstexpr

Compute total He abundance across all ionization states.

Returns
Total He abundance

◆ Y()

constexpr Real criptic::gas::GasData::Y ( ) const
inlineconstexpr

Compute He abundance by mass.

Returns
He abundance by mass

Member Data Documentation

◆ B

RealVec criptic::gas::GasData::B

Magnetic field

◆ BGrad

RealTensor2 criptic::gas::GasData::BGrad

Gradient of magnetic field, dB_i / dx_j

◆ den

Real criptic::gas::GasData::den

Total mass density

◆ denGrad

RealVec criptic::gas::GasData::denGrad

Total density gradient

◆ dx

Real criptic::gas::GasData::dx

Characteristic length scale

◆ ionDen

Real criptic::gas::GasData::ionDen

Ionized mass density

◆ ionDenGrad

RealVec criptic::gas::GasData::ionDenGrad

Ionized density gradient

◆ TBB

std::vector<Real> criptic::gas::GasData::TBB

Temperatures of BB radiation fields

◆ v

RealVec criptic::gas::GasData::v

Gas velocity

◆ vGrad

RealTensor2 criptic::gas::GasData::vGrad

Velocity gradient, dv_i / dx_j

◆ WBB

std::vector<Real> criptic::gas::GasData::WBB

Dilution factors of BB radiation fields

◆ xe

Real criptic::gas::GasData::xe

Free electron abundance per H nucleon

◆ xH0

Real criptic::gas::GasData::xH0

H^0 abundance per H nucleon

◆ xHe0

Real criptic::gas::GasData::xHe0

He^0 abundance per H nucleon

◆ xHep

Real criptic::gas::GasData::xHep

He^+ abundance per H nucleon

◆ xHep2

Real criptic::gas::GasData::xHep2

He^++ abundance per H nucleon

◆ xHp

Real criptic::gas::GasData::xHp

H^+ abundance per H nucleon

◆ Z

Real criptic::gas::GasData::Z

Heavy element abundance by mass


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