26 #ifndef GRINS_ABSORPTION_COEFF_H
27 #define GRINS_ABSORPTION_COEFF_H
30 #include "libmesh/fem_function_base.h"
31 #include "libmesh/auto_ptr.h"
62 template<
typename Chemistry>
76 AbsorptionCoeff(SharedPtr<Chemistry> & chem, SharedPtr<HITRAN> & hitran,
77 libMesh::Real nu_min, libMesh::Real nu_max,
78 libMesh::Real desired_nu,
const std::string & species,
79 libMesh::Real thermo_pressure);
82 virtual libMesh::Real
operator()(
const libMesh::FEMContext & context,
const libMesh::Point & qp_xyz,
const libMesh::Real t);
85 virtual void operator()(
const libMesh::FEMContext & context,
86 const libMesh::Point & p,
87 const libMesh::Real time,
88 libMesh::DenseVector<libMesh::Real> & output);
91 virtual void derivatives( libMesh::FEMContext & context,
92 const libMesh::Point & qp_xyz,
93 const libMesh::Real & JxW,
94 const unsigned int qoi_index,
95 const libMesh::Real time);
98 virtual libMesh::UniquePtr<libMesh::FEMFunctionBase<libMesh::Real> >
clone()
const;
142 libMesh::Real
kv(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
145 libMesh::Real
d_kv_dT(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
148 libMesh::Real
d_kv_dP(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
151 libMesh::Real
d_kv_dY(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
154 libMesh::Real
Sw(libMesh::Real T, libMesh::Real P,
unsigned int i);
157 libMesh::Real
dS_dT(libMesh::Real T, libMesh::Real P,
unsigned int i);
160 libMesh::Real
dS_dP(libMesh::Real T, libMesh::Real P,
unsigned int i);
163 libMesh::Real
nu_D(libMesh::Real T, libMesh::Real P,
unsigned int i);
166 libMesh::Real
d_nuD_dT(libMesh::Real T, libMesh::Real P,
unsigned int i);
169 libMesh::Real
d_nuD_dP(libMesh::Real T,
unsigned int i);
172 libMesh::Real
nu_C(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
175 libMesh::Real
d_nuC_dT(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
178 libMesh::Real
d_nuC_dP(libMesh::Real T, std::vector<libMesh::Real> Y,
unsigned int i);
181 libMesh::Real
d_nuC_dY(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
191 libMesh::Real
voigt(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
194 libMesh::Real
d_voigt_dT(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
197 libMesh::Real
d_voigt_dP(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
200 libMesh::Real
d_voigt_dY(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
206 libMesh::Real
voigt_a(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
209 libMesh::Real
d_voigt_a_dT(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
212 libMesh::Real
d_voigt_a_dP(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
215 libMesh::Real
d_voigt_a_dY(libMesh::Real T, libMesh::Real P, std::vector<libMesh::Real> Y,
unsigned int i);
218 libMesh::Real
voigt_w(libMesh::Real T, libMesh::Real P,
unsigned int i);
221 libMesh::Real
d_voigt_w_dT(libMesh::Real T, libMesh::Real P,
unsigned int i);
224 libMesh::Real
d_voigt_w_dP(libMesh::Real T, libMesh::Real P,
unsigned int i);
227 libMesh::Real
get_nu(libMesh::Real P,
unsigned int i);
230 libMesh::Real
d_nu_dP(
unsigned int i);
233 libMesh::Real
dX_dY(std::vector<libMesh::Real> Y);
236 libMesh::Real
dQ_dT(libMesh::Real T,
unsigned int iso);
243 #endif //GRINS_ABSORPTION_COEFF_H
PressureFEVariable & _P_var
SpeciesMassFractionsVariable & _Y_var
libMesh::Real d_voigt_a_dP(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt a parameter pressure derivative.
libMesh::Real d_voigt_dY(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt profile mass fraction derivative.
libMesh::Real d_nuC_dY(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Collisional broadening mass fraction derivative.
Extends libMesh::FEMFunctionBase by adding a function for computing derivatives.
libMesh::Real _nu
Desired wavenumber [cm^-1].
virtual libMesh::Real operator()(const libMesh::FEMContext &context, const libMesh::Point &qp_xyz, const libMesh::Real t)
Calculate the absorption coefficient at a quadratue point.
virtual void derivatives(libMesh::FEMContext &context, const libMesh::Point &qp_xyz, const libMesh::Real &JxW, const unsigned int qoi_index, const libMesh::Real time)
Calculate the derivative of the absorption coefficient at a QP with respect to all state variables...
libMesh::Real d_nuD_dT(libMesh::Real T, libMesh::Real P, unsigned int i)
Doppler broadening temperature derivative.
std::vector< std::vector< libMesh::Real > > _voigt_coeffs
2D coefficient matrix for approximating the Voigt profile
unsigned int _species_idx
Index for the species of interest.
libMesh::Real d_voigt_w_dP(libMesh::Real T, libMesh::Real P, unsigned int i)
Voigt w parameter pressure derivative.
libMesh::Real Sw(libMesh::Real T, libMesh::Real P, unsigned int i)
Linestrength [cm^-2 atm^-1].
libMesh::Real voigt(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Calculate the Voigt profile [cm^-1].
PrimitiveTempFEVariables & _T_var
libMesh::Real voigt_a(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt a parameter.
libMesh::Real _thermo_pressure
Thermodynamic Pressure [atm].
libMesh::Real get_nu(libMesh::Real P, unsigned int i)
Pressure shift of linecenter wavenumber.
libMesh::Real d_kv_dP(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Absorption coefficient pressure derivative.
libMesh::Real d_kv_dY(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Absorption coefficient mass fraction derivative.
libMesh::Real dS_dT(libMesh::Real T, libMesh::Real P, unsigned int i)
Linestrength temperature derivative.
libMesh::Real kv(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Absorption coefficient [cm^-1].
libMesh::Real d_voigt_w_dT(libMesh::Real T, libMesh::Real P, unsigned int i)
Voigt w parameter temperature derivative.
libMesh::Real d_nuC_dP(libMesh::Real T, std::vector< libMesh::Real > Y, unsigned int i)
Collisional broadening pressure derivative.
libMesh::Real d_nuD_dP(libMesh::Real T, unsigned int i)
Doppler broadening pressure derivative.
libMesh::Real d_nu_dP(unsigned int i)
Derivative of pressure-shifted linecenter wavenumber.
unsigned int _max_index
Index of maximum wavenumber.
bool _calc_thermo_pressure
Flag for whether Thermodynamic Pressure is calculated or constant.
libMesh::Real _rad_coeff
Second radiation coefficient [cm K].
libMesh::Real dX_dY(std::vector< libMesh::Real > Y)
Mole fraction derivative with respect to mass fraction.
Evaluates the Beer-Lambert Law at a given point in space.
libMesh::Real d_nuC_dT(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Collisional broadening temperature derivative.
SharedPtr< Chemistry > _chemistry
Antioch/Cantera object.
libMesh::Real nu_C(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Collisional broadening [cm^-1].
libMesh::Real d_voigt_dP(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt profile pressure derivative.
libMesh::Real d_voigt_dT(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt profile temperature derivative.
libMesh::Real dQ_dT(libMesh::Real T, unsigned int iso)
Partition Function derivative (finite difference)
libMesh::Real _Pref
Reference pressure [atm].
libMesh::Real _T0
Reference temperature [K].
SharedPtr< HITRAN > _hitran
HITRAN.
libMesh::Real voigt_w(libMesh::Real T, libMesh::Real P, unsigned int i)
Voigt w parameter.
libMesh::Real d_voigt_a_dY(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt a parameter mass fraction derivative.
void init_voigt()
Initialize the coeff matrix for calculating the Voigt profile.
AbsorptionCoeff()
User should not call empty constructor.
libMesh::Real d_voigt_a_dT(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Voigt a parameter temperature derivative.
libMesh::Real dS_dP(libMesh::Real T, libMesh::Real P, unsigned int i)
Linestrength pressure derivative.
libMesh::Real d_kv_dT(libMesh::Real T, libMesh::Real P, std::vector< libMesh::Real > Y, unsigned int i)
Absorption coefficient temperature derivative.
virtual libMesh::UniquePtr< libMesh::FEMFunctionBase< libMesh::Real > > clone() const
Not used.
unsigned int _min_index
Index of minimum wavenumber.
libMesh::Real nu_D(libMesh::Real T, libMesh::Real P, unsigned int i)
Doppler broadening [cm^-1].