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