cloudAge.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::cloudAge
26 
27 Description
28  Function to compute and write an age 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  cloudAge1
39  {
40  type cloudAge;
41  libs ("libLagrangianCloudFunctionObjects.so");
42  cloud cloud;
43  }
44  \endverbatim
45 
46 SourceFiles
47  cloudAge.C
48 
49 \*---------------------------------------------------------------------------*/
50 
51 #ifndef cloudAge_functionObject_H
52 #define cloudAge_functionObject_H
53 
55 #include "LagrangianFields.H"
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 namespace functionObjects
62 {
63 
64 /*---------------------------------------------------------------------------*\
65  Class cloudAge Declaration
66 \*---------------------------------------------------------------------------*/
67 
68 class cloudAge
69 :
70  public cloudLagrangianMeshFunctionObject
71 {
72 private:
73 
74  // Private Data
75 
76  //- Age field
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("cloudAge");
84 
85 
86  // Constructors
87 
88  //- Construct from Time and dictionary
89  cloudAge
90  (
91  const word& name,
92  const Time& runTime,
93  const dictionary& dict
94  );
95 
96  //- Disallow default bitwise copy construction
97  cloudAge(const cloudAge&) = delete;
98 
99 
100  //- Destructor
101  virtual ~cloudAge();
102 
103 
104  // Member Functions
105 
106  //- Return the list of fields required
107  virtual wordList fields() const;
108 
109  //- Calculate and store the volumes
110  virtual bool execute();
111 
112  //- Update the ages
113  virtual void calculate
114  (
115  const LagrangianSubScalarField& deltaT,
116  const bool final
117  );
118 
119  //- Write the volumes
120  virtual bool write();
121 
122  //- Clear the volumes
123  virtual bool clear();
124 
125 
126  // Member Operators
127 
128  //- Disallow default bitwise assignment
129  void operator=(const cloudAge&) = delete;
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace functionObjects
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
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 an age field for a cloud.
Definition: cloudAge.H:80
virtual wordList fields() const
Return the list of fields required.
Definition: cloudAge.C:93
TypeName("cloudAge")
Runtime type information.
virtual ~cloudAge()
Destructor.
Definition: cloudAge.C:87
virtual bool clear()
Clear the volumes.
Definition: cloudAge.C:127
void operator=(const cloudAge &)=delete
Disallow default bitwise assignment.
cloudAge(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: cloudAge.C:49
virtual bool execute()
Calculate and store the volumes.
Definition: cloudAge.C:99
virtual bool write()
Write the volumes.
Definition: cloudAge.C:121
virtual void calculate(const LagrangianSubScalarField &deltaT, const bool final)
Update the ages.
Definition: cloudAge.C:106
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
dictionary dict