26 #include "grins_config.h"
28 #ifdef GRINS_HAVE_ANTIOCH
37 #include "antioch/temp_cache.h"
38 #include "antioch/vector_utils.h"
42 template<
typename KineticsThermoCurveFit>
44 : _antioch_mixture( mixture ),
45 _antioch_kinetics( mixture.reaction_set(), 0 ),
46 _antioch_nasa_thermo( mixture.nasa_mixture() )
49 template<
typename KineticsThermoCurveFit>
52 const libMesh::Real rho,
53 const std::vector<libMesh::Real>& mass_fractions,
54 std::vector<libMesh::Real>& omega_dot )
56 Antioch::TempCache<libMesh::Real> temp_cache(T);
57 this->omega_dot(temp_cache,rho,mass_fractions,omega_dot);
60 template<
typename KineticsThermoCurveFit>
62 omega_dot(
const Antioch::TempCache<libMesh::Real>& temp_cache,
63 const libMesh::Real rho,
64 const std::vector<libMesh::Real>& mass_fractions,
65 std::vector<libMesh::Real>& omega_dot )
67 const unsigned int n_species = _antioch_mixture.n_species();
69 libmesh_assert_equal_to( mass_fractions.size(), n_species );
70 libmesh_assert_equal_to( omega_dot.size(), n_species );
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);
75 _antioch_nasa_thermo.h_RT_minus_s_R( temp_cache, h_RT_minus_s_R );
77 _antioch_mixture.molar_densities( rho, mass_fractions, molar_densities );
81 bool have_density = !_antioch_mixture.clip_negative_rho();
86 for (
unsigned int i=0; i != n_species; ++i)
88 if (molar_densities[i] <= 0)
89 molar_densities[i] = 0;
95 _antioch_kinetics.compute_mass_sources( temp_cache.T,
100 std::fill(omega_dot.begin(), omega_dot.end(), 0.0);
105 #endif // GRINS_HAVE_ANTIOCH
void omega_dot(const libMesh::Real &T, const libMesh::Real rho, const std::vector< libMesh::Real > &mass_fractions, std::vector< libMesh::Real > &omega_dot)
Wrapper class for storing state for Antioch thermo and kinetics.