Initial commit for version 2.0.x patch release
[OpenFOAM-2.0.x.git] / applications / solvers / multiphase / twoPhaseEulerFoam / phaseModel / phaseModel / phaseModel.H
blobc5b6861f072185ba69c12e29f2611610122a01a1
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2004-2010 OpenCFD Ltd.
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::phaseModel
27 SourceFiles
28     phaseModel.C
30 \*---------------------------------------------------------------------------*/
32 #ifndef phaseModel_H
33 #define phaseModel_H
35 #include "dictionary.H"
36 #include "dimensionedScalar.H"
37 #include "volFields.H"
38 #include "surfaceFields.H"
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 namespace Foam
45 /*---------------------------------------------------------------------------*\
46                            Class phaseModel Declaration
47 \*---------------------------------------------------------------------------*/
49 class phaseModel
51     // Private data
53         dictionary dict_;
55         //- Name of phase
56         word name_;
58         //- Characteristic diameter of phase
59         dimensionedScalar d_;
61         //- kinematic viscosity
62         dimensionedScalar nu_;
64         //- density
65         dimensionedScalar rho_;
67         //- Velocity
68         volVectorField U_;
70         //- Fluxes
71         autoPtr<surfaceScalarField> phiPtr_;
74 public:
76     // Constructors
78         phaseModel
79         (
80             const fvMesh& mesh,
81             const dictionary& transportProperties,
82             const word& phaseName
83         );
86     // Selectors
88         //- Return a reference to the selected turbulence model
89         static autoPtr<phaseModel> New
90         (
91             const fvMesh& mesh,
92             const dictionary& transportProperties,
93             const word& phaseName
94         );
97     //- Destructor
98     virtual ~phaseModel();
101     // Member Functions
103         const word& name() const
104         {
105             return name_;
106         }
108         const dimensionedScalar& d() const
109         {
110             return d_;
111         }
113         const dimensionedScalar& nu() const
114         {
115             return nu_;
116         }
118         const dimensionedScalar& rho() const
119         {
120             return rho_;
121         }
123         const volVectorField& U() const
124         {
125             return U_;
126         }
128         volVectorField& U()
129         {
130             return U_;
131         }
133         const surfaceScalarField& phi() const
134         {
135             return phiPtr_();
136         }
138         surfaceScalarField& phi()
139         {
140             return phiPtr_();
141         }
145 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 } // End namespace Foam
149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 #endif
153 // ************************************************************************* //