32 #ifndef ANTIOCH_CHEMICAL_SPECIES_H
33 #define ANTIOCH_CHEMICAL_SPECIES_H
53 template<
typename CoeffType=
double>
60 const CoeffType mol_wght,
61 const CoeffType h_form,
78 const std::string&
species()
const;
107 const std::vector<CoeffType>&
theta_v()
const;
110 const std::vector<unsigned int>&
ndg_v()
const;
113 const std::vector<CoeffType>&
theta_e()
const;
116 const std::vector<unsigned int>&
ndg_e()
const;
120 const CoeffType ndg_v);
124 const CoeffType ndg_e);
130 void print(std::ostream &os = std::cout)
const;
184 template<
typename CoeffType>
189 template<
typename CoeffType>
192 {
return _mol_wght; }
194 template<
typename CoeffType>
199 template<
typename CoeffType>
204 template<
typename CoeffType>
207 {
return _n_tr_dofs; }
209 template<
typename CoeffType>
214 template<
typename CoeffType>
217 {
return !_theta_v.empty(); }
219 template<
typename CoeffType>
224 return _theta_v.size();
227 template<
typename CoeffType>
232 template<
typename CoeffType>
237 template<
typename CoeffType>
242 template<
typename CoeffType>
248 template<
typename CoeffType>
251 const CoeffType ndg_v)
253 _theta_v.push_back(theta_v);
254 _ndg_v.push_back(ndg_v);
257 template<
typename CoeffType>
260 const CoeffType ndg_e)
262 _theta_e.push_back(theta_e);
263 _ndg_e.push_back(ndg_e);
266 template<
typename CoeffType>
269 const CoeffType mol_wght,
270 const CoeffType h_form,
271 const CoeffType n_tr_dofs,
274 _mol_wght (mol_wght),
277 _n_tr_dofs (n_tr_dofs),
284 template<
typename CoeffType>
299 template<
typename CoeffType>
307 template<
typename CoeffType>
311 os <<
" -----------------------------\n"
312 <<
"| Species " << this->species() <<
'\n'
313 <<
" -----------------------------\n"
315 <<
" Mol Wgt = " << this->molar_mass() <<
'\n'
316 <<
" R = " << this->gas_constant() <<
'\n'
317 <<
" h0 = " << this->formation_enthalpy() <<
'\n'
318 <<
" n_tr = " << this->n_tr_dofs() <<
'\n'
319 <<
" charge = " << this->charge() <<
'\n';
321 for (
unsigned int l=0; l<this->theta_v().size(); l++)
322 os <<
" theta_v_" << l <<
" = " << this->theta_v()[l]
323 <<
", ndg = " << this->ndg_v()[l] <<
"\n";
325 for (
unsigned int l=0; l<this->theta_e().size(); l++)
326 os <<
" theta_e_" << l <<
" = " << this->theta_e()[l]
327 <<
", ndg = " << this->ndg_e()[l] <<
"\n";
337 #endif // ANTIOCH_CHEMICAL_SPECIES_H
void print(std::ostream &os=std::cout) const
Formatted print.
CoeffType R_universal()
Universal Gas Constant, R, expressed in J/(mol-K)
bool has_vibrational_modes() const
Returns true if the chemical species has vibrational degrees.
std::vector< unsigned int > _ndg_v
Degeneracies for each vibrational mode.
unsigned int n_vibrational_modes() const
Returns true if the chemical species has vibrational degrees of freedom.
CoeffType formation_enthalpy() const
Returns formation enthalpy in units of [J/kg].
std::vector< CoeffType > _theta_v
Characteristic vibrational temperature in units of [K].
#define antioch_assert_equal_to(expr1, expr2)
const CoeffType _R
Gas constant in units of [J/kg-K].
const CoeffType _h_form
Formation enthalpy in units of [J/kg].
const std::string & species() const
Returns a descriptive name for this species.
void add_vibrational_data(const CoeffType theta_v, const CoeffType ndg_v)
Supply vibrational data.
ChemicalSpecies()
Default constructor.
const int _charge
Electrical charge number.
const std::vector< CoeffType > & theta_v() const
Characteristic vibrational temperature [K].
const std::vector< unsigned int > & ndg_v() const
Degeneracies for each vibrational mode.
Class to encapsulate data for each chemical species.
int charge() const
Returns electrical charge number.
std::vector< CoeffType > _theta_e
Characteristic electronic temperature in units of [K].
const CoeffType _n_tr_dofs
Number of translational degrees of freedom.
~ChemicalSpecies()
Destructor.
CoeffType n_tr_dofs() const
Returns number of translational degrees of freedom.
const std::vector< unsigned int > & ndg_e() const
Degeneracies for each electronic modes.
std::vector< unsigned int > _ndg_e
Degeneracies for each electronic mode.
CoeffType gas_constant() const
Returns the species ideal gas constant in [J/kg-K].
The parameters are reduced parameters.
void add_electronic_data(const CoeffType theta_e, const CoeffType ndg_e)
Supply electronic data.
const std::string _name
Name of chemical species.
CoeffType molar_mass() const
Returns the molar mass in (kg/mol)
const CoeffType _mol_wght
Molecular weight (or molar mass) in units of [kg/mol].
friend std::ostream & operator<<(std::ostream &os, const ChemicalSpecies< CoeffType > &species)
Formatted print.
const std::vector< CoeffType > & theta_e() const
Characteristic electronic excitation temperatures [K].