26 #include "grins_config.h"
28 #ifdef GRINS_HAVE_CANTERA
38 #include "libmesh/getpot.h"
41 #include "libmesh/ignore_warnings.h"
42 #include "cantera/IdealGasMix.h"
43 #include "libmesh/restore_warnings.h"
49 : _cantera_gas( mixture.get_chemistry() )
61 std::vector<libMesh::Real>& omega_dot )
const
73 const std::vector<libMesh::Real>& mass_fractions,
74 std::vector<libMesh::Real>& omega_dot )
const
76 libmesh_assert_equal_to( mass_fractions.size(), omega_dot.size() );
77 libmesh_assert_equal_to( mass_fractions.size(),
_cantera_gas.nSpecies() );
78 libmesh_assert_greater(T,0.0);
79 libmesh_assert_greater(P,0.0);
84 libMesh::Threads::spin_mutex::scoped_lock lock(cantera_mutex);
91 catch(Cantera::CanteraError)
93 Cantera::showErrors(std::cerr);
99 for(
unsigned int s = 0; s < omega_dot.size(); s++ )
101 if( libMesh::libmesh_isnan(omega_dot[s]) )
103 std::cout <<
"T = " << T << std::endl
104 <<
"P = " << P << std::endl;
105 for(
unsigned int s = 0; s < omega_dot.size(); s++ )
107 std::cout <<
"Y[" << s <<
"] = " << mass_fractions[s] << std::endl;
109 for(
unsigned int s = 0; s < omega_dot.size(); s++ )
111 std::cout <<
"omega_dot[" << s <<
"] = " << omega_dot[s] << std::endl;
119 for(
unsigned int s = 0; s < omega_dot.size(); s++ )
129 const std::vector<libMesh::Real>& mass_fractions,
130 std::vector<libMesh::Real>& omega_dot )
const
132 libmesh_assert_equal_to( mass_fractions.size(), omega_dot.size() );
133 libmesh_assert_equal_to( mass_fractions.size(),
_cantera_gas.nSpecies() );
134 libmesh_assert_greater(T,0.0);
135 libmesh_assert_greater(rho,0.0);
140 libMesh::Threads::spin_mutex::scoped_lock lock(cantera_mutex);
147 catch(Cantera::CanteraError)
149 Cantera::showErrors(std::cerr);
154 for(
unsigned int s = 0; s < omega_dot.size(); s++ )
165 #endif //GRINS_HAVE_CANTERA
void omega_dot_TRY(const libMesh::Real &T, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot) const
void omega_dot(const CachedValues &cache, unsigned int qp, std::vector< libMesh::Real > &omega_dot) const
void omega_dot_TPY(const libMesh::Real T, const libMesh::Real P, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot) const
const std::vector< std::vector< libMesh::Number > > & get_cached_vector_values(unsigned int quantity) const
Cantera::IdealGasMix & _cantera_gas
Wrapper class for storing state for computing thermochemistry and transport properties using Cantera...
const std::vector< libMesh::Number > & get_cached_values(unsigned int quantity) const