26 #ifndef GRINS_ANTIOCH_EVALUATOR_H
27 #define GRINS_ANTIOCH_EVALUATOR_H
29 #include "grins_config.h"
31 #ifdef GRINS_HAVE_ANTIOCH
40 #include "antioch/temp_cache.h"
41 #include "antioch/cea_evaluator.h"
42 #include "antioch/stat_mech_thermo.h"
45 #include <boost/scoped_ptr.hpp>
57 template<
typename Thermo>
67 libMesh::Real
M(
unsigned int species )
const;
69 libMesh::Real
M_mix(
const std::vector<libMesh::Real>& mass_fractions )
const;
71 libMesh::Real
R(
unsigned int species )
const;
73 libMesh::Real
R_mix(
const std::vector<libMesh::Real>& mass_fractions )
const;
75 libMesh::Real
X(
unsigned int species, libMesh::Real M, libMesh::Real mass_fraction )
const;
77 void X( libMesh::Real M,
const std::vector<libMesh::Real>& mass_fractions,
78 std::vector<libMesh::Real>& mole_fractions )
const;
82 std::string
species_name(
unsigned int species_index )
const;
89 libMesh::Real
h_s(
const CachedValues& cache,
unsigned int qp,
unsigned int species);
91 void h_s(
const CachedValues& cache,
unsigned int qp, std::vector<libMesh::Real>& h_s);
93 libMesh::Real
h_s(
const libMesh::Real& T,
unsigned int species );
95 libMesh::Real
cp(
const libMesh::Real& T,
96 const std::vector<libMesh::Real>& Y );
102 void omega_dot(
const libMesh::Real& T, libMesh::Real rho,
103 const std::vector<libMesh::Real> mass_fractions,
104 std::vector<libMesh::Real>& omega_dot );
115 boost::scoped_ptr<Antioch::TempCache<libMesh::Real> >
_temp_cache;
134 boost::scoped_ptr<Antioch::StatMechThermodynamics<libMesh::Real> >& thermo,
135 thermo_type<Antioch::StatMechThermodynamics<libMesh::Real> > )
137 thermo.reset(
new Antioch::StatMechThermodynamics<libMesh::Real>( mixture.
chemical_mixture() ) );
142 boost::scoped_ptr<Antioch::CEAEvaluator<libMesh::Real> >& thermo,
143 thermo_type<Antioch::CEAEvaluator<libMesh::Real> > )
145 thermo.reset(
new Antioch::CEAEvaluator<libMesh::Real>( mixture.
cea_mixture() ) );
152 template<
typename Thermo>
156 return _chem.M(species);
159 template<
typename Thermo>
163 return _chem.M_mix(mass_fractions);
166 template<
typename Thermo>
170 return _chem.R(species);
173 template<
typename Thermo>
177 return _chem.R_mix(mass_fractions);
180 template<
typename Thermo>
184 return _chem.X(species,M,mass_fraction);
187 template<
typename Thermo>
190 std::vector<libMesh::Real>& mole_fractions )
const
192 _chem.X(M,mass_fractions,mole_fractions);
196 template<
typename Thermo>
200 return _chem.species_index(species_name);
203 template<
typename Thermo>
207 return _chem.species_name(species_index);
212 #endif // GRINS_HAVE_ANTIOCH
214 #endif // GRINS_ANTIOCH_EVALUATOR_H
libMesh::Real cv(const CachedValues &cache, unsigned int qp)
void check_and_reset_temp_cache(const libMesh::Real &T)
Helper method for managing _temp_cache.
Wrapper class for evaluating chemistry and thermo properties using Antioch.
virtual ~AntiochEvaluator()
const Antioch::ChemicalMixture< libMesh::Real > & chemical_mixture() const
Accessor to underlying Antioch object.
boost::scoped_ptr< Thermo > _thermo
libMesh::Real cp(const CachedValues &cache, unsigned int qp)
void omega_dot(const CachedValues &cache, unsigned int qp, std::vector< libMesh::Real > &omega_dot)
const Antioch::CEAThermoMixture< libMesh::Real > & cea_mixture() const
libMesh::Real h_s(const CachedValues &cache, unsigned int qp, unsigned int species)
libMesh::Real R_mix(const std::vector< libMesh::Real > &mass_fractions) const
libMesh::Real M(unsigned int species) const
std::string species_name(unsigned int species_index) const
unsigned int species_index(const std::string &species_name) const
boost::scoped_ptr< AntiochKinetics > _kinetics
const AntiochMixture & _chem
boost::scoped_ptr< Antioch::TempCache< libMesh::Real > > _temp_cache
Wrapper class for storing state for Antioch thermo and kinetics.
libMesh::Real X(unsigned int species, libMesh::Real M, libMesh::Real mass_fraction) const
void specialized_build_thermo(const AntiochMixture &mixture, boost::scoped_ptr< Antioch::CEAEvaluator< libMesh::Real > > &thermo, thermo_type< Antioch::CEAEvaluator< libMesh::Real > >)
libMesh::Real M_mix(const std::vector< libMesh::Real > &mass_fractions) const
void specialized_build_thermo(const AntiochMixture &mixture, boost::scoped_ptr< Antioch::StatMechThermodynamics< libMesh::Real > > &thermo, thermo_type< Antioch::StatMechThermodynamics< libMesh::Real > >)
void build_thermo(const AntiochMixture &mixture)
libMesh::Real R(unsigned int species) const