twoPhaseChangeModel.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) 2021 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::twoPhaseChangeModel
26 
27 Description
28 
29 SourceFiles
30  twoPhaseChangeModel.C
31  phaseChangeModelNew.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef twoPhaseChangeModel_H
36 #define twoPhaseChangeModel_H
37 
39 #include "fvMatricesFwd.H"
40 #include "Pair.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class twoPhaseChangeModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public IOdictionary
54 {
55  // Private Member Functions
56 
57  //- Construct the base IO object
58  IOobject createIOobject
59  (
61  ) const;
62 
63 
64 protected:
65 
66  // Protected data
67 
68  //- Reference to the two-phase mixture
70 
71  //- Model coefficient dictionary
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("phaseChangeModel");
79 
80  //- Default phaseChangeProperties dictionary name
81  static const word phaseChangePropertiesName;
82 
83 
84  // Declare run-time constructor selection table
85 
87  (
88  autoPtr,
90  dictionary,
91  (
93  ),
94  (mixture)
95  );
96 
97 
98  // Constructors
99 
100  //- Construct from dictionary
102  (
103  const word& type,
105  );
106 
107  //- Disallow default bitwise copy construction
109 
110 
111  // Selectors
112 
113  //- Return a reference to the selected phaseChange model
115  (
117  );
118 
119 
120  //- Destructor
121  virtual ~twoPhaseChangeModel()
122  {}
123 
124 
125  // Member Functions
126 
127  //- Return the phase-change explicit and implicit sources
128  // for the phase-fraction equation
130  (
132  ) const = 0;
133 
134  //- Return the phase-change source matrix
135  // for the p_rgh pressure equation
137  (
138  const volScalarField& rho,
139  const volScalarField& gh,
141  ) const = 0;
142 
143  //- Return the phase-change source matrix for the momentum equation
144  virtual tmp<fvVectorMatrix> SU
145  (
146  const volScalarField& rho,
147  const surfaceScalarField& rhoPhi,
149  ) const = 0;
150 
151  //- Correct the phaseChange model
152  virtual void correct() = 0;
153 
154  //- Read the transportProperties dictionary and update
155  virtual bool read() = 0;
156 
157 
158  // Member Operators
159 
160  //- Disallow default bitwise assignment
161  void operator=(const twoPhaseChangeModel&) = delete;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
static const word phaseChangePropertiesName
Default phaseChangeProperties dictionary name.
virtual Pair< tmp< volScalarField::Internal > > Salpha(volScalarField &alpha) const =0
Return the phase-change explicit and implicit sources.
volScalarField & p_rgh
TypeName("phaseChangeModel")
Runtime type information.
virtual tmp< fvVectorMatrix > SU(const volScalarField &rho, const surfaceScalarField &rhoPhi, volVectorField &U) const =0
Return the phase-change source matrix for the momentum equation.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
dictionary twoPhaseChangeModelCoeffs_
Model coefficient dictionary.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static autoPtr< twoPhaseChangeModel > New(const immiscibleIncompressibleTwoPhaseMixture &mixture)
Return a reference to the selected phaseChange model.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: contiguous.H:49
virtual ~twoPhaseChangeModel()
Destructor.
A class for handling words, derived from string.
Definition: word.H:59
virtual void correct()=0
Correct the phaseChange model.
virtual bool read()=0
Read the transportProperties dictionary and update.
declareRunTimeSelectionTable(autoPtr, twoPhaseChangeModel, dictionary,(const immiscibleIncompressibleTwoPhaseMixture &mixture),(mixture))
void operator=(const twoPhaseChangeModel &)=delete
Disallow default bitwise assignment.
virtual tmp< fvScalarMatrix > Sp_rgh(const volScalarField &rho, const volScalarField &gh, volScalarField &p_rgh) const =0
Return the phase-change source matrix.
Forward declarations of fvMatrix specialisations.
An immiscible incompressible two-phase mixture transport model.
U
Definition: pEqn.H:72
twoPhaseChangeModel(const word &type, const immiscibleIncompressibleTwoPhaseMixture &mixture)
Construct from dictionary.
rhoPhi
Definition: rhoEqn.H:10
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.
Definition: POSIX.C:488
const volScalarField & gh
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:92
const immiscibleIncompressibleTwoPhaseMixture & mixture_
Reference to the two-phase mixture.
Namespace for OpenFOAM.