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-2024 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  columns (0 1);
59  separator ",";
60  mergeSeparators no;
61  outOfBounds clamp;
62  interpolationScheme linear;
63  };
64  \endverbatim
65 
66 SourceFiles
67  function1Temperature.C
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef function1Temperature_H
72 #define function1Temperature_H
73 
75 #include "Function1.H"
76 
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78 
79 namespace Foam
80 {
81 namespace saturationModels
82 {
83 
84 /*---------------------------------------------------------------------------*\
85  Class function1Temperature Declaration
86 \*---------------------------------------------------------------------------*/
87 
89 :
91 {
92  // Private Data
93 
94  //- Saturation temperature as a function of pressure
95  autoPtr<Function1<scalar>> function_;
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("function1");
102 
103 
104  // Constructors
105 
106  //- Construct from a dictionary and an interface
108  (
109  const dictionary& dict
110  );
111 
112 
113  //- Destructor
114  virtual ~function1Temperature();
115 
116 
117  // Member Functions
118 
119  //- Saturation temperature for volScalarField::Internal
121  (
123  ) const;
124 
125  //- Saturation temperature for volScalarField
126  virtual tmp<volScalarField> Tsat(const volScalarField& p) const;
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace saturationModels
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
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:162
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