antioch-0.4.0
rotational_relaxation.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_ROTATIONAL_RELAXATION_H
28 #define ANTIOCH_ROTATIONAL_RELAXATION_H
29 
30 // Antioch
32 #include "antioch/math_constants.h"
33 #include "antioch/cmath_shims.h"
34 
35 // C++
36 
37 namespace Antioch
38 {
39  template <typename CoeffType>
41  {
42  public:
45 
46  void reset_coeffs( CoeffType rot, CoeffType depth);
47 
48  // \todo
49  // cache _eps_kb / 298
50  template <typename StateType>
51  ANTIOCH_AUTO(StateType)
52  operator()(const StateType & T) const
53  ANTIOCH_AUTOFUNC(StateType, _z_298 * this->F(_eps_kb / 298) / this->F(StateType(_eps_kb/T)))
54 
56  CoeffType Z_298() const
57  { return _z_298; }
58 
61  { return _eps_kb; }
62 
63  private:
64 
66 
67  template <typename StateType>
68  ANTIOCH_AUTO(StateType)
69  F(const StateType & eps_T) const
70  ANTIOCH_AUTOFUNC(StateType, _one + _pi32_2 * ant_sqrt(eps_T) + _pi2_4_plus_2 * eps_T + _pi32 * ant_pow(eps_T,CoeffType(1.5))) //unambiguate pow() for vexcl
71 
72  CoeffType _z_298;
74  const CoeffType _one;
78  };
79 
80  template <typename CoeffType>
82  _z_298(z_298),
83  _eps_kb(eps_kb),
84  _one(1),
85  _pi32_2(ant_pow(Constants::pi<CoeffType>(),CoeffType(1.5)) / 2),
86  _pi2_4_plus_2(Constants::pi<CoeffType>() * Constants::pi<CoeffType>() / 4 + 2),
87  _pi32(ant_pow(Constants::pi<CoeffType>(),CoeffType(1.5)))
88  {
89  return;
90  }
91 
92  template <typename CoeffType>
93  inline
95  {
96  _z_298 = rot;
97  _eps_kb = depth;
98  }
99 
100 }
101 
102 #endif
_one _pi32_2 CoeffType(1.5))) CoeffType _z_298
void reset_coeffs(CoeffType rot, CoeffType depth)
#define ANTIOCH_AUTOFUNC(Type, Expr)
const ANTIOCH_AUTO(StateType) KineticsTheoryThermalConductivity< ThermoEvaluator
_one _pi32_2 * ant_sqrt(eps_T)+_pi2_4_plus_2 *eps_T+_pi32 *ant_pow(eps_T
The parameters are reduced parameters.
_z_298 *this F(_eps_kb/298)/this-> F(StateType(_eps_kb/T))) CoeffType Z_298() const
CoeffType pi()
pi

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