FreeFOAM The Cross-Platform CFD Toolkit
hsRhoMixtureThermo.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::hsRhoMixtureThermo
26 
27 Description
28  Foam::hsRhoMixtureThermo
29 
30 SourceFiles
31  hsRhoMixtureThermo.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef hsRhoMixtureThermo_H
36 #define hsRhoMixtureThermo_H
37 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class hsRhoMixtureThermo Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class MixtureType>
51 :
52  public hsReactionThermo,
53  public MixtureType
54 {
55  // Private member functions
56 
57  void calculate();
58 
59  //- Construct as copy (not implemented)
61 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("hsRhoMixtureThermo");
67 
68 
69  // Constructors
70 
71  //- Construct from mesh
72  hsRhoMixtureThermo(const fvMesh&);
73 
74 
75  //- Destructor
76  virtual ~hsRhoMixtureThermo();
77 
78 
79  // Member functions
80 
81  //- Return the compostion of the multi-component mixture
83  {
84  return *this;
85  }
86 
87  //- Return the compostion of the multi-component mixture
88  virtual const basicMultiComponentMixture& composition() const
89  {
90  return *this;
91  }
92 
93  //- Update properties
94  virtual void correct();
95 
96 
97  // Fields derived from thermodynamic state variables
98 
99  //- Chemical enthalpy [J/kg]
100  virtual tmp<volScalarField> hc() const;
101 
102 
103  //- Sensible nthalpy for cell-set [J/kg]
104  virtual tmp<scalarField> hs
105  (
106  const scalarField& T,
107  const labelList& cells
108  ) const;
109 
110  //- Sensible enthalpy for patch [J/kg]
111  virtual tmp<scalarField> hs
112  (
113  const scalarField& T,
114  const label patchi
115  ) const;
116 
117  //- Heat capacity at constant pressure for patch [J/kg/K]
118  virtual tmp<scalarField> Cp
119  (
120  const scalarField& T,
121  const label patchi
122  ) const;
123 
124  //- Heat capacity at constant pressure [J/kg/K]
125  virtual tmp<volScalarField> Cp() const;
126 
127 
128  //- Read thermophysicalProperties dictionary
129  virtual bool read();
130 };
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace Foam
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #ifdef NoRepository
140 # include "hsRhoMixtureThermo.C"
141 #endif
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************ vim: set sw=4 sts=4 et: ************************ //