cloudKineticEnergy.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::cloudKineticEnergy
26 
27 Description
28  Function to compute and write the kinetic energy field for a cloud
29 
30 Usage
31  \table
32  Property | Description | Required? | Default
33  cloud | Name of the cloud | yes |
34  \endtable
35 
36  Example specification:
37  \verbatim
38  cloudKineticEnergy1
39  {
40  type cloudKineticEnergy;
41  libs ("libLagrangianCloudFunctionObjects.so");
42  cloud cloud;
43  }
44  \endverbatim
45 
46 SourceFiles
47  cloudKineticEnergy.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef cloudKineticEnergy_functionObject_H
52 #define cloudKineticEnergy_functionObject_H
53 
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 namespace functionObjects
61 {
62 
63 /*---------------------------------------------------------------------------*\
64  Class cloudKineticEnergy Declaration
65 \*---------------------------------------------------------------------------*/
66 
67 class cloudKineticEnergy
68 :
69  public cloudLagrangianMeshFunctionObject
70 {
71 public:
72 
73  //- Runtime type information
74  TypeName("cloudKineticEnergy");
75 
76 
77  // Public Static Data
78 
79  //- The name of the kinetic energy field
80  static const word KEName_;
81 
82 
83  // Constructors
84 
85  //- Construct from Time and dictionary
87  (
88  const word& name,
89  const Time& runTime,
90  const dictionary& dict
91  );
92 
93  //- Disallow default bitwise copy construction
95  (
96  const cloudKineticEnergy&
97  ) = delete;
98 
99 
100  //- Destructor
101  virtual ~cloudKineticEnergy();
102 
103 
104  // Member Functions
105 
106  //- Return the list of fields required
107  virtual wordList fields() const;
108 
109  //- Hook before solution steps
110  virtual void preSolve();
111 
112  //- Calculate and store the kinetic energy
113  virtual bool execute();
114 
115  //- Write the kinetic energy
116  virtual bool write();
117 
118  //- Clear the kinetic energy
119  virtual bool clear();
120 
121 
122  // Member Operators
123 
124  //- Disallow default bitwise assignment
125  void operator=(const cloudKineticEnergy&) = delete;
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace functionObjects
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
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.
Function to compute and write the kinetic energy field for a cloud.
TypeName("cloudKineticEnergy")
Runtime type information.
cloudKineticEnergy(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
void operator=(const cloudKineticEnergy &)=delete
Disallow default bitwise assignment.
virtual wordList fields() const
Return the list of fields required.
virtual bool clear()
Clear the kinetic energy.
static const word KEName_
The name of the kinetic energy field.
virtual void preSolve()
Hook before solution steps.
virtual bool execute()
Calculate and store the kinetic energy.
virtual bool write()
Write the kinetic energy.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict