OpenFOAM logo
Open Source CFD Toolkit

hThermo.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-2005 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 Class
00026     hThermo
00027 
00028 SourceFiles
00029     hThermo.C
00030 
00031 \*---------------------------------------------------------------------------*/
00032 
00033 #ifndef hThermo_H
00034 #define hThermo_H
00035 
00036 #include "basicThermo.H"
00037 #include "basicMixture.H"
00038 
00039 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00040 
00041 namespace Foam
00042 {
00043 
00044 /*---------------------------------------------------------------------------*\
00045                            Class hThermo Declaration
00046 \*---------------------------------------------------------------------------*/
00047 
00048 template<class MixtureType>
00049 class hThermo
00050 :
00051     public basicThermo,
00052     public MixtureType
00053 {
00054     // Private data
00055 
00056         volScalarField h_;
00057 
00058 
00059     // Private member functions
00060 
00061         void calculate();
00062 
00063         //- Construct as copy (not implemented)
00064         hThermo(const hThermo<MixtureType>&);
00065 
00066 
00067 public:
00068 
00069     //- Runtime type information
00070     TypeName("hThermo");
00071 
00072 
00073     // Constructors
00074 
00075         //- Construct from mesh
00076         hThermo(const fvMesh&);
00077 
00078 
00079     // Destructor
00080 
00081         ~hThermo();
00082 
00083 
00084     // Member functions
00085 
00086         //- Return the compostion of the combustion mixture
00087         basicMixture& composition()
00088         {
00089             return *this;
00090         }
00091 
00092         //- Return the compostion of the combustion mixture
00093         const basicMixture& composition() const
00094         {
00095             return *this;
00096         }
00097 
00098         //- Update properties
00099         void correct();
00100 
00101 
00102         // Access to thermodynamic state variables
00103 
00104             //- Enthalpy [J/kg]
00105             //  Non-const access allowed for transport equations
00106             volScalarField& h()
00107             {
00108                 return h_;
00109             }
00110 
00111             //- Enthalpy [J/kg]
00112             const volScalarField& h() const
00113             {
00114                 return h_;
00115             }
00116 
00117 
00118         // Fields derived from thermodynamic state variables
00119 
00120             //- Enthalpy for cell-set [J/kg]
00121             tmp<scalarField> h
00122             (
00123                 const scalarField& T,
00124                 const labelList& cells
00125             ) const;
00126 
00127             //- Enthalpy for patch [J/kg]
00128             tmp<scalarField> h
00129             (
00130                 const scalarField& T,
00131                 const label patchi
00132             ) const;
00133 
00134             //- Heat capacity at constant pressure for patch [J/kg/K]
00135             tmp<scalarField> Cp(const scalarField& T, const label patchi) const;
00136 
00137             //- Heat capacity at constant pressure [J/kg/K]
00138             tmp<volScalarField> Cp() const;
00139 
00140             //- Heat capacity at constant volume [J/kg/K]
00141             tmp<volScalarField> Cv() const;
00142 
00143 
00144         //- Read thermophysicalProperties dictionary
00145         bool read();
00146 };
00147 
00148 
00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00150 
00151 } // End namespace Foam
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00154 
00155 #ifdef NoRepository
00156 #   include "hThermo.C"
00157 #endif
00158 
00159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00160 
00161 #endif
00162 
00163 // ************************************************************************* //
For further information go to www.openfoam.org