Loading...
Searching...
No Matches
VoidFraction.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) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::VoidFraction
29
30Group
31 grpLagrangianIntermediateFunctionObjects
32
33Description
34 Creates particle void fraction field on carrier phase
35
36SourceFiles
37 VoidFraction.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef VoidFraction_H
42#define VoidFraction_H
43
44#include "CloudFunctionObject.H"
45#include "volFields.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class VoidFraction Declaration
54\*---------------------------------------------------------------------------*/
55
56template<class CloudType>
57class VoidFraction
58:
59 public CloudFunctionObject<CloudType>
60{
61 // Private Data
62
63 // Typedefs
64
65 //- Convenience typedef for parcel type
66 typedef typename CloudType::parcelType parcelType;
67
68
69 //- Void fraction field
71
72
73protected:
74
75 // Protected Member Functions
76
77 //- Write post-processing info
78 virtual void write();
79
80
81public:
82
83 //- Runtime type information
84 TypeName("voidFraction");
85
86
87 // Constructors
88
89 //- Construct from dictionary
91 (
92 const dictionary& dict,
94 const word& modelName
95 );
96
97 //- Construct copy
99
100 //- Construct and return a clone
102 {
104 (
105 new VoidFraction<CloudType>(*this)
106 );
107 }
108
109
110 //- Destructor
111 virtual ~VoidFraction() = default;
112
113
114 // Member Functions
115
116 // Evaluation
117
118 //- Pre-evolve hook
119 virtual void preEvolve
120 (
121 const typename parcelType::trackingData& td
122 );
123
124 //- Post-evolve hook
125 virtual void postEvolve
126 (
127 const typename parcelType::trackingData& td
128 );
129
130 //- Post-move hook
131 virtual bool postMove
132 (
133 parcelType& p,
134 const scalar dt,
135 const point& position0,
136 const typename parcelType::trackingData& td
137 );
138};
139
140
141// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142
143} // End namespace Foam
144
145// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
146
147#ifdef NoRepository
148 #include "VoidFraction.C"
149#endif
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#endif
154
155// ************************************************************************* //
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
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
TypeName("voidFraction")
Runtime type information.
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
virtual void write()
Write post-processing info.
virtual ~VoidFraction()=default
Destructor.
VoidFraction(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
virtual bool postMove(parcelType &p, const scalar dt, const point &position0, const typename parcelType::trackingData &td)
Post-move hook.
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
volScalarField & p
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
Namespace for OpenFOAM.
DSMCCloud< dsmcParcel > CloudType
vector point
Point is a vector.
Definition point.H:37
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68