The SKIRT project
advanced radiative transfer for astrophysics
DiffuseIonizedGasMix Class Reference

#include <DiffuseIonizedGasMix.hpp>

Inheritance diagram for DiffuseIonizedGasMix:

Classes

struct  ReemissionData

Public Types

enum class  AbundanceMode : int { SolarScaled , PerCell }
Public Types inherited from MaterialMix
enum class  DynamicStateType { None , Primary , Secondary , PrimaryIfMergedIterations }
enum class  MaterialType { Dust , Electrons , Gas }

Public Member Functions

AbundanceMode abundanceMode () const
double defaultMetallicity () const
double defaultTemperature () const
Array emissionSpectrum (const MaterialState *state, const Array &Jv) const override
DisjointWavelengthGridemissionWavelengthGrid () const override
bool hasContinuumEmission () const override
DynamicStateType hasDynamicMediumState () const override
bool hasExtraSpecificState () const override
bool hasLineEmission () const override
bool hasScattering () const
bool hasScatteringDispersion () const override
double indicativeTemperature (const MaterialState *state, const Array &Jv) const override
void initializeSpecificState (MaterialState *state, double metallicity, double temperature, const Array &params) const override
bool isSpecificStateConverged (int numCells, int numUpdated, int numNotConverged, MaterialState *currentAggregate, MaterialState *previousAggregate) const override
Array lineEmissionCenters () const override
Array lineEmissionMasses () const override
Array lineEmissionSpectrum (const MaterialState *state, const Array &Jv) const override
double mass () const override
double maxChangeInGlobalIonizedH () const
double maxChangeInIonization () const
double maxFractionNotConvergedCells () const
double maxHydrogenDensity () const
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
vector< SnapshotParameterparameterInfo () 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 reemissionFraction () const
double sectionAbs (double lambda) const override
double sectionExt (double lambda) const override
double sectionSca (double lambda) const override
double solarScalingC () const
double solarScalingN () const
vector< StateVariablespecificStateVariableInfo () const override
double stabilityConvergenceThreshold () const
double transitionBlendWidth () const
UpdateStatus updateSpecificState (MaterialState *state, const Array &Jv) const override
bool useCloudyOpacity () const
bool useCloudyTemperature () const
Public Member Functions inherited from EmittingGasMix
MaterialType materialType () const override
double sourceWeight () const
double wavelengthBias () const
WavelengthDistributionwavelengthBiasDistribution () const
Range wavelengthRange () const override
Public Member Functions inherited from MaterialMix
virtual double asymmpar (double lambda) const
virtual Array emissivity (const Array &Jv) const
virtual bool hasNegativeExtinction () const
virtual bool hasPolarizedAbsorption () const
virtual bool hasPolarizedEmission () const
virtual bool hasPolarizedScattering () const
virtual bool hasResonantScattering () const
virtual bool hasStochasticDustEmission () const
bool isDust () const
bool isElectrons () const
bool isGas () const
virtual bool scatteringEmulatesSecondaryEmission () const
virtual const ArraysectionsAbs (double lambda) const
virtual const ArraysectionsAbspol (double lambda) const
virtual const ArraythetaGrid () 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
Public Member Functions inherited from WavelengthRangeInterface
virtual ~WavelengthRangeInterface ()

Protected Member Functions

 DiffuseIonizedGasMix ()
void setupSelfBefore () override
Protected Member Functions inherited from EmittingGasMix
 EmittingGasMix ()
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 ()
Protected Member Functions inherited from SourceWavelengthRangeInterface
 SourceWavelengthRangeInterface ()
Protected Member Functions inherited from WavelengthRangeInterface
 WavelengthRangeInterface ()

Private Types

using BaseType
using ItemType
enum  ReemissionChannel {
  Hydrogen , HeliumLyC , HeliumNpEv , HeliumTPC ,
  HeliumLyA
}
enum class  TableSelection { Standard , Transition , Blend }

Private Member Functions

