GRINS-0.8.0
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo > Class Template Reference

Wrapper class for evaluating chemistry and thermo properties using Antioch. More...

#include <antioch_evaluator.h>

Inheritance diagram for GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >:
Inheritance graph
[legend]

Public Member Functions

 AntiochEvaluator (const AntiochMixture< KineticsThermoCurveFit > &mixture)
 
virtual ~AntiochEvaluator ()
 
libMesh::Real M (unsigned int species) const
 
libMesh::Real M_mix (const std::vector< libMesh::Real > &mass_fractions) const
 
libMesh::Real R (unsigned int species) const
 
libMesh::Real R_mix (const std::vector< libMesh::Real > &mass_fractions) const
 
libMesh::Real X (unsigned int species, libMesh::Real M, libMesh::Real mass_fraction) const
 
void X (libMesh::Real M, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &mole_fractions) const
 
unsigned int species_index (const std::string &species_name) const
 
std::string species_name (unsigned int species_index) const
 
libMesh::Real cp (const libMesh::Real &T, const libMesh::Real P, const std::vector< libMesh::Real > &Y)
 
libMesh::Real cv (const libMesh::Real &T, const libMesh::Real P, const std::vector< libMesh::Real > &Y)
 
libMesh::Real h_s (const libMesh::Real &T, unsigned int species)
 
void omega_dot (const libMesh::Real &T, libMesh::Real rho, const std::vector< libMesh::Real > mass_fractions, std::vector< libMesh::Real > &omega_dot)
 
template<>
libMesh::Real cp (const libMesh::Real &T, const libMesh::Real, const std::vector< libMesh::Real > &Y)
 
template<>
libMesh::Real cv (const libMesh::Real &T, const libMesh::Real, const std::vector< libMesh::Real > &Y)
 
template<>
libMesh::Real h_s (const libMesh::Real &T, unsigned int species)
 
template<>
libMesh::Real cp (const libMesh::Real &T, const libMesh::Real, const std::vector< libMesh::Real > &Y)
 
template<>
libMesh::Real cv (const libMesh::Real &T, const libMesh::Real, const std::vector< libMesh::Real > &Y)
 
template<>
libMesh::Real h_s (const libMesh::Real &T, unsigned int species)
 

Protected Member Functions

void check_and_reset_temp_cache (const libMesh::Real &T)
 Helper method for managing _temp_cache. More...
 
void build_thermo (const AntiochMixture< KineticsThermoCurveFit > &mixture)
 

Protected Attributes

const AntiochMixture< KineticsThermoCurveFit > & _chem
 
libMesh::UniquePtr< Thermo > _thermo
 Primary thermo object. More...
 
libMesh::UniquePtr< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > > _nasa_evaluator
 For some Thermo types, we also need to cache a NASAEvaluator. More...
 
libMesh::UniquePtr< AntiochKinetics< KineticsThermoCurveFit > > _kinetics
 
libMesh::Real _clipped_T
 
const libMesh::Real _minimum_T
 
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
 

Private Member Functions

 AntiochEvaluator ()
 
void specialized_build_thermo (const AntiochMixture< KineticsThermoCurveFit > &mixture, libMesh::UniquePtr< Antioch::StatMechThermodynamics< libMesh::Real > > &thermo, thermo_type< Antioch::StatMechThermodynamics< libMesh::Real > >)
 
void specialized_build_thermo (const AntiochMixture< KineticsThermoCurveFit > &mixture, libMesh::UniquePtr< Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit >, libMesh::Real > > &thermo, thermo_type< Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit >, libMesh::Real > >)
 

Detailed Description

template<typename KineticsThermoCurveFit, typename Thermo>
class GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >

Wrapper class for evaluating chemistry and thermo properties using Antioch.

This class is expected to be constructed after threads have been forked and will only live during the lifetime of the thread. By default, Antioch is working in SI units. Note that this documentation will always be built regardless if Antioch is included in the GRINS build or not. Check configure output to confirm that Antioch was included in the build.

Definition at line 56 of file antioch_evaluator.h.

Constructor & Destructor Documentation

template<typename KineticsThermoCurveFit, typename Thermo >
GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::AntiochEvaluator ( const AntiochMixture< KineticsThermoCurveFit > &  mixture)

