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