From ee591a840659fe39fa0f2c5db5c8e47b94599eb4 Mon Sep 17 00:00:00 2001 From: Sylvain Plessis Date: Tue, 25 Aug 2015 19:45:34 +0200 Subject: [PATCH] Bugfix for the ChemKin parser, the high values for thermo are given first Correct orders of coefficients in test for thermo in ChemKin input file --- src/parsing/include/antioch/chemkin_parser.h | 5 +++-- test/nasa_evaluator_unit.C | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/parsing/include/antioch/chemkin_parser.h b/src/parsing/include/antioch/chemkin_parser.h index dcbd0682..7f280b78 100644 --- a/src/parsing/include/antioch/chemkin_parser.h +++ b/src/parsing/include/antioch/chemkin_parser.h @@ -1334,11 +1334,12 @@ namespace Antioch{ >> temps[0] >> temps[2] >> temps[1]; - for(unsigned int i = 0; i < 14; i++) + coeffs.resize(14,0); + for(unsigned int i = 7; i < 21; i++) { NumericType a; tmp >> a; - coeffs.push_back(a); + coeffs[i%14] = a; } // If we are still good, we have a valid set of thermodynamic diff --git a/test/nasa_evaluator_unit.C b/test/nasa_evaluator_unit.C index 5481963a..d5f169e9 100644 --- a/test/nasa_evaluator_unit.C +++ b/test/nasa_evaluator_unit.C @@ -294,25 +294,25 @@ int tester(const std::string & nasa_filename) const Scalar cea_H2_a3[10] = { 4.96671613e+08, -3.14744812e+05, 7.98388750e+01, -8.41450419e-03, 4.75306044e-07, -1.37180973e-11, 1.60537460e-16, 0.00000000e+00, 2.48835466e+06, -6.69552419e+02}; - const Scalar nasa_N2_a1[7] = { 0.02926640E+02, 0.14879768E-02, -0.05684760E-05, 0.10097038E-09, -0.06753351E-13, + const Scalar nasa_N2_a2[7] = { 0.02926640E+02, 0.14879768E-02, -0.05684760E-05, 0.10097038E-09, -0.06753351E-13, -0.09227977E+04, 0.05980528E+02}; - const Scalar nasa_N2_a2[7] = { 0.03298677E+02, 0.14082404E-02, -0.03963222E-04, 0.05641515E-07, -0.02444854E-10, + const Scalar nasa_N2_a1[7] = { 0.03298677E+02, 0.14082404E-02, -0.03963222E-04, 0.05641515E-07, -0.02444854E-10, -0.10208999E+04, 0.03950372E+02}; - const Scalar nasa_O2_a1[7] = { 3.28253784E+00, 1.48308754E-03, -7.57966669E-07, 2.09470555E-10, -2.16717794E-14, + const Scalar nasa_O2_a2[7] = { 3.28253784E+00, 1.48308754E-03, -7.57966669E-07, 2.09470555E-10, -2.16717794E-14, -1.08845772E+03, 5.45323129E+00}; - const Scalar nasa_O2_a2[7] = { 3.78245636E+00, -2.99673416E-03, 9.84730201E-06, -9.68129509E-09, 3.24372837E-12, + const Scalar nasa_O2_a1[7] = { 3.78245636E+00, -2.99673416E-03, 9.84730201E-06, -9.68129509E-09, 3.24372837E-12, -1.06394356E+03, 3.65767573E+00}; - const Scalar nasa_OH_a1[7] = { 3.09288767E+00, 5.48429716E-04, 1.26505228E-07, -8.79461556E-11, 1.17412376E-14, + const Scalar nasa_OH_a2[7] = { 3.09288767E+00, 5.48429716E-04, 1.26505228E-07, -8.79461556E-11, 1.17412376E-14, 3.85865700E+03, 4.47669610E+00}; - const Scalar nasa_OH_a2[7] = { 3.99201543E+00, -2.40131752E-03, 4.61793841E-06, -3.88113333E-09, 1.36411470E-12, + const Scalar nasa_OH_a1[7] = { 3.99201543E+00, -2.40131752E-03, 4.61793841E-06, -3.88113333E-09, 1.36411470E-12, 3.61508056E+03, -1.03925458E-01}; - const Scalar nasa_O_a1[7] = { 2.56942078E+00, -8.59741137E-05, 4.19484589E-08, -1.00177799E-11, 1.22833691E-15, + const Scalar nasa_O_a2[7] = { 2.56942078E+00, -8.59741137E-05, 4.19484589E-08, -1.00177799E-11, 1.22833691E-15, 2.92175791E+04, 4.78433864E+00}; - const Scalar nasa_O_a2[7] = { 3.16826710E+00, -3.27931884E-03, 6.64306396E-06, -6.12806624E-09, 2.11265971E-12, + const Scalar nasa_O_a1[7] = { 3.16826710E+00, -3.27931884E-03, 6.64306396E-06, -6.12806624E-09, 2.11265971E-12, 2.91222592E+04, 2.05193346E+00}; - const Scalar nasa_H2_a1[7] = { 3.33727920E+00, -4.94024731E-05, 4.99456778E-07, -1.79566394E-10, 2.00255376E-14, + const Scalar nasa_H2_a2[7] = { 3.33727920E+00, -4.94024731E-05, 4.99456778E-07, -1.79566394E-10, 2.00255376E-14, -9.50158922E+02, -3.20502331E+00}; - const Scalar nasa_H2_a2[7] = { 2.34433112E+00, 7.98052075E-03, -1.94781510E-05, 2.01572094E-08, -7.37611761E-12, + const Scalar nasa_H2_a1[7] = { 2.34433112E+00, 7.98052075E-03, -1.94781510E-05, 2.01572094E-08, -7.37611761E-12, -9.17935173E+02, 6.83010238E-01}; int return_flag = 0;