44 const unsigned int N_index = chem_mixture.species_index(
"N");
45 const unsigned int C_index = chem_mixture.species_index(
"C");
46 const unsigned int CN_index = chem_mixture.species_index(
"CN");
48 const double gamma = 0.03;
54 const double w_s = 0.2;
56 const double rho = 1.0e-3;
57 const double rho_s = rho*w_s;
59 const double T = 620.1;
60 const double R_N = chem_mixture.R( chem_mixture.species_index(
"N") );
62 const double R = 30.1;
66 const double drho_dws = -rho*rho_s/R;
70 const double mdot_C_exact = -omega_dot_exact*chem_mixture.M( chem_mixture.species_index(
"C") )/chem_mixture.M( chem_mixture.species_index(
"N") );
72 const double mdot_CN_exact = omega_dot_exact*chem_mixture.M( chem_mixture.species_index(
"CN") )/chem_mixture.M( chem_mixture.species_index(
"N") );
76 const double omega_dot_N = wall.omega_dot( rho_s, T );
78 const double domega_dot_dT_N = wall.domega_dot_dT( rho_s, T );
80 const double domega_dot_dws_N = wall.domega_dot_dws( rho_s, w_s, T, R );
82 const double mdot_N = wall.compute_reactant_gas_mass_flux( rho, w_s, T );
84 const double mdot_C = wall.compute_reactant_solid_mass_consumption( rho, w_s, T );
86 const double mdot_CN = wall.compute_product_mass_flux( rho, w_s, T );
88 const double tol = 1.0e-15;
92 double rel_error = std::fabs( (omega_dot_N - omega_dot_exact)/omega_dot_exact );
96 std::cerr << std::setprecision(16) << std::scientific
97 <<
"Mismatch in omega_dot_N!" << std::endl
98 <<
"omega_dot_N = " << omega_dot_N << std::endl
99 <<
"omega_dot_exact = " << omega_dot_exact << std::endl
100 <<
"rel error = " << rel_error << std::endl;
108 double rel_error = std::fabs( (domega_dot_dT_N - domega_dot_dT_exact)/domega_dot_dT_exact );
110 if( rel_error > tol )
112 std::cerr << std::setprecision(16) << std::scientific
113 <<
"Mismatch in domega_dot_dT_N!" << std::endl
114 <<
"domega_dot_dT_N = " << domega_dot_dT_N << std::endl
115 <<
"domega_dot_dT_exact = " << domega_dot_dT_exact << std::endl
116 <<
"rel error = " << rel_error << std::endl;
124 double rel_error = std::fabs( (domega_dot_dws_N - domega_dot_dws_exact)/domega_dot_dws_exact );
126 if( rel_error > tol )
128 std::cerr << std::setprecision(16) << std::scientific
129 <<
"Mismatch in domega_dot_dws_N!" << std::endl
130 <<
"domega_dot_dws_N = " << domega_dot_dws_N << std::endl
131 <<
"domega_dot_dws_exact = " << domega_dot_dws_exact << std::endl
132 <<
"rel error = " << rel_error << std::endl;
140 double rel_error = std::fabs( (mdot_N-(-omega_dot_exact))/(-omega_dot_exact) );
142 if( rel_error > tol )
144 std::cerr << std::setprecision(16) << std::scientific
145 <<
"Mismatch in mdot_N!" << std::endl
146 <<
"mdot_N = " << mdot_N << std::endl
147 <<
"mdot_N_exact = " << -omega_dot_exact << std::endl
148 <<
"rel error = " << rel_error << std::endl;
156 double rel_error = std::fabs( (mdot_C - mdot_C_exact)/mdot_C_exact );
158 if( rel_error > tol )
160 std::cerr << std::setprecision(16) << std::scientific
161 <<
"Mismatch in mdot_C!" << std::endl
162 <<
"mdot_C = " << mdot_C << std::endl
163 <<
"mdot_C_exact = " << mdot_C_exact << std::endl
164 <<
"rel error = " << rel_error << std::endl;
172 double rel_error = std::fabs( (mdot_CN - mdot_CN_exact)/mdot_CN_exact );
174 if( rel_error > tol )
176 std::cerr << std::setprecision(16) << std::scientific
177 <<
"Mismatch in mdot_CN!" << std::endl
178 <<
"mdot_CN = " << mdot_CN << std::endl
179 <<
"mdot_CN_exact = " << mdot_CN_exact << std::endl
180 <<
"rel error = " << rel_error << std::endl;
const libMesh::Real two_pi