30 const Real
tol = 6e-3;
31 const std::vector<std::pair<Real, std::vector<std::pair<std::string, Real>>>> references = {
33 {{
"H2", 9.000177310613688e-06},
34 {
"O2", 2.065378948167078e-05},
35 {
"CH4", 1.1453629801108389e-05},
36 {
"CO", 1.777126940240487e-05},
37 {
"CO2", 1.5048181672334403e-05},
38 {
"N2", 1.80854698821696e-05}}},
40 {{
"H2", 1.9676368365578972e-05},
41 {
"O2", 4.7911694307285326e-05},
42 {
"CH4", 2.7657970234929e-05},
43 {
"CO", 4.0801958261007516e-05},
44 {
"CO2", 4.09913251119492e-05},
45 {
"N2", 4.149814387750264e-05}}},
47 {{
"H2", 3.5525956370270646e-05},
48 {
"O2", 8.681334277254339e-05},
49 {
"CH4", 5.031808575692049e-05},
50 {
"CO", 7.387175858990157e-05},
51 {
"CO2", 7.612436248107707e-05},
52 {
"N2", 7.512886600196423e-05}}}};
54 for (
const auto & [
T,
values] : references)
55 for (
const auto & [species,
mu] :
values)
68 const Real
tol = 2e-3;
69 const Real tol_H2O = 5e-2;
73 std::string species_i;
74 std::string species_j;
77 const std::vector<Reference> references = {{300.0,
"N2",
"O2", 2.114004397958847e-05},
78 {300.0,
"H2",
"N2", 7.892785088901448e-05},
79 {300.0,
"CH4",
"CO2", 1.7394895936669404e-05},
80 {300.0,
"H2",
"CO", 7.818547081111362e-05},
81 {300.0,
"CO",
"CO2", 1.58357230065214e-05},
82 {300.0,
"H2O",
"N2", 2.2961566123205863e-05},
83 {300.0,
"H2O",
"H2", 8.662561051685164e-05},
84 {1000.0,
"N2",
"O2", 0.00016508453019480936},
85 {1000.0,
"H2",
"N2", 0.0005928256767875003},
86 {1000.0,
"CH4",
"CO2", 0.00014842228814550512},
87 {1000.0,
"H2",
"CO", 0.0005873361123312881},
88 {1000.0,
"CO",
"CO2", 0.00013074964295438555},
89 {1000.0,
"H2O",
"N2", 0.0002111137941842763},
90 {1000.0,
"H2O",
"H2", 0.000727354808885168},
91 {2500.0,
"N2",
"O2", 0.0007553835721572624},
92 {2500.0,
"H2",
"N2", 0.0027020824913847425},
93 {2500.0,
"CH4",
"CO2", 0.0006888837584287778},
94 {2500.0,
"H2",
"CO", 0.002677091367171154},
95 {2500.0,
"CO",
"CO2", 0.0006031661492209093}};
97 for (
const auto & ref : references)
102 molarMass(ref.species_i),
103 molarMass(ref.species_j),
106 REL_TEST(D, ref.D, ref.species_i ==
"H2O" ? tol_H2O :
tol);
148 const Real h = REL_PERTURBATION *
T;
152 const auto mu = [&lj_N2](
const auto &
T)
154 const auto D = [&lj_H2, &lj_N2](
const auto &
p,
const auto &
T)
157 p,
T, molarMass(
"H2"), molarMass(
"N2"), lj_H2, lj_N2);
160 REL_TEST(
mu(T_ad).derivatives()[0], (
mu(
T + h) -
mu(
T - h)) / (2 * h), REL_TOL_DERIVATIVE);
162 D(p_ad, T_ad).derivatives()[0], (D(
p,
T + h) - D(
p,
T - h)) / (2 * h), REL_TOL_DERIVATIVE);
164 REL_TEST(D(p_ad, T_ad).derivatives()[1], -D(
p,
T) /
p, REL_TOL_CONSISTENCY);
CppType binaryDiffusionCoefficient(const CppType &p, const CppType &T, const Real molar_mass_i, const Real molar_mass_j, const LennardJonesParameters &lj_i, const LennardJonesParameters &lj_j)
Chapman-Enskog binary diffusion coefficient of a dilute gas pair [m^2/s], with the Lorentz-Berthelot ...
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N > > &derivs, libMesh::dof_id_type index, Real value)