All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
phaseChangeModel.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-2019 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::regionModels::surfaceFilmModels::phaseChangeModel
26 
27 Description
28  Base class for surface film phase change models
29 
30 SourceFiles
31  phaseChangeModel.C
32  phaseChangeModelNew.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef phaseChangeModel_H
37 #define phaseChangeModel_H
38 
39 #include "filmSubModelBase.H"
40 #include "runTimeSelectionTables.H"
41 #include "scalarField.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 namespace regionModels
48 {
49 namespace surfaceFilmModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class phaseChangeModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class phaseChangeModel
57 :
58  public filmSubModelBase
59 {
60 protected:
61 
62  // Protected Member Functions
63 
64  //- Latest mass transfer due to phase change
65  scalar latestMassPC_;
66 
67  //- Total mass transfer due to phase change
68  scalar totalMassPC_;
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("phaseChangeModel");
75 
76 
77  // Declare runtime constructor selection table
78 
80  (
81  autoPtr,
83  dictionary,
84  (
86  const dictionary& dict
87  ),
88  (film, dict)
89  );
90 
91  // Constructors
92 
93  //- Construct null
95 
96  //- Construct from type name, dictionary and surface film model
98  (
99  const word& modelType,
101  const dictionary& dict
102  );
103 
104  //- Disallow default bitwise copy construction
105  phaseChangeModel(const phaseChangeModel&) = delete;
106 
107 
108  // Selectors
109 
110  //- Return a reference to the selected phase change model
112  (
114  const dictionary& dict
115  );
116 
117 
118  //- Destructor
119  virtual ~phaseChangeModel();
120 
121 
122  // Member Functions
123 
124  // Evolution
125 
126  //- Correct
127  virtual void correct
128  (
129  const scalar dt,
130  scalarField& availableMass,
131  volScalarField& dMass,
132  volScalarField& dEnergy
133  );
134 
135  //- Correct
136  virtual void correctModel
137  (
138  const scalar dt,
139  scalarField& availableMass,
140  scalarField& dMass,
141  scalarField& dEnergy
142  ) = 0;
143 
144 
145  // I-O
146 
147  //- Provide some feedback
148  virtual void info(Ostream& os) const;
149 
150 
151  // Member Operators
152 
153  //- Disallow default bitwise assignment
154  void operator=(const phaseChangeModel&) = delete;
155 };
156 
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 } // End namespace surfaceFilmModels
161 } // End namespace regionModels
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #endif
167 
168 // ************************************************************************* //
virtual void info(Ostream &os) const
Provide some feedback.
scalar latestMassPC_
Latest mass transfer due to phase change.
Base class for surface film sub-models.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
scalar totalMassPC_
Total mass transfer due to phase change.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
void operator=(const phaseChangeModel &)=delete
Disallow default bitwise assignment.
declareRunTimeSelectionTable(autoPtr, phaseChangeModel, dictionary,(surfaceFilmRegionModel &film, const dictionary &dict),(film, dict))
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
Base class for surface film phase change models.
virtual void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy)=0
Correct.
phaseChangeModel(surfaceFilmRegionModel &film)
Construct null.
A class for handling words, derived from string.
Definition: word.H:59
TypeName("phaseChangeModel")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
const word & modelType() const
Return const access to the sub-model type.
Definition: subModelBase.C:122
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.
virtual void correct(const scalar dt, scalarField &availableMass, volScalarField &dMass, volScalarField &dEnergy)
Correct.
Namespace for OpenFOAM.