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 void postMove
132 (
133 parcelType& p,
134 const scalar dt,
135 const point& position0,
136 bool& keepParticle
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// ************************************************************************* //
Templated cloud function object base class.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Creates particle void fraction field on carrier phase.
Definition: VoidFraction.H:59
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
Definition: VoidFraction.H:100
virtual void postMove(parcelType &p, const scalar dt, const point &position0, bool &keepParticle)
Post-move hook.
Definition: VoidFraction.C:128
TypeName("voidFraction")
Runtime type information.
virtual void postEvolve(const typename parcelType::trackingData &td)
Post-evolve hook.
Definition: VoidFraction.C:112
virtual void write()
Write post-processing info.
Definition: VoidFraction.C:34
virtual ~VoidFraction()=default
Destructor.
virtual void preEvolve(const typename parcelType::trackingData &td)
Pre-evolve hook.
Definition: VoidFraction.C:78
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Class used to pass data into container.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:107
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73