28 #include "antioch_config.h"
50 template<
typename Scalar>
51 bool test_val( Scalar value, Scalar gold, Scalar tol, std::string test )
53 bool test_passed =
true;
55 Scalar error = std::abs( value - gold );
59 std::cerr <<
"Test "+test+
" failed!" << std::endl
60 <<
"value = " << value << std::endl
61 <<
"gold = " << gold << std::endl
62 <<
"error = " << error << std::endl
63 <<
"tol = " << tol << std::endl;
69 template <
typename Scalar>
72 std::vector<std::string> species_str_list;
79 const unsigned int n_species = 1;
80 species_str_list.reserve(n_species);
81 species_str_list.push_back(
"N2" );
82 unsigned int N2_species = 0;
87 MicroThermo thermo_stat( chem_mixture );
92 e_k_mixture(tran_mixture);
94 Antioch::build_eucken_thermal_conductivity<MicroThermo,Scalar>(e_k_mixture, thermo_stat);
97 s_mu_mixture(tran_mixture);
100 b_mu_mixture(tran_mixture);
102 #ifdef ANTIOCH_HAVE_GSL
104 k_mu_mixture(tran_mixture);
105 #endif // ANTIOCH_HAVE_GSL
110 #ifdef ANTIOCH_HAVE_GSL
111 Antioch::build_kinetics_theory_viscosity<Scalar>(k_mu_mixture);
112 #endif // ANTIOCH_HAVE_GSL
114 const Scalar T = 1500.1;
118 Scalar k_e_s_N2_gold = 8.1294319021704618392660e-02L;
119 Scalar k_e_s_N2_value = 0.0;
122 Scalar k_e_b_N2_gold = 8.3906393746814049491975e-02L;
123 Scalar k_e_b_N2_value = 0.0;
126 #ifdef ANTIOCH_HAVE_GSL
127 Scalar k_e_kt_N2_gold = 8.6774379182691310526782e-02L;
128 Scalar k_e_kt_N2_value = 0.0;
129 #endif // ANTIOCH_HAVE_GSL
131 std::cout <<
"Eucken (with SutherlandViscosity):" << std::endl;
132 for(
unsigned int s = 0; s < n_species; s++ )
134 Scalar mu = s_mu_mixture(s,T);
135 Scalar value = e_k_mixture.conductivity_without_diffusion(s, T, mu);
136 if( s == N2_species )
137 k_e_s_N2_value = value;
139 std::cout <<
"k(" << species_str_list[s] <<
") = " << value << std::endl;
142 std::cout <<
"Eucken (with BlottnerViscosity):" << std::endl;
143 for(
unsigned int s = 0; s < n_species; s++ )
145 Scalar mu = b_mu_mixture(s,T);
146 Scalar value = e_k_mixture.conductivity_without_diffusion(s, T, mu);
147 if( s == N2_species )
148 k_e_b_N2_value = value;
150 std::cout <<
"k(" << species_str_list[s] <<
") = " << value << std::endl;
153 #ifdef ANTIOCH_HAVE_GSL
154 std::cout <<
"Eucken (with KineticsTheoryViscosity):" << std::endl;
155 for(
unsigned int s = 0; s < n_species; s++ )
157 Scalar mu = k_mu_mixture(s,T);
158 Scalar value = e_k_mixture.conductivity_without_diffusion(s, T, mu);
159 if( s == N2_species )
160 k_e_kt_N2_value = value;
162 std::cout <<
"k(" << species_str_list[s] <<
") = " << value << std::endl;
164 #endif // ANTIOCH_HAVE_GSL
169 Scalar tol = std::numeric_limits<Scalar>::epsilon();
171 if( !test_val<Scalar>(k_e_s_N2_value, k_e_s_N2_gold, tol,
"Eucken-Sutherland") )
174 if( !test_val<Scalar>(k_e_b_N2_value, k_e_b_N2_gold, tol,
"Eucken-Blottner") )
177 #ifdef ANTIOCH_HAVE_GSL
178 if( !test_val<Scalar>(k_e_kt_N2_value, k_e_kt_N2_gold, tol,
"Eucken-KineticsTheory") )
180 #endif // ANTIOCH_HAVE_GSL
187 return (tester<double>() ||
188 tester<long double>() ||
Container class for species viscosities.
bool test_val(Scalar value, Scalar gold, Scalar tol, std::string test)
Class storing chemical mixture properties.
static const std::string & sutherland_data()
static const std::string & blottner_data()
Container class for species thermal conductivities.
Class storing chemical mixture properties.