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

hhuCombustionThermo.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::hhuCombustionThermo
00026 
00027 Description
00028     Foam::hhuCombustionThermo
00029 
00030 SourceFiles
00031     hhuCombustionThermo.C
00032     newhhuCombustionThermo.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef hhuCombustionThermo_H
00037 #define hhuCombustionThermo_H
00038 
00039 #include <reactionThermophysicalModels/hCombustionThermo.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                            Class hhuCombustionThermo Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 class hhuCombustionThermo
00051 :
00052     public hCombustionThermo
00053 {
00054 
00055 protected:
00056 
00057     // Protected data
00058 
00059         volScalarField Tu_;
00060         volScalarField hu_;
00061 
00062 
00063     // Protected member functions
00064 
00065         wordList huBoundaryTypes();
00066         void huBoundaryCorrection(volScalarField& hu);
00067 
00068 
00069 public:
00070 
00071     //- Runtime type information
00072     TypeName("hhuCombustionThermo");
00073 
00074 
00075     // Declare run-time constructor selection tables
00076 
00077         declareRunTimeSelectionTable
00078         (
00079             autoPtr,
00080             hhuCombustionThermo,
00081             fvMesh,
00082             (const fvMesh& mesh),
00083             (mesh)
00084         );
00085 
00086 
00087     // Constructors
00088 
00089         //- Construct from dictionary and mesh
00090         hhuCombustionThermo(const fvMesh&);
00091 
00092 
00093     // Selectors
00094 
00095         static autoPtr<hhuCombustionThermo> New(const fvMesh&);
00096 
00097 
00098     //- Destructor
00099     virtual ~hhuCombustionThermo();
00100 
00101 
00102     // Member functions
00103 
00104         //- Update properties
00105         virtual void correct() = 0;
00106 
00107 
00108         // Access to thermodynamic state variables.
00109 
00110             //- Unburnt gas enthalpy [J/kg]
00111             //  Non-const access allowed for transport equations
00112             virtual volScalarField& hu()
00113             {
00114                 return hu_;
00115             }
00116 
00117             //- Unburnt gas enthalpy [J/kg]
00118             virtual const volScalarField& hu() const
00119             {
00120                 return hu_;
00121             }
00122 
00123 
00124         // Fields derived from thermodynamic state variables
00125 
00126             //- Unburnt gas enthalpy for cell-set [J/kg]
00127             virtual tmp<scalarField> hu
00128             (
00129                 const scalarField& T,
00130                 const labelList& cells
00131             ) const = 0;
00132 
00133             //- Unburnt gas enthalpy for patch [J/kg]
00134             virtual tmp<scalarField> hu
00135             (
00136                 const scalarField& T,
00137                 const label patchi
00138             ) const = 0;
00139 
00140             //- Unburnt gas temperature [K]
00141             virtual const volScalarField& Tu() const
00142             {
00143                 return Tu_;
00144             }
00145 
00146             //- Burnt gas temperature [K]
00147             virtual tmp<volScalarField> Tb() const = 0;
00148 
00149             //- Unburnt gas density [kg/m^3]
00150             virtual tmp<volScalarField> rhou() const
00151             {
00152                 return p_*psiu();
00153             }
00154 
00155             //- Burnt gas density [kg/m^3]
00156             virtual tmp<volScalarField> rhob() const
00157             {
00158                 return p_*psib();
00159             }
00160 
00161             //- Unburnt gas compressibility [s^2/m^2]
00162             virtual tmp<volScalarField> psiu() const = 0;
00163 
00164             //- Burnt gas compressibility [s^2/m^2]
00165             virtual tmp<volScalarField> psib() const = 0;
00166 
00167             //- Dynamic viscosity of unburnt gas [kg/ms]
00168             virtual tmp<volScalarField> muu() const = 0;
00169 
00170             //- Dynamic viscosity of burnt gas [kg/ms]
00171             virtual tmp<volScalarField> mub() const = 0;
00172 };
00173 
00174 
00175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00176 
00177 } // End namespace Foam
00178 
00179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00180 
00181 #endif
00182 
00183 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines