OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

barotropicCompressibilityModel.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Namespace
00026     Foam::compressibilityModels
00027 
00028 Description
00029     Namespace for compressibility models.
00030 
00031 
00032 Class
00033     Foam::barotropicCompressibilityModel
00034 
00035 Description
00036     Abstract class for barotropic compressibility models
00037 
00038 SourceFiles
00039     barotropicCompressibilityModel.C
00040     newbarotropicCompressibilityModel.C
00041 
00042 \*---------------------------------------------------------------------------*/
00043 
00044 #ifndef barotropicCompressibilityModel_H
00045 #define barotropicCompressibilityModel_H
00046 
00047 #include "IOdictionary.H"
00048 #include "typeInfo.H"
00049 #include "runTimeSelectionTables.H"
00050 #include "volFields.H"
00051 #include "dimensionedScalar.H"
00052 #include "autoPtr.H"
00053 
00054 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00055 
00056 namespace Foam
00057 {
00058 
00059 /*---------------------------------------------------------------------------*\
00060                 Class barotropicCompressibilityModel Declaration
00061 \*---------------------------------------------------------------------------*/
00062 
00063 class barotropicCompressibilityModel
00064 {
00065 
00066 protected:
00067 
00068     // Protected data
00069 
00070         dictionary compressibilityProperties_;
00071 
00072         volScalarField psi_;
00073         const volScalarField& gamma_;
00074 
00075 
00076     // Private Member Functions
00077 
00078         //- Disallow copy construct
00079         barotropicCompressibilityModel(const barotropicCompressibilityModel&);
00080 
00081         //- Disallow default bitwise assignment
00082         void operator=(const barotropicCompressibilityModel&);
00083 
00084 
00085 public:
00086 
00087     //- Runtime type information
00088     TypeName("barotropicCompressibilityModel");
00089 
00090 
00091     // Declare run-time constructor selection table
00092 
00093         declareRunTimeSelectionTable
00094         (
00095             autoPtr,
00096             barotropicCompressibilityModel,
00097             dictionary,
00098             (
00099                 const dictionary& compressibilityProperties,
00100                 const volScalarField& gamma,
00101                 const word& psiName
00102             ),
00103             (compressibilityProperties, gamma, psiName)
00104         );
00105 
00106 
00107     // Selectors
00108 
00109         //- Return a reference to the selected compressibility model
00110         static autoPtr<barotropicCompressibilityModel> New
00111         (
00112             const dictionary& compressibilityProperties,
00113             const volScalarField& gamma,
00114             const word& psiName = "psi"
00115         );
00116 
00117 
00118     // Constructors
00119 
00120         //- Construct from components
00121         barotropicCompressibilityModel
00122         (
00123             const dictionary& compressibilityProperties,
00124             const volScalarField& gamma,
00125             const word& psiName = "psi"
00126         );
00127 
00128 
00129     // Destructor
00130 
00131         virtual ~barotropicCompressibilityModel()
00132         {}
00133 
00134 
00135     // Member Functions
00136 
00137         //- Return the phase transport properties dictionary
00138         const dictionary& compressibilityProperties() const
00139         {
00140             return compressibilityProperties_;
00141         }
00142 
00143         //- Return the compressibility
00144         const volScalarField& psi() const
00145         {
00146             return psi_;
00147         }
00148 
00149         //- Correct the compressibility
00150         virtual void correct() = 0;
00151 
00152         //- Read compressibilityProperties dictionary
00153         virtual bool read(const dictionary& compressibilityProperties) = 0;
00154 };
00155 
00156 
00157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00158 
00159 } // End namespace Foam
00160 
00161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00162 
00163 #endif
00164 
00165 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd