The SKIRT project
advanced radiative transfer for astrophysics
TrivialGasMix Class Reference

#include <TrivialGasMix.hpp>

Inheritance diagram for TrivialGasMix:

Public Member Functions

double absorptionCrossSection () const
double asymmetryParameter () const
double asymmpar (double lambda) const override
bool hasNegativeExtinction () const override
double indicativeTemperature (const MaterialState *state, const Array &Jv) const override
double mass () const override
MaterialType materialType () const override
double opacityAbs (double lambda, const MaterialState *state, const PhotonPacket *pp) const override
double opacityExt (double lambda, const MaterialState *state, const PhotonPacket *pp) const override
double opacitySca (double lambda, const MaterialState *state, const PhotonPacket *pp) const override
bool peeloffScattering (double &I, double &Q, double &U, double &V, double &lambda, Direction bfkobs, Direction bfky, const MaterialState *state, const PhotonPacket *pp) const override
void performScattering (double lambda, const MaterialState *state, PhotonPacket *pp) const override
double scatteringCrossSection () const
double sectionAbs (double lambda) const override
double sectionExt (double lambda) const override
double sectionSca (double lambda) const override
vector< StateVariablespecificStateVariableInfo () const override
Public Member Functions inherited from MaterialMix
virtual Array emissionSpectrum (const MaterialState *state, const Array &Jv) const
virtual DisjointWavelengthGridemissionWavelengthGrid () const
virtual Array emissivity (const Array &Jv) const
virtual bool hasContinuumEmission () const
virtual DynamicStateType hasDynamicMediumState () const
virtual bool hasExtraSpecificState () const
virtual bool hasLineEmission () const
virtual bool hasPolarizedAbsorption () const
virtual bool hasPolarizedEmission () const
virtual bool hasPolarizedScattering () const
virtual bool hasResonantScattering () const
virtual bool hasScatteringDispersion () const
virtual bool hasStochasticDustEmission () const
virtual void initializeSpecificState (MaterialState *state, double metallicity, double temperature, const Array &params) const
bool isDust () const
bool isElectrons () const
bool isGas () const
virtual bool isSpecificStateConverged (int numCells, int numUpdated, int numNotConverged, MaterialState *currentAggregate, MaterialState *previousAggregate) const
virtual Array lineEmissionCenters () const
virtual Array lineEmissionMasses () const
virtual Array lineEmissionSpectrum (const MaterialState *state, const Array &Jv) const
virtual vector< SnapshotParameterparameterInfo () const
virtual bool scatteringEmulatesSecondaryEmission () const
virtual const ArraysectionsAbs (double lambda) const
virtual const ArraysectionsAbspol (double lambda) const
virtual const ArraythetaGrid () const
virtual UpdateStatus updateSpecificState (MaterialState *state, const Array &Jv) const
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

 TrivialGasMix ()
Protected Member Functions inherited from MaterialMix
 MaterialMix ()
Configurationconfig () const
Randomrandom () const
void setupSelfBefore () override
Protected Member Functions inherited from SimulationItem
 SimulationItem ()
virtual bool offersInterface (const std::type_info &interfaceTypeInfo) const
virtual void setupSelfAfter ()
Protected Member Functions inherited from Item
 Item ()

Private Types

using BaseType
using ItemType

Private Attributes

double _absorptionCrossSection
double _asymmetryParameter
double _scatteringCrossSection

Friends

class ItemRegistry

Additional Inherited Members

Public Types inherited from MaterialMix
enum class  DynamicStateType { None , Primary , Secondary , PrimaryIfMergedIterations }
enum class  MaterialType { Dust , Electrons , Gas }

Detailed Description

The TrivialGasMix class represents a trivial gas mix defined by optical properties fully specified inside the configuration file. It is provided for testing purposes, and specifically for testing media with a negative absorption cross section (caused by stimulated emission).

The class is designed for use in monochromatic simulations. The gas mix properties do not depend on wavelength, nor on any other property of the incoming photon packet or on any medium state variable (other than the number density). The gas mix supports absorption and Henyey-Greenstein scattering but no secondary emission. Each interacting entity in the gas is considered to be a hydrogen atom, which sets the conversion scale from mass to number normalization. If the gas distribution is normalized to a given optical depth, the values of the cross sections (see below) are essentially scale free.

The following spatially-constant and wavelength-independent properties can be configured: the absorption cross section per hydrogen atom, which can be negative; the scattering cross section per hydrogen atom, which must be positive; and the scattering asymmetry parameter used with the Henyey-Greenstein phase function.

This item type is displayed only if the Boolean expression "Level3" evaluates to true after replacing the names by true or false depending on their presence.

When an item of this type is used, the names provided by the conditional value expression "GasMix" are inserted into the name sets used for evaluating Boolean expressions.

Constructor & Destructor Documentation

◆ TrivialGasMix()

