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