initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / reactionThermo / combustionThermo / hhuCombustionThermo / hhuCombustionThermo.H
blob8ef4c972ba07566451cb2edd2de6f0d45bb5571b
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::hhuCombustionThermo
28 Description
29     Foam::hhuCombustionThermo
31 SourceFiles
32     hhuCombustionThermo.C
33     newhhuCombustionThermo.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef hhuCombustionThermo_H
38 #define hhuCombustionThermo_H
40 #include "hCombustionThermo.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class hhuCombustionThermo Declaration
49 \*---------------------------------------------------------------------------*/
51 class hhuCombustionThermo
53     public hCombustionThermo
56 protected:
58     // Protected data
60         volScalarField Tu_;
61         volScalarField hu_;
64     // Protected member functions
66         wordList huBoundaryTypes();
67         void huBoundaryCorrection(volScalarField& hu);
70 public:
72     //- Runtime type information
73     TypeName("hhuCombustionThermo");
76     // Declare run-time constructor selection tables
78         declareRunTimeSelectionTable
79         (
80             autoPtr,
81             hhuCombustionThermo,
82             fvMesh,
83             (const fvMesh& mesh),
84             (mesh)
85         );
88     // Constructors
90         //- Construct from dictionary and mesh
91         hhuCombustionThermo(const fvMesh&);
94     // Selectors
96         static autoPtr<hhuCombustionThermo> New(const fvMesh&);
99     //- Destructor
100     virtual ~hhuCombustionThermo();
103     // Member functions
105         //- Update properties
106         virtual void correct() = 0;
109         // Access to thermodynamic state variables.
111             //- Unburnt gas enthalpy [J/kg]
112             //  Non-const access allowed for transport equations
113             virtual volScalarField& hu()
114             {
115                 return hu_;
116             }
118             //- Unburnt gas enthalpy [J/kg]
119             virtual const volScalarField& hu() const
120             {
121                 return hu_;
122             }
125         // Fields derived from thermodynamic state variables
127             //- Unburnt gas enthalpy for cell-set [J/kg]
128             virtual tmp<scalarField> hu
129             (
130                 const scalarField& T,
131                 const labelList& cells
132             ) const = 0;
134             //- Unburnt gas enthalpy for patch [J/kg]
135             virtual tmp<scalarField> hu
136             (
137                 const scalarField& T,
138                 const label patchi
139             ) const = 0;
141             //- Unburnt gas temperature [K]
142             virtual const volScalarField& Tu() const
143             {
144                 return Tu_;
145             }
147             //- Burnt gas temperature [K]
148             virtual tmp<volScalarField> Tb() const = 0;
150             //- Unburnt gas density [kg/m^3]
151             virtual tmp<volScalarField> rhou() const
152             {
153                 return p_*psiu();
154             }
156             //- Burnt gas density [kg/m^3]
157             virtual tmp<volScalarField> rhob() const
158             {
159                 return p_*psib();
160             }
162             //- Unburnt gas compressibility [s^2/m^2]
163             virtual tmp<volScalarField> psiu() const = 0;
165             //- Burnt gas compressibility [s^2/m^2]
166             virtual tmp<volScalarField> psib() const = 0;
168             //- Dynamic viscosity of unburnt gas [kg/ms]
169             virtual tmp<volScalarField> muu() const = 0;
171             //- Dynamic viscosity of burnt gas [kg/ms]
172             virtual tmp<volScalarField> mub() const = 0;
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178 } // End namespace Foam
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 #endif
184 // ************************************************************************* //