antioch-0.4.0
nasa7_thermo_test_base.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // Antioch - A Gas Dynamics Thermochemistry Library
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk,
7 // Sylvain Plessis, Roy H. Stonger
8 //
9 // Copyright (C) 2013 The PECOS Development Team
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the Version 2.1 GNU Lesser General
13 // Public License as published by the Free Software Foundation.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
23 // Boston, MA 02110-1301 USA
24 //
25 //-----------------------------------------------------------------------el-
26 
27 #ifndef ANTIOCH_NASA7_THERMO_TEST_BASE_H
28 #define ANTIOCH_NASA7_THERMO_TEST_BASE_H
29 
30 #include "antioch_config.h"
31 
32 #ifdef ANTIOCH_HAVE_CPPUNIT
33 
34 // CppUnit
35 #include <cppunit/extensions/HelperMacros.h>
36 #include <cppunit/TestCase.h>
37 
38 namespace AntiochTesting
39 {
40  template<typename Scalar>
41  class NASA7ThermoTestBase : public CppUnit::TestCase
42  {
43  public:
44 
45  void setUp()
46  {
49  this->init_all_H2_coeffs();
50 
53  this->init_all_N2_coeffs();
54  }
55 
56  void tearDown(){}
57 
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  }
69 
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  }
81 
83  {
85  _H2_coeffs_200_1000.begin(),
86  _H2_coeffs_200_1000.end() );
87 
89  _H2_coeffs_1000_3500.begin(),
90  _H2_coeffs_1000_3500.end() );
91  }
92 
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  }
104 
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  }
116 
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  }
127 
128  protected:
129 
130  std::vector<Scalar> _H2_coeffs_200_1000;
131  std::vector<Scalar> _H2_coeffs_1000_3500;
132 
133  std::vector<Scalar> _N2_coeffs_300_1000;
134  std::vector<Scalar> _N2_coeffs_1000_5000;
135 
136 
137  std::vector<Scalar> _all_standard_H2_coeffs;
138  std::vector<Scalar> _all_standard_N2_coeffs;
139 
140  };
141 
142 } // end namespace AntiochTesting
143 
144 #endif // ANTIOCH_HAVE_CPPUNIT
145 
146 #endif // ANTIOCH_NASA7_THERMO_TEST_BASE_H

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