function1Pressure.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) 2025 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::function1Pressure
26 
27 Description
28  Saturation vapour pressure in terms of temperature in Kelvins. The
29  saturation pressure in Pa is specified as a Foam::Function1 type, to enable
30  use of, e.g. constant, polynomial, table values.
31 
32  Examples:
33 
34  \verbatim
35  type function1;
36  function
37  {
38  type table;
39  file "filename.csv";
40  format csv;
41  nHeaderLine 1;
42  columns (0 1);
43  separator ",";
44  mergeSeparators no;
45  outOfBounds clamp;
46  interpolationScheme linear;
47  }
48  \endverbatim
49 
50 SourceFiles
51  function1Pressure.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef function1Pressure_H
56 #define function1Pressure_H
57 
59 #include "Function1.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 namespace saturationModels
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class function1Pressure Declaration
70 \*---------------------------------------------------------------------------*/
71 
73 :
75 {
76  // Private Data
77 
78  //- Saturation pressure as a function of temperature
79  autoPtr<Function1<scalar>> function_;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("function1");
86 
87 
88  // Constructors
89 
90  //- Construct from a dictionary and an interface
92  (
93  const dictionary& dict
94  );
95 
96 
97  //- Destructor
98  virtual ~function1Pressure();
99 
100 
101  // Member Functions
102 
103  //- Saturation pressure for scalarField
104  virtual tmp<scalarField> pSat(const scalarField& T) const;
105 
106  //- Saturation pressure derivative w.r.t. temperature for scalarField
107  virtual tmp<scalarField> pSatPrime(const scalarField& T) const;
108 
109  //- Natural log of the saturation pressure for scalarField
110  virtual tmp<scalarField> lnPSat(const scalarField& T) const;
111 };
112 
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 } // End namespace saturationModels
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Saturation vapour pressure in terms of temperature in Kelvins. The saturation pressure in Pa is speci...
function1Pressure(const dictionary &dict)
Construct from a dictionary and an interface.
TypeName("function1")
Runtime type information.
virtual tmp< scalarField > pSat(const scalarField &T) const
Saturation pressure for scalarField.
virtual tmp< scalarField > pSatPrime(const scalarField &T) const
Saturation pressure derivative w.r.t. temperature for scalarField.
virtual tmp< scalarField > lnPSat(const scalarField &T) const
Natural log of the saturation pressure for scalarField.
Model to describe the dependence of saturation pressure on temperature.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
dictionary dict