85 std::vector<std::string> species_str_list;
86 const unsigned int n_species = 5;
87 species_str_list.reserve(n_species);
88 species_str_list.push_back(
"N2" );
89 species_str_list.push_back(
"O2" );
90 species_str_list.push_back(
"N" );
91 species_str_list.push_back(
"O" );
92 species_str_list.push_back(
"NO" );
94 const Scalar Mm_N = 14.008e-3L;
95 const Scalar Mm_O = 16.000e-3L;
96 const Scalar Mm_N2 = 2.L * Mm_N;
97 const Scalar Mm_O2 = 2.L * Mm_O;
98 const Scalar Mm_NO = Mm_N + Mm_O;
105 const Scalar T1 = 190.0;
106 const Scalar T2 = 1500.0;
107 const Scalar T3 = 10000.0;
109 const Scalar R_N2 = Antioch::Constants::R_universal<Scalar>()/Mm_N2;
110 const Scalar R_O2 = Antioch::Constants::R_universal<Scalar>()/Mm_O2;
111 const Scalar R_N = Antioch::Constants::R_universal<Scalar>()/Mm_N;
112 const Scalar R_O = Antioch::Constants::R_universal<Scalar>()/Mm_O;
113 const Scalar R_NO = Antioch::Constants::R_universal<Scalar>()/Mm_NO;
119 unsigned int index = 0;
120 const Scalar cp_N2_1 = R_N2*
cp( T1, Scalar(2.21037122e+04), Scalar(-3.81846145e+02), Scalar(6.08273815e+00),
121 Scalar(-8.53091381e-03), Scalar(1.38464610e-05), Scalar(-9.62579293e-09), Scalar(2.51970560e-12));
123 const Scalar cp_N2_2 = R_N2*
cp( T2, Scalar(5.87709908e+05), Scalar(-2.23924255e+03), Scalar(6.06694267e+00),
124 Scalar(-6.13965296e-04), Scalar(1.49179819e-07), Scalar(-1.92309442e-11), Scalar(1.06194871e-15) );
126 const Scalar cp_N2_3 = R_N2*
cp( T3, Scalar(8.30971200e+08), Scalar(-6.42048187e+05), Scalar(2.02020507e+02), Scalar(-3.06501961e-02),
127 Scalar(2.48685558e-06), Scalar(-9.70579208e-11), Scalar(1.43751673e-15));
130 const std::string species_name = chem_mixture.species_inverse_name_map().find(species)->second;
132 int return_flag_temp = 0;
133 return_flag_temp =
test_cp( species_name, index, cp_N2_1, T1, thermo );
134 if( return_flag_temp != 0 ) return_flag = 1;
136 return_flag =
test_cp( species_name, index, cp_N2_2, T2, thermo );
137 if( return_flag_temp != 0 ) return_flag = 1;
139 return_flag =
test_cp( species_name, index, cp_N2_3, T3, thermo );
140 if( return_flag_temp != 0 ) return_flag = 1;
145 unsigned int index = 1;
146 const Scalar cp_1 = R_O2*
cp( T1, Scalar(-3.42556269e+04), Scalar(4.84699986e+02), Scalar(1.11901159e+00),
147 Scalar(4.29388743e-03), Scalar(-6.83627313e-07), Scalar(-2.02337478e-09) , Scalar(1.03904064e-12) );
149 const Scalar cp_2 = R_O2*
cp( T2, Scalar(-1.03793994e+06), Scalar(2.34483275e+03), Scalar(1.81972949e+00), Scalar(1.26784887e-03),
150 Scalar(-2.18807142e-07), Scalar(2.05372411e-11), Scalar(-8.19349062e-16) );
152 const Scalar cp_3 = R_O2*
cp( T3, Scalar(4.97515261e+08), Scalar(-2.86602339e+05), Scalar(6.69015464e+01), Scalar(-6.16971869e-03),
153 Scalar(3.01623757e-07), Scalar(-7.42087888e-12), Scalar(7.27744063e-17));
156 const std::string species_name = chem_mixture.species_inverse_name_map().find(species)->second;
158 int return_flag_temp = 0;
159 return_flag_temp =
test_cp( species_name, index, cp_1, T1, thermo );
160 if( return_flag_temp != 0 ) return_flag = 1;
162 return_flag =
test_cp( species_name, index, cp_2, T2, thermo );
163 if( return_flag_temp != 0 ) return_flag = 1;
165 return_flag =
test_cp( species_name, index, cp_3, T3, thermo );
166 if( return_flag_temp != 0 ) return_flag = 1;
171 unsigned int index = 2;
172 const Scalar cp_1 = R_N*
cp( T1, Scalar(0.00000000e+00), Scalar(0.00000000e+00), Scalar(2.50000000e+00), Scalar(0.00000000e+00),
173 Scalar(0.00000000e+00), Scalar(0.00000000e+00), Scalar(0.00000000e+00));
175 const Scalar cp_2 = R_N*
cp( T2, Scalar(8.87650138e+04), Scalar(-1.07123150e+02), Scalar(2.36218829e+00), Scalar(2.91672008e-04),
176 Scalar(-1.72951510e-07), Scalar(4.01265788e-11), Scalar(-2.67722757e-15) );
178 const Scalar cp_3 = R_N*
cp( T3, Scalar(5.47518105e+08), Scalar(-3.10757498e+05), Scalar(6.91678274e+01), Scalar(-6.84798813e-03),
179 Scalar(3.82757240e-07), Scalar(-1.09836771e-11), Scalar(1.27798602e-16));
182 const std::string species_name = chem_mixture.species_inverse_name_map().find(species)->second;
184 int return_flag_temp = 0;
185 return_flag_temp =
test_cp( species_name, index, cp_1, T1, thermo );
186 if( return_flag_temp != 0 ) return_flag = 1;
188 return_flag =
test_cp( species_name, index, cp_2, T2, thermo );
189 if( return_flag_temp != 0 ) return_flag = 1;
191 return_flag =
test_cp( species_name, index, cp_3, T3, thermo );
192 if( return_flag_temp != 0 ) return_flag = 1;
198 unsigned int index = 3;
199 const Scalar cp_1 = R_O*
cp( T1, Scalar(-7.95361130e+03) , Scalar(1.60717779e+02), Scalar(1.96622644e+00), Scalar(1.01367031e-03),
200 Scalar(-1.11041542e-06), Scalar(6.51750750e-10), Scalar(-1.58477925e-13) );
202 const Scalar cp_2 = R_O*
cp( T2, Scalar(2.61902026e+05), Scalar(-7.29872203e+02), Scalar(3.31717727e+00), Scalar(-4.28133436e-04),
203 Scalar(1.03610459e-07), Scalar(-9.43830433e-12), Scalar(2.72503830e-16) );
205 const Scalar cp_3 = R_O*
cp( T3, Scalar(1.77900426e+08), Scalar(-1.08232826e+05), Scalar(2.81077837e+01), Scalar(-2.97523226e-03),
206 Scalar(1.85499753e-07), Scalar(-5.79623154e-12), Scalar(7.19172016e-17) );
209 const std::string species_name = chem_mixture.species_inverse_name_map().find(species)->second;
211 int return_flag_temp = 0;
212 return_flag_temp =
test_cp( species_name, index, cp_1, T1, thermo );
213 if( return_flag_temp != 0 ) return_flag = 1;
215 return_flag =
test_cp( species_name, index, cp_2, T2, thermo );
216 if( return_flag_temp != 0 ) return_flag = 1;
218 return_flag =
test_cp( species_name, index, cp_3, T3, thermo );
219 if( return_flag_temp != 0 ) return_flag = 1;
225 unsigned int index = 4;
226 const Scalar cp_1 = R_NO*
cp( T1, Scalar(-1.14391658e+04), Scalar(1.53646774e+02), Scalar(3.43146865e+00), Scalar(-2.66859213e-03),
227 Scalar(8.48139877e-06), Scalar(-7.68511079e-09), Scalar(2.38679758e-12) );
229 const Scalar cp_2 = R_NO*
cp( T2, Scalar(2.23903708e+05), Scalar(-1.28965624e+03), Scalar(5.43394039e+00), Scalar(-3.65605546e-04),
230 Scalar(9.88101763e-08), Scalar(-1.41608327e-11), Scalar(9.38021642e-16) );
232 const Scalar cp_3 = R_NO*
cp( T3, Scalar(-9.57530764e+08), Scalar(5.91243671e+05), Scalar(-1.38456733e+02), Scalar(1.69433998e-02),
233 Scalar(-1.00735146e-06), Scalar(2.91258526e-11), Scalar(-3.29511091e-16) );
236 const std::string species_name = chem_mixture.species_inverse_name_map().find(species)->second;
238 int return_flag_temp = 0;
239 return_flag_temp =
test_cp( species_name, index, cp_1, T1, thermo );
240 if( return_flag_temp != 0 ) return_flag = 1;
242 return_flag =
test_cp( species_name, index, cp_2, T2, thermo );
243 if( return_flag_temp != 0 ) return_flag = 1;
245 return_flag =
test_cp( species_name, index, cp_3, T3, thermo );
246 if( return_flag_temp != 0 ) return_flag = 1;
Scalar cp(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6)
int test_cp(const std::string &species_name, unsigned int species, Scalar cp_exact, Scalar T, const Antioch::CEAThermodynamics< Scalar > &thermo)
Class storing chemical mixture properties.