Definition at line 44 of file antioch_evaluator.C.

References GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::build_thermo().

45  : _chem( mixture ),
46  _kinetics( new AntiochKinetics<KineticsThermoCurveFit>(mixture) ),
47  _minimum_T( mixture.minimum_T() ),
48  _temp_cache( new Antioch::TempCache<libMesh::Real>(1.0) )
49  {
50  this->build_thermo( mixture );
51  }
const libMesh::Real _minimum_T
void build_thermo(const AntiochMixture< KineticsThermoCurveFit > &mixture)
const AntiochMixture< KineticsThermoCurveFit > & _chem
libMesh::UniquePtr< AntiochKinetics< KineticsThermoCurveFit > > _kinetics
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
template<typename KineticsThermoCurveFit, typename Thermo>
virtual GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::~AntiochEvaluator ( )
inlinevirtual

Definition at line 62 of file antioch_evaluator.h.

62 {};
template<typename KineticsThermoCurveFit, typename Thermo>
GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::AntiochEvaluator ( )
private

Member Function Documentation

template<typename KineticsThermoCurveFit, typename Thermo>
void GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::build_thermo ( const AntiochMixture< KineticsThermoCurveFit > &  mixture)
inlineprotected

Definition at line 125 of file antioch_evaluator.h.

Referenced by GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::AntiochEvaluator().

126  { specialized_build_thermo( mixture, _thermo, thermo_type<Thermo>() ); }
void specialized_build_thermo(const AntiochMixture< KineticsThermoCurveFit > &mixture, libMesh::UniquePtr< Antioch::StatMechThermodynamics< libMesh::Real > > &thermo, thermo_type< Antioch::StatMechThermodynamics< libMesh::Real > >)
libMesh::UniquePtr< Thermo > _thermo
Primary thermo object.
template<typename KineticsThermoCurveFit , typename Thermo >
void GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::check_and_reset_temp_cache ( const libMesh::Real &  T)
inlineprotected

Helper method for managing _temp_cache.

T MUST be pass-by-reference because of the structure of Antioch::TempCache!

Definition at line 220 of file antioch_evaluator.h.

221  {
222  _clipped_T = std::max(_minimum_T, T);
223 
224  // We can't compare T because it's a reference, so we may have already
225  // changed it upstream. So, we compare the next cheapest thing.
226  if( _temp_cache->T2 != _clipped_T*_clipped_T )
227  _temp_cache.reset( new Antioch::TempCache<libMesh::Real>(_clipped_T) );
228  }
const libMesh::Real _minimum_T
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
template<>
libMesh::Real GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, Antioch::CEACurveFit< libMesh::Real > >, libMesh::Real > >::cp ( const libMesh::Real &  T,
const libMesh::Real  ,
const std::vector< libMesh::Real > &  Y 
)

Definition at line 67 of file antioch_evaluator.C.

70  {
72  return this->_nasa_evaluator->cp( *(_temp_cache.get()), Y );
73  }
void check_and_reset_temp_cache(const libMesh::Real &T)
Helper method for managing _temp_cache.
libMesh::UniquePtr< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > > _nasa_evaluator
For some Thermo types, we also need to cache a NASAEvaluator.
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::cp ( const libMesh::Real &  T,
const libMesh::Real  P,
const std::vector< libMesh::Real > &  Y 
)
template<>
libMesh::Real GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Antioch::StatMechThermodynamics< libMesh::Real > >::cp ( const libMesh::Real &  T,
const libMesh::Real  ,
const std::vector< libMesh::Real > &  Y 
)

Definition at line 95 of file antioch_evaluator.C.

98  {
99  return this->_thermo->cp( T, T, Y );
100  }
libMesh::UniquePtr< Thermo > _thermo
Primary thermo object.
template<>
libMesh::Real GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, Antioch::CEACurveFit< libMesh::Real > >, libMesh::Real > >::cv ( const libMesh::Real &  T,
const libMesh::Real  ,
const std::vector< libMesh::Real > &  Y 
)

Definition at line 77 of file antioch_evaluator.C.

