antioch-0.4.0
nasa9_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_NASA9_THERMO_TEST_BASE_H
28 #define ANTIOCH_NASA9_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 NASA9ThermoTestBase : public CppUnit::TestCase
42  {
43  public:
44 
45  void setUp()
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  }
60 
61  void tearDown(){}
62 
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  }
70 
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  }
84 
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  }
98 
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  }
112 
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  }
120 
122  {
124  _N2_coeffs_200_1000.begin(),
125  _N2_coeffs_200_1000.end() );
126 
128  _N2_coeffs_1000_6000.begin(),
129  _N2_coeffs_1000_6000.end() );
130 
132  _N2_coeffs_6000_20000.begin(),
133  _N2_coeffs_6000_20000.end() );
134  }
135 
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  }
143 
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  }
157 
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  }
171 
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  }
179 
181  {
183  _NO2_coeffs_200_1000.begin(),
184  _NO2_coeffs_200_1000.end() );
185 
187  _NO2_coeffs_1000_6000.begin(),
188  _NO2_coeffs_1000_6000.end() );
189  }
190 
191  protected:
192 
193  std::vector<Scalar> _N2_coeffs_0_200;
194  std::vector<Scalar> _N2_coeffs_200_1000;
195  std::vector<Scalar> _N2_coeffs_1000_6000;
196  std::vector<Scalar> _N2_coeffs_6000_20000;
197  std::vector<Scalar> _N2_coeffs_20000_99999;
198 
199  std::vector<Scalar> _NO2_coeffs_0_200;
200  std::vector<Scalar> _NO2_coeffs_200_1000;
201  std::vector<Scalar> _NO2_coeffs_1000_6000;
202  std::vector<Scalar> _NO2_coeffs_6000_99999;
203 
204 
205  std::vector<Scalar> _all_standard_N2_coeffs;
206  std::vector<Scalar> _all_standard_NO2_coeffs;
207 
208  };
209 
210 } // end namespace AntiochTesting
211 
212 #endif // ANTIOCH_HAVE_CPPUNIT
213 
214 #endif // ANTIOCH_NASA9_THERMO_TEST_BASE_H

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