function1Temperature.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) 2017-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::saturationModels::function1Temperature
26 
27 Description
28  Saturation vapour temperature in terms of
29  the vapour pressure (in Pa). The saturation temperature in Kelvins is
30  specified as a Foam::Function1 type, to enable use of, e.g. constant,
31  polynomial, table values.
32 
33  Examples:
34 
35  \verbatim
36  type function1;
37  function polynomial
38  (
39  (308.0422 0)
40  (0.0015096 1)
41  (-1.61589e-8 2)
42  (1.114106e-13 3)
43  (-4.52216e-19 4)
44  (1.05192e-24 5)
45  (-1.2953e-30 6)
46  (6.5365e-37 7)
47  );
48  \endverbatim
49 
50  \verbatim
51  type function1;
52  function table;
53  functionCoeffs
54  {
55  file "filename.csv";
56  format csv;
57  nHeaderLine 1;
58  refColumn 0;
59  componentColumns (1);
60  separator ",";
61  mergeSeparators no;
62  outOfBounds clamp;
63  interpolationScheme linear;
64  };
65  \endverbatim
66 
67 SourceFiles
68  function1Temperature.C
69 
70 \*---------------------------------------------------------------------------*/
71 
72 #ifndef function1Temperature_H
73 #define function1Temperature_H
74 
76 #include "Function1.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 namespace saturationModels
83 {
84 
85 /*---------------------------------------------------------------------------*\
86  Class function1Temperature Declaration
87 \*---------------------------------------------------------------------------*/
88 
90 :
92 {
93  // Private Data
94 
95  //- Saturation temperature as a function of pressure
96  autoPtr<Function1<scalar>> function_;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("function1");
103 
104 
105  // Constructors
106 
107  //- Construct from a dictionary and an interface
109  (
110  const dictionary& dict
111  );
112 
113 
114  //- Destructor
115  virtual ~function1Temperature();
116 
117 
118  // Member Functions
119 
120  //- Saturation temperature for volScalarField::Internal
122  (
124  ) const;
125 
126  //- Saturation temperature for volScalarField
127  virtual tmp<volScalarField> Tsat(const volScalarField& p) const;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace saturationModels
134 } // End namespace Foam
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
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
Saturation vapour temperature in terms of the vapour pressure (in Pa). The saturation temperature in ...
virtual tmp< volScalarField::Internal > Tsat(const volScalarField::Internal &p) const
Saturation temperature for volScalarField::Internal.
TypeName("function1")
Runtime type information.
function1Temperature(const dictionary &dict)
Construct from a dictionary and an interface.
Model to describe the dependence of saturation pressure on temperature, and vice versa.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
dictionary dict
volScalarField & p