initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / reactionThermo / reactionThermo / hReactionThermo / hReactionThermo.H
blob3d5c37614c3c16e3ec5fd7786bc667da322bb900
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2009-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::hReactionThermo
28 Description
29     Foam::hReactionThermo
31 SourceFiles
32     hReactionThermo.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef hReactionThermo_H
37 #define hReactionThermo_H
39 #include "basicRhoThermo.H"
40 #include "basicMultiComponentMixture.H"
41 #include "autoPtr.H"
42 #include "runTimeSelectionTables.H"
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 namespace Foam
49 /*---------------------------------------------------------------------------*\
50                      Class hReactionThermo Declaration
51 \*---------------------------------------------------------------------------*/
53 class hReactionThermo
55     public basicRhoThermo
58 protected:
60     // Protected data
62         //- Enthalpy field
63         volScalarField h_;
66 public:
68     //- Runtime type information
69     TypeName("hReactionThermo");
72     //- Declare run-time constructor selection tables
73     declareRunTimeSelectionTable
74     (
75         autoPtr,
76         hReactionThermo,
77         fvMesh,
78         (const fvMesh& mesh),
79         (mesh)
80     );
83     // Constructors
85         //- Construct from dictionary and mesh
86         hReactionThermo(const fvMesh&);
89     // Selectors
91         //- Standard selection based on fvMesh
92         static autoPtr<hReactionThermo> New(const fvMesh&);
94         //- Select and check that package contains 'thermoType'
95         static autoPtr<hReactionThermo> NewType
96         (
97             const fvMesh&,
98             const word& thermoType
99         );
102     //- Destructor
103     virtual ~hReactionThermo();
106     // Member functions
108         //- Return the composition of the multi-component mixture
109         virtual basicMultiComponentMixture& composition() = 0;
111         //- Return the composition of the multi-component mixture
112         virtual const basicMultiComponentMixture& composition() const = 0;
115         // Access to thermodynamic state variables
117             //- Enthalpy [J/kg]
118             //  Non-const access allowed for transport equations
119             virtual volScalarField& h()
120             {
121                 return h_;
122             }
124             //- Enthalpy [J/kg]
125             virtual const volScalarField& h() const
126             {
127                 return h_;
128             }
131         //- Sensible enthalpy [J/kg]
132         virtual tmp<volScalarField> hs() const = 0;
134         //- Chemical enthalpy [J/kg]
135         virtual tmp<volScalarField> hc() const = 0;
137         //- Update properties
138         virtual void correct() = 0;
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 } // End namespace Foam
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 #endif
150 // ************************************************************************* //