phaseChangeTwoPhaseMixture.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) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::phaseChangeTwoPhaseMixture
29
30Description
31
32SourceFiles
33 phaseChangeTwoPhaseMixture.C
34 newPhaseChangeModel.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef phaseChangeTwoPhaseMixture_H
39#define phaseChangeTwoPhaseMixture_H
40
42#include "typeInfo.H"
44#include "volFields.H"
45#include "dimensionedScalar.H"
46#include "autoPtr.H"
47#include "Pair.H"
48
49// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50
51namespace Foam
52{
53
54/*---------------------------------------------------------------------------*\
55 Class phaseChangeTwoPhaseMixture Declaration
56\*---------------------------------------------------------------------------*/
59:
61{
62
63protected:
64
65 // Protected data
68
69 //- Saturation vapour pressure
71
72
73 // Private Member Functions
74
75 //- No copy construct
77
78 //- No copy assignment
79 void operator=(const phaseChangeTwoPhaseMixture&) = delete;
80
81
82public:
83
84 //- Runtime type information
85 TypeName("phaseChangeTwoPhaseMixture");
86
87
88 // Declare run-time constructor selection table
91 (
92 autoPtr,
94 components,
95 (
96 const volVectorField& U,
98 ),
99 (U, phi)
100 );
101
102
103 // Selectors
104
105 //- Return a reference to the selected phaseChange model
107 (
108 const volVectorField& U,
110 );
111
112
113 // Constructors
114
115 //- Construct from components
117 (
118 const word& type,
119 const volVectorField& U,
121 );
122
123
124 //- Destructor
125 virtual ~phaseChangeTwoPhaseMixture() = default;
126
127
128 // Member Functions
129
130 //- Return const-access to the saturation vapour pressure
131 const dimensionedScalar& pSat() const
132 {
133 return pSat_;
134 }
135
136 //- Return the mass condensation and vaporisation rates as a
137 // coefficient to multiply (1 - alphal) for the condensation rate
138 // and a coefficient to multiply alphal for the vaporisation rate
139 virtual Pair<tmp<volScalarField>> mDotAlphal() const = 0;
140
141 //- Return the mass condensation and vaporisation rates as coefficients
142 // to multiply (p - pSat)
143 virtual Pair<tmp<volScalarField>> mDotP() const = 0;
144
145 //- Return the volumetric condensation and vaporisation rates as a
146 // coefficient to multiply (1 - alphal) for the condensation rate
147 // and a coefficient to multiply alphal for the vaporisation rate
149
150 //- Return the volumetric condensation and vaporisation rates as
151 // coefficients to multiply (p - pSat)
153
154 //- Correct the phaseChange model
155 virtual void correct() = 0;
156
157 //- Read the transportProperties dictionary and update
158 virtual bool read() = 0;
159};
160
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164} // End namespace Foam
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168#endif
169
170// ************************************************************************* //
surfaceScalarField & phi
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:69
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A two-phase incompressible transportModel.
const volVectorField & U() const
Return const-access to the mixture velocity.
void operator=(const phaseChangeTwoPhaseMixture &)=delete
No copy assignment.
virtual bool read()=0
Read the transportProperties dictionary and update.
const dimensionedScalar & pSat() const
Return const-access to the saturation vapour pressure.
static autoPtr< phaseChangeTwoPhaseMixture > New(const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected phaseChange model.
dimensionedScalar pSat_
Saturation vapour pressure.
virtual Pair< tmp< volScalarField > > mDotP() const =0
Return the mass condensation and vaporisation rates as coefficients.
TypeName("phaseChangeTwoPhaseMixture")
Runtime type information.
phaseChangeTwoPhaseMixture(const word &type, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
virtual void correct()=0
Correct the phaseChange model.
Pair< tmp< volScalarField > > vDotP() const
Return the volumetric condensation and vaporisation rates as.
phaseChangeTwoPhaseMixture(const phaseChangeTwoPhaseMixture &)=delete
No copy construct.
declareRunTimeSelectionTable(autoPtr, phaseChangeTwoPhaseMixture, components,(const volVectorField &U, const surfaceScalarField &phi),(U, phi))
Pair< tmp< volScalarField > > vDotAlphal() const
Return the volumetric condensation and vaporisation rates as a.
virtual ~phaseChangeTwoPhaseMixture()=default
Destructor.
virtual Pair< tmp< volScalarField > > mDotAlphal() const =0
Return the mass condensation and vaporisation rates as a.
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73