chemistryTabulationMethod.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-2026 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::chemistryTabulationMethod
26 
27 Description
28  An abstract class for chemistry tabulation.
29 
30 SourceFiles
31  chemistryTabulationMethod.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef chemistryTabulationMethod_H
36 #define chemistryTabulationMethod_H
37 
38 #include "IOdictionary.H"
39 #include "scalarField.H"
40 #include "runTimeSelectionTables.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace chemistryModels
50 {
51  class standard;
52 }
53 
54 /*---------------------------------------------------------------------------*\
55  Class chemistryTabulationMethod Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 {
60 public:
61 
62  //- Runtime type information
63  TypeName("chemistryTabulationMethod");
64 
65 
66  // Declare runtime constructor selection table
68  (
69  autoPtr,
71  dictionary,
72  (
73  const dictionary& dict,
75  ),
76  (dict, chemistry)
77  );
78 
79 
80  // Constructors
81 
82  //- Construct from components
84  (
85  const dictionary& dict,
87  );
88 
89 
90  // Selectors
91 
93  (
94  const IOdictionary& dict,
96  );
97 
98 
99  //- Destructor
100  virtual ~chemistryTabulationMethod();
101 
102 
103  // Member Functions
104 
105  //- Return true if the tabulation method tabulates
106  // otherwise return false
107  virtual bool tabulates() = 0;
108 
109  // Retrieve function: (only virtual here)
110  // Try to retrieve a stored point close enough (according to tolerance)
111  // to a stored point. If successful, it returns true and store the
112  // results in RphiQ, i.e. the result of the integration of phiQ
113  virtual bool retrieve
114  (
115  const scalarField& phiQ,
116  scalarField& RphiQ
117  ) = 0;
118 
119  // Add function: (only virtual here)
120  // Add information to the tabulation algorithm. Give the reference for
121  // future retrieve (phiQ) and the corresponding result (RphiQ).
122  virtual label add
123  (
124  const scalarField& phiQ,
125  const scalarField& RphiQ,
126  const label nActive,
127  const label li,
128  const scalar deltaT
129  ) = 0;
130 
131  // Update function: (only virtual here)
132  // The underlying structure of the tabulation is updated/cleaned
133  // to increase the performance of the retrieve
134  virtual bool update() = 0;
135 
136  virtual void reset() = 0;
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Non-templated Base class for Foam::chemistryModels::Standard.
An abstract class for chemistry tabulation.
TypeName("chemistryTabulationMethod")
Runtime type information.
virtual bool tabulates()=0
Return true if the tabulation method tabulates.
virtual bool retrieve(const scalarField &phiQ, scalarField &RphiQ)=0
declareRunTimeSelectionTable(autoPtr, chemistryTabulationMethod, dictionary,(const dictionary &dict, const chemistryModels::standard &chemistry),(dict, chemistry))
static autoPtr< chemistryTabulationMethod > New(const IOdictionary &dict, const chemistryModels::standard &chemistry)
chemistryTabulationMethod(const dictionary &dict, const chemistryModels::standard &chemistry)
Construct from components.
virtual label add(const scalarField &phiQ, const scalarField &RphiQ, const label nActive, const label li, const scalar deltaT)=0
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
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
Macros to ease declaration of run-time selection tables.
dictionary dict
chemistryModel & chemistry