28 #ifndef ANTIOCH_NASA_EVALUATOR_H
29 #define ANTIOCH_NASA_EVALUATOR_H
39 template<
typename CoeffType>
42 template<
typename CoeffType,
typename NASAFit>
45 template<
typename CoeffType=
double,
typename NASAFit = NASA9CurveFit<CoeffType> >
56 template<
typename StateType>
60 template<
typename StateType,
typename VectorStateType>
66 template<
typename StateType>
68 cv( const
TempCache<StateType>& cache,
unsigned int species ) const
70 this->
cp(cache,species) -
73 template<typename StateType, typename VectorStateType>
75 has_size<VectorStateType>::value, StateType
77 cv( const
TempCache<StateType>& cache, const VectorStateType& mass_fractions ) const;
79 template<typename StateType>
81 h( const
TempCache<StateType>& cache,
unsigned int species ) const
86 template<typename StateType, typename VectorStateType>
88 has_size<VectorStateType>::value,
void
90 h( const
TempCache<StateType>& cache, VectorStateType&
h ) const;
93 template<typename StateType>
97 template<typename StateType, typename VectorStateType>
99 has_size<VectorStateType>::value,
void
103 template<typename StateType>
107 template<typename StateType, typename VectorStateType>
109 has_size<VectorStateType>::value,
void
115 template<typename StateType>
120 template<typename StateType>
124 template<typename StateType>
128 template<typename StateType>
129 StateType
s_over_R( const
TempCache<StateType>& cache,
unsigned int species ) const;
150 template<typename CoeffType, typename NASAFit>
157 template<
typename CoeffType,
typename NASAFit>
164 template<
typename CoeffType,
typename NASAFit>
171 template<
typename CoeffType,
typename NASAFit>
178 template<
typename CoeffType,
typename NASAFit>
185 template<
typename CoeffType,
typename NASAFit>
186 template<
typename StateType>
196 (cache.
T < ScalarType(200.1),
204 template<
typename CoeffType,
typename NASAFit>
205 template<
typename StateType,
typename VectorStateType>
208 has_size<VectorStateType>::value, StateType
211 const VectorStateType& mass_fractions )
const
216 StateType
cp = mass_fractions[0]*this->
cp(cache,0);
218 for(
unsigned int s = 1; s < this->
n_species(); s++ )
220 cp += mass_fractions[s]*this->
cp(cache,s);
227 template<
typename CoeffType,
typename NASAFit>
228 template<
typename StateType,
typename VectorStateType>
231 has_size<VectorStateType>::value,
void
237 for(
unsigned int s = 0; s < this->
n_species(); s++ )
246 template<
typename CoeffType,
typename NASAFit>
247 template<
typename StateType>
257 return this->
_nasa_mixture.curve_fit(species).cp_over_R(cache);
260 template<
typename CoeffType,
typename NASAFit>
261 template<
typename StateType>
270 return this->
_nasa_mixture.curve_fit(species).cp_over_R(cache) - StateType(1.L);
273 template<
typename CoeffType,
typename NASAFit>
274 template<
typename StateType>
282 return this->
_nasa_mixture.curve_fit(species).h_over_RT(cache);
286 template<
typename CoeffType,
typename NASAFit>
287 template<
typename StateType>
295 return this->
_nasa_mixture.curve_fit(species).s_over_R(cache);
299 template<
typename CoeffType,
typename NASAFit>
300 template<
typename StateType>
310 return this->
_nasa_mixture.curve_fit(species).h_RT_minus_s_R(cache);
314 template<
typename CoeffType,
typename NASAFit>
315 template<
typename StateType,
typename VectorStateType>
318 has_size<VectorStateType>::value,
void
325 for(
unsigned int s = 0; s < this->
n_species(); s++ )
335 template<
typename CoeffType,
typename NASAFit>
336 template<
typename StateType>
346 return this->
_nasa_mixture.curve_fit(species).dh_RT_minus_s_R_dT(cache);
350 template<
typename CoeffType,
typename NASAFit>
351 template<
typename StateType,
typename VectorStateType>
354 has_size<VectorStateType>::value,
void
361 for(
unsigned int s = 0; s < this->
n_species(); s++ )
370 template<
typename CoeffType,
typename NASAFit>
371 template<
typename StateType,
typename VectorStateType>
374 has_size<VectorStateType>::value, StateType
377 const VectorStateType& mass_fractions )
const
379 return this->
cp(cache,mass_fractions) - this->
chem_mixture().R(mass_fractions);
384 #endif // ANTIOCH_NASA_EVALUATOR_H
StateType h_over_RT(const TempCache< StateType > &cache, unsigned int species) const
h over RT, directly from the curve fit
StateType dh_RT_minus_s_R_dT(const TempCache< StateType > &cache, unsigned int species) const
#define antioch_assert_equal_to(expr1, expr2)
#define antioch_assert_greater(expr1, expr2)
#define antioch_assert_less(expr1, expr2)
StateType h_RT_minus_s_R(const TempCache< StateType > &cache, unsigned int species) const
We currently need different specializations for scalar vs vector inputs here.
StateType s_over_R(const TempCache< StateType > &cache, unsigned int species) const
s over R, directly from the curve fit
unsigned int n_species() const
Convenience function.
const NASAThermoMixture< CoeffType, NASAFit > & _nasa_mixture
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > constant_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex, const Scalar &value)
enable_if_c< is_eigen< T1 >::value &&is_eigen< T2 >::value, typename state_type< T1 >::type >::type if_else(const Condition &condition, const T1 &if_true, const T2 &if_false)
h(const TempCache< StateType > &cache, unsigned int species) const ANTIOCH_AUTOFUNC(StateType
const NASAThermoMixture< CoeffType, NASAFit > & cea_mixture() const
#define ANTIOCH_AUTOFUNC(Type, Expr)
const ANTIOCH_AUTO(StateType) KineticsTheoryThermalConductivity< ThermoEvaluator
NASAEvaluator()
Default constructor.
this chem_mixture().R(species)*cache.T *this-> h_over_RT(cache, species)) template< typename StateType, typename VectorStateType >typename enable_if_c< has_size< VectorStateType >::value, void >::typeh(const TempCache< StateType > &cache, VectorStateType &h) const
StateType cv_over_R(const TempCache< StateType > &cache, unsigned int species) const
Cv over R, from ideal gas,.
Class storing chemical mixture properties.
The parameters are reduced parameters.
cv(const TempCache< StateType > &cache, unsigned int species) const ANTIOCH_AUTOFUNC(StateType
StateType cp_over_R(const TempCache< StateType > &cache, unsigned int species) const
Cp over R, directly from the curve fit.
StateType cp(const TempCache< StateType > &cache, unsigned int species) const
We currently need different specializations for scalar vs vector inputs here.