cloudBoundaryCollisionFlux.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-2026 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::cloudBoundaryCollisionFlux
26 
27 Description
28  Base class for functions which generate a boundary collision flux for a
29  cloud
30 
31 SourceFiles
32  cloudBoundaryCollisionFlux.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef cloudBoundaryCollisionFlux_functionObject_H
37 #define cloudBoundaryCollisionFlux_functionObject_H
38 
39 #include "LagrangianPatchField.H"
41 #include "surfaceFields.H"
42 #include "LagrangianFields.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 namespace functionObjects
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class cloudBoundaryCollisionFlux Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
58 {
59 private:
60 
61  // Private Data
62 
63  //- Field of proc indices
65 
66  //- Field of face indices
68 
69  //- Field of the property for which to compute the flux
71 
72  //- Name of the flux
73  const word phiName_;
74 
75  //- Dimensions of the flux
76  const dimensionSet phiDims_;
77 
78  //- Flux boundary field
80 
81 
82  // Private Member Functions
83 
84  //- Return the property for which to compute the flux
86  (
88  const label sign
89  ) const = 0;
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("cloudBoundaryCollisionFlux");
96 
97 
98  // Constructors
99 
100  //- Construct from Time and dictionary
102  (
103  const word& name,
104  const Time& runTime,
105  const dictionary& dict,
106  const word& phiName,
107  const dimensionSet& phiDims
108  );
109 
110  //- Disallow default bitwise copy construction
112 
113 
114  //- Destructor
115  virtual ~cloudBoundaryCollisionFlux();
116 
117 
118  // Member Functions
119 
120  //- Return the list of fields required
121  virtual wordList fields() const;
122 
123  //- Return false so this function does not execute at the start
124  virtual bool executeAtStart() const;
125 
126  //- Do nothing. Everything happens in faces crossing hooks.
127  virtual bool execute();
128 
129  //- Hook before solution steps
130  virtual void preSolve();
131 
132  //- Hook before all face crossings
133  virtual void preCrossFaces
134  (
136  );
137 
138  //- Hook before face crossings of a specific sub-mesh
139  virtual void preCrossFaces
140  (
142  );
143 
144  //- Hook following face crossings of a specific sub-mesh
145  virtual void postCrossFaces
146  (
148  );
149 
150  //- Hook after all face crossings
151  virtual void postCrossFaces
152  (
154  );
155 
156  //- Write the number flux
157  virtual bool write();
158 
159  //- Clear the number flux
160  virtual bool clear();
161 
162 
163  // Member Operators
164 
165  //- Disallow default bitwise assignment
166  void operator=(const cloudBoundaryCollisionFlux&) = delete;
167 };
168 
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 } // End namespace functionObjects
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricBoundaryField class.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:76
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
const word & name() const
Return the name of this functionObject.
Base class for functions which generate a boundary collision flux for a cloud.
void operator=(const cloudBoundaryCollisionFlux &)=delete
Disallow default bitwise assignment.
virtual wordList fields() const
Return the list of fields required.
virtual void preCrossFaces(const LagrangianInternalScalarDynamicField &fraction)
Hook before all face crossings.
cloudBoundaryCollisionFlux(const word &name, const Time &runTime, const dictionary &dict, const word &phiName, const dimensionSet &phiDims)
Construct from Time and dictionary.
virtual bool executeAtStart() const
Return false so this function does not execute at the start.
virtual void postCrossFaces(const LagrangianSubScalarSubField &fraction)
Hook following face crossings of a specific sub-mesh.
TypeName("cloudBoundaryCollisionFlux")
Runtime type information.
virtual void preSolve()
Hook before solution steps.
virtual bool execute()
Do nothing. Everything happens in faces crossing hooks.
Base class for function objects that refer to an fvMesh and a cloud. Used, for example,...
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:63
const unitSet fraction
Namespace for OpenFOAM.
dimensionedScalar sign(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
dictionary dict
Foam::surfaceFields.