45 const unsigned int N_index = chem_mixture.species_index(
"N");
46 const unsigned int C_index = chem_mixture.species_index(
"C");
47 const unsigned int CN_index = chem_mixture.species_index(
"CN");
49 const double gamma = 0.03;
55 const double w_s = 0.2;
57 const double rho = 1.0e-3;
58 const double rho_s = rho*w_s;
60 const double T = 620.1;
61 const double R_N = chem_mixture.R( chem_mixture.species_index(
"N") );
63 const double R = 30.1;
67 const double drho_dws = -rho*rho_s/R;
71 const double mdot_C_exact = -omega_dot_exact*chem_mixture.M( chem_mixture.species_index(
"C") )/chem_mixture.M( chem_mixture.species_index(
"N") );
73 const double mdot_CN_exact = omega_dot_exact*chem_mixture.M( chem_mixture.species_index(
"CN") )/chem_mixture.M( chem_mixture.species_index(
"N") );
77 const double omega_dot_N = wall.omega_dot( rho_s, T );
79 const double domega_dot_dT_N = wall.domega_dot_dT( rho_s, T );
81 const double domega_dot_dws_N = wall.domega_dot_dws( rho_s, w_s, T, R );
83 const double mdot_N = wall.compute_reactant_gas_mass_flux( rho, w_s, T );
85 const double mdot_C = wall.compute_reactant_solid_mass_consumption( rho, w_s, T );
87 const double mdot_CN = wall.compute_product_mass_flux( rho, w_s, T );
89 const double tol = 1.0e-15;
93 double rel_error = std::fabs( (omega_dot_N - omega_dot_exact)/omega_dot_exact );
97 std::cerr << std::setprecision(16) << std::scientific
98 <<
"Mismatch in omega_dot_N!" << std::endl
99 <<
"omega_dot_N = " << omega_dot_N << std::endl
100 <<
"omega_dot_exact = " << omega_dot_exact << std::endl
101 <<
"rel error = " << rel_error << std::endl;
109 double rel_error = std::fabs( (domega_dot_dT_N - domega_dot_dT_exact)/domega_dot_dT_exact );
111 if( rel_error > tol )
113 std::cerr << std::setprecision(16) << std::scientific
114 <<
"Mismatch in domega_dot_dT_N!" << std::endl
115 <<
"domega_dot_dT_N = " << domega_dot_dT_N << std::endl
116 <<
"domega_dot_dT_exact = " << domega_dot_dT_exact << std::endl
117 <<
"rel error = " << rel_error << std::endl;
125 double rel_error = std::fabs( (domega_dot_dws_N - domega_dot_dws_exact)/domega_dot_dws_exact );
127 if( rel_error > tol )
129 std::cerr << std::setprecision(16) << std::scientific
130 <<
"Mismatch in domega_dot_dws_N!" << std::endl
131 <<
"domega_dot_dws_N = " << domega_dot_dws_N << std::endl
132 <<
"domega_dot_dws_exact = " << domega_dot_dws_exact << std::endl
133 <<
"rel error = " << rel_error << std::endl;
141 double rel_error = std::fabs( (mdot_N-(-omega_dot_exact))/(-omega_dot_exact) );
143 if( rel_error > tol )
145 std::cerr << std::setprecision(16) << std::scientific
146 <<
"Mismatch in mdot_N!" << std::endl
147 <<
"mdot_N = " << mdot_N << std::endl
148 <<
"mdot_N_exact = " << -omega_dot_exact << std::endl
149 <<
"rel error = " << rel_error << std::endl;
157 double rel_error = std::fabs( (mdot_C - mdot_C_exact)/mdot_C_exact );
159 if( rel_error > tol )
161 std::cerr << std::setprecision(16) << std::scientific
162 <<
"Mismatch in mdot_C!" << std::endl
163 <<
"mdot_C = " << mdot_C << std::endl
164 <<
"mdot_C_exact = " << mdot_C_exact << std::endl
165 <<
"rel error = " << rel_error << std::endl;
173 double rel_error = std::fabs( (mdot_CN - mdot_CN_exact)/mdot_CN_exact );
175 if( rel_error > tol )
177 std::cerr << std::setprecision(16) << std::scientific
178 <<
"Mismatch in mdot_CN!" << std::endl
179 <<
"mdot_CN = " << mdot_CN << std::endl
180 <<
"mdot_CN_exact = " << mdot_CN_exact << std::endl
181 <<
"rel error = " << rel_error << std::endl;
const libMesh::Real two_pi