ChemicallyActivatedReactionRate.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::ChemicallyActivatedReactionRate
26 
27 Description
28  General class for handling chemically-activated bimolecular reactions.
29 
30 SourceFiles
31  ChemicallyActivatedReactionRateI.H
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ChemicallyActivatedReactionRate_H
36 #define ChemicallyActivatedReactionRate_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 ChemicallyActivationFunction>
49 
50 template<class ReactionRate, class ChemicallyActivationFunction>
51 inline Ostream& operator<<
52 (
53  Ostream&,
55  <ReactionRate, ChemicallyActivationFunction>&
56 );
57 
58 
59 /*---------------------------------------------------------------------------*\
60  Class ChemicallyActivatedReactionRate Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 template<class ReactionRate, class ChemicallyActivationFunction>
65 {
66  // Private data
67 
68  ReactionRate k0_;
69  ReactionRate kInf_;
70  ChemicallyActivationFunction F_;
72 
73 
74 public:
75 
76  // Constructors
77 
78  //- Construct from components
80  (
81  const ReactionRate& k0,
82  const ReactionRate& kInf,
83  const ChemicallyActivationFunction& F,
84  const thirdBodyEfficiencies& tbes
85  );
86 
87  //- Construct from Istream
89  (
90  const speciesTable& species,
91  Istream& is
92  );
93 
94  //- Construct from dictionary
96  (
97  const speciesTable& species,
98  const dictionary& dict
99  );
100 
101 
102  // Member Functions
103 
104  //- Return the type name
105  static word type()
106  {
107  return ReactionRate::type()
109  + "ChemicallyActivated";
110  }
111 
112  inline scalar operator()
113  (
114  const scalar p,
115  const scalar T,
116  const scalarField& c
117  ) const;
118 
119  //- Write to stream
120  inline void write(Ostream& os) const;
121 
122 
123  // Ostream Operator
124 
125  friend Ostream& operator<< <ReactionRate, ChemicallyActivationFunction>
126  (
127  Ostream&,
129  <ReactionRate, ChemicallyActivationFunction>&
130  );
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Foam::ChemicallyActivatedReactionRate::k0_
ReactionRate k0_
Definition: ChemicallyActivatedReactionRate.H:67
p
p
Definition: pEqn.H:62
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::ChemicallyActivatedReactionRate::kInf_
ReactionRate kInf_
Definition: ChemicallyActivatedReactionRate.H:68
ChemicallyActivatedReactionRateI.H
Foam::ChemicallyActivatedReactionRate::thirdBodyEfficiencies_
thirdBodyEfficiencies thirdBodyEfficiencies_
Definition: ChemicallyActivatedReactionRate.H:70
Foam::constant::physicoChemical::F
const dimensionedScalar F
Faraday constant: default SI units: [C/mol].
Foam::thirdBodyEfficiencies
Third body efficiencies.
Definition: thirdBodyEfficiencies.H:55
Foam::ChemicallyActivatedReactionRate::ChemicallyActivatedReactionRate
ChemicallyActivatedReactionRate(const ReactionRate &k0, const ReactionRate &kInf, const ChemicallyActivationFunction &F, const thirdBodyEfficiencies &tbes)
Construct from components.
Definition: ChemicallyActivatedReactionRateI.H:34
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::hashedWordList
A wordList with hashed indices for faster lookup by name.
Definition: hashedWordList.H:57
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:57
Foam::ChemicallyActivatedReactionRate::write
void write(Ostream &os) const
Write to stream.
Definition: ChemicallyActivatedReactionRateI.H:114
Foam::ChemicallyActivatedReactionRate::type
static word type()
Return the type name.
Definition: ChemicallyActivatedReactionRate.H:104
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:55
Foam::ChemicallyActivatedReactionRate::F_
ChemicallyActivationFunction F_
Definition: ChemicallyActivatedReactionRate.H:69
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
thirdBodyEfficiencies.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::ChemicallyActivatedReactionRate::operator
friend Ostream & operator(Ostream &, const ChemicallyActivatedReactionRate< ReactionRate, ChemicallyActivationFunction > &)
Foam::ChemicallyActivatedReactionRate
General class for handling chemically-activated bimolecular reactions.
Definition: ChemicallyActivatedReactionRate.H:47
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::type
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:588