ARTS  2.4.0(git:4fb77825)
nlte.h File Reference

Deep calculations for NLTE. More...

#include "absorption.h"
#include "gridded_fields.h"
#include "matpackI.h"

Go to the source code of this file.

Functions

void statistical_equilibrium_equation (MatrixView A, ConstVectorView Aij, ConstVectorView Bij, ConstVectorView Bji, ConstVectorView Cij, ConstVectorView Cji, ConstVectorView Jij, const ArrayOfIndex &upper, const ArrayOfIndex &lower)
 Sets up the solution matrix for linear statistical equilibrium equation. More...
 
void dampened_statistical_equilibrium_equation (MatrixView A, ConstVectorView x, ConstVectorView Aij, ConstVectorView Bij, ConstVectorView Bji, ConstVectorView Cij, ConstVectorView Cji, ConstVectorView Jij, ConstVectorView Lambda, const ArrayOfIndex &upper, const ArrayOfIndex &lower, const Numeric &total_number_count=1.0)
 Sets up the solution matrix for linear dampened statistical equilibrium equation. More...
 
void set_constant_statistical_equilibrium_matrix (MatrixView A, VectorView x, const Numeric &sem_ratio, const Index row)
 Set a row of the SEE matrix and level distribution vector to constant. More...
 
Vector createAij (const ArrayOfArrayOfAbsorptionLines &abs_lines)
 Create a Aij object. More...
 
Vector createBij (const ArrayOfArrayOfAbsorptionLines &abs_lines)
 Create a Bij object. More...
 
Vector createBji (const Vector &Bij, const ArrayOfArrayOfAbsorptionLines &abs_lines)
 Create a Bji object. More...
 
Vector createCji (const Vector &Cij, const ArrayOfArrayOfAbsorptionLines &abs_lines, const Numeric &T)
 Create a Cji object. More...
 
void setCji (Vector &Cji, const Vector &Cij, const ArrayOfArrayOfAbsorptionLines &abs_lines, const Numeric &T)
 Set the Cji object. More...
 
void nlte_collision_factorsCalcFromCoeffs (Vector &Cij, Vector &Cji, const ArrayOfArrayOfAbsorptionLines &abs_lines, const ArrayOfArrayOfSpeciesTag &abs_species, const ArrayOfArrayOfGriddedField1 &collision_coefficients, const ArrayOfQuantumIdentifier &collision_line_identifiers, const SpeciesAuxData &isotopologue_ratios, const ConstVectorView vmr, const Numeric &T, const Numeric &P)
 Gets collisional factors from coefficients. More...
 
void nlte_positions_in_statistical_equilibrium_matrix (ArrayOfIndex &upper, ArrayOfIndex &lower, const ArrayOfArrayOfAbsorptionLines &abs_lines, const EnergyLevelMap &nlte_field)
 Finds upper and lower states in SEE Matrix. More...
 
Index find_first_unique_in_lower (const ArrayOfIndex &upper, const ArrayOfIndex &lower) noexcept
 Finds a unique lower state if one exists or returns index to last element. More...
 
void check_collision_line_identifiers (const ArrayOfQuantumIdentifier &collision_line_identifiers)
 Checks that a WSV is OK or throws a run-time error. More...
 

Detailed Description

Deep calculations for NLTE.

Author
Richard Larsson
Date
2018-03-07

Definition in file nlte.h.

Function Documentation

◆ check_collision_line_identifiers()

void check_collision_line_identifiers ( const ArrayOfQuantumIdentifier collision_line_identifiers)

Checks that a WSV is OK or throws a run-time error.

Parameters
[in]collision_line_identifiersAs WSV

Definition at line 286 of file nlte.cc.

References ARTS::Var::collision_line_identifiers(), and ARTS::Var::x().

Referenced by collision_coefficientsFromSplitFiles().

◆ createAij()

Vector createAij ( const ArrayOfArrayOfAbsorptionLines abs_lines)

Create a Aij object.

Parameters
[in]abs_linesAll lines of interest
Returns
Vector Einstein coefficient for spontaneuos emission of all lines

Definition at line 96 of file nlte.cc.

References ARTS::Var::abs_lines(), and Absorption::nelem().

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ createBij()

Vector createBij ( const ArrayOfArrayOfAbsorptionLines abs_lines)

Create a Bij object.

Parameters
[in]abs_linesAll lines of interest
Returns
Vector Einstein coefficient for induced emission of all lines

Definition at line 113 of file nlte.cc.

References ARTS::Var::abs_lines(), Absorption::nelem(), PLANCK_CONST, and SPEED_OF_LIGHT.

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ createBji()

Vector createBji ( const Vector Bij,
const ArrayOfArrayOfAbsorptionLines abs_lines 
)

Create a Bji object.

Parameters
[in]BijEinstein coefficient for induced emission of all lines
[in]abs_linesAll lines of interest
Returns
Vector Einstein coefficient for induced absorption of all lines

Definition at line 135 of file nlte.cc.

References ARTS::Var::abs_lines(), and ConstVectorView::nelem().

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ createCji()

Vector createCji ( const Vector Cij,
const ArrayOfArrayOfAbsorptionLines abs_lines,
const Numeric T 
)

Create a Cji object.

Parameters
[in]CijCollisional rate of change from upper to lower state level
[in]abs_linesAll lines of interest
[in]TTemperature
Returns
Vector Collisional rate of change from lower to upper state level

Definition at line 153 of file nlte.cc.

References ARTS::Var::abs_lines(), Absorption::nelem(), and setCji().

◆ dampened_statistical_equilibrium_equation()

