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

Public Member Functions

 CPPUNIT_TEST_SUITE (NASA7CurveFitTestLongDouble)
 
 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< long double > &curve_fit)
 
void H2_test (const Antioch::NASA7CurveFit< long double > &curve_fit)
 
void test_cp (long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
 
void test_h (long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
 
void test_s (long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
 
long double tol ()
 
long double cp_exact (long doubleT, long doublea0, long doublea1, long doublea2, long doublea3, long doublea4)
 
long double h_exact (long doubleT, long doublea0, long doublea1, long doublea2, long doublea3, long doublea4, long doublea5)
 
long double s_exact (long doubleT, long doublea0, long doublea1, long doublea2, long doublea3, long doublea4, long 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< long double > _H2_coeffs_200_1000
 
std::vector< long double > _H2_coeffs_1000_3500
 
std::vector< long double > _N2_coeffs_300_1000
 
std::vector< long double > _N2_coeffs_1000_5000
 
std::vector< long double > _all_standard_H2_coeffs
 
std::vector< long double > _all_standard_N2_coeffs
 

Detailed Description

Definition at line 180 of file nasa7_curve_fit_test.C.

Member Function Documentation

long double AntiochTesting::NASA7CurveFitTest< long double >::cp_exact ( long double  T,
long double  a0,
long double  a1,
long double  a2,
long double  a3,
long 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::NASA7CurveFitTestLongDouble::CPPUNIT_TEST ( test_nasa7_default_temp_intervals  )
AntiochTesting::NASA7CurveFitTestLongDouble::CPPUNIT_TEST ( test_nasa7_user_specified_temp_intervals  )
AntiochTesting::NASA7CurveFitTestLongDouble::CPPUNIT_TEST_SUITE ( NASA7CurveFitTestLongDouble  )
AntiochTesting::NASA7CurveFitTestLongDouble::CPPUNIT_TEST_SUITE_END ( )
void AntiochTesting::NASA7CurveFitTest< long double >::H2_test ( const Antioch::NASA7CurveFit< long double > &  curve_fit)
inlineinherited

Definition at line 76 of file nasa7_curve_fit_test.C.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_H2_coeffs_1000_3500, AntiochTesting::NASA7ThermoTestBase< Scalar >::_H2_coeffs_200_1000, AntiochTesting::NASA7CurveFitTest< Scalar >::test_cp(), AntiochTesting::NASA7CurveFitTest< Scalar >::test_h(), and AntiochTesting::NASA7CurveFitTest< Scalar >::test_s().

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(long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
void test_s(long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
void test_cp(long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
long double AntiochTesting::NASA7CurveFitTest< long double >::h_exact ( long double  T,
long double  a0,
long double  a1,
long double  a2,
long double  a3,
long double  a4,
long 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< long double >::init_all_H2_coeffs ( )
inlineinherited
void AntiochTesting::NASA7ThermoTestBase< long double >::init_all_N2_coeffs ( )
inlineinherited
void AntiochTesting::NASA7ThermoTestBase< long double >::init_H2_coeffs_1000_3500 ( )
inlineinherited

Definition at line 70 of file nasa7_thermo_test_base.h.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_H2_coeffs_1000_3500.

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< long double >::init_H2_coeffs_200_1000 ( )
inlineinherited

Definition at line 58 of file nasa7_thermo_test_base.h.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_H2_coeffs_200_1000.

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< long double >::init_N2_coeffs_1000_5000 ( )
inlineinherited

Definition at line 105 of file nasa7_thermo_test_base.h.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_N2_coeffs_1000_5000.

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< long double >::init_N2_coeffs_300_1000 ( )
inlineinherited

Definition at line 93 of file nasa7_thermo_test_base.h.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_N2_coeffs_300_1000.

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< long double >::N2_test ( const Antioch::NASA7CurveFit< long double > &  curve_fit)
inlineinherited

Definition at line 63 of file nasa7_curve_fit_test.C.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_N2_coeffs_1000_5000, AntiochTesting::NASA7ThermoTestBase< Scalar >::_N2_coeffs_300_1000, AntiochTesting::NASA7CurveFitTest< Scalar >::test_cp(), AntiochTesting::NASA7CurveFitTest< Scalar >::test_h(), and AntiochTesting::NASA7CurveFitTest< Scalar >::test_s().

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(long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
void test_s(long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
void test_cp(long doubleT, const std::vector< long double > &exact_coeffs, const Antioch::NASA7CurveFit< long double > &curve_fit)
long double AntiochTesting::NASA7CurveFitTest< long double >::s_exact ( long double  T,
long double  a0,
long double  a1,
long double  a2,
long double  a3,
long double  a4,
long 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< long double >::setUp ( )
inlineinherited

Definition at line 45 of file nasa7_thermo_test_base.h.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::init_all_H2_coeffs(), AntiochTesting::NASA7ThermoTestBase< Scalar >::init_all_N2_coeffs(), AntiochTesting::NASA7ThermoTestBase< Scalar >::init_H2_coeffs_1000_3500(), AntiochTesting::NASA7ThermoTestBase< Scalar >::init_H2_coeffs_200_1000(), AntiochTesting::NASA7ThermoTestBase< Scalar >::init_N2_coeffs_1000_5000(), and AntiochTesting::NASA7ThermoTestBase< Scalar >::init_N2_coeffs_300_1000().

void AntiochTesting::NASA7ThermoTestBase< long double >::tearDown ( )
inlineinherited

Definition at line 56 of file nasa7_thermo_test_base.h.

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

Definition at line 89 of file nasa7_curve_fit_test.C.

References cp(), AntiochTesting::NASA7CurveFitTest< Scalar >::cp_exact(), Antioch::NASA7CurveFit< CoeffType >::cp_over_R(), and AntiochTesting::NASA7CurveFitTest< Scalar >::tol().

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  }
long double cp_exact(long doubleT, long doublea0, long doublea1, long doublea2, long doublea3, long 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< long double >::test_h ( long double  T,
const std::vector< long double > &  exact_coeffs,
const Antioch::NASA7CurveFit< long double > &  curve_fit 
)
inlineinherited

Definition at line 104 of file nasa7_curve_fit_test.C.

References AntiochTesting::NASA7CurveFitTest< Scalar >::h_exact(), Antioch::NASA7CurveFit< CoeffType >::h_over_RT(), and AntiochTesting::NASA7CurveFitTest< Scalar >::tol().

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
long double h_exact(long doubleT, long doublea0, long doublea1, long doublea2, long doublea3, long doublea4, long doublea5)
void AntiochTesting::NASA7CurveFitTest< long double >::test_nasa7_default_temp_intervals ( )
inlineinherited
void AntiochTesting::NASA7CurveFitTest< long double >::test_nasa7_user_specified_temp_intervals ( )
inlineinherited

Definition at line 52 of file nasa7_curve_fit_test.C.

References AntiochTesting::NASA7ThermoTestBase< Scalar >::_all_standard_H2_coeffs, and AntiochTesting::NASA7CurveFitTest< Scalar >::H2_test().

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< long double > &curve_fit)
void AntiochTesting::NASA7CurveFitTest< long double >::test_s ( long double  T,
const std::vector< long double > &  exact_coeffs,
const Antioch::NASA7CurveFit< long double > &  curve_fit 
)
inlineinherited

Definition at line 120 of file nasa7_curve_fit_test.C.

References AntiochTesting::NASA7CurveFitTest< Scalar >::s_exact(), Antioch::NASA7CurveFit< CoeffType >::s_over_R(), and AntiochTesting::NASA7CurveFitTest< Scalar >::tol().

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  }
long double s_exact(long doubleT, long doublea0, long doublea1, long doublea2, long doublea3, long doublea4, long doublea6)
StateType s_over_R(const TempCache< StateType > &cache) const
long double AntiochTesting::NASA7CurveFitTest< long 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<long double > AntiochTesting::NASA7ThermoTestBase< long double >::_all_standard_H2_coeffs
protectedinherited

Definition at line 137 of file nasa7_thermo_test_base.h.

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

Definition at line 138 of file nasa7_thermo_test_base.h.

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

Definition at line 131 of file nasa7_thermo_test_base.h.

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

Definition at line 130 of file nasa7_thermo_test_base.h.

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

Definition at line 134 of file nasa7_thermo_test_base.h.

std::vector<long double > AntiochTesting::NASA7ThermoTestBase< long 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