antioch-0.4.0
List of all members | Public Member Functions | Protected Attributes
AntiochTesting::NASA7CurveFitTestDouble Class Reference
Inheritance diagram for AntiochTesting::NASA7CurveFitTestDouble:
AntiochTesting::NASA7CurveFitTest< double > AntiochTesting::NASA7ThermoTestBase< double >

Public Member Functions

 CPPUNIT_TEST_SUITE (NASA7CurveFitTestDouble)
 
 CPPUNIT_TEST (test_nasa7_default_temp_intervals)
 
 CPPUNIT_TEST (test_nasa7_user_specified_temp_intervals)
 
 CPPUNIT_TEST_SUITE_END ()
 
void test_nasa7_default_temp_intervals ()
 
void test_nasa7_user_specified_temp_intervals ()
 
void N2_test (const Antioch::NASA7CurveFit< double > &curve_fit)
 
void H2_test (const Antioch::NASA7CurveFit< double > &curve_fit)
 
void test_cp (doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
 
void test_h (doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
 
void test_s (doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
 
double tol ()
 
double cp_exact (doubleT, doublea0, doublea1, doublea2, doublea3, doublea4)
 
double h_exact (doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5)
 
double s_exact (doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea6)
 
void setUp ()
 
void tearDown ()
 
void init_H2_coeffs_200_1000 ()
 
void init_H2_coeffs_1000_3500 ()
 
void init_all_H2_coeffs ()
 
void init_N2_coeffs_300_1000 ()
 
void init_N2_coeffs_1000_5000 ()
 
void init_all_N2_coeffs ()
 

Protected Attributes

std::vector< double > _H2_coeffs_200_1000
 
std::vector< double > _H2_coeffs_1000_3500
 
std::vector< double > _N2_coeffs_300_1000
 
std::vector< double > _N2_coeffs_1000_5000
 
std::vector< double > _all_standard_H2_coeffs
 
std::vector< double > _all_standard_N2_coeffs
 

Detailed Description

Definition at line 168 of file nasa7_curve_fit_test.C.

Member Function Documentation

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

Definition at line 139 of file nasa7_curve_fit_test.C.

140  {
141  return a0 + a1*T + a2*T*T + a3*T*T*T + a4*(T*T*T*T);
142  }
AntiochTesting::NASA7CurveFitTestDouble::CPPUNIT_TEST ( test_nasa7_default_temp_intervals  )
AntiochTesting::NASA7CurveFitTestDouble::CPPUNIT_TEST ( test_nasa7_user_specified_temp_intervals  )
AntiochTesting::NASA7CurveFitTestDouble::CPPUNIT_TEST_SUITE ( NASA7CurveFitTestDouble  )
AntiochTesting::NASA7CurveFitTestDouble::CPPUNIT_TEST_SUITE_END ( )
void AntiochTesting::NASA7CurveFitTest< double >::H2_test ( const Antioch::NASA7CurveFit< double > &  curve_fit)
inlineinherited

Definition at line 76 of file nasa7_curve_fit_test.C.

77  {
78  Scalar T = 352.0;
79  this->test_cp( T, this->_H2_coeffs_200_1000, curve_fit );
80  this->test_h( T, this->_H2_coeffs_200_1000, curve_fit );
81  this->test_s( T, this->_H2_coeffs_200_1000, curve_fit );
82 
83  T = 2002.0;
84  this->test_cp( T, this->_H2_coeffs_1000_3500, curve_fit );
85  this->test_h( T, this->_H2_coeffs_1000_3500, curve_fit );
86  this->test_s( T, this->_H2_coeffs_1000_3500, curve_fit );
87  }
void test_h(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
void test_s(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
void test_cp(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
double AntiochTesting::NASA7CurveFitTest< double >::h_exact ( double  T,
double  a0,
double  a1,
double  a2,
double  a3,
double  a4,
double  a5 
)
inlineinherited

Definition at line 144 of file nasa7_curve_fit_test.C.

145  {
146  return a0 + a1/2.0L*T + a2/3.0L*T*T + a3/4.0L*T*T*T + a4/5.0L*(T*T*T*T) + a5/T;
147  }
void AntiochTesting::NASA7ThermoTestBase< double >::init_all_H2_coeffs ( )
inlineinherited
void AntiochTesting::NASA7ThermoTestBase< double >::init_all_N2_coeffs ( )
inlineinherited

Definition at line 117 of file nasa7_thermo_test_base.h.

void AntiochTesting::NASA7ThermoTestBase< double >::init_H2_coeffs_1000_3500 ( )
inlineinherited

Definition at line 70 of file nasa7_thermo_test_base.h.

71  {
72  _H2_coeffs_1000_3500.resize(7);
73  _H2_coeffs_1000_3500[0] = 3.337279200E+00L;
74  _H2_coeffs_1000_3500[1] = -4.940247310E-05L;
75  _H2_coeffs_1000_3500[2] = 4.994567780E-07L;
76  _H2_coeffs_1000_3500[3] = -1.795663940E-10L;
77  _H2_coeffs_1000_3500[4] = 2.002553760E-14L;
78  _H2_coeffs_1000_3500[5] = -9.501589220E+02L;
79  _H2_coeffs_1000_3500[6] = -3.205023310E+00L;
80  }
void AntiochTesting::NASA7ThermoTestBase< double >::init_H2_coeffs_200_1000 ( )
inlineinherited

Definition at line 58 of file nasa7_thermo_test_base.h.

59  {
60  _H2_coeffs_200_1000.resize(7);
61  _H2_coeffs_200_1000[0] = 2.344331120E+00L;
62  _H2_coeffs_200_1000[1] = 7.980520750E-03L;
63  _H2_coeffs_200_1000[2] = -1.947815100E-05L;
64  _H2_coeffs_200_1000[3] = 2.015720940E-08L;
65  _H2_coeffs_200_1000[4] = -7.376117610E-12L;
66  _H2_coeffs_200_1000[5] = -9.179351730E+02L;
67  _H2_coeffs_200_1000[6] = 6.830102380E-01L;
68  }
void AntiochTesting::NASA7ThermoTestBase< double >::init_N2_coeffs_1000_5000 ( )
inlineinherited

Definition at line 105 of file nasa7_thermo_test_base.h.

106  {
107  _N2_coeffs_1000_5000.resize(7);
108  _N2_coeffs_1000_5000[0] = 2.926640000E+00L;
109  _N2_coeffs_1000_5000[1] = 1.487976800E-03L;
110  _N2_coeffs_1000_5000[2] = -5.684760000E-07L;
111  _N2_coeffs_1000_5000[3] = 1.009703800E-10L;
112  _N2_coeffs_1000_5000[4] = -6.753351000E-15L;
113  _N2_coeffs_1000_5000[5] = -9.227977000E+02L;
114  _N2_coeffs_1000_5000[6] = 5.980528000E+00L;
115  }
void AntiochTesting::NASA7ThermoTestBase< double >::init_N2_coeffs_300_1000 ( )
inlineinherited

Definition at line 93 of file nasa7_thermo_test_base.h.

94  {
95  _N2_coeffs_300_1000.resize(7);
96  _N2_coeffs_300_1000[0] = 3.298677000E+00L;
97  _N2_coeffs_300_1000[1] = 1.408240400E-03L;
98  _N2_coeffs_300_1000[2] = -3.963222000E-06L;
99  _N2_coeffs_300_1000[3] = 5.641515000E-09L;
100  _N2_coeffs_300_1000[4] = -2.444854000E-12L;
101  _N2_coeffs_300_1000[5] = -1.020899900E+03L;
102  _N2_coeffs_300_1000[6] = 3.950372000E+00L;
103  }
void AntiochTesting::NASA7CurveFitTest< double >::N2_test ( const Antioch::NASA7CurveFit< double > &  curve_fit)
inlineinherited

Definition at line 63 of file nasa7_curve_fit_test.C.

64  {
65  Scalar T = 352.0;
66  this->test_cp( T, this->_N2_coeffs_300_1000, curve_fit );
67  this->test_h( T, this->_N2_coeffs_300_1000, curve_fit );
68  this->test_s( T, this->_N2_coeffs_300_1000, curve_fit );
69 
70  T = 3002.0;
71  this->test_cp( T, this->_N2_coeffs_1000_5000, curve_fit );
72  this->test_h( T, this->_N2_coeffs_1000_5000, curve_fit );
73  this->test_s( T, this->_N2_coeffs_1000_5000, curve_fit );
74  }
void test_h(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
void test_s(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
void test_cp(doubleT, const std::vector< double > &exact_coeffs, const Antioch::NASA7CurveFit< double > &curve_fit)
double AntiochTesting::NASA7CurveFitTest< double >::s_exact ( double  T,
double  a0,
double  a1,
double  a2,
double  a3,
double  a4,
double  a6 
)
inlineinherited

Definition at line 149 of file nasa7_curve_fit_test.C.

150  {
151  return a0*std::log(T) + a1*T + a2/2.0L*T*T + a3/3.0L*T*T*T + a4/4.0L*(T*T*T*T) + a6;
152  }
void AntiochTesting::NASA7ThermoTestBase< double >::setUp ( )
inlineinherited
void AntiochTesting::NASA7ThermoTestBase< double >::tearDown ( )
inlineinherited

Definition at line 56 of file nasa7_thermo_test_base.h.

56 {}
void AntiochTesting::NASA7CurveFitTest< double >::test_cp ( double  T,
const std::vector< double > &  exact_coeffs,
const Antioch::NASA7CurveFit< double > &  curve_fit 
)
inlineinherited

Definition at line 89 of file nasa7_curve_fit_test.C.

92  {
94  Scalar cp = this->cp_exact( T,
95  exact_coeffs[0],
96  exact_coeffs[1],
97  exact_coeffs[2],
98  exact_coeffs[3],
99  exact_coeffs[4] );
100 
101  CPPUNIT_ASSERT_DOUBLES_EQUAL( cp, curve_fit.cp_over_R(cache), this->tol() );
102  }
double cp_exact(doubleT, doublea0, doublea1, doublea2, doublea3, doublea4)
Scalar cp(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5, Scalar a6)
const StateType cp_over_R(const TempCache< StateType > &cache) const
void AntiochTesting::NASA7CurveFitTest< double >::test_h ( double  T,
const std::vector< double > &  exact_coeffs,
const Antioch::NASA7CurveFit< double > &  curve_fit 
)
inlineinherited

Definition at line 104 of file nasa7_curve_fit_test.C.

107  {
109  Scalar h = this->h_exact( T,
110  exact_coeffs[0],
111  exact_coeffs[1],
112  exact_coeffs[2],
113  exact_coeffs[3],
114  exact_coeffs[4],
115  exact_coeffs[5] );
116 
117  CPPUNIT_ASSERT_DOUBLES_EQUAL( h, curve_fit.h_over_RT(cache), this->tol() );
118  }
StateType h_over_RT(const TempCache< StateType > &cache) const
double h_exact(doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea5)
void AntiochTesting::NASA7CurveFitTest< double >::test_nasa7_default_temp_intervals ( )
inlineinherited

Definition at line 46 of file nasa7_curve_fit_test.C.

47  {
49  this->N2_test(curve_fit);
50  }
void N2_test(const Antioch::NASA7CurveFit< double > &curve_fit)
void AntiochTesting::NASA7CurveFitTest< double >::test_nasa7_user_specified_temp_intervals ( )
inlineinherited

Definition at line 52 of file nasa7_curve_fit_test.C.

53  {
54  std::vector<Scalar> temp(3);
55  temp[0] = 200;
56  temp[1] = 1000;
57  temp[2] = 3500;
58 
60  this->H2_test(curve_fit);
61  }
void H2_test(const Antioch::NASA7CurveFit< double > &curve_fit)
void AntiochTesting::NASA7CurveFitTest< double >::test_s ( double  T,
const std::vector< double > &  exact_coeffs,
const Antioch::NASA7CurveFit< double > &  curve_fit 
)
inlineinherited

Definition at line 120 of file nasa7_curve_fit_test.C.

123  {
125  Scalar s = this->s_exact( T,
126  exact_coeffs[0],
127  exact_coeffs[1],
128  exact_coeffs[2],
129  exact_coeffs[3],
130  exact_coeffs[4],
131  exact_coeffs[6] );
132 
133  CPPUNIT_ASSERT_DOUBLES_EQUAL( s, curve_fit.s_over_R(cache), this->tol() );
134  }
double s_exact(doubleT, doublea0, doublea1, doublea2, doublea3, doublea4, doublea6)
StateType s_over_R(const TempCache< StateType > &cache) const
double AntiochTesting::NASA7CurveFitTest< double >::tol ( )
inlineinherited

Definition at line 136 of file nasa7_curve_fit_test.C.

137  { return std::numeric_limits<Scalar>::epsilon() * 500; }

Member Data Documentation

std::vector<double > AntiochTesting::NASA7ThermoTestBase< double >::_all_standard_H2_coeffs
protectedinherited

Definition at line 137 of file nasa7_thermo_test_base.h.

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

Definition at line 138 of file nasa7_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA7ThermoTestBase< double >::_H2_coeffs_1000_3500
protectedinherited

Definition at line 131 of file nasa7_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA7ThermoTestBase< double >::_H2_coeffs_200_1000
protectedinherited

Definition at line 130 of file nasa7_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA7ThermoTestBase< double >::_N2_coeffs_1000_5000
protectedinherited

Definition at line 134 of file nasa7_thermo_test_base.h.

std::vector<double > AntiochTesting::NASA7ThermoTestBase< double >::_N2_coeffs_300_1000
protectedinherited

Definition at line 133 of file nasa7_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