AntoineExtended.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 "AntoineExtended.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::AntoineExtended::pSat(const FieldType& T) const
51 {
52  return
54  *exp(A_ + B_/(C_ + T) + E_*pow(T, F_))
55  *pow(T, D_);
56 }
57 
58 
59 template<class FieldType>
61 Foam::saturationModels::AntoineExtended::pSatPrime(const FieldType& T) const
62 {
63  return pSat(T)*((D_ + E_*F_*pow(T, F_))/T - B_/sqr(C_ + T));
64 }
65 
66 
67 template<class FieldType>
69 Foam::saturationModels::AntoineExtended::lnPSat(const FieldType& T) const
70 {
71  return
72  A_
73  + B_/(C_ + T)
75  + E_*pow(T, F_);
76 }
77 
78 
79 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
80 
82 (
83  const dictionary& dict
84 )
85 :
87  A_("A", dimless, dict),
88  B_("B", dimTemperature, dict),
89  C_("C", dimTemperature, dict),
90  D_("D", dimless, dict),
91  F_("F", dimless, dict),
92  E_("E", dimless/pow(dimTemperature, F_), dict)
93 {}
94 
95 
96 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
97 
99 {}
100 
101 
102 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
103 
105 
106 
107 IMPLEMENT_PSAT(AntoineExtended, volScalarField);
108 
109 
110 // ************************************************************************* //
IMPLEMENT_PSAT(AntoineExtended, volScalarField::Internal)
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
Extended Antoine equation for the vapour pressure.
AntoineExtended(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
addToRunTimeSelectionTable(saturationPressureModel, Antoine, dictionary)
defineTypeNameAndDebug(Antoine, 0)
Namespace for OpenFOAM.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensionedScalar exp(const dimensionedScalar &ds)
const dimensionSet dimPressure
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimless
const dimensionSet dimTemperature
dimensionedScalar log(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:61
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dictionary dict