antioch-0.4.0
kinetics_theory_thermal_conductivity.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_KINETICS_THEORY_THERMAL_CONDUCTIVITY_H
28 #define ANTIOCH_KINETICS_THEORY_THERMAL_CONDUCTIVITY_H
29 
30 //Antioch
35 
36 //C++
37 #include <vector>
38 
39 namespace Antioch{
40 
42 
43  template <typename ThermoEvaluator, typename CoeffType>
44  class KineticsTheoryThermalConductivity : public SpeciesConductivityBase<KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType> >
45  {
46  public:
47 
48  KineticsTheoryThermalConductivity(const ThermoEvaluator & t, CoeffType Z_298K, CoeffType LJ_depth);
49 
50  KineticsTheoryThermalConductivity( const ThermoEvaluator& t, const std::vector<CoeffType>& coeffs);
51 
53 
54  void reset_coeffs(const std::vector<CoeffType> & coeffs);
55 
56  template <typename StateType>
57  ANTIOCH_AUTO(StateType)
58  trans( const unsigned int s, const StateType& mu, const StateType & T, const StateType & rho, const StateType & Dss) const
59  ANTIOCH_AUTOFUNC(StateType, mu * this->_thermo.cv_trans(s) * five_over_two * (one - two_over_pi * this->_thermo.cv_rot_over_R(s) / this->_thermo.cv_trans_over_R(s) * this->A(rho * Dss / mu) / this->B(s, T, rho * Dss / mu)))
60 
61  template <typename StateType>
62  ANTIOCH_AUTO(StateType)
63  rot( const unsigned int s, const StateType& mu, const StateType & T, const StateType & rho, const StateType & Dss) const
64  ANTIOCH_AUTOFUNC(StateType, rho * Dss * this->_thermo.cv_rot(s) * (one + two_over_pi * this->A(rho * Dss / mu) / this->B(s, T, rho * Dss / mu)))
65 
66  template <typename StateType>
67  ANTIOCH_AUTO(StateType)
68  vib( const unsigned int s, const StateType& mu, const StateType & T, const StateType & rho, const StateType & Dss) const
69  ANTIOCH_AUTOFUNC(StateType, rho * Dss * this->_thermo.cv_vib(s,T))
70 
71  const ThermoEvaluator& thermo() const
72  { return this->_thermo; }
73 
75  const RotationalRelaxation<CoeffType> & rot() const {return _rot;}
76 
78  friend class SpeciesConductivityBase<KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType> >;
79 
80  protected:
81 
82  const ThermoEvaluator& _thermo;
83 
84  template <typename StateType>
85  const ANTIOCH_AUTO(StateType)
86  op_with_diff_impl(unsigned int s, const StateType& mu_s, const StateType & T, const StateType & rho_s, const StateType & Dss) const;
87 
88  template <typename StateType>
89  ANTIOCH_AUTO(StateType)
90  op_no_diff_impl( const unsigned int s, const StateType& mu, const StateType & T ) const;
91 
92  private:
93 
94  template <typename StateType>
95  const
96  ANTIOCH_AUTO(StateType)
97  A(const StateType & rho_times_self_diff_over_mu) const
98  ANTIOCH_AUTOFUNC(StateType,five_over_two - rho_times_self_diff_over_mu)
99 
100  template <typename StateType>
101  const
102  ANTIOCH_AUTO(StateType)
103  B(unsigned int s, const StateType & T, const StateType & rho_times_self_diff_over_mu) const
104  ANTIOCH_AUTOFUNC(StateType,_rot(T) + two_over_pi * (five_over_three * this->_thermo.cv_rot_over_R(s) +
105  rho_times_self_diff_over_mu ) )
106 
107 
110 
111  //small enough
113 
114 //constants
115  const CoeffType five_over_two;
116  const CoeffType five_over_three;
117  const CoeffType two_over_pi;
118  const CoeffType one;
119 
120  };
121 
122  template <typename ThermoEvaluator, typename CoeffType>
123  inline
124  KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType>::KineticsTheoryThermalConductivity(const ThermoEvaluator & t, CoeffType Z_298K, CoeffType LJ_depth)
125  : SpeciesConductivityBase<KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType> >(),
126  _thermo(t),
127  _rot(Z_298K,LJ_depth),
128  five_over_two(CoeffType(5)/CoeffType(2)),
129  five_over_three(CoeffType(5)/CoeffType(3)),
130  two_over_pi(2/Constants::pi<CoeffType>()),
131  one(1)
132  {}
133 
134  template <typename ThermoEvaluator, typename CoeffType>
135  inline
136  KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType>::KineticsTheoryThermalConductivity( const ThermoEvaluator& t, const std::vector<CoeffType>& coeffs)
137  :SpeciesConductivityBase<KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType> >(),
138  _thermo(t),
139  _rot(coeffs[0],coeffs[1]),
140  five_over_two(CoeffType(5)/CoeffType(2)),
141  five_over_three(CoeffType(5)/CoeffType(3)),
142  two_over_pi(2/Constants::pi<CoeffType>()),
143  one(1)
144  {}
145 
146  template <typename ThermoEvaluator, typename CoeffType>
147  inline
149  {
150  antioch_assert_equal_to(coeffs.size(),2);
151 
152  _rot.reset_coeffs(coeffs[0],coeffs[1]);
153  }
154 
155  template <typename ThermoEvaluator, typename CoeffType>
156  inline
158  {
159  return;
160  }
161 
162  template <typename ThermoEvaluator, typename CoeffType>
163  template <typename StateType>
164  inline
165  const ANTIOCH_AUTO(StateType)
166  KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType>::op_with_diff_impl(const unsigned int s, const StateType& mu_s, const StateType & T, const StateType & rho_s, const StateType & Dss) const
167  {
168  StateType rho_d_m = rho_s * Dss / mu_s; // only once instead of twice
169  StateType A_B = two_over_pi * this->A(rho_d_m) / this->B(s, T, rho_d_m);
170 
171  return ( mu_s * this->_thermo.cv_trans(s) * five_over_two * (one - this->_thermo.cv_rot_over_R(s) / this->_thermo.cv_trans_over_R(s) * A_B) +
172  rho_s * Dss * ( this->_thermo.cv_rot(s) * (one + A_B) +
173  this->_thermo.cv_vib(s,T) ) );
174  }
175 
176  template <typename ThermoEvaluator, typename CoeffType>
177  template <typename StateType>
178  ANTIOCH_AUTO(StateType)
179  KineticsTheoryThermalConductivity<ThermoEvaluator,CoeffType>::op_no_diff_impl( const unsigned int s, const StateType& mu, const StateType & T ) const
180  {
181  // This is a "with diffusion" model so any attempts
182  // at calling the "no diffusion" method should error.
183  antioch_error();
184 
185  /*The following is dummy*/
186  return trans(s,mu,T,mu,mu);
187  }
188 
189 } //end namespace Antioch
190 
191 #endif
#define antioch_assert_equal_to(expr1, expr2)
void reset_coeffs(const std::vector< CoeffType > &coeffs)
const ANTIOCH_AUTO(StateType) EuckenThermalConductivity< ThermoEvaluator > return trans(s, mu_s)
#define antioch_error()
Conductivity based on kinetic theory of mixtures approximations.
const const StateType const StateType const StateType & rho_s
trans(const unsigned int s, const StateType &mu, const StateType &T, const StateType &rho, const StateType &Dss) const ANTIOCH_AUTOFUNC(StateType
const RotationalRelaxation< CoeffType > & rot() const
const ref to the rotational relaxation
const ANTIOCH_AUTO(StateType) op_with_diff_impl(unsigned int s
const const StateType const StateType &rho_times_self_diff_over_mu const ANTIOCH_AUTOFUNC(StateType, _rot(T)+two_over_pi *(five_over_three *this->_thermo.cv_rot_over_R(s)+rho_times_self_diff_over_mu)) KineticsTheoryThermalConductivity()
never ever use it
Base class for species conducitivity models.
const ANTIOCH_AUTO(StateType) KineticsTheoryThermalConductivity< ThermoEvaluator
const const StateType const StateType const StateType const StateType &Dss const
KineticsTheoryThermalConductivity(const ThermoEvaluator &t, CoeffType Z_298K, CoeffType LJ_depth)
The parameters are reduced parameters.
const A(const StateType &rho_times_self_diff_over_mu) const template< typename StateType > const B(unsigned int s
op_no_diff_impl(const unsigned int s, const StateType &mu, const StateType &T) const
CoeffType pi()
pi

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