ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / lagrangian / intermediate / submodels / CloudFunctionObjects / VoidFraction / VoidFraction.H
blob0b15a6f620737598cd5a218440e4087654d0c009
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::VoidFraction
27 Description
28     Creates particle void fraction field on carrier phase
30 SourceFiles
31     VoidFraction.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef VoidFraction_H
36 #define VoidFraction_H
38 #include "CloudFunctionObject.H"
39 #include "volFields.H"
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 namespace Foam
46 /*---------------------------------------------------------------------------*\
47                        Class VoidFraction Declaration
48 \*---------------------------------------------------------------------------*/
50 template<class CloudType>
51 class VoidFraction
53     public CloudFunctionObject<CloudType>
55     // Private Data
57         // Typedefs
59             //- Convenience typedef for parcel type
60             typedef typename CloudType::parcelType parcelType;
63         //- Void fraction field
64         autoPtr<volScalarField> thetaPtr_;
67 protected:
69     // Protected Member Functions
71         //- Write post-processing info
72         virtual void write();
75 public:
77     //- Runtime type information
78     TypeName("voidFraction");
81     // Constructors
83         //- Construct from dictionary
84         VoidFraction(const dictionary& dict, CloudType& owner);
86         //- Construct copy
87         VoidFraction(const VoidFraction<CloudType>& vf);
89         //- Construct and return a clone
90         virtual autoPtr<CloudFunctionObject<CloudType> > clone() const
91         {
92             return autoPtr<CloudFunctionObject<CloudType> >
93             (
94                 new VoidFraction<CloudType>(*this)
95             );
96         }
99     //- Destructor
100     virtual ~VoidFraction();
103     // Member Functions
105         // Evaluation
107             //- Pre-evolve hook
108             virtual void preEvolve();
110             //- Post-evolve hook
111             virtual void postEvolve();
113             //- Post-move hook
114             virtual void postMove
115             (   
116                 const parcelType& p,
117                 const label cellI,
118                 const scalar dt
119             );
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 } // End namespace Foam
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 #ifdef NoRepository
130 #   include "VoidFraction.C"
131 #endif
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 #endif
137 // ************************************************************************* //