FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Namespace
00025     Foam::compressibilityModels
00026 
00027 Description
00028     Namespace for compressibility models.
00029 
00030 
00031 Class
00032     Foam::barotropicCompressibilityModel
00033 
00034 Description
00035     Abstract class for barotropic compressibility models
00036 
00037 SourceFiles
00038     barotropicCompressibilityModel.C
00039     newbarotropicCompressibilityModel.C
00040 
00041 \*---------------------------------------------------------------------------*/
00042 
00043 #ifndef barotropicCompressibilityModel_H
00044 #define barotropicCompressibilityModel_H
00045 
00046 #include <OpenFOAM/IOdictionary.H>
00047 #include <OpenFOAM/typeInfo.H>
00048 #include <OpenFOAM/runTimeSelectionTables.H>
00049 #include <finiteVolume/volFields.H>
00050 #include <OpenFOAM/dimensionedScalar.H>
00051 #include <OpenFOAM/autoPtr.H>
00052 
00053 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00054 
00055 namespace Foam
00056 {
00057 
00058 /*---------------------------------------------------------------------------*\
00059                 Class barotropicCompressibilityModel Declaration
00060 \*---------------------------------------------------------------------------*/
00061 
00062 class barotropicCompressibilityModel
00063 {
00064 
00065 protected:
00066 
00067     // Protected data
00068 
00069         dictionary compressibilityProperties_;
00070 
00071         volScalarField psi_;
00072         const volScalarField& gamma_;
00073 
00074 
00075     // Private Member Functions
00076 
00077         //- Disallow copy construct
00078         barotropicCompressibilityModel(const barotropicCompressibilityModel&);
00079 
00080         //- Disallow default bitwise assignment
00081         void operator=(const barotropicCompressibilityModel&);
00082 
00083 
00084 public:
00085 
00086     //- Runtime type information
00087     TypeName("barotropicCompressibilityModel");
00088 
00089 
00090     // Declare run-time constructor selection table
00091 
00092         declareRunTimeSelectionTable
00093         (
00094             autoPtr,
00095             barotropicCompressibilityModel,
00096             dictionary,
00097             (
00098                 const dictionary& compressibilityProperties,
00099                 const volScalarField& gamma,
00100                 const word& psiName
00101             ),
00102             (compressibilityProperties, gamma, psiName)
00103         );
00104 
00105 
00106     // Selectors
00107 
00108         //- Return a reference to the selected compressibility model
00109         static autoPtr<barotropicCompressibilityModel> New
00110         (
00111             const dictionary& compressibilityProperties,
00112             const volScalarField& gamma,
00113             const word& psiName = "psi"
00114         );
00115 
00116 
00117     // Constructors
00118 
00119         //- Construct from components
00120         barotropicCompressibilityModel
00121         (
00122             const dictionary& compressibilityProperties,
00123             const volScalarField& gamma,
00124             const word& psiName = "psi"
00125         );
00126 
00127 
00128     // Destructor
00129 
00130         virtual ~barotropicCompressibilityModel()
00131         {}
00132 
00133 
00134     // Member Functions
00135 
00136         //- Return the phase transport properties dictionary
00137         const dictionary& compressibilityProperties() const
00138         {
00139             return compressibilityProperties_;
00140         }
00141 
00142         //- Return the compressibility
00143         const volScalarField& psi() const
00144         {
00145             return psi_;
00146         }
00147 
00148         //- Correct the compressibility
00149         virtual void correct() = 0;
00150 
00151         //- Read compressibilityProperties dictionary
00152         virtual bool read(const dictionary& compressibilityProperties) = 0;
00153 };
00154 
00155 
00156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00157 
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #endif
00163 
00164 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines