VolumeFraction.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) 2011-2023 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::VolumeFraction
26 
27 Description
28  Creates particle volume fraction field on carrier phase
29 
30 SourceFiles
31  VolumeFraction.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef VolumeFraction_H
36 #define VolumeFraction_H
37 
38 #include "CloudFunctionObject.H"
39 #include "volFields.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class VolumeFraction Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class CloudType>
51 class VolumeFraction
52 :
53  public CloudFunctionObject<CloudType>
54 {
55 protected:
56 
57  // Private Data
58 
59  //- Volume fraction field
61 
62 
63  // Protected Member Functions
64 
65  //- Write post-processing info
66  virtual void write();
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("volumeFraction");
73 
74 
75  // Constructors
76 
77  //- Construct from dictionary
79  (
80  const dictionary& dict,
82  const word& modelName
83  );
84 
85  //- Construct copy
87 
88  //- Construct and return a clone
90  {
92  (
93  new VolumeFraction<CloudType>(*this)
94  );
95  }
96 
97 
98  //- Destructor
99  virtual ~VolumeFraction();
100 
101 
102  // Member Functions
103 
104  // Evaluation
105 
106  //- Post-evolve hook
107  virtual void postEvolve();
108 };
109 
110 
111 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
112 
113 } // End namespace Foam
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #ifdef NoRepository
118  #include "VolumeFraction.C"
119 #endif
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #endif
124 
125 // ************************************************************************* //
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:80
Generic GeometricField class.
Creates particle volume fraction field on carrier phase.
virtual void postEvolve()
Post-evolve hook.
TypeName("volumeFraction")
Runtime type information.
VolumeFraction(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
virtual void write()
Write post-processing info.
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
virtual ~VolumeFraction()
Destructor.
volScalarField alpha_
Volume fraction field.
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 keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.