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-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 \*---------------------------------------------------------------------------*/
25 
26 #include "constantPressure.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace saturationModels
34 {
37  (
41  );
42 }
43 }
44 
45 
46 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
47 
48 template<class FieldType>
50 Foam::saturationModels::constantPressure::pSat(const FieldType& T) const
51 {
52  return FieldType::New("pSat", T.mesh(), pSat_);
53 }
54 
55 
56 template<class FieldType>
58 Foam::saturationModels::constantPressure::pSatPrime(const FieldType& T) const
59 {
60  return
62  (
63  "pSatPrime",
64  T.mesh(),
66  );
67 }
68 
69 
70 template<class FieldType>
72 Foam::saturationModels::constantPressure::lnPSat(const FieldType& T) const
73 {
74  return
76  (
77  "lnPSat",
78  T.mesh(),
79  dimensionedScalar(dimless, log(pSat_.value()))
80  );
81 }
82 
83 
84 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
85 
87 (
88  const dictionary& dict
89 )
90 :
92  pSat_("value", dimPressure, dict)
93 {}
94 
95 
97 (
98  const dimensionedScalar& pSat
99 )
100 :
102  pSat_(pSat)
103 {}
104 
105 
106 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
107 
109 {}
110 
111 
112 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
113 
115 
116 
117 IMPLEMENT_PSAT(constantPressure, volScalarField);
118 
119 
120 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Constant saturation pressure model.
constantPressure(const dictionary &dict)
Construct from a dictionary.
Model to describe the dependence of saturation pressure on temperature, and vice versa.
A class for managing temporary objects.
Definition: tmp.H:55
IMPLEMENT_PSAT(constantPressure, volScalarField::Internal)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
addToRunTimeSelectionTable(saturationPressureModel, Antoine, dictionary)
defineTypeNameAndDebug(Antoine, 0)
Namespace for OpenFOAM.
const dimensionSet dimPressure
const dimensionSet dimless
const dimensionSet dimTemperature
dimensionedScalar log(const dimensionedScalar &ds)
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:61
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict