specieReactionRates.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2023 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::functionObjects::specieReactionRates
26 
27 Description
28  Writes the domain averaged reaction rates for each specie for each reaction
29  into the file <timeDir>/specieReactionRates.dat
30 
31 See also
32  Foam::functionObjects::fvMeshFunctionObject
33  Foam::fvCellSet
34  Foam::functionObjects::logFiles
35 
36 SourceFiles
37  specieReactionRates.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef functionObjects_specieReactionRates_H
42 #define functionObjects_specieReactionRates_H
43 
44 #include "fvMeshFunctionObject.H"
45 #include "fvCellSet.H"
46 #include "logFiles.H"
47 #include "basicChemistryModel.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace functionObjects
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class specieReactionRates Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public fvMeshFunctionObject,
63  public fvCellSet,
64  public logFiles
65 {
66  // Private Member Data
67 
68  //- Reference to the chemistry model
69  const basicChemistryModel& chemistryModel_;
70 
71 
72  // Private Member Functions
73 
74  //- File header information
75  virtual void writeFileHeader(const label i);
76 
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("specieReactionRates");
82 
83 
84  // Constructors
85 
86  //- Construct from Time and dictionary
88  (
89  const word& name,
90  const Time& runTime,
91  const dictionary& dict
92  );
93 
94  //- Disallow default bitwise copy construction
96 
97 
98  //- Destructor
99  virtual ~specieReactionRates();
100 
101 
102  // Member Functions
103 
104  //- Read the specieReactionRates data
105  virtual bool read(const dictionary&);
106 
107  //- Return the list of fields required
108  virtual wordList fields() const
109  {
110  return wordList::null();
111  }
112 
113  //- Do nothing
114  virtual bool execute();
115 
116  //- Write the specie reaction rates
117  virtual bool write();
118 
119 
120  // Member Operators
121 
122  //- Disallow default bitwise assignment
123  void operator=(const specieReactionRates&) = delete;
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace functionObjects
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #endif
135 
136 // ************************************************************************* //
static const List< word > & null()
Return a null List.
Definition: ListI.H:118
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
Base class for chemistry models.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
const word & name() const
Return the name of this functionObject.
Specialisation of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
functionObject base class for creating, maintaining and writing log files e.g. integrated of averaged...
Definition: logFiles.H:60
Writes the domain averaged reaction rates for each specie for each reaction into the file <timeDir>/s...
virtual wordList fields() const
Return the list of fields required.
TypeName("specieReactionRates")
Runtime type information.
void operator=(const specieReactionRates &)=delete
Disallow default bitwise assignment.
virtual bool write()
Write the specie reaction rates.
specieReactionRates(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual bool read(const dictionary &)
Read the specieReactionRates data.
General run-time selected cell set selection class for fvMesh.
Definition: fvCellSet.H:88
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict