saturationPressureModel.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) 2015-2022 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::saturationPressureModel
26 
27 Description
28  Model to describe the dependence of saturation pressure on temperature, and
29  vice versa
30 
31 SourceFiles
32  saturationPressureModel.C
33  saturationPressureModelNew.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef saturationPressureModel_H
38 #define saturationPressureModel_H
39 
40 #include "volFields.H"
41 #include "dictionary.H"
42 #include "runTimeSelectionTables.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 #define DEFINE_PSAT(FieldType, Modifier) \
47  \
48  virtual tmp<FieldType> pSat(const FieldType& T) const Modifier; \
49  \
50  virtual tmp<FieldType> pSatPrime(const FieldType& T) const Modifier; \
51  \
52  virtual tmp<FieldType> lnPSat(const FieldType& T) const Modifier;
53 
54 
55 #define IMPLEMENT_PSAT(ModelType, FieldType) \
56  \
57  Foam::tmp<Foam::FieldType> \
58  Foam::saturationModels::ModelType::pSat(const FieldType& T) const \
59  { \
60  return pSat<FieldType>(T); \
61  } \
62  \
63  Foam::tmp<Foam::FieldType> \
64  Foam::saturationModels::ModelType::pSatPrime(const FieldType& T) const \
65  { \
66  return pSatPrime<FieldType>(T); \
67  } \
68  \
69  Foam::tmp<Foam::FieldType> \
70  Foam::saturationModels::ModelType::lnPSat(const FieldType& T) const \
71  { \
72  return lnPSat<FieldType>(T); \
73  }
74 
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 
81 /*---------------------------------------------------------------------------*\
82  Class saturationPressureModel Declaration
83 \*---------------------------------------------------------------------------*/
84 
86 {
87 public:
88 
89  //- Runtime type information
90  TypeName("saturationPressureModel");
91 
92 
93  //- Declare runtime construction
95  (
96  autoPtr,
98  dictionary,
99  (const dictionary& dict),
100  (dict)
101  );
102 
103 
104  // Constructors
105 
106  //- Default construct
108 
109 
110  // Selectors
111 
112  //- Select with dictionary
114  (
115  const dictionary& dict
116  );
117 
118  //- Select with name within a dictionary
120  (
121  const word& name,
122  const dictionary& dict
123  );
124 
125 
126  //- Destructor
127  virtual ~saturationPressureModel();
128 
129 
130  // Member Functions
131 
132  //- Saturation pressure for volScalarField::Internal
134 
135  //- Saturation pressure for volScalarField
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #endif
147 
148 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Model to describe the dependence of saturation pressure on temperature, and vice versa.
declareRunTimeSelectionTable(autoPtr, saturationPressureModel, dictionary,(const dictionary &dict),(dict))
Declare runtime construction.
saturationPressureModel()
Default construct.
TypeName("saturationPressureModel")
Runtime type information.
static autoPtr< saturationPressureModel > New(const dictionary &dict)
Select with dictionary.
virtual ~saturationPressureModel()
Destructor.
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Macros to ease declaration of run-time selection tables.
#define DEFINE_PSAT(FieldType, Modifier)
dictionary dict