saturationModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2018 OpenFOAM Foundation
9  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::saturationModel
29 
30 Description
31 
32 SourceFiles
33  saturationModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef saturationModel_H
38 #define saturationModel_H
39 
40 #include "IOdictionary.H"
41 #include "volFields.H"
42 #include "dictionary.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class saturationModel Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class saturationModel
55 :
56  public IOdictionary
57 {
58  // Private Member Functions
59 
60  //- No copy construct
61  saturationModel(const saturationModel&) = delete;
62 
63  //- No copy assignment
64  void operator=(const saturationModel&) = delete;
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("saturationModel");
71 
72 
73  //- Declare runtime construction
75  (
76  autoPtr,
78  dictionary,
79  (
80  const dictionary& dict, const objectRegistry& db
81  ),
82  (dict, db)
83  );
84 
85 
86  // Constructors
87 
88  //- Default constructed (from registry)
89  explicit saturationModel(const objectRegistry& db);
90 
91 
92  // Selectors
93 
94  //- Select default constructed
96  (
97  const dictionary& dict,
98  const objectRegistry& db
99  );
100 
101 
102  //- Destructor
103  virtual ~saturationModel() = default;
104 
105 
106  // Member Functions
107 
108  //- Saturation pressure
109  virtual tmp<volScalarField> pSat
110  (
111  const volScalarField& T
112  ) const = 0;
113 
114  //- Saturation pressure derivetive w.r.t. temperature
116  (
117  const volScalarField& T
118  ) const = 0;
119 
120  //- Natural log of the saturation pressure
122  (
123  const volScalarField& T
124  ) const = 0;
125 
126  //- Saturation temperature
127  virtual tmp<volScalarField> Tsat
128  (
129  const volScalarField& p
130  ) const = 0;
131 };
132 
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 } // End namespace Foam
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
volFields.H
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::saturationModel::New
static autoPtr< saturationModel > New(const dictionary &dict, const objectRegistry &db)
Select default constructed.
Definition: saturationModel.C:60
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::saturationModel
Definition: saturationModel.H:53
Foam::saturationModel::lnPSat
virtual tmp< volScalarField > lnPSat(const volScalarField &T) const =0
Natural log of the saturation pressure.
Foam::saturationModel::~saturationModel
virtual ~saturationModel()=default
Destructor.
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:60
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::saturationModel::Tsat
virtual tmp< volScalarField > Tsat(const volScalarField &p) const =0
Saturation temperature.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::saturationModel::pSat
virtual tmp< volScalarField > pSat(const volScalarField &T) const =0
Saturation pressure.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
IOdictionary.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::saturationModel::pSatPrime
virtual tmp< volScalarField > pSatPrime(const volScalarField &T) const =0
Saturation pressure derivetive w.r.t. temperature.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
dictionary.H
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::saturationModel::TypeName
TypeName("saturationModel")
Runtime type information.
Foam::saturationModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, saturationModel, dictionary,(const dictionary &dict, const objectRegistry &db),(dict, db))
Declare runtime construction.
Foam::IOobject::db
const objectRegistry & db() const noexcept
Return the local objectRegistry.
Definition: IOobject.C:487