void bracketDeltaAxis (double value, const std::vector< double > &axis_values, const std::vector< int > &axis_deltaIds, int &deltaIdLo, int &deltaIdHi, double &w) const
void buildPerCellAbundances (const MaterialState *state, double abund[8]) const
void calculate5BinRatioParameters (const Array &Jv, double &logR2, double &logR3, double &logR4, double &logR5) const
void calculateBinAverages (const Array &Jv, double *binAverages) const
double calculateIonizationParameter (const Array &Jv, double nH) const
void calculateReemissionProbabilities (const MaterialState *state, double lambda, ReemissionData &data) const
void computeCellDeltas (const MaterialState *state, double &dN, double &dC) const
double convertTotalDensityToHydrogenDensity (double n_total, double He_abundance) const
double getBlendingWeight (double logU) const
double getHeliumCrossSection (double frequency) const
double getHydrogenCrossSection (double frequency) const
const ReemissionDatagetReemissionData (const MaterialState *state, double lambda) const
void initializeOpacityWavelengthGrid () const
double integrate (const std::vector< double > &x, const std::vector< double > &y) const
double integrateLinearSpace (const std::vector< double > &x, const std::vector< double > &y) const
double integrateLogSpace (const std::vector< double > &x, const std::vector< double > &y) const
double interpolateOpacityFromState (double lambda, MaterialState *state, int opacityType) const
void interpolateReemissionSpectrum (int spectrumType, double temperature, std::vector< double > &wavelengths, std::vector< double > &cumulativeDist) const
void precomputeOpacityArrays (MaterialState *state, const Array &Jv) const
double rydbergToWavelength (double energy_ryd) const
double sampleFromTemperatureDependentSpectrum (int spectrumType, double temperature, Random *random) const
double sampleHeliumLymanContinuum (double temperature) const
double sampleHeliumTwoPhotonContinuum (double temperature) const
double sampleHydrogenLymanContinuum (double temperature) const
int selectReemissionChannel (const MaterialState *state, double lambda, const PhotonPacket *pp) const
TableSelection selectTable (double logU) const
double simpsonIntegration (const std::vector< double > &x, const std::vector< double > &y) const
double trapezoidalIntegrationKahan (const std::vector< double > &x, const std::vector< double > &y) const
void updateTemperatureFromStab (MaterialState *state) const

Private Attributes

AbundanceMode _abundanceMode
std::vector< double > _convergedFractionHistory
size_t _convergenceHistorySize
std::vector< int > _dCAxisDeltaIds
std::vector< double > _dCAxisValues
double _defaultMetallicity
double _defaultTemperature
StoredTable< 1 > _deltaCMapTable
int _deltaIdCentre
StoredTable< 1 > _deltaNMapTable
std::vector< int > _dNAxisDeltaIds
std::vector< double > _dNAxisValues
PhotoIonizationSolver _emissionSolver
DisjointWavelengthGrid_emissionWavelengthGrid
int _indexFirstIonFractionAgg
int _indexFirstIonFractionDiag
int _indexFirstMetalAbund
int _indexFirstOpacityAbs
int _indexFirstOpacityExt
int _indexFirstOpacitySca
int _indexHeliumAbundance
int _indexHeNeutralFraction
int _indexHNeutralFraction
int _indexIonizationParameter
int _indexLogR2
int _indexLogR3
int _indexLogR4
int _indexLogR5
int _indexNHIonized
double _lambdaBin1
double _lambdaBin2
double _lambdaBin3
double _lambdaBin4
double _lambdaBin5
double _lambdaBin6
double _lambdaH
double _lambdaHe
double _lambdaHigh
double _lambdaLow
Array _lineCenters
Array _lineMasses
double _maxChangeInGlobalIonizedH
double _maxChangeInIonization
double _maxFractionNotConvergedCells
double _maxHydrogenDensity
double _maxNH_m3
double _nHMinOpacity
int _numLines
Array _opacityWavelengthGrid
double _reemissionFraction
StoredTable< 3 > _reemissionSpectraTable
double _solarScalingC
double _solarScalingN
double _stabDCmax
double _stabDCmin
double _stabDNmax
double _stabDNmin
double _stabilityConvergenceThreshold
StoredTable< 9 > _standardOpacityTable
StoredTable< 8 > _standardTemperatureTable
double _transitionBlendWidth
double _transitionLogUMax
double _transitionLogUMin
StoredTable< 8 > _transitionOpacityTable
StoredTable< 7 > _transitionTemperatureTable
bool _useCloudyOpacity
bool _useCloudyTemperature

Static Private Attributes

static constexpr int numReemissionChannels

Friends

class ItemRegistry

Detailed Description

An instance of the DiffuseIonizedGasMix class represents diffuse ionized gas regions (HII regions, diffuse ionized gas, ionization fronts) for radiative transfer simulations. The module uses a hybrid approach that combines pre-computed Cloudy tables with an inline photoionization solver:

Applicability and naming note

The class name "DiffuseIonizedGasMix" reflects the module's original motivating application: modelling the diffuse ionised medium in cosmological galaxy simulations, where dense HII regions are often unresolved and handled by sub-grid prescriptions (Kapoor et al. 2026a; the multi-metallicity and per-cell-abundance extensions are presented in Kapoor et al. 2026b). The module itself is general-purpose: it operates on the local radiation field and gas density in each cell, agnostic to the specific astrophysical context.

The STAB tables extend to n_H = 10^5 cm^-3 and log U from -6.5 to +1.5, making the module applicable across the photoionised-plasma regime, from the diffuse ionised medium (n_H << 1 cm^-3) through individual HII regions, planetary nebulae, and dense star-forming clumps (n_H up to 10^5 cm^-3).

The STAB tables for temperature and opacity are pre-computed by running Cloudy on a grid of 5-bin step-function SEDs that are zero above 6 Ryd; the lookup parameters are the ionisation parameter log U (integrated from 1 Ryd over the full simulation wavelength grid) and four spectral-shape ratios R2-R5 covering 1.0-6.0 Ryd. The inline ionisation balance, by contrast, is solved by PhotoIonizationSolver directly from the full radiation field using Verner photoionisation cross-sections extending to keV. As a result, the ion balance accommodates any incident SED, but the STAB-based T and opacity ignore any flux above 6 Ryd. When the radiation-field wavelength grid extends beyond 6 Ryd and the incident SED carries significant flux there (e.g. AGN power-law spectra into X-rays), the T and opacity lookups become approximate; the size of the bias scales with the fraction of ionising flux that sits in that regime.

  • Temperature and opacity are determined from pre-computed STAB tables based on the ionization parameter (log U), a 5-bin spectral characterization (R2-R5), metallicity, and gas density.
  • Ionization balance is solved every iteration by the inline PhotoIonizationSolver at the STAB-derived temperature, yielding ion fractions for all tracked species (H, He, C, N, O, Ne, Mg, Si, S, Fe) and the electron density. Key ion fractions (x_HII, x_NII, x_OI, x_OII, x_OIII, x_SII) and n_e are stored as custom state variables for diagnostics.
  • Emission is computed from the converged radiation field, temperature, and ion fractions: NebularLineEmission computes line luminosities (hydrogen recombination lines from Storey & Hummer 1995 Case B coefficients; metal forbidden lines from CHIANTI collisional excitation rates) and NebularContinuumEmission computes the nebular continuum (free-bound, free-free, two-photon).
  • Diffuse reemission of absorbed ionizing photons follows Wood, Mathis & Ercolano (2004), with pre-tabulated temperature-dependent spectra for H/He Lyman continuum and He two-photon.

5-Bin Radiation Field Characterization

The ionizing radiation field is characterized using 5 energy bins:

  • Bin 1: 1.0 - 1.8 Ryd (912 - 506 A)
  • Bin 2: 1.8 - 2.58 Ryd (506 - 353 A)
  • Bin 3: 2.58 - 3.52 Ryd (353 - 259 A)
  • Bin 4: 3.52 - 4.0 Ryd (259 - 228 A)
  • Bin 5: 4.0 - 6.0 Ryd (228 - 152 A)

The spectral shape is described by four ratios relative to the first bin: R2 = J2/J1, R3 = J3/J1, R4 = J4/J1, R5 = J5/J1

Dual-Table System

Separate STAB tables for temperature and opacity optimize accuracy across different ionization regimes:

  • Standard Table: log U sampling (-4.0, -3.3, -2.6, -2.0, -1.3, -0.6, 0.1, 0.8, 1.5) for general ISM (log U >= -4)
  • Transition Table: log U sampling (-6.5, -6.1, -5.7, -5.2, -4.8, -4.4, -4.0) for ionization fronts (log U <= -4), capturing radiation hardening at nebular edges. The transition table uses broader shape-ratio ranges to capture the harder spectra near ionization fronts.

The appropriate table is automatically selected based on log U, with smooth blending in overlap regions.

Required Input

The input model must provide spatial distributions of:

  • Number density
  • Metallicity

STAB Table Structure

  • Temperature: 7D (Z, n_H, logU, log10(R2), log10(R3), log10(R4), log10(R5))
  • Opacity: 9D (wavelength, logU, log10(R2), log10(R3), log10(R4), log10(R5), Z, n_H, index)
  • Reemission spectra: 3D (spectrumType, T, wavelength) -> cumulative probability