80  {
82  return this->_nasa_evaluator->cv( *(_temp_cache.get()), Y );
83  }
void check_and_reset_temp_cache(const libMesh::Real &T)
Helper method for managing _temp_cache.
libMesh::UniquePtr< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > > _nasa_evaluator
For some Thermo types, we also need to cache a NASAEvaluator.
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::cv ( const libMesh::Real &  T,
const libMesh::Real  P,
const std::vector< libMesh::Real > &  Y 
)
template<>
libMesh::Real GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Antioch::StatMechThermodynamics< libMesh::Real > >::cv ( const libMesh::Real &  T,
const libMesh::Real  ,
const std::vector< libMesh::Real > &  Y 
)

Definition at line 103 of file antioch_evaluator.C.

106  {
107  return this->_thermo->cv( T, T, Y );
108  }
libMesh::UniquePtr< Thermo > _thermo
Primary thermo object.
template<>
libMesh::Real GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, Antioch::CEACurveFit< libMesh::Real > >, libMesh::Real > >::h_s ( const libMesh::Real &  T,
unsigned int  species 
)

Definition at line 87 of file antioch_evaluator.C.

88  {
90 
91  return this->_nasa_evaluator->h( *(_temp_cache.get()), species );;
92  }
void check_and_reset_temp_cache(const libMesh::Real &T)
Helper method for managing _temp_cache.
libMesh::UniquePtr< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > > _nasa_evaluator
For some Thermo types, we also need to cache a NASAEvaluator.
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::h_s ( const libMesh::Real &  T,
unsigned int  species 
)
template<>
libMesh::Real GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Antioch::StatMechThermodynamics< libMesh::Real > >::h_s ( const libMesh::Real &  T,
unsigned int  species 
)

Definition at line 111 of file antioch_evaluator.C.

