constantTemperature.C
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-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 \*---------------------------------------------------------------------------*/
25 
26 #include "saturationModels.H"
27 #include "constantTemperature.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace saturationModels
35 {
38  (
42  );
43 
45 }
46 }
47 
48 
49 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
50 
51 template<class FieldType>
54 {
55  return evaluate(p, "Tsat", Tsat_);
56 }
57 
58 
59 template<class FieldType>
62 {
63  return evaluate(p, "TsatPrime", zeroTbyP);
64 }
65 
66 
67 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
68 
70 (
71  const dictionary& dict
72 )
73 :
75  Tsat_("value", dimTemperature, dict)
76 {}
77 
78 
80 (
81  const dimensionedScalar& Tsat
82 )
83 :
85  Tsat_(Tsat)
86 {}
87 
88 
89 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
90 
92 {}
93 
94 
95 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
96 
97 IMPLEMENT_TSAT(saturationModels::constantTemperature, scalarField);
98 
99 
100 IMPLEMENT_TSAT(saturationModels::constantTemperature, volScalarField::Internal);
101 
102 
103 IMPLEMENT_TSAT(saturationModels::constantTemperature, volScalarField);
104 
105 
106 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
DimensionedField< Type, GeoMesh, PrimitiveField > Internal
Type of the internal field from which this GeometricField is derived.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Constant saturation temperature model.
const dimensionedScalar Tsat_
Constant saturation temperature.
tmp< FieldType > Tsat(const FieldType &p) const
Saturation temperature.
constantTemperature(const dictionary &dict)
Construct from a dictionary.
tmp< FieldType > TsatPrime(const FieldType &p) const
Saturation temperature derivative w.r.t. pressure.
Model to describe the dependence of saturation temperature on pressure.
A class for managing temporary objects.
Definition: tmp.H:55
IMPLEMENT_TSAT(saturationModels::constantTemperature, scalarField)
tmp< scalarField > evaluate(const scalarField &argument, const word &name, const dimensionedScalar &value)
Construct a scalar field from a uniform value.
addToRunTimeSelectionTable(saturationPressureModel, Antoine, dictionary)
static const dimensionedScalar zeroTbyP(dimTemperature/dimPressure, 0)
defineTypeNameAndDebug(Antoine, 0)
Namespace for OpenFOAM.
const dimensionSet dimPressure
const dimensionSet dimTemperature
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
dictionary dict
volScalarField & p