Convergence

Convergence of the primary emission iterations is governed by three criteria. The per-cell criterion OR the plateau criterion must pass, AND the global criterion must pass:

  • Per-cell: each cell's relative change in temperature |delta T|/T and ionization parameter |delta logU|/|logU| are compared to maxChangeInIonization. A cell is "not converged" if either exceeds the threshold. The fraction of not-converged cells must be below maxFractionNotConvergedCells.
  • Plateau: the converged cell fraction is tracked over the last 3 iterations. If the change between consecutive values is below stabilityConvergenceThreshold (a fraction, displayed as percent in the log), convergence is declared even if the per-cell criterion is not met. This handles cases where Monte Carlo noise prevents the per-cell fraction from reaching the target.
  • Global: the relative change |delta sum(nHp*V)| / sum(nHp*V) in total ionized hydrogen must be below maxChangeInGlobalIonizedH. This prevents false convergence when trivially-neutral cells dominate the per-cell count while the ionization structure is still evolving.

All threshold properties are specified as fractions (0-1); log output displays percentages.

Density Ceiling

If maxHydrogenDensity is set to a positive value, the hydrogen number density n_H is clamped to that ceiling (in cm^-3) at the start of each cell update, before it is used anywhere: ionization parameter (logU), ionization fractions, temperature/opacity STAB lookups, and emission. This ensures self-consistency across all calculations. The default value is 10^5 cm^-3, matching the upper edge of the stab density axis; setting it to 0 disables the ceiling.

For opacity, cells below the minimum STAB table density are linearly scaled (opacity proportional to n). Cells above the maximum table density use StoredTable clamping.

Abundances and gas-phase depletion

The metallicity and per-cell element abundances supplied to this mix are interpreted as total values, including atoms that are locked up in dust. The temperature and opacity tables shipped with this mix were generated by Cloudy runs in which a fraction of the heavy elements was placed in the dust phase following the recipe of Gunasekera et al. (2023), based on the Jenkins (2009) depletion pattern at F* = 0.5 with no depletion applied to sulphur. The line-emission and ionization-balance step inside this mix applies that same gas-phase fraction to the abundance vector before it is used, so the analytical step is consistent with the physics in the tables. Inputs must therefore be total abundances; subtracting dust before passing them in would apply the depletion twice.

The abundanceMode enum selects how metal and helium abundances are handed to the analytical PIO/emission solver: SolarScaled uses the same prescription the stabs were built with (solar pattern * Zfrac * g(dN,dC) for metals, Gutkin Y(Z) for helium), so emission is fully self-consistent with the tabulated T and kappa. PerCell uses the snapshot's abundances in the emission calculation via 9 imported columns (8 metals + He); the stab T/kappa stay on the Gutkin baseline.

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

Member Enumeration Documentation

◆ AbundanceMode

enum class DiffuseIonizedGasMix::AbundanceMode : int
strong

Selects how metal and helium abundances are handed to the analytical emission solver. See the class docstring section "Abundances and gas-phase depletion" for the full description.

SolarScaled : "solar pattern scaled by metallicity".

PerCell : "per-cell abundances imported from the snapshot".

Constructor & Destructor Documentation

◆ DiffuseIonizedGasMix()

DiffuseIonizedGasMix::DiffuseIonizedGasMix ( )
inlineprotected

Default constructor for concrete Item subclass DiffuseIonizedGasMix: "a diffuse ionized gas mix including emission".

Member Function Documentation

◆ abundanceMode()

AbundanceMode DiffuseIonizedGasMix::abundanceMode ( ) const
inline

This function returns the value of the discoverable AbundanceMode enumeration property abundanceMode: "abundance specification for the emission solver".

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

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

◆ defaultMetallicity()

double DiffuseIonizedGasMix::defaultMetallicity ( ) const
inline

This function returns the value of the discoverable double property defaultMetallicity: "the default metallicity of the gas".

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

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

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

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

◆ defaultTemperature()

double DiffuseIonizedGasMix::defaultTemperature ( ) const
inline

This function returns the value of the discoverable double property defaultTemperature: "the fixed temperature of the gas".

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

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

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

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

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

◆ emissionSpectrum()

Array DiffuseIonizedGasMix::emissionSpectrum ( const MaterialState * state,
const Array & Jv ) const
overridevirtual

Returns the continuum emission spectrum (free-bound, free-free, two-photon).

