FallOffReactionRate.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::FallOffReactionRate
26 
27 Description
28  General class for handling unimolecular/recombination fall-off reactions.
29 
30 SourceFiles
31  FallOffReactionRateI.H
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef FallOffReactionRate_H
36 #define FallOffReactionRate_H
37 
38 #include "thirdBodyEfficiencies.H"
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 // Forward declaration of friend functions and operators
46 
47 template<class ReactionRate, class FallOffFunction>
49 
50 template<class ReactionRate, class FallOffFunction>
51 inline Ostream& operator<<
52 (
53  Ostream&,
55 );
56 
57 
58 /*---------------------------------------------------------------------------*\
59  Class FallOffReactionRate Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class ReactionRate, class FallOffFunction>
64 {
65  // Private data
66 
67  ReactionRate k0_;
68  ReactionRate kInf_;
69  FallOffFunction F_;
70  thirdBodyEfficiencies thirdBodyEfficiencies_;
71 
72 
73 public:
74 
75  // Constructors
76 
77  //- Construct from components
78  inline FallOffReactionRate
79  (
80  const ReactionRate& k0,
81  const ReactionRate& kInf,
82  const FallOffFunction& F,
83  const thirdBodyEfficiencies& tbes
84  );
85 
86  //- Construct from dictionary
87  inline FallOffReactionRate
88  (
89  const speciesTable& species,
90  const dictionary& dict
91  );
92 
93 
94  // Member Functions
95 
96  //- Return the type name
97  static word type()
98  {
99  return ReactionRate::type() + FallOffFunction::type() + "FallOff";
100  }
101 
102  inline scalar operator()
103  (
104  const scalar p,
105  const scalar T,
106  const scalarField& c
107  ) const;
108 
109  //- Write to stream
110  inline void write(Ostream& os) const;
111 
112 
113  // Ostream Operator
114 
115  friend Ostream& operator<< <ReactionRate, FallOffFunction>
116  (
117  Ostream&,
119  );
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #include "FallOffReactionRateI.H"
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
dictionary dict
type
Types of root.
Definition: Roots.H:52
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
General class for handling unimolecular/recombination fall-off reactions.
A class for handling words, derived from string.
Definition: word.H:59
void write(Ostream &os) const
Write to stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
FallOffReactionRate(const ReactionRate &k0, const ReactionRate &kInf, const FallOffFunction &F, const thirdBodyEfficiencies &tbes)
Construct from components.
friend Ostream & operator(Ostream &, const FallOffReactionRate< ReactionRate, FallOffFunction > &)
const dimensionedScalar F
Faraday constant: default SI units: [C/mol].
A wordList with hashed indices for faster lookup by name.
const dimensionedScalar c
Speed of light in a vacuum.
volScalarField & p
Third body efficiencies.
Namespace for OpenFOAM.
static word type()
Return the type name.