104 std::vector<std::string> species_str_list;
105 const unsigned int n_species = 5;
106 species_str_list.reserve(n_species);
107 species_str_list.push_back(
"N2" );
108 species_str_list.push_back(
"O2" );
109 species_str_list.push_back(
"N" );
110 species_str_list.push_back(
"O" );
111 species_str_list.push_back(
"NO" );
131 Antioch::build_eucken_thermal_conductivity<MicroThermo,Scalar>(k,thermo_stat);
139 #ifdef ANTIOCH_HAVE_GSL
142 Antioch::build_kinetics_theory_viscosity<Scalar,Antioch::GSLSpliner>(ps_mu);
145 bimol_D( tran_mixture );
150 ps_k( tran_mixture );
152 Antioch::build_kinetics_theory_thermal_conductivity<MicroThermo,Scalar>(ps_k,thermo_stat);
159 const Scalar Le = 1.4;
160 Antioch::build_constant_lewis_diffusivity<Scalar>(
D, Le);
169 wilke( wilke_mixture, D, mu, k );
173 #ifdef ANTIOCH_HAVE_GSL
176 Antioch::KineticsTheoryViscosity<Scalar,Antioch::GSLSpliner>,
179 wilke_ps_evaluator(wilke_mixture,bimol_D,ps_mu,ps_k);
185 Antioch::EuckenThermalConductivity<MicroThermo> k_eucken(thermo_stat);
188 Antioch::EuckenThermalConductivity<MicroThermo>,
189 Scalar> wilke_eval_dep( wilke_mix_dep, mu, k_eucken );
193 const Scalar tol = std::numeric_limits<Scalar>::epsilon() * 5;
198 std::vector<Scalar> mu( 5 );
205 std::vector<Scalar> chi( 5 );
212 Scalar phi_N_exact = 0.0L;
213 unsigned int N_index = 2;
214 Scalar M_N = chem_mixture.M(N_index);
216 for(
unsigned int r = 0; r < 5; r++ )
218 Scalar M_r = chem_mixture.M(r);
219 Scalar dummy = 1.0L + std::sqrt(mu[N_index]/mu[r])*
pow( M_r/M_N, Scalar(0.25L) );
220 phi_N_exact += chi[r]*dummy*dummy/std::sqrt(8.0L*( 1.0L + M_N/M_r ) );
224 std::vector<std::vector<Scalar> > mu_mu_sqrt(mu.size());
228 wilke.compute_mu_mu_sqrt( mu, mu_mu_sqrt);
229 phi_N = wilke.compute_phi( mu_mu_sqrt, chi, N_index );
231 return_flag =
test_val( phi_N, phi_N_exact, tol, std::string(
"phi") );
234 const Scalar P = 1e5;
235 std::vector<Scalar> mass_fractions( 5, 0.2L);
236 const Scalar T = 1000.0L;
239 const Scalar R_mix = chem_mixture.R(mass_fractions);
240 const Scalar rho = P/(R_mix*T);
241 const Scalar
cp = thermo_mix.cp( T_cache, mass_fractions );
243 const Scalar wilke_mu_long_double = 4.51233094078102111066e-05L;
244 const Scalar wilke_k_long_double = 8.01027375195322618301e-02L;
246 Scalar wilke_mu = wilke.
mu(T, mass_fractions );
247 Scalar wilke_k = wilke.
k(T, mass_fractions );
249 return_flag =
test_val( wilke_mu, wilke_mu_long_double, tol,
"wilke mixture viscosity") || return_flag;
250 return_flag =
test_val( wilke_k, wilke_k_long_double, tol,
"wilke mixture thermal conduction") || return_flag;
252 std::vector<Scalar> lewis_D(5,0);
254 wilke.mu_and_k(T,mass_fractions,wilke_mu,wilke_k);
256 return_flag =
test_val( wilke_mu, wilke_mu_long_double, tol,
"wilke mixture viscosity") || return_flag;
257 return_flag =
test_val( wilke_k, wilke_k_long_double, tol,
"wilke mixture thermal conduction") || return_flag;
259 wilke.mu_and_k_and_D( T, rho, cp, mass_fractions, wilke_mu, wilke_k, lewis_D );
261 Scalar D_lewis_exact = wilke_k/(rho*cp*Le);
263 for(
unsigned int s = 0; s < lewis_D.size(); s++)
264 return_flag =
test_val( lewis_D[s], D_lewis_exact, tol,
"constant Lewis diffusion for species " + species_str_list[s]) || return_flag;
278 const Scalar mu_kt_long_double = 4.49877527305932602332e-05L;
279 const Scalar k_kt_long_double = 8.22050332419571328635e-02L;
281 std::vector<Scalar> D_kt_long_double(5,0);
282 D_kt_long_double[0] = 1.95418749838889089562e-04L;
283 D_kt_long_double[1] = 1.92376915629762328034e-04L;
284 D_kt_long_double[2] = 2.98006144849143296987e-04L;
285 D_kt_long_double[3] = 3.08179434829991685679e-04L;
286 D_kt_long_double[4] = 1.90508644119203653519e-04L;
288 std::vector<Scalar> D_kt(5,0);
289 wilke_ps_evaluator.mu_and_k_and_D( T, rho, cp, mass_fractions, mu_kt, k_kt, D_kt );
292 return_flag =
test_val( mu_kt, mu_kt_long_double, tol,
"kinetics theory viscosity") || return_flag;
293 return_flag =
test_val( k_kt, k_kt_long_double, tol,
"kinetics theory thermal conduction") || return_flag;
294 for(
unsigned int s = 0; s < D_kt.size(); s++)
295 return_flag =
test_val( D_kt[s], D_kt_long_double[s], tol,
"kinetics theory diffusion for species " + species_str_list[s]) || return_flag;
297 std::vector<Scalar> D_kt_2(5,0);
298 wilke_ps_evaluator.D(rho, T, mass_fractions, D_kt_2 );
300 for(
unsigned int s = 0; s < D_kt.size(); s++)
301 return_flag =
test_val( D_kt_2[s], D_kt_long_double[s], tol,
"kinetics theory diffusion for species " + species_str_list[s]) || return_flag;
306 Antioch::KineticsTheoryViscosity<Scalar,Antioch::GSLSpliner>,
307 Antioch::KineticsTheoryThermalConductivity<MicroThermo,Scalar>,
308 Scalar>::DiffusivityType
310 Antioch::KineticsTheoryViscosity<Scalar,Antioch::GSLSpliner>,
311 Antioch::KineticsTheoryThermalConductivity<MicroThermo,Scalar>,
312 Scalar>::MASS_FLUX_MASS_FRACTION;
314 std::vector<Scalar> D_kt_mass_mass_long_double(5);
315 D_kt_mass_mass_long_double[0] = 2.049224418207810845348e-04L;
316 D_kt_mass_mass_long_double[1] = 2.065920312318615510015e-04L;
317 D_kt_mass_mass_long_double[2] = 2.550809908204135170620e-04L;
318 D_kt_mass_mass_long_double[3] = 2.790464132548291530901e-04L;
319 D_kt_mass_mass_long_double[4] = 2.024029424511201457822e-04L;
321 std::vector<Scalar> D_kt_mass_mass(5,0);
322 wilke_ps_evaluator.D(rho, T, mass_fractions, D_kt_mass_mass, diff_type );
324 for(
unsigned int s = 0; s < D_kt.size(); s++)
325 return_flag =
test_val( D_kt_mass_mass[s], D_kt_mass_mass_long_double[s], tol,
"kinetics theory diffusion (mass flux, mass fraction) for species " + species_str_list[s]) || return_flag;
332 Antioch::KineticsTheoryViscosity<Scalar,Antioch::GSLSpliner>,
333 Antioch::KineticsTheoryThermalConductivity<MicroThermo,Scalar>,
334 Scalar>::DiffusivityType
336 Antioch::KineticsTheoryViscosity<Scalar,Antioch::GSLSpliner>,
337 Antioch::KineticsTheoryThermalConductivity<MicroThermo,Scalar>,
338 Scalar>::MOLE_FLUX_MOLE_FRACTION;
340 std::vector<Scalar> D_kt_mole_mole_long_double(5);
341 D_kt_mole_mole_long_double[0] = 2.070373009368896292617e-04L;
342 D_kt_mole_mole_long_double[1] = 2.083783534307470249142e-04L;
343 D_kt_mole_mole_long_double[2] = 2.589403037715613871414e-04L;
344 D_kt_mole_mole_long_double[3] = 2.824017881144487186270e-04L;
345 D_kt_mole_mole_long_double[4] = 2.042449798230576410557e-04L;
347 std::vector<Scalar> D_kt_mole_mole(5,0);
348 wilke_ps_evaluator.D(rho, T, mass_fractions, D_kt_mole_mole, diff_type );
350 for(
unsigned int s = 0; s < D_kt.size(); s++)
351 return_flag =
test_val( D_kt_mole_mole[s], D_kt_mole_mole_long_double[s], tol,
"kinetics theory diffusion (mass flux, mass fraction) for species " + species_str_list[s]) || return_flag;
Deprecated. Use MixtureAveragedTransportEvaluator instead.
Container class for species viscosities.
Compute transport properties using ``mixture averaged" model.
StateType k(const StateType &T, const VectorStateType &mass_fractions) const
Container class for species binary diffusion models.
Scalar cp(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6)
Conductivity based on kinetic theory of mixtures approximations.
int test_val(const Scalar val, const Scalar val_exact, const Scalar tol, const std::string &val_name)
void read_nasa_mixture_data(NASAThermoMixture< NumericType, CurveType > &thermo, const std::string &filename=DefaultSourceFilename::thermo_data(), ParsingType=ASCII, bool verbose=true)
Antioch::enable_if_c< Antioch::is_valarray< T >::value, typename Antioch::state_type< T >::type >::type pow(const T &in, const T2 &n)
Species conductivity based on Eucken relation.
Class storing chemical mixture properties.
static const std::string & thermo_data()
static const std::string & blottner_data()
void set_zero(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a)
Container class for species thermal conductivities.
StateType mu(const StateType &T, const VectorStateType &mass_fractions) const
Class storing chemical mixture properties.
void init_constant(Vector &output, const Scalar &example)
void read_blottner_data_ascii(MixtureViscosity< BlottnerViscosity< NumericType >, NumericType > &mu, const std::string &filename)
Mixture object for MixtureAveragedTransport model.