Go to the documentation of this file.
28 result += TN * q_grid[i];
41 result +=
Numeric(i) * TN * q_grid[i];
51 const Index& interp_order) {
56 return interp(itw, q_grid, gp);
64 const Index& interp_order) {
69 return (
interp(itw, q_grid, gp) - QT) / dT;
75 switch (partition_type) {
80 T, partition_data[0].get_numeric_grid(0), partition_data[0].
data, 1);
82 throw std::runtime_error(
83 "Unknown or deprecated partition type requested.\n");
93 switch (partition_type) {
101 partition_data[0].get_numeric_grid(0),
102 partition_data[0].
data,
105 throw std::runtime_error(
106 "Unknown or deprecated partition type requested.\n");
112 static constexpr
Numeric c1 = -h / k;
113 return std::exp(c1 *
F0 / T);
118 static constexpr
Numeric c1 = -h / k;
119 return -
F0 * c1 * std::exp(
F0 * c1 / T) /
pow2(T);
124 static constexpr
Numeric c1 = -h / k;
125 return c1 * std::exp(
F0 * c1 / T) / T;
130 return (1. - gamma) / (1. - gamma_ref);
141 return c *
F0 * gamma / (T * T * (1. - gamma_ref));
155 return c * (g * gamma_ref / (T0 *
g0 *
g0) - gamma / (T *
g0));
163 return exp(
E0 * c * (T - T0) / (T * T0));
172 return E0 * c * boltzmann_ratio / (T * T);
178 return std::exp(-
E0 / (Constant::k*T));
184 static constexpr
Numeric c1 = -1 / k;
185 return -
E0 * c1 * std::exp(
E0 * c1 / T) /
pow2(T);
191 static constexpr
Numeric c1 = -1 / k;
192 return c1 * std::exp(
E0 * c1 / T) / T;
198 return (r_low - r_upp * gamma) / (1 - gamma);
212 if (El < 0 or Eu < 0) {
213 std::ostringstream os;
214 os <<
"It is considered undefined behavior to NLTE and "
215 <<
"temperature Jacobian without defining all "
216 <<
"vibrational energy states";
217 throw std::runtime_error(os.str());
220 const Numeric x = 1 / (T * (gamma - 1));
224 ((gamma - 1) * (El * r_low - Eu * gamma * r_upp) -
225 hf * gamma * (r_low - r_upp));
236 return c * gamma * (r_low - r_upp) / (T *
Constant::pow2(gamma - 1));
249 return El *
x *
y *
y * T * r_low / (gamma - 1);
262 return Eu *
x *
y *
y * T * gamma * r_upp / (gamma - 1);
Numeric g0(Workspace &ws) noexcept
Numeric dabsorption_nlte_rate_dT(const Numeric &gamma, const Numeric &T, const Numeric &F0, const Numeric &El, const Numeric &Eu, const Numeric &r_upp, const Numeric &r_low)
Computes temperature derivatives of (r_low - r_upp * gamma) / (1 - gamma)
const Numeric PLANCK_CONST
Global constant, the Planck constant [Js].
Numeric interp(ConstVectorView itw, ConstVectorView a, const GridPos &tc)
Red 1D Interpolate.
Numeric dstimulated_emissiondF0(Numeric T, Numeric F0)
Computes frequency derivative of exp(-hf/kT)
Vector y(Workspace &ws) noexcept
Numeric dsingle_partition_function_dT(const Numeric &QT, const Numeric &T, const Numeric &dT, const SpeciesAuxData::AuxType &partition_type, const ArrayOfGriddedField1 &partition_data)
Computes the partition function temperature derivative.
Numeric dboltzman_ratio_dT(const Numeric &boltzmann_ratio, const Numeric &T, const Numeric &E0)
Computes temperature derivatives exp(E0/k (T - T0) / (T * T0))
Numeric single_partition_function(const Numeric &T, const SpeciesAuxData::AuxType &partition_type, const ArrayOfGriddedField1 &partition_data)
Computes the partition function at one temperature.
G0 G2 FVC Y DV Numeric Numeric Numeric Zeeman LowerQuantumNumbers void * data
@ AT_PARTITIONFUNCTION_TFIELD
Numeric dabsorption_nlte_rate_dF0(const Numeric &gamma, const Numeric &T, const Numeric &r_upp, const Numeric &r_low)
Computes frequency derivative of (r_low - r_upp * gamma) / (1 - gamma)
Numeric absorption_nlte_ratio(const Numeric &gamma, const Numeric &r_upp, const Numeric &r_low)
Computes (r_low - r_upp * gamma) / (1 - gamma)
Numeric boltzman_factor(Numeric T, Numeric E0)
Computes exp(- E0/kT)
This can be used to make arrays out of anything.
@ AT_PARTITIONFUNCTION_COEFF
Numeric dboltzman_factordT(Numeric T, Numeric E0)
Computes temperature derivatives exp(- E0/kT)
Numeric SingleCalculatePartitionFctFromData(const Numeric &T, ConstVectorView t_grid, ConstVectorView q_grid, const Index &interp_order)
Structure to store a grid position for higher order interpolation.
Numeric SingleCalculatePartitionFctFromCoeff(const Numeric &T, ConstVectorView q_grid)
Numeric SingleCalculatePartitionFctFromData_dT(const Numeric &QT, const Numeric &T, const Numeric &dT, ConstVectorView t_grid, ConstVectorView q_grid, const Index &interp_order)
Index nelem() const
Returns the number of elements.
NUMERIC Numeric
The type to use for all floating point numbers.
Numeric boltzman_ratio(const Numeric &T, const Numeric &T0, const Numeric &E0)
Computes exp(E0/c (T - T0) / (T * T0))
Numeric stimulated_relative_emission(const Numeric &gamma, const Numeric &gamma_ref)
Computes (1 - gamma) / (1 - gamma_ref)
Header file for interpolation_poly.cc.
Numeric dabsorption_nlte_rate_dTl(const Numeric &gamma, const Numeric &T, const Numeric &Tl, const Numeric &El, const Numeric &r_low)
Computes lower state temperature derivative of (r_low - r_upp * gamma) / (1 - gamma)
Numeric dstimulated_relative_emission_dT(const Numeric &gamma, const Numeric &gamma_ref, const Numeric &F0, const Numeric &T)
Computes temperature derivative of (1 - gamma) / (1 - gamma_ref)
Numeric dstimulated_relative_emission_dF0(const Numeric &gamma, const Numeric &gamma_ref, const Numeric &T, const Numeric &T0)
Computes frequency derivative of (1 - gamma) / (1 - gamma_ref)
Constains various line scaling functions.
Numeric dabsorption_nlte_rate_dTu(const Numeric &gamma, const Numeric &T, const Numeric &Tu, const Numeric &Eu, const Numeric &r_upp)
Computes upper state temperature derivative of (r_low - r_upp * gamma) / (1 - gamma)
Numeric dstimulated_emissiondT(Numeric T, Numeric F0)
Computes temperature derivative of exp(-hf/kT)
Numeric dboltzman_factordE0(Numeric T, Numeric E0)
Computes lower state energy derivatives exp(- E0/kT)
constexpr T pow2(T x)
power of two
Vector x(Workspace &ws) noexcept
INDEX Index
The type to use for all integer numbers and indices.
void gridpos_poly(ArrayOfGridPosPoly &gp, ConstVectorView old_grid, ConstVectorView new_grid, const Index order, const Numeric &extpolfac)
The maximum difference from 1 that we allow for a sum check.
Numeric stimulated_emission(Numeric T, Numeric F0)
Computes exp(-hf/kT)
Numeric SingleCalculatePartitionFctFromCoeff_dT(const Numeric &T, ConstVectorView q_grid)
A constant view of a Vector.
Index nelem() const
Number of elements.
void interpweights(VectorView itw, const GridPos &tc)
Red 1D interpolation weights.
const Numeric BOLTZMAN_CONST
Global constant, the Boltzmann constant [J/K].
G0 G2 FVC Y DV Numeric E0
Namespace containing several constants, physical and mathematical.