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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::functionObjects::specieReactionRates
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Writes the domain averaged reaction rates for each specie for each reaction
35 into the file <timeDir>/specieReactionRates.dat
36
37See also
38 Foam::functionObjects::fvMeshFunctionObject
39 Foam::functionObjects::volRegion
40 Foam::functionObjects::writeFile
41
42SourceFiles
43 specieReactionRates.C
44
45\*---------------------------------------------------------------------------*/
46
47#ifndef functionObjects_specieReactionRates_H
48#define functionObjects_specieReactionRates_H
49
51#include "volRegion.H"
52#include "writeFile.H"
53
54// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55
56namespace Foam
57{
58namespace functionObjects
59{
60
61/*---------------------------------------------------------------------------*\
62 Class specieReactionRates Declaration
63\*---------------------------------------------------------------------------*/
64
65template<class ChemistryModelType>
67:
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
89public:
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// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
Writes the domain averaged reaction rates for each specie for each reaction into the file <timeDir>/s...
virtual ~specieReactionRates()=default
Destructor.
virtual bool read(const dictionary &dict)
Read the specieReactionRates data.
TypeName("specieReactionRates")
Runtime type information.
virtual bool write()
Write the specie reaction rates.
Volume (cell) region selection class.
Definition: volRegion.H:116
Base class for writing single files from the function objects.
Definition: writeFile.H:120
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73