Reimplemented from MaterialMix.

◆ emissionWavelengthGrid()

DisjointWavelengthGrid * DiffuseIonizedGasMix::emissionWavelengthGrid ( ) const
overridevirtual

Returns a wavelength grid for the emission spectrum

Reimplemented from MaterialMix.

◆ hasContinuumEmission()

bool DiffuseIonizedGasMix::hasContinuumEmission ( ) const
overridevirtual

Returns true because emission is handled as continuous spectrum

Reimplemented from MaterialMix.

◆ hasDynamicMediumState()

DynamicStateType DiffuseIonizedGasMix::hasDynamicMediumState ( ) const
overridevirtual

Returns DynamicStateType::Primary, indicating that this material mix has a dynamic medium state with updates that are considered to affect primary emission.

Reimplemented from MaterialMix.

◆ hasExtraSpecificState()

bool DiffuseIonizedGasMix::hasExtraSpecificState ( ) const
overridevirtual

Returns true, indicating that this material mix has state variables beyond number density

Reimplemented from MaterialMix.

◆ hasLineEmission()

bool DiffuseIonizedGasMix::hasLineEmission ( ) const
overridevirtual

Returns true: DIG emits discrete emission lines computed from PIO-style ion balance.

Reimplemented from MaterialMix.

◆ hasScattering()

bool DiffuseIonizedGasMix::hasScattering ( ) const

Returns true if this material mix supports scattering (for diffuse reemission).

◆ hasScatteringDispersion()

bool DiffuseIonizedGasMix::hasScatteringDispersion ( ) const
overridevirtual

This function returns true when diffuse reemission is turned on.

Reimplemented from MaterialMix.

◆ indicativeTemperature()

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

Returns the fixed temperature used for this material.

Reimplemented from MaterialMix.

◆ initializeSpecificState()

void DiffuseIonizedGasMix::initializeSpecificState ( MaterialState * state,
double metallicity,
double temperature,
const Array & params ) const
overridevirtual

Initializes specific state variables from imported or default values.

Reimplemented from MaterialMix.

◆ isSpecificStateConverged()

bool DiffuseIonizedGasMix::isSpecificStateConverged ( int numCells,
int numUpdated,
int numNotConverged,
MaterialState * currentAggregate,
MaterialState * previousAggregate ) const
overridevirtual

Determines if the medium state has converged based on ionization fractions and parameters.

Reimplemented from MaterialMix.

◆ lineEmissionCenters()

Array DiffuseIonizedGasMix::lineEmissionCenters ( ) const
overridevirtual

Returns the rest-frame wavelength centers of all emission lines.

Reimplemented from MaterialMix.

◆ lineEmissionMasses()

Array DiffuseIonizedGasMix::lineEmissionMasses ( ) const
overridevirtual

Returns the particle masses for thermal line broadening.

Reimplemented from MaterialMix.

◆ lineEmissionSpectrum()

Array DiffuseIonizedGasMix::lineEmissionSpectrum ( const MaterialState * state,
const Array & Jv ) const
overridevirtual

Returns the per-line luminosities [W] computed from T, ne, and ion fractions.

Reimplemented from MaterialMix.

◆ mass()

double DiffuseIonizedGasMix::mass ( ) const
overridevirtual

Returns the mean mass of a gas particle (weighted by composition).

Implements MaterialMix.

◆ maxChangeInGlobalIonizedH()

double DiffuseIonizedGasMix::maxChangeInGlobalIonizedH ( ) const
inline

This function returns the value of the discoverable double property maxChangeInGlobalIonizedH: "convergence threshold on the total ionized-H change".

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

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

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

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

◆ maxChangeInIonization()

double DiffuseIonizedGasMix::maxChangeInIonization ( ) const
inline

This function returns the value of the discoverable double property maxChangeInIonization: "maximum relative change in T or logU per cell for convergence".

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

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

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

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

◆ maxFractionNotConvergedCells()

double DiffuseIonizedGasMix::maxFractionNotConvergedCells ( ) const
inline

This function returns the value of the discoverable double property maxFractionNotConvergedCells: "maximum fraction of cells allowed to not converge".

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

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

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

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

◆ maxHydrogenDensity()

double DiffuseIonizedGasMix::maxHydrogenDensity ( ) const
inline

This function returns the value of the discoverable double property maxHydrogenDensity: "maximum hydrogen number density ceiling in cm^-3 (0 means no ceiling)".

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

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

