initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / thermophysicalModels / combustion / hhuCombustionThermo / hhuCombustionThermo.H
blobffc9f27f5a45e543d51c1517943c9c698e04dae9
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 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
101         virtual ~hhuCombustionThermo();
104     // Member functions
106         //- Update properties
107         virtual void correct() = 0;
110         // Access to thermodynamic state variables.
112             //- Unburnt gas enthalpy [J/kg]
113             //  Non-const access allowed for transport equations
114             volScalarField& hu()
115             {
116                 return hu_;
117             }
119             //- Unburnt gas enthalpy [J/kg]
120             const volScalarField& hu() const
121             {
122                 return hu_;
123             }
126         // Fields derived from thermodynamic state variables
128             //- Unburnt gas enthalpy for cell-set [J/kg]
129             virtual tmp<scalarField> hu
130             (
131                 const scalarField& T,
132                 const labelList& cells
133             ) const = 0;
135             //- Unburnt gas enthalpy for patch [J/kg]
136             virtual tmp<scalarField> hu
137             (
138                 const scalarField& T,
139                 const label patchi
140             ) const = 0;
142             //- Unburnt gas temperature [K]
143             const volScalarField& Tu() const
144             {
145                 return Tu_;
146             }
148             //- Burnt gas temperature [K]
149             virtual tmp<volScalarField> Tb() const = 0;
151             //- Unburnt gas density [kg/m^3]
152             virtual tmp<volScalarField> rhou() const
153             {
154                 return p_*psiu();
155             }
157             //- Burnt gas density [kg/m^3]
158             virtual tmp<volScalarField> rhob() const
159             {
160                 return p_*psib();
161             }
163             //- Unburnt gas compressibility [s^2/m^2]
164             virtual tmp<volScalarField> psiu() const = 0;
166             //- Burnt gas compressibility [s^2/m^2]
167             virtual tmp<volScalarField> psib() const = 0;
169             //- Dynamic viscosity of unburnt gas [kg/ms]
170             virtual tmp<volScalarField> muu() const = 0;
172             //- Dynamic viscosity of burnt gas [kg/ms]
173             virtual tmp<volScalarField> mub() const = 0;
177 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 } // End namespace Foam
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 #endif
185 // ************************************************************************* //