specieReactionRates.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2016 OpenFOAM Foundation
9  Copyright (C) 2016-2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::functionObjects::specieReactionRates
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
34  Writes the domain averaged reaction rates for each specie for each reaction
35  into the file <timeDir>/specieReactionRates.dat
36 
37 See also
38  Foam::functionObjects::fvMeshFunctionObject
39  Foam::functionObjects::volRegion
40  Foam::functionObjects::writeFile
41 
42 SourceFiles
43  specieReactionRates.C
44 
45 \*---------------------------------------------------------------------------*/
46 
47 #ifndef functionObjects_specieReactionRates_H
48 #define functionObjects_specieReactionRates_H
49 
50 #include "fvMeshFunctionObject.H"
51 #include "volRegion.H"
52 #include "writeFile.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace functionObjects
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class specieReactionRates Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 template<class ChemistryModelType>
67 :
68  public fvMeshFunctionObject,
69  public volRegion,
70  public writeFile
71 {
72  // Private Member Data
73 
74  const ChemistryModelType& chemistryModel_;
75 
76 
77  // Private Member Functions
78 
79  //- File header information
80  virtual void writeFileHeader(Ostream& os) const;
81 
82  //- No copy construct
84 
85  //- No copy assignment
86  void operator=(const specieReactionRates&) = delete;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("specieReactionRates");
93 
94 
95  // Constructors
96 
97  //- Construct from Time and dictionary
99  (
100  const word& name,
101  const Time& runTime,
102  const dictionary& dict
103  );
104 
105 
106  //- Destructor
107  virtual ~specieReactionRates() = default;
108 
109 
110  // Member Functions
111 
112  //- Read the specieReactionRates data
113  virtual bool read(const dictionary& dict);
114 
115  //- Do nothing
116  virtual bool execute();
117 
118  //- Write the specie reaction rates
119  virtual bool write();
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace functionObjects
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
runTime
engineTime & runTime
Definition: createEngineTime.H:13
writeFile.H
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
fvMeshFunctionObject.H
Foam::functionObjects::volRegion
Volume (cell) region selection class.
Definition: volRegion.H:115
Foam::functionObjects::specieReactionRates
Writes the domain averaged reaction rates for each specie for each reaction into the file <timeDir>/s...
Definition: specieReactionRates.H:65
Foam::functionObjects::specieReactionRates::execute
virtual bool execute()
Do nothing.
Definition: specieReactionRates.C:103
Foam::functionObjects::fvMeshFunctionObject
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Definition: fvMeshFunctionObject.H:64
Foam::functionObjects::specieReactionRates::write
virtual bool write()
Write the specie reaction rates.
Definition: specieReactionRates.C:110
Foam::functionObjects::specieReactionRates::TypeName
TypeName("specieReactionRates")
Runtime type information.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
volRegion.H
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::specieReactionRates::~specieReactionRates
virtual ~specieReactionRates()=default
Destructor.
Foam::functionObjects::writeFile
Base class for writing single files from the function objects.
Definition: writeFile.H:119
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::functionObjects::specieReactionRates::read
virtual bool read(const dictionary &dict)
Read the specieReactionRates data.
Definition: specieReactionRates.C:92