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 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 face indices
65 
66  //- Field of the property for which to compute the flux
68 
69  //- Name of the flux
70  const word phiName_;
71 
72  //- Dimensions of the flux
73  const dimensionSet phiDims_;
74 
75  //- Flux boundary field
77 
78 
79  // Private Member Functions
80 
81  //- Return the property for which to compute the flux
83  (
84  const LagrangianSubScalarSubField& fraction,
85  const label sign
86  ) const = 0;
87 
88 
89 public:
90 
91  //- Runtime type information
92  TypeName("cloudBoundaryCollisionFlux");
93 
94 
95  // Constructors
96 
97  //- Construct from Time and dictionary
99  (
100  const word& name,
101  const Time& runTime,
102  const dictionary& dict,
103  const word& phiName,
104  const dimensionSet& phiDims
105  );
106 
107  //- Disallow default bitwise copy construction
109 
110 
111  //- Destructor
112  virtual ~cloudBoundaryCollisionFlux();
113 
114 
115  // Member Functions
116 
117  //- Return the list of fields required
118  virtual wordList fields() const;
119 
120  //- Return false so this function does not execute at the start
121  virtual bool executeAtStart() const;
122 
123  //- Do nothing. Everything happens in faces crossing hooks.
124  virtual bool execute();
125 
126  //- Hook before solution steps
127  virtual void preSolve();
128 
129  //- Hook before all face crossings
130  virtual void preCrossFaces
131  (
133  );
134 
135  //- Hook before face crossings of a specific sub-mesh
136  virtual void preCrossFaces
137  (
138  const LagrangianSubScalarSubField& fraction
139  );
140 
141  //- Hook following face crossings of a specific sub-mesh
142  virtual void postCrossFaces
143  (
144  const LagrangianSubScalarSubField& fraction
145  );
146 
147  //- Hook after all face crossings
148  virtual void postCrossFaces
149  (
151  );
152 
153  //- Write the number flux
154  virtual bool write();
155 
156  //- Clear the number flux
157  virtual bool clear();
158 
159 
160  // Member Operators
161 
162  //- Disallow default bitwise assignment
163  void operator=(const cloudBoundaryCollisionFlux&) = delete;
164 };
165 
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 } // End namespace functionObjects
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #endif
175 
176 // ************************************************************************* //
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.
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.
virtual void preCrossFaces(const LagrangianScalarInternalDynamicField &fraction)
Hook before all face crossings.
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:62
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.