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

basicRhoThermo.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 Class
00025     Foam::basicRhoThermo
00026 
00027 Description
00028     Basic thermodynamic properties based on density
00029 
00030 SourceFiles
00031     basicRhoThermo.C
00032     newBasicRhoThermo.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef basicRhoThermo_H
00037 #define basicRhoThermo_H
00038 
00039 #include <basicThermophysicalModels/basicThermo.H>
00040 #include <OpenFOAM/runTimeSelectionTables.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 /*---------------------------------------------------------------------------*\
00048                        Class basicRhoThermo Declaration
00049 \*---------------------------------------------------------------------------*/
00050 
00051 class basicRhoThermo
00052 :
00053     public basicThermo
00054 {
00055 
00056 protected:
00057 
00058     // Protected data
00059 
00060         //- Density field [kg/m^3]
00061         //  Named 'rhoThermo' to avoid (potential) conflict with solver density
00062         volScalarField rho_;
00063 
00064 
00065     // Protected member functions
00066 
00067         //- Construct as copy (not implemented)
00068         basicRhoThermo(const basicRhoThermo&);
00069 
00070 
00071 public:
00072 
00073     //- Runtime type information
00074     TypeName("basicRhoThermo");
00075 
00076 
00077     //- Declare run-time constructor selection table
00078     declareRunTimeSelectionTable
00079     (
00080         autoPtr,
00081         basicRhoThermo,
00082         fvMesh,
00083         (const fvMesh& mesh),
00084         (mesh)
00085     );
00086 
00087 
00088     // Constructors
00089 
00090         //- Construct from mesh
00091         basicRhoThermo(const fvMesh&);
00092 
00093 
00094     //- Selector
00095     static autoPtr<basicRhoThermo> New(const fvMesh&);
00096 
00097 
00098     //- Destructor
00099     virtual ~basicRhoThermo();
00100 
00101 
00102     // Member functions
00103 
00104         // Fields derived from thermodynamic state variables
00105 
00106             //- Density [kg/m^3]
00107             virtual tmp<volScalarField> rho() const;
00108 
00109             //- Return non-const access to the local density field [kg/m^3]
00110             virtual volScalarField& rho();
00111 };
00112 
00113 
00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00115 
00116 } // End namespace Foam
00117 
00118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00119 
00120 #endif
00121 
00122 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines