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