◆ opacityAbs()

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

Returns the absorption opacity based on gas neutral fractions.

Implements MaterialMix.

◆ opacityExt()

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

Returns the extinction opacity (equals absorption for this material).

Implements MaterialMix.

◆ opacitySca()

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

Returns scattering opacity for diffuse reemission if enabled.

Implements MaterialMix.

◆ parameterInfo()

vector< SnapshotParameter > DiffuseIonizedGasMix::parameterInfo ( ) const
overridevirtual

Returns descriptors for snapshot-import columns required by this material mix. When abundanceMode=PerCell, requests 9 columns: 8 metal n_X/n_H ratios (C, N, O, Ne, Mg, Si, S, Fe) followed by n_He/n_H. SolarScaled requires no columns.

Reimplemented from MaterialMix.

◆ peeloffScattering()

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

Performs peel-off scattering for diffuse reemission. Returns false: no fluorescence-as-secondary-emission.

Reimplemented from MaterialMix.

◆ performScattering()

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

Performs scattering event including possible diffuse reemission.

Reimplemented from MaterialMix.

◆ reemissionFraction()

double DiffuseIonizedGasMix::reemissionFraction ( ) const
inline

This function returns the value of the discoverable double property reemissionFraction: "fraction of the theoretical reemission probability that is realised".

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

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

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

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

◆ sectionAbs()

double DiffuseIonizedGasMix::sectionAbs ( double lambda) const
overridevirtual

Returns a representative absorption cross section (in m2).

Implements MaterialMix.

◆ sectionExt()

double DiffuseIonizedGasMix::sectionExt ( double lambda) const
overridevirtual

Returns the total extinction cross section (equals absorption for this material).

Implements MaterialMix.

◆ sectionSca()

double DiffuseIonizedGasMix::sectionSca ( double lambda) const
overridevirtual

Returns the scattering cross section (zero for this material).

Implements MaterialMix.

◆ setupSelfBefore()

void DiffuseIonizedGasMix::setupSelfBefore ( )
overrideprotectedvirtual

This function opens the STAB tables for temperature and opacity (Standard and Transition), loads the reemission spectra table if diffuse reemission is enabled, initializes wavelength boundaries for the 5-bin calculation, builds the continuum emission wavelength grid, and initializes the PhotoIonizationSolver used for computing ion fractions at emission time.

Reimplemented from SimulationItem.

◆ solarScalingC()

double DiffuseIonizedGasMix::solarScalingC ( ) const
inline

This function returns the value of the discoverable double property solarScalingC: "carbon scaling factor on solar pattern * Zfrac (SolarScaled mode)".

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

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

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

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

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

◆ solarScalingN()

double DiffuseIonizedGasMix::solarScalingN ( ) const
inline

This function returns the value of the discoverable double property solarScalingN: "nitrogen scaling factor on solar pattern * Zfrac (SolarScaled mode)".

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

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

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

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

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

◆ specificStateVariableInfo()

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

Returns descriptors for state variables used by this material mix.

Implements MaterialMix.

◆ stabilityConvergenceThreshold()

double DiffuseIonizedGasMix::stabilityConvergenceThreshold ( ) const
inline

This function returns the value of the discoverable double property stabilityConvergenceThreshold: "convergence threshold on the converged-cell fraction".

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

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

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

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

◆ transitionBlendWidth()

double DiffuseIonizedGasMix::transitionBlendWidth ( ) const
inline

This function returns the value of the discoverable double property transitionBlendWidth: "blending width in logU between the standard and transition tables".

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

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

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

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

◆ updateSpecificState()

UpdateStatus DiffuseIonizedGasMix::updateSpecificState ( MaterialState * state,
const Array & Jv ) const
overridevirtual

Updates ionization fractions, ionization parameter and 4-bin parameters based on the radiation field.

Reimplemented from MaterialMix.

◆ useCloudyOpacity()

bool DiffuseIonizedGasMix::useCloudyOpacity ( ) const
inline

This function returns the value of the discoverable Boolean property useCloudyOpacity: "use the Cloudy-tabulated opacity (disabling falls back to Verner bound-free opacity)".

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

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

◆ useCloudyTemperature()

bool DiffuseIonizedGasMix::useCloudyTemperature ( ) const
inline

This function returns the value of the discoverable Boolean property useCloudyTemperature: "use the Cloudy-tabulated temperature (disabling keeps T fixed at defaultTemperature)".

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

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


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