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-2018 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 private:
61 
62  // Private Member Functions
63 
64  //- Disallow default bitwise copy construct
66 
67  //- Disallow default bitwise assignment
68  void operator=(const phaseChangeModel&);
69 
70 
71 protected:
72 
73  // Protected Member Functions
74 
75  //- Latest mass transfer due to phase change
76  scalar latestMassPC_;
77 
78  //- Total mass transfer due to phase change
79  scalar totalMassPC_;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("phaseChangeModel");
86 
87 
88  // Declare runtime constructor selection table
89 
91  (
92  autoPtr,
94  dictionary,
95  (
97  const dictionary& dict
98  ),
99  (film, dict)
100  );
101 
102  // Constructors
103 
104  //- Construct null
106 
107  //- Construct from type name, dictionary and surface film model
109  (
110  const word& modelType,
112  const dictionary& dict
113  );
114 
115 
116  // Selectors
117 
118  //- Return a reference to the selected phase change model
120  (
122  const dictionary& dict
123  );
124 
125 
126  //- Destructor
127  virtual ~phaseChangeModel();
128 
129 
130  // Member Functions
131 
132  // Evolution
133 
134  //- Correct
135  virtual void correct
136  (
137  const scalar dt,
138  scalarField& availableMass,
139  volScalarField& dMass,
140  volScalarField& dEnergy
141  );
142 
143  //- Correct
144  virtual void correctModel
145  (
146  const scalar dt,
147  scalarField& availableMass,
148  scalarField& dMass,
149  scalarField& dEnergy
150  ) = 0;
151 
152 
153  // I-O
154 
155  //- Provide some feedback
156  virtual void info(Ostream& os) const;
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace surfaceFilmModels
163 } // End namespace regionModels
164 } // End namespace Foam
165 
166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167 
168 #endif
169 
170 // ************************************************************************* //
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:137
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
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.
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:53
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.