adjustTimeStepToNucleation.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) 2025 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::adjustTimeStepToNucleation
26 
27 Description
28  Controls the time-step to the minimum nucleation time scale. A specific
29  nucleation model can be specified, otherwise it will scan for and use all
30  the nucleation fvModels in operation.
31 
32  Note that this function only does anything if time step adjustment is
33  enabled in the controlDict.
34 
35  Example of function object specification:
36  \verbatim
37  adjustTimeStepToNucleation
38  {
39  type adjustTimeStepToNucleation;
40  libs ("libmultiphaseEulerFunctionObjects.so");
41  maxCo 0.1;
42  }
43  \endverbatim
44 
45 Usage
46  \table
47  Property | Description | Required | Default value
48  type | type name: adjustTimeStepToNucleation | yes |
49  model | name of the nucleation fvModel | no |
50  maxCo | maximum nucleation "Courant" number | no | 1
51  \endtable
52 
53 SourceFiles
54  adjustTimeStepToNucleation.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef adjustTimeStepToNucleation_functionObject_H
59 #define adjustTimeStepToNucleation_functionObject_H
60 
61 #include "fvMeshFunctionObject.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 namespace functionObjects
68 {
69 
70 /*---------------------------------------------------------------------------*\
71  Class adjustTimeStepToNucleation Declaration
72 \*---------------------------------------------------------------------------*/
73 
74 class adjustTimeStepToNucleation
75 :
76  public fvMeshFunctionObject
77 {
78  // Private Data
79 
80  //- Name of the nucleation fvModel
81  word modelName_;
82 
83  //- Maximum nucleation "Courant" number
84  scalar maxCo_;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("adjustTimeStepToNucleation");
91 
92 
93  // Constructors
94 
95  //- Construct from components
97  (
98  const word& name,
99  const Time& runTime,
100  const dictionary& dict
101  );
102 
103  //- Disallow default bitwise copy construction
105 
106 
107  // Destructor
108  virtual ~adjustTimeStepToNucleation();
109 
110 
111  // Member Functions
112 
113  //- Read and reset the timeStep Function1
114  virtual bool read(const dictionary&);
115 
116  //- Return the list of fields required
117  virtual wordList fields() const
118  {
119  return wordList::null();
120  }
121 
122  //- Do nothing
123  virtual bool execute();
124 
125  //- Do nothing
126  virtual bool write();
127 
128  //- Return the minimum chemistry.deltaTChem()
129  virtual scalar maxDeltaT() const;
130 
131 
132  // Member Operators
133 
134  //- Disallow default bitwise assignment
135  void operator=(const adjustTimeStepToNucleation&) = delete;
136 };
137 
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 } // End namespace functionObjects
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
const word & name() const
Return the name of this functionObject.
Controls the time-step to the minimum nucleation time scale. A specific nucleation model can be speci...
void operator=(const adjustTimeStepToNucleation &)=delete
Disallow default bitwise assignment.
virtual wordList fields() const
Return the list of fields required.
TypeName("adjustTimeStepToNucleation")
Runtime type information.
adjustTimeStepToNucleation(const word &name, const Time &runTime, const dictionary &dict)
Construct from components.
virtual scalar maxDeltaT() const
Return the minimum chemistry.deltaTChem()
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