TrivialGasMix::TrivialGasMix ( )
inlineprotected

Default constructor for concrete Item subclass TrivialGasMix: "A trivial gas mix for testing purposes".

Member Function Documentation

◆ absorptionCrossSection()

double TrivialGasMix::absorptionCrossSection ( ) const
inline

This function returns the value of the discoverable double property absorptionCrossSection: "the absorption cross section per hydrogen atom".

This property represents a physical quantity of type "section".

◆ asymmetryParameter()

double TrivialGasMix::asymmetryParameter ( ) const
inline

This function returns the value of the discoverable double property asymmetryParameter: "the scattering asymmetry parameter".

The minimum value for this property is "[-0.95".

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

◆ asymmpar()

double TrivialGasMix::asymmpar ( double lambda) const
overridevirtual

This function returns the scattering asymmetry parameter configured for this material mix. The wavelength is not used.

Reimplemented from MaterialMix.

◆ hasNegativeExtinction()

bool TrivialGasMix::hasNegativeExtinction ( ) const
overridevirtual

This function returns true if the configured extinction cross section (the sum of the configured absorption and scattering cross section) for this material mix is negative, and false otherwise.

Reimplemented from MaterialMix.

◆ indicativeTemperature()

double TrivialGasMix::indicativeTemperature ( const MaterialState * state,
const Array & Jv ) const
overridevirtual

This function returns an indicative temperature of zero. The specified material state and radiation field are noto used.

Reimplemented from MaterialMix.

◆ mass()

double TrivialGasMix::mass ( ) const
overridevirtual

This function returns the mass of a hydrogen atom.

Implements MaterialMix.

◆ materialType()

MaterialType TrivialGasMix::materialType ( ) const
overridevirtual

This function returns the fundamental material type represented by this material mix, which is MaterialType::Gas.

Implements MaterialMix.

◆ opacityAbs()

double TrivialGasMix::opacityAbs ( double lambda,
const MaterialState * state,
const PhotonPacket * pp ) const
overridevirtual

This function returns the absorption opacity for the number density given in the specified material state. The wavelength and the photon packet properties are not used.

Implements MaterialMix.

◆ opacityExt()

double TrivialGasMix::opacityExt ( double lambda,
const MaterialState * state,
const PhotonPacket * pp ) const
overridevirtual

This function returns the extinction opacity for the number density given in the specified material state. The wavelength and the photon packet properties are not used.

Implements MaterialMix.

◆ opacitySca()

double TrivialGasMix::opacitySca ( double lambda,
const MaterialState * state,
const PhotonPacket * pp ) const
overridevirtual

This function returns the scattering opacity for the number density given in the specified material state. The wavelength and the photon packet properties are not used.

Implements MaterialMix.

◆ peeloffScattering()

bool TrivialGasMix::peeloffScattering ( double & I,
double & Q,
double & U,
double & V,
double & lambda,
Direction bfkobs,
Direction bfky,
const MaterialState * state,
const PhotonPacket * pp ) const
overridevirtual

This function calculates the contribution of the medium component associated with this material mix to the peel-off photon luminosity for the given observer direction. The material state, wavelength and photon packet properties other than direction are not used.

Reimplemented from MaterialMix.

◆ performScattering()

void TrivialGasMix::performScattering ( double lambda,
const MaterialState * state,
PhotonPacket * pp ) const
overridevirtual

This function performs a scattering event for this material mix on the specified photon packet. The photon packet properties other than luminosity and direction remain unchanged.

Reimplemented from MaterialMix.

◆ scatteringCrossSection()

double TrivialGasMix::scatteringCrossSection ( ) const
inline

This function returns the value of the discoverable double property scatteringCrossSection: "the scattering cross section per hydrogen atom".

This property represents a physical quantity of type "section".

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

◆ sectionAbs()

double TrivialGasMix::sectionAbs ( double lambda) const
overridevirtual

This function returns the absorption cross section per hydrogen atom configured for this material mix. The wavelength is not used.

Implements MaterialMix.

◆ sectionExt()

double TrivialGasMix::sectionExt ( double lambda) const
overridevirtual

This function returns the extinction cross section per hydrogen atom, i.e. the sum of the absorption and scattering cross sections per hydrogen atom configured for this material mix. The wavelength is not used.

Implements MaterialMix.

◆ sectionSca()

double TrivialGasMix::sectionSca ( double lambda) const
overridevirtual

This function returns the scattering cross section per hydrogen atom configured for this material mix. The wavelength is not used.

Implements MaterialMix.

◆ specificStateVariableInfo()

vector< StateVariable > TrivialGasMix::specificStateVariableInfo ( ) const
overridevirtual

This function returns a list of StateVariable objects describing the specific state variables used by the receiving material mix. For this class, the function returns just the descriptor for the number density.

Implements MaterialMix.


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