26 #include "grins_config.h"
28 #ifdef GRINS_HAVE_CANTERA
38 #include "libmesh/getpot.h"
44 : _cantera_mixture(mixture),
45 _cantera_gas(mixture.get_chemistry())
61 libmesh_assert_equal_to( Y.size(),
_cantera_gas.nSpecies() );
63 libMesh::Real
cp = 0.0;
68 libMesh::Threads::spin_mutex::scoped_lock lock(cantera_mutex);
76 catch(Cantera::CanteraError)
78 Cantera::showErrors(std::cerr);
93 libmesh_assert_equal_to( Y.size(),
_cantera_gas.nSpecies() );
95 libMesh::Real
cv = 0.0;
100 libMesh::Threads::spin_mutex::scoped_lock lock(cantera_mutex);
108 catch(Cantera::CanteraError)
110 Cantera::showErrors(std::cerr);
120 unsigned int species )
const
126 libmesh_assert_equal_to( Y.size(),
_cantera_gas.nSpecies() );
128 std::vector<libMesh::Real> h_RT( Y.size(), 0.0 );
133 libMesh::Threads::spin_mutex::scoped_lock lock(cantera_mutex);
141 catch(Cantera::CanteraError)
143 Cantera::showErrors(std::cerr);
153 std::vector<libMesh::Real>& h)
const
159 libmesh_assert_equal_to( Y.size(), h.size() );
160 libmesh_assert_equal_to( Y.size(),
_cantera_gas.nSpecies() );
165 libMesh::Threads::spin_mutex::scoped_lock lock(cantera_mutex);
173 catch(Cantera::CanteraError)
175 Cantera::showErrors(std::cerr);
179 for(
unsigned int s = 0; s < h.size(); s++ )
191 std::vector<libMesh::Real> h_RT(
_cantera_gas.nSpecies(), 0.0 );
199 catch(Cantera::CanteraError)
201 Cantera::showErrors(std::cerr);
210 #endif //GRINS_HAVE_CANTERA
libMesh::Real R(unsigned int species) const
libMesh::Real cp(const CachedValues &cache, unsigned int qp) const
const std::vector< std::vector< libMesh::Number > > & get_cached_vector_values(unsigned int quantity) const
Cantera::IdealGasMix & _cantera_gas
libMesh::Real cv(const CachedValues &cache, unsigned int qp) const
Wrapper class for storing state for computing thermochemistry and transport properties using Cantera...
libMesh::Real h(const CachedValues &cache, unsigned int qp, unsigned int species) const
const std::vector< libMesh::Number > & get_cached_values(unsigned int quantity) const
CanteraMixture & _cantera_mixture