antioch-0.4.0
List of all members | Public Member Functions | Protected Attributes
AntiochTesting::NASA9XMLParsingTestDouble Class Reference
Inheritance diagram for AntiochTesting::NASA9XMLParsingTestDouble:
AntiochTesting::NASA9XMLParsingTest< double > AntiochTesting::NASA9ThermoTestBase< double >

Public Member Functions

 CPPUNIT_TEST_SUITE (NASA9XMLParsingTestDouble)
 
 CPPUNIT_TEST (test_supplied_species)
 
 CPPUNIT_TEST_SUITE_END ()
 
void test_supplied_species ()
 
void check_coefficients (const double *parsed_coeffs, std::vector< double > &exact_coeffs)
 
double tol ()
 
void setUp ()
 
void tearDown ()
 
void init_N2_coeffs_0_200 ()
 
void init_N2_coeffs_200_1000 ()
 
void init_N2_coeffs_1000_6000 ()
 
void init_N2_coeffs_6000_20000 ()
 
void init_N2_coeffs_20000_99999 ()
 
void init_all_N2_coeffs ()
 
void init_NO2_coeffs_0_200 ()
 
void init_NO2_coeffs_200_1000 ()
 
void init_NO2_coeffs_1000_6000 ()
 
void init_NO2_coeffs_6000_99999 ()
 
void init_all_NO2_coeffs ()
 

Protected Attributes

std::vector< double > _N2_coeffs_0_200
 
std::vector< double > _N2_coeffs_200_1000
 
std::vector< double > _N2_coeffs_1000_6000
 
std::vector< double > _N2_coeffs_6000_20000
 
std::vector< double > _N2_coeffs_20000_99999
 
std::vector< double > _NO2_coeffs_0_200
 
std::vector< double > _NO2_coeffs_200_1000
 
std::vector< double > _NO2_coeffs_1000_6000
 
std::vector< double > _NO2_coeffs_6000_99999
 
std::vector< double > _all_standard_N2_coeffs
 
std::vector< double > _all_standard_NO2_coeffs
 

Detailed Description

Definition at line 173 of file nasa_mixture_xml_parsing_test.C.

Member Function Documentation

void AntiochTesting::NASA9XMLParsingTest< double >::check_coefficients ( const double *  parsed_coeffs,
std::vector< double > &  exact_coeffs 
)
inlineinherited

Definition at line 84 of file nasa_mixture_xml_parsing_test.C.

85  {
86  for( unsigned int c = 0; c < exact_coeffs.size(); c++ )
87  CPPUNIT_ASSERT_DOUBLES_EQUAL( exact_coeffs[c], parsed_coeffs[c], this->tol() );
88  }
AntiochTesting::NASA9XMLParsingTestDouble::CPPUNIT_TEST ( test_supplied_species  )
AntiochTesting::NASA9XMLParsingTestDouble::CPPUNIT_TEST_SUITE ( NASA9XMLParsingTestDouble  )
AntiochTesting::NASA9XMLParsingTestDouble::CPPUNIT_TEST_SUITE_END ( )
void AntiochTesting::NASA9ThermoTestBase< double >::init_all_N2_coeffs ( )
inlineinherited

Definition at line 121 of file nasa9_thermo_test_base.h.

void AntiochTesting::NASA9ThermoTestBase< double >::init_all_NO2_coeffs ( )
inlineinherited

Definition at line 180 of file nasa9_thermo_test_base.h.

void AntiochTesting::NASA9ThermoTestBase< double >::init_N2_coeffs_0_200 ( )
inlineinherited

Definition at line 63 of file nasa9_thermo_test_base.h.

