antioch-0.4.0
lindemann_falloff.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_LINDEMANN_FALLOFF_H
28 #define _ANTIOCH_LINDEMANN_FALLOFF_H
29 
30 //Antioch
31 
32 //C++
33 
34 namespace Antioch{
51  template <typename CoeffType = double>
53  public:
54  LindemannFalloff(const unsigned int nspec);
56 
57  template <typename StateType>
58  StateType value(const StateType &T,
59  const StateType &M,
60  const StateType &k0,
61  const StateType &kinf) const;
62 
63  template <typename StateType>
64  StateType operator()(const StateType &T,
65  const StateType &M,
66  const StateType &k0,
67  const StateType &kinf) const;
68 
69  template <typename StateType, typename VectorStateType>
70  void F_and_derivatives(const StateType& T,
71  const StateType &M,
72  const StateType &k0,
73  const StateType &dk0_dT,
74  const StateType &kinf,
75  const StateType &dkinf_dT,
76  StateType &F,
77  StateType &dF_dT,
78  VectorStateType &dF_dX) const;
79 
80  private:
81  unsigned int n_spec;
82 
83  };
84 
85  template<typename CoeffType>
86  template <typename StateType>
87  inline
89  (const StateType& T,
90  const StateType& /* M */,
91  const StateType& /* k0 */,
92  const StateType& /* kinf */) const
93  {
94  return Antioch::constant_clone(T, 1);
95  }
96 
97  template<typename CoeffType>
98  template <typename StateType>
99  inline
101  (const StateType& T,
102  const StateType& /* M */,
103  const StateType& /* k0 */,
104  const StateType& /* kinf */) const
105  {
106  return Antioch::constant_clone(T, 1);
107  }
108 
109  template <typename CoeffType>
110  template <typename StateType, typename VectorStateType>
111  inline
113  (const StateType& T,
114  const StateType& /* M */,
115  const StateType& /* k0 */,
116  const StateType& /* dk0_dT */,
117  const StateType& /* kinf */,
118  const StateType& /* dkinf_dT */,
119  StateType& F,
120  StateType& dF_dT,
121  VectorStateType& dF_dX) const
122  {
123  //all derived are 0
124  Antioch::set_zero(dF_dT);
125  antioch_assert_equal_to(dF_dX.size(),n_spec);
126  Antioch::set_zero(dF_dX);
127  // F = 1
128  F = Antioch::constant_clone(T,1);
129 
130  return;
131  }
132 
133  template<typename CoeffType>
134  inline
135  LindemannFalloff<CoeffType>::LindemannFalloff(const unsigned int nspec):n_spec(nspec)
136  {
137  return;
138  }
139 
140  template<typename CoeffType>
141  inline
143  {
144  return;
145  }
146 }
147 
148 #endif
Simplest falloff model ( )
void F_and_derivatives(const StateType &T, const StateType &M, const StateType &k0, const StateType &dk0_dT, const StateType &kinf, const StateType &dkinf_dT, StateType &F, StateType &dF_dT, VectorStateType &dF_dX) const
#define antioch_assert_equal_to(expr1, expr2)
StateType operator()(const StateType &T, const StateType &M, const StateType &k0, const StateType &kinf) const
Scalar F(const Scalar &x)
_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > constant_clone(const _Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &ex, const Scalar &value)
Definition: eigen_utils.h:181
void set_zero(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a)
Definition: eigen_utils.h:217
The parameters are reduced parameters.
StateType value(const StateType &T, const StateType &M, const StateType &k0, const StateType &kinf) const
LindemannFalloff(const unsigned int nspec)

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