initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / barotropicCompressibilityModel / barotropicCompressibilityModel / barotropicCompressibilityModel.H
blobc6babbdf0eeac435bbdf4f6291f67eaa47fff6a0
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Namespace
26     Foam::compressibilityModels
28 Description
29     Namespace for compressibility models.
32 Class
33     Foam::barotropicCompressibilityModel
35 Description
36     Abstract class for barotropic compressibility models
38 SourceFiles
39     barotropicCompressibilityModel.C
40     newbarotropicCompressibilityModel.C
42 \*---------------------------------------------------------------------------*/
44 #ifndef barotropicCompressibilityModel_H
45 #define barotropicCompressibilityModel_H
47 #include "IOdictionary.H"
48 #include "typeInfo.H"
49 #include "runTimeSelectionTables.H"
50 #include "volFields.H"
51 #include "dimensionedScalar.H"
52 #include "autoPtr.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 namespace Foam
59 /*---------------------------------------------------------------------------*\
60                 Class barotropicCompressibilityModel Declaration
61 \*---------------------------------------------------------------------------*/
63 class barotropicCompressibilityModel
66 protected:
68     // Protected data
70         dictionary compressibilityProperties_;
72         volScalarField psi_;
73         const volScalarField& gamma_;
76     // Private Member Functions
78         //- Disallow copy construct
79         barotropicCompressibilityModel(const barotropicCompressibilityModel&);
81         //- Disallow default bitwise assignment
82         void operator=(const barotropicCompressibilityModel&);
85 public:
87     //- Runtime type information
88     TypeName("barotropicCompressibilityModel");
91     // Declare run-time constructor selection table
93         declareRunTimeSelectionTable
94         (
95             autoPtr,
96             barotropicCompressibilityModel,
97             dictionary,
98             (
99                 const dictionary& compressibilityProperties,
100                 const volScalarField& gamma,
101                 const word& psiName
102             ),
103             (compressibilityProperties, gamma, psiName)
104         );
107     // Selectors
109         //- Return a reference to the selected compressibility model
110         static autoPtr<barotropicCompressibilityModel> New
111         (
112             const dictionary& compressibilityProperties,
113             const volScalarField& gamma,
114             const word& psiName = "psi"
115         );
118     // Constructors
120         //- Construct from components
121         barotropicCompressibilityModel
122         (
123             const dictionary& compressibilityProperties,
124             const volScalarField& gamma,
125             const word& psiName = "psi"
126         );
129     // Destructor
131         virtual ~barotropicCompressibilityModel()
132         {}
135     // Member Functions
137         //- Return the phase transport properties dictionary
138         const dictionary& compressibilityProperties() const
139         {
140             return compressibilityProperties_;
141         }
143         //- Return the compressibility
144         const volScalarField& psi() const
145         {
146             return psi_;
147         }
149         //- Correct the compressibility
150         virtual void correct() = 0;
152         //- Read compressibilityProperties dictionary
153         virtual bool read(const dictionary& compressibilityProperties) = 0;
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 } // End namespace Foam
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163 #endif
165 // ************************************************************************* //