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

Public Member Functions

void test_nasa7_default_temp_intervals ()
 
void test_nasa7_user_specified_temp_intervals ()
 
void N2_test (const Antioch::NASA7CurveFit< Scalar > &curve_fit)
 
void H2_test (const Antioch::NASA7CurveFit< Scalar > &curve_fit)
 
void test_cp (Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
 
void test_h (Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
 
void test_s (Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
 
Scalar tol ()
 
Scalar cp_exact (Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4)
 
Scalar h_exact (Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5)
 
Scalar s_exact (Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a6)
 
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< Scalar > _H2_coeffs_200_1000
 
std::vector< Scalar > _H2_coeffs_1000_3500
 
std::vector< Scalar > _N2_coeffs_300_1000
 
std::vector< Scalar > _N2_coeffs_1000_5000
 
std::vector< Scalar > _all_standard_H2_coeffs
 
std::vector< Scalar > _all_standard_N2_coeffs
 

Detailed Description

template<typename Scalar>
class AntiochTesting::NASA7CurveFitTest< Scalar >

Definition at line 42 of file nasa7_curve_fit_test.C.

Member Function Documentation

template<typename Scalar>
Scalar AntiochTesting::NASA7CurveFitTest< Scalar >::cp_exact ( Scalar  T,
Scalar  a0,
Scalar  a1,
Scalar  a2,
Scalar  a3,
Scalar  a4 
)
inline

Definition at line 139 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::test_cp().

140  {
141  return a0 + a1*T + a2*T*T + a3*T*T*T + a4*(T*T*T*T);
142  }
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::H2_test ( const Antioch::NASA7CurveFit< Scalar > &  curve_fit)
inline

Definition at line 76 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::test_nasa7_user_specified_temp_intervals().

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(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
void test_s(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
void test_cp(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
template<typename Scalar>
Scalar AntiochTesting::NASA7CurveFitTest< Scalar >::h_exact ( Scalar  T,
Scalar  a0,
Scalar  a1,
Scalar  a2,
Scalar  a3,
Scalar  a4,
Scalar  a5 
)
inline

Definition at line 144 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::test_h().

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  }
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::init_all_H2_coeffs ( )
inlineinherited
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::init_all_N2_coeffs ( )
inlineinherited

Definition at line 117 of file nasa7_thermo_test_base.h.

Referenced by AntiochTesting::NASA7ThermoTestBase< long double >::setUp().

118  {
120  _N2_coeffs_300_1000.begin(),
121  _N2_coeffs_300_1000.end() );
122 
124  _N2_coeffs_1000_5000.begin(),
125  _N2_coeffs_1000_5000.end() );
126  }
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::init_H2_coeffs_1000_3500 ( )
inlineinherited

Definition at line 70 of file nasa7_thermo_test_base.h.

Referenced by AntiochTesting::NASA7ThermoTestBase< long double >::setUp().

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  }
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::init_H2_coeffs_200_1000 ( )
inlineinherited

Definition at line 58 of file nasa7_thermo_test_base.h.

Referenced by AntiochTesting::NASA7ThermoTestBase< long double >::setUp().

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  }
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::init_N2_coeffs_1000_5000 ( )
inlineinherited

Definition at line 105 of file nasa7_thermo_test_base.h.

Referenced by AntiochTesting::NASA7ThermoTestBase< long double >::setUp().

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  }
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::init_N2_coeffs_300_1000 ( )
inlineinherited

Definition at line 93 of file nasa7_thermo_test_base.h.

Referenced by AntiochTesting::NASA7ThermoTestBase< long double >::setUp().

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  }
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::N2_test ( const Antioch::NASA7CurveFit< Scalar > &  curve_fit)
inline

Definition at line 63 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::test_nasa7_default_temp_intervals().

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(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
void test_s(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
void test_cp(Scalar T, const std::vector< Scalar > &exact_coeffs, const Antioch::NASA7CurveFit< Scalar > &curve_fit)
template<typename Scalar>
Scalar AntiochTesting::NASA7CurveFitTest< Scalar >::s_exact ( Scalar  T,
Scalar  a0,
Scalar  a1,
Scalar  a2,
Scalar  a3,
Scalar  a4,
Scalar  a6 
)
inline

Definition at line 149 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::test_s().

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  }
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::setUp ( )
inlineinherited
template<typename Scalar>
void AntiochTesting::NASA7ThermoTestBase< Scalar >::tearDown ( )
inlineinherited

Definition at line 56 of file nasa7_thermo_test_base.h.

56 {}
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::test_cp ( Scalar  T,
const std::vector< Scalar > &  exact_coeffs,
const Antioch::NASA7CurveFit< Scalar > &  curve_fit 
)
inline

Definition at line 89 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::H2_test(), and AntiochTesting::NASA7CurveFitTest< long double >::N2_test().

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  }
Scalar cp_exact(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4)
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
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::test_h ( Scalar  T,
const std::vector< Scalar > &  exact_coeffs,
const Antioch::NASA7CurveFit< Scalar > &  curve_fit 
)
inline

Definition at line 104 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::H2_test(), and AntiochTesting::NASA7CurveFitTest< long double >::N2_test().

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
Scalar h_exact(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a5)
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::test_nasa7_default_temp_intervals ( )
inline

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< Scalar > &curve_fit)
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::test_nasa7_user_specified_temp_intervals ( )
inline

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< Scalar > &curve_fit)
template<typename Scalar>
void AntiochTesting::NASA7CurveFitTest< Scalar >::test_s ( Scalar  T,
const std::vector< Scalar > &  exact_coeffs,
const Antioch::NASA7CurveFit< Scalar > &  curve_fit 
)
inline

Definition at line 120 of file nasa7_curve_fit_test.C.

Referenced by AntiochTesting::NASA7CurveFitTest< long double >::H2_test(), and AntiochTesting::NASA7CurveFitTest< long double >::N2_test().

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  }
Scalar s_exact(Scalar T, Scalar a0, Scalar a1, Scalar a2, Scalar a3, Scalar a4, Scalar a6)
StateType s_over_R(const TempCache< StateType > &cache) const
template<typename Scalar>
Scalar AntiochTesting::NASA7CurveFitTest< Scalar >::tol ( )
inline

Member Data Documentation

template<typename Scalar>
std::vector<Scalar> AntiochTesting::NASA7ThermoTestBase< Scalar >::_all_standard_H2_coeffs
protectedinherited
template<typename Scalar>
std::vector<Scalar> AntiochTesting::NASA7ThermoTestBase< Scalar >::_all_standard_N2_coeffs
protectedinherited
template<typename Scalar>
std::vector<Scalar> AntiochTesting::NASA7ThermoTestBase< Scalar >::_H2_coeffs_1000_3500
protectedinherited
template<typename Scalar>
std::vector<Scalar> AntiochTesting::NASA7ThermoTestBase< Scalar >::_H2_coeffs_200_1000
protectedinherited
template<typename Scalar>
std::vector<Scalar> AntiochTesting::NASA7ThermoTestBase< Scalar >::_N2_coeffs_1000_5000
protectedinherited
template<typename Scalar>
std::vector<Scalar> AntiochTesting::NASA7ThermoTestBase< Scalar >::_N2_coeffs_300_1000
protectedinherited

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