FreezeParticles.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2024 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::FreezeParticles
28 
29 Group
30  grpLagrangianIntermediateFunctionObjects
31 
32 Description
33  Sets particle active flag to false to freeze particles in space
34 
35 Usage
36  Minimal example by using \c constant/<CloudProperties>:
37  \verbatim
38  cloudFunctions
39  {
40  FreezeParticles
41  {
42  // Mandatory entries
43  type FreezeParticles;
44  }
45  }
46  \endverbatim
47 
48  where the entries mean:
49  \table
50  Property | Description | Type | Reqd | Deflt
51  type | Type name: FreezeParticles | word | yes | -
52  \endtable
53 
54 SourceFiles
55  FreezeParticles.C
56 
57 \*---------------------------------------------------------------------------*/
58 
59 #ifndef Foam_FreezeParticles_H
60 #define Foam_FreezeParticles_H
61 
62 #include "CloudFunctionObject.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class FreezeParticles Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 template<class CloudType>
74 class FreezeParticles
75 :
76  public CloudFunctionObject<CloudType>
77 {
78  // Private Member Functions
79 
80  //- Write post-processing info
81  virtual void write()
82  {}
83 
84 
85 public:
86 
87  typedef typename CloudType::parcelType parcelType;
88 
89  //- Runtime type information
90  TypeName("FreezeParticles");
91 
92 
93  // Constructors
94 
95  //- Construct from dictionary
97  (
98  const dictionary& dict,
100  const word& modelName
101  );
102 
103  //- Copy construct
105 
106  //- Construct and return a clone
108  {
110  (
111  new FreezeParticles<CloudType>(*this)
112  );
113  }
114 
115 
116  //- Destructor
117  virtual ~FreezeParticles() = default;
118 
119 
120  // Member Functions
121 
122  //- Pre-evolve hook
123  virtual void preEvolve(const typename parcelType::trackingData& td);
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #ifdef NoRepository
134  #include "FreezeParticles.C"
135 #endif
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
TypeName("FreezeParticles")
Runtime type information.
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:98
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
virtual ~FreezeParticles()=default
Destructor.
const CloudType & owner() const
Return const access to the owner cloud.
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
A class for handling words, derived from Foam::string.
Definition: word.H:63
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:290
CloudType::parcelType parcelType
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Sets particle active flag to false to freeze particles in space.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67
FreezeParticles(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
Namespace for OpenFOAM.