All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sensibleEnthalpy.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation
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::sensibleEnthalpy
26 
27 Description
28  Thermodynamics mapping class to expose the sensible enthalpy functions.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef sensibleEnthalpy_H
33 #define sensibleEnthalpy_H
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39 
40 /*---------------------------------------------------------------------------*\
41  Class sensibleEnthalpy Declaration
42 \*---------------------------------------------------------------------------*/
43 
44 template<class Thermo>
45 class sensibleEnthalpy
46 {
47 
48 public:
49 
50  // Constructors
51 
52  //- Construct
54  {}
55 
56 
57  // Member Functions
58 
59  //- Return the instantiated type name
60  static word typeName()
61  {
62  return "sensibleEnthalpy";
63  }
64 
65  // Fundamental properties
66 
67  static bool enthalpy()
68  {
69  return true;
70  }
71 
72  static word energyName()
73  {
74  return "h";
75  }
76 
77  // Heat capacity at constant pressure [J/kg/K]
78  scalar Cpv
79  (
80  const Thermo& thermo,
81  const scalar p,
82  const scalar T
83  ) const
84  {
85  return thermo.Cp(p, T);
86  }
87 
88  // Sensible enthalpy [J/kg]
89  scalar HE
90  (
91  const Thermo& thermo,
92  const scalar p,
93  const scalar T
94  ) const
95  {
96  return thermo.Hs(p, T);
97  }
98 
99  //- Temperature from sensible enthalpy
100  // given an initial temperature T0
101  scalar THE
102  (
103  const Thermo& thermo,
104  const scalar h,
105  const scalar p,
106  const scalar T0
107  ) const
108  {
109  return thermo.THs(h, p, T0);
110  }
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace Foam
117 
118 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119 
120 #endif
121 
122 // ************************************************************************* //
scalar THE(const Thermo &thermo, const scalar h, const scalar p, const scalar T0) const
Temperature from sensible enthalpy.
scalar HE(const Thermo &thermo, const scalar p, const scalar T) const
sensibleEnthalpy()
Construct.
const dimensionedScalar h
Planck constant.
A class for handling words, derived from string.
Definition: word.H:59
Thermodynamics mapping class to expose the sensible enthalpy functions.
static word typeName()
Return the instantiated type name.
scalar Cpv(const Thermo &thermo, const scalar p, const scalar T) const
Namespace for OpenFOAM.
scalar T0
Definition: createFields.H:22