Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::FreezeParticles
28
29Group
30 grpLagrangianIntermediateFunctionObjects
31
32Description
33 Sets particle active flag to false to freeze particles in space
34
35Usage
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
54SourceFiles
55 FreezeParticles.C
56
57\*---------------------------------------------------------------------------*/
58
59#ifndef Foam_FreezeParticles_H
60#define Foam_FreezeParticles_H
61
62#include "CloudFunctionObject.H"
63
64// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65
66namespace Foam
67{
68
69/*---------------------------------------------------------------------------*\
70 Class FreezeParticles Declaration
71\*---------------------------------------------------------------------------*/
72
73template<class CloudType>
75:
76 public CloudFunctionObject<CloudType>
77{
78 // Private Member Functions
79
80 //- Write post-processing info
81 virtual void write()
82 {}
83
84
85public:
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 (
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);
125
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129} // End namespace Foam
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132
133#ifdef NoRepository
134 #include "FreezeParticles.C"
135#endif
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139#endif
140
141// ************************************************************************* //
Templated cloud function object base class.
CloudFunctionObject(CloudType &owner)
Construct null from owner.
const CloudType & owner() const
Return const access to the owner cloud.
particle::trackingData trackingData
Definition DSMCParcel.H:155
Sets particle active flag to false to freeze particles in space.
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
FreezeParticles(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
TypeName("FreezeParticles")
Runtime type information.
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
virtual ~FreezeParticles()=default
Destructor.
CloudType::parcelType parcelType
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition autoPtr.H:65
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const dictionary & dict() const
Return const access to the cloud dictionary.
const word & modelName() const
Return const access to the name of the sub-model.
A class for handling words, derived from Foam::string.
Definition word.H:66
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68