1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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
26 Foam::compressibilityModels
29 Namespace for compressibility models.
33 Foam::barotropicCompressibilityModel
36 Abstract class for barotropic compressibility models
39 barotropicCompressibilityModel.C
40 newbarotropicCompressibilityModel.C
42 \*---------------------------------------------------------------------------*/
44 #ifndef barotropicCompressibilityModel_H
45 #define barotropicCompressibilityModel_H
47 #include "IOdictionary.H"
49 #include "runTimeSelectionTables.H"
50 #include "volFields.H"
51 #include "dimensionedScalar.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 /*---------------------------------------------------------------------------*\
60 Class barotropicCompressibilityModel Declaration
61 \*---------------------------------------------------------------------------*/
63 class barotropicCompressibilityModel
70 dictionary compressibilityProperties_;
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&);
87 //- Runtime type information
88 TypeName("barotropicCompressibilityModel");
91 // Declare run-time constructor selection table
93 declareRunTimeSelectionTable
96 barotropicCompressibilityModel,
99 const dictionary& compressibilityProperties,
100 const volScalarField& gamma,
103 (compressibilityProperties, gamma, psiName)
109 //- Return a reference to the selected compressibility model
110 static autoPtr<barotropicCompressibilityModel> New
112 const dictionary& compressibilityProperties,
113 const volScalarField& gamma,
114 const word& psiName = "psi"
120 //- Construct from components
121 barotropicCompressibilityModel
123 const dictionary& compressibilityProperties,
124 const volScalarField& gamma,
125 const word& psiName = "psi"
131 virtual ~barotropicCompressibilityModel()
137 //- Return the phase transport properties dictionary
138 const dictionary& compressibilityProperties() const
140 return compressibilityProperties_;
143 //- Return the compressibility
144 const volScalarField& psi() const
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 // ************************************************************************* //