phaseChangeTwoPhaseMixture.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) 2011-2020 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::phaseChangeTwoPhaseMixture
26 
27 Description
28 
29 SourceFiles
30  phaseChangeTwoPhaseMixture.C
31  phaseChangeModelNew.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef phaseChangeTwoPhaseMixture_H
36 #define phaseChangeTwoPhaseMixture_H
37 
39 #include "typeInfo.H"
40 #include "runTimeSelectionTables.H"
41 #include "volFields.H"
42 #include "dimensionedScalar.H"
43 #include "autoPtr.H"
44 #include "Pair.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class phaseChangeTwoPhaseMixture Declaration
53 \*---------------------------------------------------------------------------*/
54 
56 :
58 {
59 protected:
60 
61  // Protected data
62 
64 
65  //- Saturation vapour pressure
67 
68 
69 public:
70 
71  //- Runtime type information
72  TypeName("phaseChangeTwoPhaseMixture");
73 
74 
75  // Declare run-time constructor selection table
76 
78  (
79  autoPtr,
81  components,
82  (
83  const volVectorField& U,
84  const surfaceScalarField& phi
85  ),
86  (U, phi)
87  );
88 
89 
90  // Constructors
91 
92  //- Construct from components
94  (
95  const word& type,
96  const volVectorField& U,
97  const surfaceScalarField& phi
98  );
99 
100  //- Disallow default bitwise copy construction
102 
103 
104  // Selectors
105 
106  //- Return a reference to the selected phaseChange model
108  (
109  const volVectorField& U,
110  const surfaceScalarField& phi
111  );
112 
113 
114  //- Destructor
116  {}
117 
118 
119  // Member Functions
120 
121  //- Return const-access to the saturation vapour pressure
122  const dimensionedScalar& pSat() const
123  {
124  return pSat_;
125  }
126 
127  //- Return the mass condensation and vaporisation rates as a
128  // coefficient to multiply (1 - alphal) for the condensation rate
129  // and a coefficient to multiply alphal for the vaporisation rate
130  virtual Pair<tmp<volScalarField>> mDotAlphal() const = 0;
131 
132  //- Return the mass condensation and vaporisation rates as coefficients
133  // to multiply (p - pSat)
134  virtual Pair<tmp<volScalarField>> mDotP() const = 0;
135 
136  //- Return the volumetric 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
140 
141  //- Return the volumetric condensation and vaporisation rates as
142  // coefficients to multiply (p - pSat)
144 
145  //- Correct the phaseChange model
146  virtual void correct() = 0;
147 
148  //- Read the transportProperties dictionary and update
149  virtual bool read() = 0;
150 
151 
152  // Member Operators
153 
154  //- Disallow default bitwise assignment
155  void operator=(const phaseChangeTwoPhaseMixture&) = delete;
156 };
157 
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 } // End namespace Foam
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 #endif
166 
167 // ************************************************************************* //
virtual bool read()=0
Read the transportProperties dictionary and update.
TypeName("phaseChangeTwoPhaseMixture")
Runtime type information.
phaseChangeTwoPhaseMixture(const word &type, const volVectorField &U, const surfaceScalarField &phi)
Construct from components.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual Pair< tmp< volScalarField > > mDotP() const =0
Return the mass condensation and vaporisation rates as coefficients.
virtual void correct()=0
Correct the phaseChange model.
void operator=(const phaseChangeTwoPhaseMixture &)=delete
Disallow default bitwise assignment.
Pair< tmp< volScalarField > > vDotAlphal() const
Return the volumetric condensation and vaporisation rates as a.
declareRunTimeSelectionTable(autoPtr, phaseChangeTwoPhaseMixture, components,(const volVectorField &U, const surfaceScalarField &phi),(U, phi))
phi
Definition: pEqn.H:104
virtual Pair< tmp< volScalarField > > mDotAlphal() const =0
Return the mass condensation and vaporisation rates as a.
const volVectorField & U() const
Return const-access to the mixture velocity.
static autoPtr< phaseChangeTwoPhaseMixture > New(const volVectorField &U, const surfaceScalarField &phi)
Return a reference to the selected phaseChange model.
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
A class for handling words, derived from string.
Definition: word.H:59
const dimensionedScalar & pSat() const
Return const-access to the saturation vapour pressure.
An immiscible incompressible two-phase mixture transport model.
Pair< tmp< volScalarField > > vDotP() const
Return the volumetric condensation and vaporisation rates as.
dimensionedScalar pSat_
Saturation vapour pressure.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
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.
Namespace for OpenFOAM.