112  {
113  return this->_thermo->h_tot( species, T ) + _chem.h_stat_mech_ref_correction(species);
114  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
libMesh::UniquePtr< Thermo > _thermo
Primary thermo object.
template<typename KineticsThermoCurveFit , typename Thermo >
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::M ( unsigned int  species) const
inline

Definition at line 153 of file antioch_evaluator.h.

154  {
155  return _chem.M(species);
156  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
template<typename KineticsThermoCurveFit , typename Thermo >
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::M_mix ( const std::vector< libMesh::Real > &  mass_fractions) const
inline

Definition at line 162 of file antioch_evaluator.h.

163  {
164  return _chem.M_mix(mass_fractions);
165  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
template<typename KineticsThermoCurveFit , typename Thermo >
void GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::omega_dot ( const libMesh::Real &  T,
libMesh::Real  rho,
const std::vector< libMesh::Real >  mass_fractions,
std::vector< libMesh::Real > &  omega_dot 
)

Definition at line 55 of file antioch_evaluator.C.

58  {
60 
61  _kinetics->omega_dot( *(_temp_cache.get()), rho, mass_fractions, omega_dot );
62  }
void check_and_reset_temp_cache(const libMesh::Real &T)
Helper method for managing _temp_cache.
void omega_dot(const libMesh::Real &T, libMesh::Real rho, const std::vector< libMesh::Real > mass_fractions, std::vector< libMesh::Real > &omega_dot)
libMesh::UniquePtr< AntiochKinetics< KineticsThermoCurveFit > > _kinetics
libMesh::UniquePtr< Antioch::TempCache< libMesh::Real > > _temp_cache
template<typename KineticsThermoCurveFit , typename Thermo >
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::R ( unsigned int  species) const
inline

Definition at line 170 of file antioch_evaluator.h.

171  {
172  return _chem.R(species);
173  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
template<typename KineticsThermoCurveFit , typename Thermo >
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::R_mix ( const std::vector< libMesh::Real > &  mass_fractions) const
inline

Definition at line 179 of file antioch_evaluator.h.

180  {
181  return _chem.R_mix(mass_fractions);
182  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
template<typename KineticsThermoCurveFit, typename Thermo>
void GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::specialized_build_thermo ( const AntiochMixture< KineticsThermoCurveFit > &  mixture,
libMesh::UniquePtr< Antioch::StatMechThermodynamics< libMesh::Real > > &  thermo,
thermo_type< Antioch::StatMechThermodynamics< libMesh::Real > >   
)
inlineprivate

Definition at line 132 of file antioch_evaluator.h.

Referenced by GRINS::AntiochEvaluator< Antioch::CEACurveFit< libMesh::Real >, Thermo >::build_thermo().

135  {
136  thermo.reset( new Antioch::StatMechThermodynamics<libMesh::Real>( mixture.chemical_mixture() ) );
137  }
template<typename KineticsThermoCurveFit, typename Thermo>
void GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::specialized_build_thermo ( const AntiochMixture< KineticsThermoCurveFit > &  mixture,
libMesh::UniquePtr< Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit >, libMesh::Real > > &  thermo,
thermo_type< Antioch::IdealGasMicroThermo< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit >, libMesh::Real > >   
)
inlineprivate

Definition at line 139 of file antioch_evaluator.h.

142  {
143  _nasa_evaluator.reset( new Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit>( mixture.nasa_mixture() ) );
144  thermo.reset( new Antioch::IdealGasMicroThermo<Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit>,libMesh::Real>( *_nasa_evaluator, mixture.chemical_mixture() ) );
145  }
libMesh::UniquePtr< Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > > _nasa_evaluator
For some Thermo types, we also need to cache a NASAEvaluator.
template<typename KineticsThermoCurveFit , typename Thermo >
unsigned int GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::species_index ( const std::string &  species_name) const
inline

Definition at line 205 of file antioch_evaluator.h.

206  {
207  return _chem.species_index(species_name);
208  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
std::string species_name(unsigned int species_index) const
template<typename KineticsThermoCurveFit , typename Thermo >
std::string GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::species_name ( unsigned int  species_index) const
inline

Definition at line 213 of file antioch_evaluator.h.

214  {
215  return _chem.species_name(species_index);
216  }
const AntiochMixture< KineticsThermoCurveFit > & _chem
unsigned int species_index(const std::string &species_name) const
template<typename KineticsThermoCurveFit , typename Thermo >
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::X ( unsigned int  species,
libMesh::Real  M,
libMesh::Real  mass_fraction 
) const
inline

Definition at line 186 of file antioch_evaluator.h.

189  {
190  return _chem.X(species,M,mass_fraction);
191  }
libMesh::Real M(unsigned int species) const
const AntiochMixture< KineticsThermoCurveFit > & _chem
template<typename KineticsThermoCurveFit , typename Thermo >
void GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::X ( libMesh::Real  M,
const std::vector< libMesh::Real > &  mass_fractions,
std::vector< libMesh::Real > &  mole_fractions 
) const
inline

Definition at line 195 of file antioch_evaluator.h.

198  {
199  _chem.X(M,mass_fractions,mole_fractions);
200  }
libMesh::Real M(unsigned int species) const
const AntiochMixture< KineticsThermoCurveFit > & _chem

Member Data Documentation

template<typename KineticsThermoCurveFit, typename Thermo>
const AntiochMixture<KineticsThermoCurveFit>& GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_chem
protected

Definition at line 96 of file antioch_evaluator.h.

template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_clipped_T
protected

Definition at line 108 of file antioch_evaluator.h.

template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::UniquePtr<AntiochKinetics<KineticsThermoCurveFit> > GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_kinetics
protected

Definition at line 104 of file antioch_evaluator.h.

template<typename KineticsThermoCurveFit, typename Thermo>
const libMesh::Real GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_minimum_T
protected

Definition at line 112 of file antioch_evaluator.h.

template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::UniquePtr<Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit> > GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_nasa_evaluator
protected

For some Thermo types, we also need to cache a NASAEvaluator.

Definition at line 102 of file antioch_evaluator.h.

template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::UniquePtr<Antioch::TempCache<libMesh::Real> > GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_temp_cache
protected

Definition at line 114 of file antioch_evaluator.h.

template<typename KineticsThermoCurveFit, typename Thermo>
libMesh::UniquePtr<Thermo> GRINS::AntiochEvaluator< KineticsThermoCurveFit, Thermo >::_thermo
protected

Primary thermo object.

Definition at line 99 of file antioch_evaluator.h.


The documentation for this class was generated from the following files:

Generated on Tue Dec 19 2017 12:47:29 for GRINS-0.8.0 by  doxygen 1.8.9.1