saturationModel.H
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 Class
25  Foam::saturationModel
26 
27 Description
28  Model to describe the dependence of saturation pressure on temperature, and
29  vice versa
30 
31 SourceFiles
32  saturationModel.C
33  saturationModelNew.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef saturationModel_H
38 #define saturationModel_H
39 
40 #include "volFields.H"
41 #include "dictionary.H"
42 #include "phaseInterface.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 regIOobject
57 {
58  // Private Data
59 
60  //- The interface
61  const phaseInterface interface_;
62 
63 
64 public:
65 
66  //- Runtime type information
67  TypeName("saturationModel");
68 
69 
70  //- Declare runtime construction
72  (
73  autoPtr,
75  dictionary,
76  (
77  const dictionary& dict,
79  ),
80  (dict, interface)
81  );
82 
83 
84  // Constructors
85 
86  //- Construct from a dictionary and an interface
88  (
89  const dictionary& dict,
90  const phaseInterface& interface
91  );
92 
93 
94  // Selectors
95 
97  (
98  const dictionary& dict,
99  const phaseInterface& interface,
100  const bool outer=true
101  );
102 
103 
104  //- Destructor
105  virtual ~saturationModel();
106 
107 
108  // Member Functions
109 
110  //- Access the interface
111  const phaseInterface& interface() const;
112 
113  //- Saturation pressure
114  virtual tmp<volScalarField> pSat
115  (
116  const volScalarField& T
117  ) const = 0;
118 
119  //- Saturation pressure derivative w.r.t. temperature
121  (
122  const volScalarField& T
123  ) const = 0;
124 
125  //- Natural log of the saturation pressure
127  (
128  const volScalarField& T
129  ) const = 0;
130 
131  //- Saturation temperature
132  virtual tmp<volScalarField> Tsat
133  (
134  const volScalarField& p
135  ) const = 0;
136 
137  //- Dummy write for regIOobject
138  bool writeData(Ostream& os) const;
139 };
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 } // End namespace Foam
145 
146 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147 
148 #endif
149 
150 // ************************************************************************* //
dictionary dict
virtual tmp< volScalarField > lnPSat(const volScalarField &T) const =0
Natural log of the saturation pressure.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
saturationModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Class to represent an interface between phases. Derivations can further specify the configuration of ...
virtual tmp< volScalarField > Tsat(const volScalarField &p) const =0
Saturation temperature.
static autoPtr< saturationModel > New(const dictionary &dict, const phaseInterface &interface, const bool outer=true)
declareRunTimeSelectionTable(autoPtr, saturationModel, dictionary,(const dictionary &dict, const phaseInterface &interface),(dict, interface))
Declare runtime construction.
bool writeData(Ostream &os) const
Dummy write for regIOobject.
const phaseInterface & interface() const
Access the interface.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Model to describe the dependence of saturation pressure on temperature, and vice versa.
TypeName("saturationModel")
Runtime type information.
virtual tmp< volScalarField > pSat(const volScalarField &T) const =0
Saturation pressure.
virtual ~saturationModel()
Destructor.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:52
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
volScalarField & p
A class for managing temporary objects.
Definition: PtrList.H:53
virtual tmp< volScalarField > pSatPrime(const volScalarField &T) const =0
Saturation pressure derivative w.r.t. temperature.
Namespace for OpenFOAM.