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

Public Member Functions

 CPPUNIT_TEST_SUITE (NASA9CurveFitTestDouble)
 
 CPPUNIT_TEST (test_nasa9_default_temp_intervals)
 
 CPPUNIT_TEST (test_nasa9_user_specified_temp_intervals)
 
 CPPUNIT_TEST_SUITE_END ()
 
void test_nasa9_default_temp_intervals ()
 
void test_nasa9_user_specified_temp_intervals ()
 
void three_interval_test (const Antioch::NASA9CurveFit< double > &curve_fit)
 
void two_interval_test (const Antioch::NASA9CurveFit< double > &curve_fit)
 
void test_cp (doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
 
void test_h (doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
 
void test_s (doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
 
double tol ()
 
double cp_exact (doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5, doublea6)
 
double h_exact (doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5, doublea6, doublea7)
 
double s_exact (doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5, doublea6, doublea8)
 
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 208 of file nasa9_curve_fit_test.C.

Member Function Documentation

double AntiochTesting::NASA9CurveFitTest< double >::cp_exact ( double  T,
double  a0,
double  a1,
double  a2,
double  a3,
double  a4,
double  a5,
double  a6 
)
inlineinherited

Definition at line 172 of file nasa9_curve_fit_test.C.

174  {
175  return a0/(T*T) + a1/T + a2 + a3*T + a4*(T*T) + a5*(T*T*T) + a6*(T*T*T*T);
176  }
AntiochTesting::NASA9CurveFitTestDouble::CPPUNIT_TEST ( test_nasa9_default_temp_intervals  )
AntiochTesting::NASA9CurveFitTestDouble::CPPUNIT_TEST ( test_nasa9_user_specified_temp_intervals  )
AntiochTesting::NASA9CurveFitTestDouble::CPPUNIT_TEST_SUITE ( NASA9CurveFitTestDouble  )
AntiochTesting::NASA9CurveFitTestDouble::CPPUNIT_TEST_SUITE_END ( )
double AntiochTesting::NASA9CurveFitTest< double >::h_exact ( double  T,
double  a0,
double  a1,
double  a2,
double  a3,
double  a4,
double  a5,
double  a6,
double  a7 
)
inlineinherited

Definition at line 178 of file nasa9_curve_fit_test.C.

181  {
182  return -a0/(T*T) + a1*std::log(T)/T + a2 + a3*T/2.0L + a4*(T*T)/3.0L
183  + a5*(T*T*T)/4.0L + a6*(T*T*T*T)/5.0L + a7/T;
184  }
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  }
double AntiochTesting::NASA9CurveFitTest< double >::s_exact ( double  T,
double  a0,
double  a1,
double  a2,
double  a3,
double  a4,
double  a5,
double  a6,
double  a8 
)
inlineinherited

Definition at line 186 of file nasa9_curve_fit_test.C.

189  {
190  return -a0/(2.L*T*T) - a1/T + a2*std::log(T) + a3*T + a4*(T*T)/2.0L
191  + a5*(T*T*T)/3.0L + a6*(T*T*T*T)/4.0L + a8;
192  }
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::NASA9CurveFitTest< double >::test_cp ( double  T,
const std::vector< double > &  exact_coeffs,
const Antioch::NASA9CurveFit< double > &  curve_fit 
)
inlineinherited

Definition at line 116 of file nasa9_curve_fit_test.C.

119  {
121  Scalar cp = this->cp_exact( T,
122  exact_coeffs[0],
123  exact_coeffs[1],
124  exact_coeffs[2],
125  exact_coeffs[3],
126  exact_coeffs[4],
127  exact_coeffs[5],
128  exact_coeffs[6] );
129 
130  CPPUNIT_ASSERT_DOUBLES_EQUAL( cp, curve_fit.cp_over_R(cache), this->tol() );
131  }
const StateType cp_over_R(const TempCache< StateType > &cache) const
Scalar cp(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6)
double cp_exact(doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5, doublea6)
void AntiochTesting::NASA9CurveFitTest< double >::test_h ( double  T,
const std::vector< double > &  exact_coeffs,
const Antioch::NASA9CurveFit< double > &  curve_fit 
)
inlineinherited

Definition at line 133 of file nasa9_curve_fit_test.C.

136  {
138  Scalar h = this->h_exact( T,
139  exact_coeffs[0],
140  exact_coeffs[1],
141  exact_coeffs[2],
142  exact_coeffs[3],
143  exact_coeffs[4],
144  exact_coeffs[5],
145  exact_coeffs[6],
146  exact_coeffs[7] );
147 
148  CPPUNIT_ASSERT_DOUBLES_EQUAL( h, curve_fit.h_over_RT(cache), this->tol() );
149  }
double h_exact(doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5, doublea6, doublea7)
StateType h_over_RT(const TempCache< StateType > &cache) const
void AntiochTesting::NASA9CurveFitTest< double >::test_nasa9_default_temp_intervals ( )
inlineinherited

Definition at line 46 of file nasa9_curve_fit_test.C.

47  {
48  {
50  this->three_interval_test(curve_fit);
51  }
52 
53  {
55  this->two_interval_test(curve_fit);
56  }
57 
58  }
void three_interval_test(const Antioch::NASA9CurveFit< double > &curve_fit)
This class stores the NASA polynomial fit to the thermodynamics quantities and .
Definition: ascii_parser.h:68
void two_interval_test(const Antioch::NASA9CurveFit< double > &curve_fit)
void AntiochTesting::NASA9CurveFitTest< double >::test_nasa9_user_specified_temp_intervals ( )
inlineinherited

Definition at line 60 of file nasa9_curve_fit_test.C.

61  {
62  {
63  std::vector<Scalar> temp(4);
64  temp[0] = 200;
65  temp[1] = 1000;
66  temp[2] = 6000;
67  temp[3] = 20000;
68 
70  this->three_interval_test(curve_fit);
71  }
72 
73  {
74  std::vector<Scalar> temp(3);
75  temp[0] = 200;
76  temp[1] = 1000;
77  temp[2] = 6000;
78 
80  this->two_interval_test(curve_fit);
81  }
82 
83  }
void three_interval_test(const Antioch::NASA9CurveFit< double > &curve_fit)
This class stores the NASA polynomial fit to the thermodynamics quantities and .
Definition: ascii_parser.h:68
void two_interval_test(const Antioch::NASA9CurveFit< double > &curve_fit)
void AntiochTesting::NASA9CurveFitTest< double >::test_s ( double  T,
const std::vector< double > &  exact_coeffs,
const Antioch::NASA9CurveFit< double > &  curve_fit 
)
inlineinherited

Definition at line 151 of file nasa9_curve_fit_test.C.

154  {
156  Scalar s = this->s_exact( T,
157  exact_coeffs[0],
158  exact_coeffs[1],
159  exact_coeffs[2],
160  exact_coeffs[3],
161  exact_coeffs[4],
162  exact_coeffs[5],
163  exact_coeffs[6],
164  exact_coeffs[8] );
165 
166  CPPUNIT_ASSERT_DOUBLES_EQUAL( s, curve_fit.s_over_R(cache), this->tol() );
167  }
double s_exact(doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5, doublea6, doublea8)
StateType s_over_R(const TempCache< StateType > &cache) const
void AntiochTesting::NASA9CurveFitTest< double >::three_interval_test ( const Antioch::NASA9CurveFit< double > &  curve_fit)
inlineinherited

Definition at line 85 of file nasa9_curve_fit_test.C.

86  {
87  Scalar T = 302.0;
88  this->test_cp( T, this->_N2_coeffs_200_1000, curve_fit );
89  this->test_h( T, this->_N2_coeffs_200_1000, curve_fit );
90  this->test_s( T, this->_N2_coeffs_200_1000, curve_fit );
91 
92  T = 3002.0;
93  this->test_cp( T, this->_N2_coeffs_1000_6000, curve_fit );
94  this->test_h( T, this->_N2_coeffs_1000_6000, curve_fit );
95  this->test_s( T, this->_N2_coeffs_1000_6000, curve_fit );
96 
97  T = 7002.0;
98  this->test_cp( T, this->_N2_coeffs_6000_20000, curve_fit );
99  this->test_h( T, this->_N2_coeffs_6000_20000, curve_fit );
100  this->test_s( T, this->_N2_coeffs_6000_20000, curve_fit );
101  }
void test_h(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
void test_s(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
void test_cp(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
double AntiochTesting::NASA9CurveFitTest< double >::tol ( )
inlineinherited

Definition at line 169 of file nasa9_curve_fit_test.C.

170  { return std::numeric_limits<Scalar>::epsilon() * 500; }
void AntiochTesting::NASA9CurveFitTest< double >::two_interval_test ( const Antioch::NASA9CurveFit< double > &  curve_fit)
inlineinherited

Definition at line 103 of file nasa9_curve_fit_test.C.

104  {
105  Scalar T = 302.0;
106  this->test_cp( T, this->_NO2_coeffs_200_1000, curve_fit );
107  this->test_h( T, this->_NO2_coeffs_200_1000, curve_fit );
108  this->test_s( T, this->_NO2_coeffs_200_1000, curve_fit );
109 
110  T = 3002.0;
111  this->test_cp( T, this->_NO2_coeffs_1000_6000, curve_fit );
112  this->test_h( T, this->_NO2_coeffs_1000_6000, curve_fit );
113  this->test_s( T, this->_NO2_coeffs_1000_6000, curve_fit );
114  }
void test_h(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
void test_s(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)
void test_cp(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA9CurveFit< double > &curve_fit)

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:51 for antioch-0.4.0 by  doxygen 1.8.8