adjustTimeStepToChemistry.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) 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::adjustTimeStepToChemistry
26 
27 Description
28  Returns the minimum chemistry chemical time scale
29 
30  This allows the solver to temporally resolve chemical changes, in order to
31  better couple the chemistry and transport, or in order to accurately
32  post-process the chemical changes.
33 
34  Note that this function only does anything if time step adjustment is
35  enabled in the controlDict.
36 
37  Example of function object specification:
38  \verbatim
39  adjustTimeStepToChemistry
40  {
41  type adjustTimeStepToChemistry;
42  libs ("libchemistryModel.so");
43  }
44  \endverbatim
45 
46 Usage
47  \table
48  Property | Description | Required | Default value
49  type | type name: adjustTimeStepToChemistry | yes |
50  phase | name of the reacting phase | no |
51  \endtable
52 
53 SourceFiles
54  adjustTimeStepToChemistry.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef functionObjects_adjustTimeStepToChemistry_H
59 #define functionObjects_adjustTimeStepToChemistry_H
60 
61 #include "regionFunctionObject.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace functionObjects
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class adjustTimeStepToChemistry Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class adjustTimeStepToChemistry
75 :
76  public regionFunctionObject
77 {
78  // Private Data
79 
80  //- Name of the phase
81  word phaseName_;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("adjustTimeStepToChemistry");
88 
89 
90  // Constructors
91 
92  //- Construct from components
94  (
95  const word& name,
96  const Time& runTime,
97  const dictionary& dict
98  );
99 
100  //- Disallow default bitwise copy construction
102 
103 
104  // Destructor
105  virtual ~adjustTimeStepToChemistry();
106 
107 
108  // Member Functions
109 
110  //- Read and reset the timeStep Function1
111  virtual bool read(const dictionary&);
112 
113  //- Return the list of fields required
114  virtual wordList fields() const
115  {
116  return wordList::null();
117  }
118 
119  //- Do nothing
120  virtual bool execute();
121 
122  //- Do nothing
123  virtual bool write();
124 
125  //- Return the minimum chemistry.deltaTChem()
126  virtual scalar maxDeltaT() const;
127 
128 
129  // Member Operators
130 
131  //- Disallow default bitwise assignment
132  void operator=(const adjustTimeStepToChemistry&) = delete;
133 };
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 } // End namespace functionObjects
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
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
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.
Returns the minimum chemistry chemical time scale.
virtual wordList fields() const
Return the list of fields required.
virtual scalar maxDeltaT() const
Return the minimum chemistry.deltaTChem()
adjustTimeStepToChemistry(const word &name, const Time &runTime, const dictionary &dict)
Construct from components.
TypeName("adjustTimeStepToChemistry")
Runtime type information.
void operator=(const adjustTimeStepToChemistry &)=delete
Disallow default bitwise assignment.
virtual bool read(const dictionary &)
Read and reset the timeStep Function1.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict