constantPressure.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 "constantPressure.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace saturationModels
35 {
38  (
42  );
43 
46 }
47 }
48 
49 
50 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
51 
52 template<class FieldType>
54 Foam::saturationModels::constantPressure::pSat(const FieldType& T) const
55 {
56  return evaluate(T, "pSat", pSat_);
57 }
58 
59 
60 template<class FieldType>
62 Foam::saturationModels::constantPressure::pSatPrime(const FieldType& T) const
63 {
64  return evaluate(T, "pSatPrime", zeroPbyT);
65 }
66 
67 
68 template<class FieldType>
70 Foam::saturationModels::constantPressure::lnPSat(const FieldType& T) const
71 {
72  return evaluate(T, "lnPSat", log(pSat_/oneP));
73 }
74 
75 
76 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
77 
79 (
80  const dictionary& dict
81 )
82 :
84  pSat_("value", dimPressure, dict)
85 {}
86 
87 
89 (
90  const dimensionedScalar& pSat
91 )
92 :
94  pSat_(pSat)
95 {}
96 
97 
98 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
99 
101 {}
102 
103 
104 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
105 
106 IMPLEMENT_PSAT(saturationModels::constantPressure, scalarField);
107 
108 
109 IMPLEMENT_PSAT(saturationModels::constantPressure, volScalarField::Internal);
110 
111 
112 IMPLEMENT_PSAT(saturationModels::constantPressure, volScalarField);
113 
114 
115 // ************************************************************************* //
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 pressure model.
constantPressure(const dictionary &dict)
Construct from a dictionary.
Model to describe the dependence of saturation pressure on temperature.
A class for managing temporary objects.
Definition: tmp.H:55
IMPLEMENT_PSAT(saturationModels::constantPressure, scalarField)
static const dimensionedScalar zeroPbyT(dimPressure/dimTemperature, 0)
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 coefficient oneP(dimPressure, 1)
defineTypeNameAndDebug(Antoine, 0)
Namespace for OpenFOAM.
const dimensionSet dimPressure
void T(LagrangianPatchField< Type > &f, const LagrangianPatchField< Type > &f1)
const dimensionSet dimTemperature
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar log(const dimensionedScalar &ds)
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
dictionary dict