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-2012 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 Istream
87  inline FallOffReactionRate
88  (
89  const speciesTable& species,
90  Istream& is
91  );
92 
93  //- Construct from dictionary
94  inline FallOffReactionRate
95  (
96  const speciesTable& species,
97  const dictionary& dict
98  );
99 
100 
101  // Member Functions
102 
103  //- Return the type name
104  static word type()
105  {
106  return ReactionRate::type() + FallOffFunction::type() + "FallOff";
107  }
108 
109  inline scalar operator()
110  (
111  const scalar p,
112  const scalar T,
113  const scalarField& c
114  ) const;
115 
116  //- Write to stream
117  inline void write(Ostream& os) const;
118 
119 
120  // Ostream Operator
121 
122  friend Ostream& operator<< <ReactionRate, FallOffFunction>
123  (
124  Ostream&,
126  );
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #include "FallOffReactionRateI.H"
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
void write(Ostream &os) const
Write to stream.
dictionary dict
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Definition: Istream.H:57
General class for handling unimolecular/recombination fall-off reactions.
A class for handling words, derived from string.
Definition: word.H:59
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].
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
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.