antioch-0.4.0
|
Class storing chemical mixture properties. More...
#include <chemical_mixture.h>
Public Member Functions | |
ChemicalMixture (const std::string &filename=DefaultFilename::species_list(), const bool verbose=true, const std::string &species_data=DefaultFilename::chemical_mixture(), const std::string &vibration_data=DefaultFilename::vibrational_data(), const std::string &electronic_data=DefaultFilename::electronic_data()) | |
ascii parser by default More... | |
ChemicalMixture (const std::vector< std::string > &species_list, const bool verbose=true, const std::string &species_data=DefaultFilename::chemical_mixture(), const std::string &vibration_data=DefaultFilename::vibrational_data(), const std::string &electronic_data=DefaultFilename::electronic_data()) | |
ascii parser by default More... | |
ChemicalMixture (ParserBase< CoeffType > *parser, const std::string &species_data=DefaultFilename::chemical_mixture(), const std::string &vibration_data=DefaultFilename::vibrational_data(), const std::string &electronic_data=DefaultFilename::electronic_data()) | |
explicit parser, file in parser must contains species list More... | |
~ChemicalMixture () | |
const ChemicalMixture < CoeffType > & | chemical_mixture () const |
method to send this back More... | |
void | initialize_species (const std::vector< std::string > &species_list) |
method to initialize, backward compatibility More... | |
void | read_species_characteristics (ParserBase< CoeffType > *parser, const std::string &species_data, const std::string &vibration_data, const std::string &electronic_data) |
method to read characteristics, using one parser More... | |
void | read_species_mandatory_characteristics (ParserBase< CoeffType > *parser) |
method to read mandatory characteristics More... | |
void | read_species_vibrational_characteristics (ParserBase< CoeffType > *parser) |
method to read vibrational characteristics More... | |
void | read_species_electronic_characteristics (ParserBase< CoeffType > *parser) |
method to read electronic characteristics More... | |
unsigned int | n_species () const |
Returns the number of species in this mixture. More... | |
void | add_species (const unsigned int index, const std::string &name, CoeffType mol_wght, CoeffType h_form, CoeffType n_tr_dofs, int charge) |
void | add_species_vibrational_data (const unsigned int index, const CoeffType theta_v, const unsigned int ndg_v) |
void | add_species_electronic_data (const unsigned int index, const CoeffType theta_e, const unsigned int ndg_e) |
const std::vector < ChemicalSpecies< CoeffType > * > & | chemical_species () const |
const std::vector< Species > & | species_list () const |
const std::map< std::string, Species > & | species_name_map () const |
const std::map< Species, std::string > & | species_inverse_name_map () const |
const std::map< std::string, Species > & | active_species_name_map () const |
CoeffType | R (const unsigned int s) const |
Gas constant for species s in [J/kg-K]. More... | |
template<typename VectorStateType > | |
enable_if_c< has_size < VectorStateType >::value, typename Antioch::value_type < VectorStateType >::type > ::type | R (const VectorStateType &mass_fractions) const |
Gas constant for mixture in [J/kg-K]. More... | |
CoeffType | M (const unsigned int s) const |
Molecular weight (molar mass) for species s in kg/mol. More... | |
template<typename VectorStateType > | |
enable_if_c< has_size < VectorStateType >::value, typename Antioch::value_type < VectorStateType >::type > ::type | M (const VectorStateType &mass_fractions) const |
Molecular weight (molar mass) for mixture in kg/mol. More... | |
template<typename VectorStateType > | |
enable_if_c< has_size < VectorStateType >::value, typename Antioch::value_type < VectorStateType >::type > ::type | R (const VectorStateType &mass_fractions) const |
template<typename VectorStateType > | |
enable_if_c< has_size < VectorStateType >::value, typename Antioch::value_type < VectorStateType >::type > ::type | M (const VectorStateType &mass_fractions) const |
Public Attributes | |
template<typename StateType > | |
X(const unsigned int species, const StateType &M, const StateType &mass_fraction) const template< typename VectorStateType > void X(typename Antioch | molar_density (const unsigned int species, const StateType &rho, const StateType &mass_fraction) const template< typename StateType |
Species mole fraction. More... | |
X(const unsigned int species, const StateType &M, const StateType &mass_fraction) const template< typename VectorStateType > void X(typename Antioch VectorStateType void | molar_densities (const StateType &rho, const VectorStateType &mass_fractions, VectorStateType &molar_densities) const |
Protected Member Functions | |
void | init_species_name_map (const std::vector< std::string > &species_list) |
void | build_inverse_name_map () |
Protected Attributes | |
std::vector< Species > | _species_list |
std::vector< ChemicalSpecies < CoeffType > * > | _chemical_species |
std::map< std::string, Species > | _species_name_map |
std::map< Species, std::string > | _species_inv_name_map |
Class storing chemical mixture properties.
This class manages the list of ChemicalSpecies for a requested set of species from input.
We require four types of data:
Definition at line 75 of file chemical_mixture.h.
Antioch::ChemicalMixture< CoeffType >::ChemicalMixture | ( | const std::string & | filename = DefaultFilename::species_list() , |
const bool | verbose = true , |
||
const std::string & | species_data = DefaultFilename::chemical_mixture() , |
||
const std::string & | vibration_data = DefaultFilename::vibrational_data() , |
||
const std::string & | electronic_data = DefaultFilename::electronic_data() |
||
) |
ascii parser by default
Definition at line 38 of file chemical_mixture.C.
References Antioch::ASCIIParser< NumericType >::change_file().
Antioch::ChemicalMixture< CoeffType >::ChemicalMixture | ( | const std::vector< std::string > & | species_list, |
const bool | verbose = true , |
||
const std::string & | species_data = DefaultFilename::chemical_mixture() , |
||
const std::string & | vibration_data = DefaultFilename::vibrational_data() , |
||
const std::string & | electronic_data = DefaultFilename::electronic_data() |
||
) |
ascii parser by default
Definition at line 67 of file chemical_mixture.C.
Antioch::ChemicalMixture< CoeffType >::ChemicalMixture | ( | ParserBase< CoeffType > * | parser, |
const std::string & | species_data = DefaultFilename::chemical_mixture() , |
||
const std::string & | vibration_data = DefaultFilename::vibrational_data() , |
||
const std::string & | electronic_data = DefaultFilename::electronic_data() |
||
) |
explicit parser, file in parser must contains species list
Definition at line 54 of file chemical_mixture.C.
Antioch::ChemicalMixture< CoeffType >::~ChemicalMixture | ( | ) |
Definition at line 83 of file chemical_mixture.C.
|
inline |
Definition at line 274 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_species_name_map, and antioch_deprecated.
void Antioch::ChemicalMixture< CoeffType >::add_species | ( | const unsigned int | index, |
const std::string & | name, | ||
CoeffType | mol_wght, | ||
CoeffType | h_form, | ||
CoeffType | n_tr_dofs, | ||
int | charge | ||
) |
Definition at line 178 of file chemical_mixture.C.
Referenced by Antioch::ASCIIParser< NumericType >::read_chemical_species().
void Antioch::ChemicalMixture< CoeffType >::add_species_electronic_data | ( | const unsigned int | index, |
const CoeffType | theta_e, | ||
const unsigned int | ndg_e | ||
) |
Definition at line 197 of file chemical_mixture.C.
Referenced by Antioch::ASCIIParser< NumericType >::read_electronic_data().
void Antioch::ChemicalMixture< CoeffType >::add_species_vibrational_data | ( | const unsigned int | index, |
const CoeffType | theta_v, | ||
const unsigned int | ndg_v | ||
) |
Definition at line 189 of file chemical_mixture.C.
Referenced by Antioch::ASCIIParser< NumericType >::read_vibrational_data().
|
protected |
Definition at line 148 of file chemical_mixture.C.
|
inline |
method to send this back
added for backward compatibility for WilkeMixture v/s MixtureAveragedTransportMixture, the idea is to send a chemical mixture whatever mixture is provided
Definition at line 383 of file chemical_mixture.h.
References antioch_deprecated.
Referenced by Antioch::read_blottner_data_ascii(), Antioch::read_sutherland_data_ascii(), Antioch::XMLParser< NumericType >::read_thermodynamic_data_root(), and Antioch::WilkeMixture< CoeffType >::WilkeMixture().
|
inline |
Definition at line 252 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_chemical_species.
Referenced by Antioch::ASCIIParser< NumericType >::read_electronic_data(), Antioch::read_species_data(), Antioch::read_species_electronic_data(), Antioch::read_species_vibrational_data(), Antioch::ASCIIParser< NumericType >::read_vibrational_data(), tester(), tester_N2N(), and vectester().
|
protected |
Definition at line 138 of file chemical_mixture.C.
void Antioch::ChemicalMixture< CoeffType >::initialize_species | ( | const std::vector< std::string > & | species_list | ) |
method to initialize, backward compatibility
Definition at line 114 of file chemical_mixture.C.
References antioch_error.
Referenced by Antioch::read_chemical_species_composition().
|
inline |
Molecular weight (molar mass) for species s in kg/mol.
Definition at line 289 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_chemical_species.
Referenced by Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::diffusion_mixing_rule(), Antioch::ChemicalMixture< CoeffType >::M(), tester(), and vectester().
enable_if_c< has_size<VectorStateType>::value, typename Antioch::value_type<VectorStateType>::type >::type Antioch::ChemicalMixture< CoeffType >::M | ( | const VectorStateType & | mass_fractions | ) | const |
Molecular weight (molar mass) for mixture in kg/mol.
where is the mass fraction of species and is the molecular weight (molar mass) of species
|
inline |
Definition at line 344 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_chemical_species, antioch_assert_equal_to, and Antioch::ChemicalMixture< CoeffType >::M().
|
inline |
Returns the number of species in this mixture.
Definition at line 238 of file chemical_mixture.h.
Referenced by Antioch::MixtureAveragedTransportEvaluator< Diffusion, Viscosity, ThermalConductivity, CoeffType >::diffusion_mixing_rule(), Antioch::read_reaction_set_data(), and Antioch::WilkeMixture< CoeffType >::WilkeMixture().
|
inline |
Gas constant for species s in [J/kg-K].
Definition at line 282 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_chemical_species.
Referenced by Antioch::ChemicalMixture< CoeffType >::R(), test_type(), tester(), tester_N2N(), and vectester().
enable_if_c< has_size<VectorStateType>::value, typename Antioch::value_type<VectorStateType>::type >::type Antioch::ChemicalMixture< CoeffType >::R | ( | const VectorStateType & | mass_fractions | ) | const |
Gas constant for mixture in [J/kg-K].
|
inline |
Definition at line 321 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_chemical_species, antioch_assert_equal_to, antioch_assert_greater, and Antioch::ChemicalMixture< CoeffType >::R().
void Antioch::ChemicalMixture< CoeffType >::read_species_characteristics | ( | ParserBase< CoeffType > * | parser, |
const std::string & | species_data, | ||
const std::string & | vibration_data, | ||
const std::string & | electronic_data | ||
) |
method to read characteristics, using one parser
Definition at line 96 of file chemical_mixture.C.
References Antioch::ParserBase< NumericType >::change_file().
void Antioch::ChemicalMixture< CoeffType >::read_species_electronic_characteristics | ( | ParserBase< CoeffType > * | parser | ) |
method to read electronic characteristics
Definition at line 172 of file chemical_mixture.C.
void Antioch::ChemicalMixture< CoeffType >::read_species_mandatory_characteristics | ( | ParserBase< CoeffType > * | parser | ) |
method to read mandatory characteristics
Definition at line 160 of file chemical_mixture.C.
void Antioch::ChemicalMixture< CoeffType >::read_species_vibrational_characteristics | ( | ParserBase< CoeffType > * | parser | ) |
method to read vibrational characteristics
Definition at line 166 of file chemical_mixture.C.
|
inline |
Definition at line 266 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_species_inv_name_map.
Referenced by Antioch::read_species_data(), tester(), and vectester().
|
inline |
Definition at line 245 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_species_list.
Referenced by Antioch::ASCIIParser< NumericType >::read_chemical_species(), Antioch::read_species_data(), tester(), and vectester().
|
inline |
Definition at line 259 of file chemical_mixture.h.
References Antioch::ChemicalMixture< CoeffType >::_species_name_map.
Referenced by Antioch::read_blottner_data_ascii(), Antioch::read_cea_thermo_data_ascii(), Antioch::ASCIIParser< NumericType >::read_chemical_species(), Antioch::ASCIIParser< NumericType >::read_electronic_data(), Antioch::read_reaction_set_data(), Antioch::read_sutherland_data_ascii(), Antioch::ASCIIParser< NumericType >::read_thermodynamic_data(), Antioch::ASCIIParser< NumericType >::read_thermodynamic_data_root(), Antioch::ChemKinParser< NumericType >::read_thermodynamic_data_root(), Antioch::ASCIIParser< NumericType >::read_vibrational_data(), tester(), and vectester().
|
protected |
Definition at line 228 of file chemical_mixture.h.
Referenced by Antioch::ChemicalMixture< CoeffType >::chemical_species(), Antioch::ChemicalMixture< CoeffType >::M(), and Antioch::ChemicalMixture< CoeffType >::R().
|
protected |
Definition at line 230 of file chemical_mixture.h.
Referenced by Antioch::ChemicalMixture< CoeffType >::species_inverse_name_map().
|
protected |
Definition at line 227 of file chemical_mixture.h.
Referenced by Antioch::ChemicalMixture< CoeffType >::species_list().
|
protected |
Definition at line 229 of file chemical_mixture.h.
Referenced by Antioch::ChemicalMixture< CoeffType >::active_species_name_map(), and Antioch::ChemicalMixture< CoeffType >::species_name_map().
|
inline |
Definition at line 218 of file chemical_mixture.h.
Referenced by test_type(), tester(), tester_N2N(), and vectester().
X ( const unsigned int species, const StateType& M, const StateType& mass_fraction ) const template<typename VectorStateType> void X( typename Antioch Antioch::ChemicalMixture< CoeffType >::molar_density(const unsigned int species, const StateType &rho, const StateType &mass_fraction) const template< typename StateType |
Species mole fraction.
Given mixture molar mass M and mass fraction for species, compute species mole fraction using the relationship All species mole fractions
The output argument mole_fractions should already be properly sized to hold the output.Species molar density
Given total density rho and mass fraction for species, compute species moles per unit volumeSpecies molar densities
Given total density rho and mass fractions for all species, compute moles per unit volume for all species
Definition at line 207 of file chemical_mixture.h.