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

Wrapper class for evaluating chemical kinetics using Antioch. More...

#include <antioch_kinetics.h>

Public Member Functions

 AntiochKinetics (const AntiochMixture< KineticsThermoCurveFit > &mixture)
 
 ~AntiochKinetics ()
 
void omega_dot (const libMesh::Real &T, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot)
 
void omega_dot (const Antioch::TempCache< libMesh::Real > &temp_cache, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot)
 

Protected Attributes

const AntiochMixture< KineticsThermoCurveFit > & _antioch_mixture
 
Antioch::KineticsEvaluator< libMesh::Real > _antioch_kinetics
 
Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > _antioch_nasa_thermo
 

Private Member Functions

 AntiochKinetics ()
 

Detailed Description

template<typename KineticsThermoCurveFit>
class GRINS::AntiochKinetics< KineticsThermoCurveFit >

Wrapper class for evaluating chemical kinetics 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 59 of file antioch_kinetics.h.

Constructor & Destructor Documentation

template<typename KineticsThermoCurveFit >
GRINS::AntiochKinetics< KineticsThermoCurveFit >::AntiochKinetics ( const AntiochMixture< KineticsThermoCurveFit > &  mixture)

Definition at line 43 of file antioch_kinetics.C.

44  : _antioch_mixture( mixture ),
45  _antioch_kinetics( mixture.reaction_set(), 0 ),
46  _antioch_nasa_thermo( mixture.nasa_mixture() )
47  {}
Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > _antioch_nasa_thermo
Antioch::KineticsEvaluator< libMesh::Real > _antioch_kinetics
const AntiochMixture< KineticsThermoCurveFit > & _antioch_mixture
template<typename KineticsThermoCurveFit>
GRINS::AntiochKinetics< KineticsThermoCurveFit >::~AntiochKinetics ( )
inline

Definition at line 65 of file antioch_kinetics.h.

65 {};
template<typename KineticsThermoCurveFit>
GRINS::AntiochKinetics< KineticsThermoCurveFit >::AntiochKinetics ( )
private

Member Function Documentation

template<typename KineticsThermoCurveFit >
void GRINS::AntiochKinetics< KineticsThermoCurveFit >::omega_dot ( const libMesh::Real &  T,
const libMesh::Real  rho,
const std::vector< libMesh::Real > &  mass_fractions,
std::vector< libMesh::Real > &  omega_dot 
)

Definition at line 51 of file antioch_kinetics.C.

Referenced by main().

55  {
56  Antioch::TempCache<libMesh::Real> temp_cache(T);
57  this->omega_dot(temp_cache,rho,mass_fractions,omega_dot);
58  }
void omega_dot(const libMesh::Real &T, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot)
template<typename KineticsThermoCurveFit >
void GRINS::AntiochKinetics< KineticsThermoCurveFit >::omega_dot ( const Antioch::TempCache< libMesh::Real > &  temp_cache,
const libMesh::Real  rho,
const std::vector< libMesh::Real > &  mass_fractions,
std::vector< libMesh::Real > &  omega_dot 
)

Definition at line 62 of file antioch_kinetics.C.

66  {
67  const unsigned int n_species = _antioch_mixture.n_species();
68 
69  libmesh_assert_equal_to( mass_fractions.size(), n_species );
70  libmesh_assert_equal_to( omega_dot.size(), n_species );
71 
72  std::vector<libMesh::Real> h_RT_minus_s_R(n_species, 0.0);
73  std::vector<libMesh::Real> molar_densities(n_species, 0.0);
74 
75  _antioch_nasa_thermo.h_RT_minus_s_R( temp_cache, h_RT_minus_s_R );
76 
77  _antioch_mixture.molar_densities( rho, mass_fractions, molar_densities );
78 
79  // If we don't clip negative densities, then we always have
80  // density to evaluate
81  bool have_density = !_antioch_mixture.clip_negative_rho();
82 
83  // If we don't necessarily have density to evaluate, then we need
84  // to check (and potentially clip) each species
85  if (!have_density)
86  for (unsigned int i=0; i != n_species; ++i)
87  {
88  if (molar_densities[i] <= 0)
89  molar_densities[i] = 0;
90  else
91  have_density = true;
92  }
93 
94  if (have_density)
95  _antioch_kinetics.compute_mass_sources( temp_cache.T,
96  molar_densities,
97  h_RT_minus_s_R,
98  omega_dot );
99  else
100  std::fill(omega_dot.begin(), omega_dot.end(), 0.0);
101  }
Antioch::NASAEvaluator< libMesh::Real, KineticsThermoCurveFit > _antioch_nasa_thermo
void omega_dot(const libMesh::Real &T, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot)
Antioch::KineticsEvaluator< libMesh::Real > _antioch_kinetics
const AntiochMixture< KineticsThermoCurveFit > & _antioch_mixture

Member Data Documentation

template<typename KineticsThermoCurveFit>
Antioch::KineticsEvaluator<libMesh::Real> GRINS::AntiochKinetics< KineticsThermoCurveFit >::_antioch_kinetics
protected

Definition at line 81 of file antioch_kinetics.h.

template<typename KineticsThermoCurveFit>
const AntiochMixture<KineticsThermoCurveFit>& GRINS::AntiochKinetics< KineticsThermoCurveFit >::_antioch_mixture
protected

Definition at line 79 of file antioch_kinetics.h.

template<typename KineticsThermoCurveFit>
Antioch::NASAEvaluator<libMesh::Real,KineticsThermoCurveFit> GRINS::AntiochKinetics< KineticsThermoCurveFit >::_antioch_nasa_thermo
protected

Definition at line 83 of file antioch_kinetics.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