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 -------------------------------------------------------------------------------
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::phaseChangeTwoPhaseMixture
29 
30 Description
31 
32 SourceFiles
33  phaseChangeTwoPhaseMixture.C
34  newPhaseChangeModel.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef phaseChangeTwoPhaseMixture_H
39 #define phaseChangeTwoPhaseMixture_H
40 
42 #include "typeInfo.H"
43 #include "runTimeSelectionTables.H"
44 #include "volFields.H"
45 #include "dimensionedScalar.H"
46 #include "autoPtr.H"
47 #include "Pair.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class phaseChangeTwoPhaseMixture Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
61 {
62 
63 protected:
64 
65  // Protected data
66 
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 
82 public:
83 
84  //- Runtime type information
85  TypeName("phaseChangeTwoPhaseMixture");
86 
87 
88  // Declare run-time constructor selection table
89 
91  (
92  autoPtr,
94  components,
95  (
96  const volVectorField& U,
97  const surfaceScalarField& phi
98  ),
99  (U, phi)
100  );
101 
102 
103  // Selectors
104 
105  //- Return a reference to the selected phaseChange model
107  (
108  const volVectorField& U,
109  const surfaceScalarField& phi
110  );
111 
112 
113  // Constructors
114 
115  //- Construct from components
117  (
118  const word& type,
119  const volVectorField& U,
120  const surfaceScalarField& phi
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 // ************************************************************************* //
volFields.H
Foam::phaseChangeTwoPhaseMixture::pSat
const dimensionedScalar & pSat() const
Return const-access to the saturation vapour pressure.
Definition: phaseChangeTwoPhaseMixture.H:130
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
typeInfo.H
Foam::phaseChangeTwoPhaseMixture::vDotP
Pair< tmp< volScalarField > > vDotP() const
Return the volumetric condensation and vaporisation rates as.
incompressibleTwoPhaseMixture.H
Pair.H
Foam::phaseChangeTwoPhaseMixture::pSat_
dimensionedScalar pSat_
Saturation vapour pressure.
Definition: phaseChangeTwoPhaseMixture.H:69
Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixtureCoeffs_
dictionary phaseChangeTwoPhaseMixtureCoeffs_
Definition: phaseChangeTwoPhaseMixture.H:66
Foam::phaseChangeTwoPhaseMixture::~phaseChangeTwoPhaseMixture
virtual ~phaseChangeTwoPhaseMixture()=default
Destructor.
phi
surfaceScalarField & phi
Definition: setRegionFluidFields.H:8
Foam::phaseChangeTwoPhaseMixture::read
virtual bool read()=0
Read the transportProperties dictionary and update.
Foam::phaseChangeTwoPhaseMixture::TypeName
TypeName("phaseChangeTwoPhaseMixture")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::dimensioned< scalar >
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::phaseChangeTwoPhaseMixture
Definition: phaseChangeTwoPhaseMixture.H:57
Foam::phaseChangeTwoPhaseMixture::operator=
void operator=(const phaseChangeTwoPhaseMixture &)=delete
No copy assignment.
Foam::incompressibleTwoPhaseMixture
A two-phase incompressible transportModel.
Definition: incompressibleTwoPhaseMixture.H:55
Foam::phaseChangeTwoPhaseMixture::mDotP
virtual Pair< tmp< volScalarField > > mDotP() const =0
Return the mass condensation and vaporisation rates as coefficients.
dimensionedScalar.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::phaseChangeTwoPhaseMixture::correct
virtual void correct()=0
Correct the phaseChange model.
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:54
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::phaseChangeTwoPhaseMixture::phaseChangeTwoPhaseMixture
phaseChangeTwoPhaseMixture(const phaseChangeTwoPhaseMixture &)=delete
No copy construct.
Foam::type
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:590
Foam::phaseChangeTwoPhaseMixture::vDotAlphal
Pair< tmp< volScalarField > > vDotAlphal() const
Return the volumetric condensation and vaporisation rates as a.
Foam::incompressibleTwoPhaseMixture::U
const volVectorField & U() const
Return const-access to the mixture velocity.
Definition: incompressibleTwoPhaseMixture.H:129
Foam::phaseChangeTwoPhaseMixture::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, phaseChangeTwoPhaseMixture, components,(const volVectorField &U, const surfaceScalarField &phi),(U, phi))
Foam::phaseChangeTwoPhaseMixture::New
static autoPtr< phaseChangeTwoPhaseMixture > New(const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected phaseChange model.
Foam::GeometricField< vector, fvPatchField, volMesh >
Foam::phaseChangeTwoPhaseMixture::mDotAlphal
virtual Pair< tmp< volScalarField > > mDotAlphal() const =0
Return the mass condensation and vaporisation rates as a.
autoPtr.H