temperaturePhaseChangeTwoPhaseMixture.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) 2016-2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::temperaturePhaseChangeTwoPhaseMixture
28 
29 Description
30 
31 SourceFiles
32  temperaturePhaseChangeTwoPhaseMixture.C
33  newtemperaturePhaseChangeTwoPhaseMixture.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef temperaturePhaseChangeTwoPhaseMixture_H
38 #define temperaturePhaseChangeTwoPhaseMixture_H
39 
41 #include "typeInfo.H"
42 #include "runTimeSelectionTables.H"
43 #include "volFields.H"
44 #include "dimensionedScalar.H"
45 #include "fvMatrices.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class temperaturePhaseChangeTwoPhaseMixture Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 :
58  public IOdictionary
59 {
60 
61 protected:
62 
63  // Protected data
64 
65  //- Reference to the thermoIncompressibleTwoPhaseMixture
67 
68  //- Reference to fvMesh
69  const fvMesh& mesh_;
70 
71 
72  // Private Member Functions
73 
74  //- No copy construct
76  (
78  ) = delete;
79 
80  //- No copy assignment
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("temperaturePhaseChangeTwoPhaseMixture");
88 
89 
90  // Declare run-time constructor selection table
91 
93  (
94  autoPtr,
96  components,
97  (
99  const fvMesh& mesh
100  ),
101  (mixture, mesh)
102  );
103 
104 
105  // Selectors
106 
107  //- Return a reference to the selected phaseChange model
109  (
111  const fvMesh& mesh
112  );
113 
114 
115  // Constructors
116 
117  //- Construct from components
119  (
121  const fvMesh& mesh
122  );
123 
124 
125  //- Destructor
126  virtual ~temperaturePhaseChangeTwoPhaseMixture() = default;
127 
128 
129  // Member Functions
130 
131 
132  //- Return the mass condensation and vaporisation rates as a
133  // coefficient to multiply (1 - alphal) for the condensation rate
134  // and a coefficient to multiply alphal for the vaporisation rate
135  virtual Pair<tmp<volScalarField>> mDotAlphal() const = 0;
136 
137  //- Return the mass condensation and vaporisation rates as coefficients
138  virtual Pair<tmp<volScalarField>> mDot() const = 0;
139 
140  //- Return the mass condensation and vaporisation rates as a
141  // coefficient to multiply (Tsat - T) for the condensation rate
142  // and a coefficient to multiply (T - Tsat) for the vaporisation rate
143  virtual Pair<tmp<volScalarField>> mDotDeltaT() const = 0;
144 
145  //- Source for T equarion
146  virtual tmp<fvScalarMatrix> TSource() const = 0;
147 
148  //- Return the volumetric condensation and vaporisation rates as a
149  // coefficient to multiply (1 - alphal) for the condensation rate
150  // and a coefficient to multiply alphal for the vaporisation rate
151  virtual Pair<tmp<volScalarField>> vDotAlphal() const;
152 
153  //- Return the volumetric condensation and vaporisation rates as
154  // coefficients
155  virtual Pair<tmp<volScalarField>> vDot() const;
156 
157  //- Correct the phaseChange model
158  virtual void correct() = 0;
159 
160  //- Read the transportProperties dictionary and update
161  virtual bool read();
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::temperaturePhaseChangeTwoPhaseMixture
Definition: temperaturePhaseChangeTwoPhaseMixture.H:55
volFields.H
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::temperaturePhaseChangeTwoPhaseMixture::mixture_
const thermoIncompressibleTwoPhaseMixture & mixture_
Reference to the thermoIncompressibleTwoPhaseMixture.
Definition: temperaturePhaseChangeTwoPhaseMixture.H:65
Foam::temperaturePhaseChangeTwoPhaseMixture::vDotAlphal
virtual Pair< tmp< volScalarField > > vDotAlphal() const
Return the volumetric condensation and vaporisation rates as a.
Foam::temperaturePhaseChangeTwoPhaseMixture::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, temperaturePhaseChangeTwoPhaseMixture, components,(const thermoIncompressibleTwoPhaseMixture &mixture, const fvMesh &mesh),(mixture, mesh))
typeInfo.H
Foam::temperaturePhaseChangeTwoPhaseMixture::correct
virtual void correct()=0
Correct the phaseChange model.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::temperaturePhaseChangeTwoPhaseMixture::~temperaturePhaseChangeTwoPhaseMixture
virtual ~temperaturePhaseChangeTwoPhaseMixture()=default
Destructor.
thermoIncompressibleTwoPhaseMixture.H
Foam::temperaturePhaseChangeTwoPhaseMixture::vDot
virtual Pair< tmp< volScalarField > > vDot() const
Return the volumetric condensation and vaporisation rates as.
Foam::temperaturePhaseChangeTwoPhaseMixture::New
static autoPtr< temperaturePhaseChangeTwoPhaseMixture > New(const thermoIncompressibleTwoPhaseMixture &mixture, const fvMesh &mesh)
Return a reference to the selected phaseChange model.
fvMatrices.H
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Foam::temperaturePhaseChangeTwoPhaseMixture::mDotDeltaT
virtual Pair< tmp< volScalarField > > mDotDeltaT() const =0
Return the mass condensation and vaporisation rates as a.
Foam::temperaturePhaseChangeTwoPhaseMixture::mDotAlphal
virtual Pair< tmp< volScalarField > > mDotAlphal() const =0
Return the mass condensation and vaporisation rates as a.
Foam::temperaturePhaseChangeTwoPhaseMixture::operator=
void operator=(const temperaturePhaseChangeTwoPhaseMixture &)=delete
No copy assignment.
Foam::temperaturePhaseChangeTwoPhaseMixture::mDot
virtual Pair< tmp< volScalarField > > mDot() const =0
Return the mass condensation and vaporisation rates as coefficients.
Foam::temperaturePhaseChangeTwoPhaseMixture::TSource
virtual tmp< fvScalarMatrix > TSource() const =0
Source for T equarion.
Foam::temperaturePhaseChangeTwoPhaseMixture::temperaturePhaseChangeTwoPhaseMixture
temperaturePhaseChangeTwoPhaseMixture(const temperaturePhaseChangeTwoPhaseMixture &)=delete
No copy construct.
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::temperaturePhaseChangeTwoPhaseMixture::mesh_
const fvMesh & mesh_
Reference to fvMesh.
Definition: temperaturePhaseChangeTwoPhaseMixture.H:68
Foam::thermoIncompressibleTwoPhaseMixture
A two-phase incompressible transportModel.
Definition: thermoIncompressibleTwoPhaseMixture.H:50
dimensionedScalar.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
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::temperaturePhaseChangeTwoPhaseMixture::TypeName
TypeName("temperaturePhaseChangeTwoPhaseMixture")
Runtime type information.
Foam::mixture
Definition: mixture.H:54
Foam::temperaturePhaseChangeTwoPhaseMixture::read
virtual bool read()
Read the transportProperties dictionary and update.