64  {
65  _N2_coeffs_0_200.resize(9,0.0L);
66  _N2_coeffs_0_200[2] = 3.50080109e+00L;
67  _N2_coeffs_0_200[7] = -1.04381074e+03L;
68  _N2_coeffs_0_200[8] = 3.09890983e+00L;
69  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_N2_coeffs_1000_6000 ( )
inlineinherited

Definition at line 85 of file nasa9_thermo_test_base.h.

86  {
87  _N2_coeffs_1000_6000.resize(9);
88  _N2_coeffs_1000_6000[0] = 5.87709908e+05L;
89  _N2_coeffs_1000_6000[1] = -2.23924255e+03L;
90  _N2_coeffs_1000_6000[2] = 6.06694267e+00L;
91  _N2_coeffs_1000_6000[3] = -6.13965296e-04L;
92  _N2_coeffs_1000_6000[4] = 1.49179819e-07L;
93  _N2_coeffs_1000_6000[5] = -1.92309442e-11L;
94  _N2_coeffs_1000_6000[6] = 1.06194871e-15L;
95  _N2_coeffs_1000_6000[7] = 1.28320618e+04L;
96  _N2_coeffs_1000_6000[8] = -1.58663484e+01L;
97  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_N2_coeffs_20000_99999 ( )
inlineinherited

Definition at line 113 of file nasa9_thermo_test_base.h.

114  {
115  _N2_coeffs_20000_99999.resize(9,0.0L);
116  _N2_coeffs_20000_99999[2] = 7.27314605e+00L;
117  _N2_coeffs_20000_99999[7] = -2.73414039e+04L;
118  _N2_coeffs_20000_99999[8] = -2.92594085e+01L;
119  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_N2_coeffs_200_1000 ( )
inlineinherited

Definition at line 71 of file nasa9_thermo_test_base.h.

72  {
73  _N2_coeffs_200_1000.resize(9);
74  _N2_coeffs_200_1000[0] = 2.21037122e+04L;
75  _N2_coeffs_200_1000[1] = -3.81846145e+02L;
76  _N2_coeffs_200_1000[2] = 6.08273815e+00L;
77  _N2_coeffs_200_1000[3] = -8.53091381e-03L;
78  _N2_coeffs_200_1000[4] = 1.38464610e-05L;
79  _N2_coeffs_200_1000[5] = -9.62579293e-09L;
80  _N2_coeffs_200_1000[6] = 2.51970560e-12L;
81  _N2_coeffs_200_1000[7] = 7.10845911e+02L;
82  _N2_coeffs_200_1000[8] = -1.07600320e+01L;
83  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_N2_coeffs_6000_20000 ( )
inlineinherited

Definition at line 99 of file nasa9_thermo_test_base.h.

100  {
101  _N2_coeffs_6000_20000.resize(9);
102  _N2_coeffs_6000_20000[0] = 8.30971200e+08L;
103  _N2_coeffs_6000_20000[1] = -6.42048187e+05L;
104  _N2_coeffs_6000_20000[2] = 2.02020507e+02L;
105  _N2_coeffs_6000_20000[3] = -3.06501961e-02L;
106  _N2_coeffs_6000_20000[4] = 2.48685558e-06L;
107  _N2_coeffs_6000_20000[5] = -9.70579208e-11L;
108  _N2_coeffs_6000_20000[6] = 1.43751673e-15L;
109  _N2_coeffs_6000_20000[7] = 4.93850663e+06L;
110  _N2_coeffs_6000_20000[8] = -1.67204791e+03L;
111  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_NO2_coeffs_0_200 ( )
inlineinherited

Definition at line 136 of file nasa9_thermo_test_base.h.

137  {
138  _NO2_coeffs_0_200.resize(9,0.0L);
139  _NO2_coeffs_0_200[2] = 4.14754156e+00L;
140  _NO2_coeffs_0_200[7] = 2.86078945e+03L;
141  _NO2_coeffs_0_200[8] = 5.19771055e+00L;
142  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_NO2_coeffs_1000_6000 ( )
inlineinherited

Definition at line 158 of file nasa9_thermo_test_base.h.

159  {
160  _NO2_coeffs_1000_6000.resize(9);
161  _NO2_coeffs_1000_6000[0] = 7.21271176e+05L;
162  _NO2_coeffs_1000_6000[1] = -3.83253763e+03L;
163  _NO2_coeffs_1000_6000[2] = 1.11395534e+01L;
164  _NO2_coeffs_1000_6000[3] = -2.23801440e-03L;
165  _NO2_coeffs_1000_6000[4] = 6.54762164e-07L;
166  _NO2_coeffs_1000_6000[5] = -7.61120803e-11L;
167  _NO2_coeffs_1000_6000[6] = 3.32829926e-15L;
168  _NO2_coeffs_1000_6000[7] = 2.50244718e+04L;
169  _NO2_coeffs_1000_6000[8] = -4.30507224e+01L;
170  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_NO2_coeffs_200_1000 ( )
inlineinherited

Definition at line 144 of file nasa9_thermo_test_base.h.

145  {
146  _NO2_coeffs_200_1000.resize(9);
147  _NO2_coeffs_200_1000[0] = -5.64204584e+04L;
148  _NO2_coeffs_200_1000[1] = 9.63309734e+02L;
149  _NO2_coeffs_200_1000[2] = -2.43451851e+00L;
150  _NO2_coeffs_200_1000[3] = 1.92776414e-02L;
151  _NO2_coeffs_200_1000[4] = -1.87456362e-05L;
152  _NO2_coeffs_200_1000[5] = 9.14553637e-09L;
153  _NO2_coeffs_200_1000[6] = -1.77766146e-12L;
154  _NO2_coeffs_200_1000[7] = -1.54793043e+03L;
155  _NO2_coeffs_200_1000[8] = 4.06785541e+01L;
156  }
void AntiochTesting::NASA9ThermoTestBase< double >::init_NO2_coeffs_6000_99999 ( )
inlineinherited

Definition at line 172 of file nasa9_thermo_test_base.h.

173  {
174  _NO2_coeffs_6000_99999.resize(9,0.0L);
175  _NO2_coeffs_6000_99999[2] = 1.51725546e+02L;
176  _NO2_coeffs_6000_99999[7] = -2.44062907e+06L;
177  _NO2_coeffs_6000_99999[8] = -1.41879306e+03L;
178  }
void AntiochTesting::NASA9ThermoTestBase< double >::setUp ( )
inlineinherited

Definition at line 45 of file nasa9_thermo_test_base.h.

46  {
47  this->init_N2_coeffs_0_200();
52  this->init_all_N2_coeffs();
53 
54  this->init_NO2_coeffs_0_200();
58  this->init_all_NO2_coeffs();
59  }
void AntiochTesting::NASA9ThermoTestBase< double >::tearDown ( )
inlineinherited

Definition at line 61 of file nasa9_thermo_test_base.h.

61 {}
void AntiochTesting::NASA9XMLParsingTest< double >::test_supplied_species ( )
inlineinherited

Definition at line 51 of file nasa_mixture_xml_parsing_test.C.

52  {
53  std::vector<std::string> species_str_list(2);
54  species_str_list[0] = "N2";
55  species_str_list[1] = "NO2";
56 
57  Antioch::ChemicalMixture<Scalar> chem_mixture( species_str_list );
59 
60  std::string filename = std::string(ANTIOCH_SHARE_XML_INPUT_FILES_SOURCE_PATH)+"nasa9_thermo.xml";
61 
62  Antioch::read_nasa_mixture_data( nasa_mixture, filename, Antioch::XML );
63 
64  const Antioch::NASA9CurveFit<Scalar>& N2_curve_fit = nasa_mixture.curve_fit(0);
65  const Antioch::NASA9CurveFit<Scalar>& NO2_curve_fit = nasa_mixture.curve_fit(1);
66 
67  CPPUNIT_ASSERT_EQUAL( (unsigned int)5, N2_curve_fit.n_intervals() );
68  CPPUNIT_ASSERT_EQUAL( (unsigned int)4, NO2_curve_fit.n_intervals() );
69 
70  // Check N2 coefficients
71  this->check_coefficients( N2_curve_fit.coefficients(0), this->_N2_coeffs_0_200 );
72  this->check_coefficients( N2_curve_fit.coefficients(1), this->_N2_coeffs_200_1000 );
73  this->check_coefficients( N2_curve_fit.coefficients(2), this->_N2_coeffs_1000_6000 );
74  this->check_coefficients( N2_curve_fit.coefficients(3), this->_N2_coeffs_6000_20000 );
75  this->check_coefficients( N2_curve_fit.coefficients(4), this->_N2_coeffs_20000_99999 );
76 
77  // Check NO2 coefficients
78  this->check_coefficients( NO2_curve_fit.coefficients(0), this->_NO2_coeffs_0_200 );
79  this->check_coefficients( NO2_curve_fit.coefficients(1), this->_NO2_coeffs_200_1000 );
80  this->check_coefficients( NO2_curve_fit.coefficients(2), this->_NO2_coeffs_1000_6000 );
81  this->check_coefficients( NO2_curve_fit.coefficients(3), this->_NO2_coeffs_6000_99999 );
82  }
const CoeffType * coefficients(const unsigned int interval) const
The ordering/packing of the coefficients will depend on the subclass.
void read_nasa_mixture_data(NASAThermoMixture< NumericType, CurveType > &thermo, const std::string &filename=DefaultSourceFilename::thermo_data(), ParsingType=ASCII, bool verbose=true)
This class stores the NASA polynomial fit to the thermodynamics quantities and .
Definition: ascii_parser.h:68
void check_coefficients(const double *parsed_coeffs, std::vector< double > &exact_coeffs)
Class storing chemical mixture properties.
unsigned int n_intervals() const
The number of intervals for this NASA9 curve fit.
double AntiochTesting::NASA9XMLParsingTest< double >::tol ( )
inlineinherited

Definition at line 90 of file nasa_mixture_xml_parsing_test.C.

91  { return std::numeric_limits<Scalar>::epsilon() * 10; }

Member Data Documentation

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_all_standard_N2_coeffs
protectedinherited

Definition at line 205 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_all_standard_NO2_coeffs
protectedinherited

Definition at line 206 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_N2_coeffs_0_200
protectedinherited

Definition at line 193 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_N2_coeffs_1000_6000
protectedinherited

Definition at line 195 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_N2_coeffs_20000_99999
protectedinherited

Definition at line 197 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_N2_coeffs_200_1000
protectedinherited

Definition at line 194 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_N2_coeffs_6000_20000
protectedinherited

Definition at line 196 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_NO2_coeffs_0_200
protectedinherited

Definition at line 199 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_NO2_coeffs_1000_6000
protectedinherited

Definition at line 201 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_NO2_coeffs_200_1000
protectedinherited

Definition at line 200 of file nasa9_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA9ThermoTestBase< double >::_NO2_coeffs_6000_99999
protectedinherited

Definition at line 202 of file nasa9_thermo_test_base.h.


The documentation for this class was generated from the following file:

Generated on Thu Jul 7 2016 11:09:52 for antioch-0.4.0 by  doxygen 1.8.8