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

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