initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / thermophysicalModels / basic / rhoThermo / hRhoThermo / hRhoThermo.H
bloba83a241c26354dfad0d1d4cd18f46f9dde950e72
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::hPsiThermo
28 Description
29     Enthalpy for a mixture based on density
31 SourceFiles
32     hRhoThermo.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef hRhoThermo_H
37 #define hRhoThermo_H
39 #include "basicRhoThermo.H"
40 #include "basicMixture.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                          Class hRhoThermo Declaration
49 \*---------------------------------------------------------------------------*/
51 template<class MixtureType>
52 class hRhoThermo
54     public basicRhoThermo,
55     public MixtureType
57     // Private data
59         //- Enthalpy field
60         volScalarField h_;
63     // Private member functions
65         //- Calculate the thermo variables
66         void calculate();
68         //- Construct as copy (not implemented)
69         hRhoThermo(const hRhoThermo<MixtureType>&);
72 public:
74     //- Runtime type information
75     TypeName("hRhoThermo");
78     // Constructors
80         //- Construct from mesh
81         hRhoThermo(const fvMesh&);
84     //- Destructor
85     virtual ~hRhoThermo();
88     // Member functions
90         //- Return the compostion of the combustion mixture
91         virtual basicMixture& composition()
92         {
93             return *this;
94         }
96         //- Return the compostion of the combustion mixture
97         virtual const basicMixture& composition() const
98         {
99             return *this;
100         }
102         //- Update properties
103         virtual void correct();
106         // Access to thermodynamic state variables
108             //- Enthalpy [J/kg]
109             //  Non-const access allowed for transport equations
110             virtual volScalarField& h()
111             {
112                 return h_;
113             }
115             //- Enthalpy [J/kg]
116             virtual const volScalarField& h() const
117             {
118                 return h_;
119             }
122         // Fields derived from thermodynamic state variables
124             //- Enthalpy for cell-set [J/kg]
125             virtual tmp<scalarField> h
126             (
127                 const scalarField& T,
128                 const labelList& cells
129             ) const;
131             //- Enthalpy for patch [J/kg]
132             virtual tmp<scalarField> h
133             (
134                 const scalarField& T,
135                 const label patchi
136             ) const;
138             //- Heat capacity at constant pressure for patch [J/kg/K]
139             virtual tmp<scalarField> Cp
140             (
141                 const scalarField& T,
142                 const label patchi
143             ) const;
145             //- Heat capacity at constant pressure [J/kg/K]
146             virtual tmp<volScalarField> Cp() const;
148             //- Heat capacity at constant volume for patch [J/kg/K]
149             virtual tmp<scalarField> Cv
150             (
151                 const scalarField& T,
152                 const label patchi
153             ) const;
155             //- Heat capacity at constant volume [J/kg/K]
156             virtual tmp<volScalarField> Cv() const;
159         //- Read thermophysicalProperties dictionary
160         virtual bool read();
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 } // End namespace Foam
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
170 #ifdef NoRepository
171 #   include "hRhoThermo.C"
172 #endif
174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 #endif
178 // ************************************************************************* //