void dampened_statistical_equilibrium_equation ( MatrixView  A,
ConstVectorView  x,
ConstVectorView  Aij,
ConstVectorView  Bij,
ConstVectorView  Bji,
ConstVectorView  Cij,
ConstVectorView  Cji,
ConstVectorView  Jij,
ConstVectorView  Lambda,
const ArrayOfIndex upper,
const ArrayOfIndex lower,
const Numeric total_number_count = 1.0 
)

Sets up the solution matrix for linear dampened statistical equilibrium equation.

Parameters
[in,out]AMatrix to solve SEE
[in]xRatio of molecules for each state
[in]AijEinstein coefficient for spontaneuos emission of all lines
[in]BijEinstein coefficient for induced emission of all lines
[in]BjiEinstein coefficient for induced absorption of all lines
[in]CijCollisional rate of change from upper to lower state level
[in]CjiCollisional rate of change from lower to upper state level
[in]JijRadiation field for the upper to lower transition for each line
[in]LambdaTransmission for the upper to lower transition for each line
[in]upperIndex list for upper state levels for each line
[in]lowerIndex list for lower state levels for each line

Definition at line 54 of file nlte.cc.

References ConstVectorView::nelem(), nlines, and ARTS::Var::x().

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ find_first_unique_in_lower()

Index find_first_unique_in_lower ( const ArrayOfIndex upper,
const ArrayOfIndex lower 
)
noexcept

Finds a unique lower state if one exists or returns index to last element.

Parameters
[in]upperIndex list for upper state levels for each line
[in]lowerIndex list for lower state levels for each line
Returns
Index Pos of unique element or len-1

Definition at line 277 of file nlte.cc.

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ nlte_collision_factorsCalcFromCoeffs()

void nlte_collision_factorsCalcFromCoeffs ( Vector Cij,
Vector Cji,
const ArrayOfArrayOfAbsorptionLines abs_lines,
const ArrayOfArrayOfSpeciesTag abs_species,
const ArrayOfArrayOfGriddedField1 collision_coefficients,
const ArrayOfQuantumIdentifier collision_line_identifiers,
const SpeciesAuxData isotopologue_ratios,
const ConstVectorView  vmr,
const Numeric T,
const Numeric P 
)

Gets collisional factors from coefficients.

Parameters
[in,out]CijCollisional rate of change from upper to lower state level
[in,out]CjiCollisional rate of change from lower to upper state level
[in]abs_linesAll lines of interest
[in]abs_speciesAll absorption species
[in]collision_coefficientsAs WSV
[in]collision_line_identifiersAs WSV
[in]isotopologue_ratiosAs WSV
[in]vmrVolume mixing ratios of absoprtion species
[in]TTemperature
[in]PPressure

Definition at line 182 of file nlte.cc.

References ARTS::Var::abs_lines(), ARTS::Var::abs_species(), BOLTZMAN_CONST, ARTS::Var::collision_line_identifiers(), and ARTS::Var::isotopologue_ratios().

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ nlte_positions_in_statistical_equilibrium_matrix()

void nlte_positions_in_statistical_equilibrium_matrix ( ArrayOfIndex upper,
ArrayOfIndex lower,
const ArrayOfArrayOfAbsorptionLines abs_lines,
const EnergyLevelMap nlte_field 
)

Finds upper and lower states in SEE Matrix.

Parameters
[in,out]upperIndex list for upper state levels for each line
[in,out]lowerIndex list for lower state levels for each line
[in]abs_linesAll lines of interest
[in]nlte_quantum_identifiersAs WSV

Definition at line 244 of file nlte.cc.

References ARTS::Var::abs_lines(), Absorption::nelem(), and ARTS::Var::nlte_field().

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ set_constant_statistical_equilibrium_matrix()

void set_constant_statistical_equilibrium_matrix ( MatrixView  A,
VectorView  x,
const Numeric sem_ratio,
const Index  row 
)

Set a row of the SEE matrix and level distribution vector to constant.

Parameters
[in]AMatrix to solve SEE
[in]xRatio of molecules for each state
[in]sem_ratioLargest ratio possible
[in]rowRow of SEE Matrix being zero

Definition at line 88 of file nlte.cc.

References joker, and ARTS::Var::x().

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().

◆ setCji()

void setCji ( Vector Cji,
const Vector Cij,
const ArrayOfArrayOfAbsorptionLines abs_lines,
const Numeric T 
)

Set the Cji object.

Parameters
[in,out]CjiCollisional rate of change from lower to upper state level
[in]CijCollisional rate of change from upper to lower state level
[in]abs_linesAll lines of interest
[in]TTemperature
[in]nSize of Cij

Definition at line 162 of file nlte.cc.

References ARTS::Var::abs_lines(), BOLTZMAN_CONST, and PLANCK_CONST.

Referenced by createCji().

◆ statistical_equilibrium_equation()

void statistical_equilibrium_equation ( MatrixView  A,
ConstVectorView  Aij,
ConstVectorView  Bij,
ConstVectorView  Bji,
ConstVectorView  Cij,
ConstVectorView  Cji,
ConstVectorView  Jij,
const ArrayOfIndex upper,
const ArrayOfIndex lower 
)

Sets up the solution matrix for linear statistical equilibrium equation.

Parameters
[in,out]AMatrix to solve SEE
[in]AijEinstein coefficient for spontaneuos emission of all lines
[in]BijEinstein coefficient for induced emission of all lines
[in]BjiEinstein coefficient for induced absorption of all lines
[in]CijCollisional rate of change from upper to lower state level
[in]CjiCollisional rate of change from lower to upper state level
[in]JijRadiation field for the upper to lower transition for each line
[in]upperIndex list for upper state levels for each line
[in]lowerIndex list for lower state levels for each line

Definition at line 30 of file nlte.cc.

References ConstVectorView::nelem(), and nlines.

Referenced by nlte_fieldForSingleSpeciesNonOverlappingLines().