phaseChangeModel.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) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::regionModels::surfaceFilmModels::phaseChangeModel
28
29Description
30 Base class for surface film phase change models
31
32SourceFiles
33 phaseChangeModel.C
34 phaseChangeModelNew.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef phaseChangeModel_H
39#define phaseChangeModel_H
40
41#include "filmSubModelBase.H"
43#include "scalarField.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49namespace regionModels
50{
51namespace surfaceFilmModels
52{
53
54/*---------------------------------------------------------------------------*\
55 Class phaseChangeModel Declaration
56\*---------------------------------------------------------------------------*/
59:
60 public filmSubModelBase
61{
62private:
63
64 // Private Member Functions
65
66 //- No copy construct
67 phaseChangeModel(const phaseChangeModel&) = delete;
68
69 //- No copy assignment
70 void operator=(const phaseChangeModel&) = delete;
71
72
73protected:
74
75 // Protected Member Functions
76
77 //- Latest mass transfer due to phase change
78 scalar latestMassPC_;
79
80 //- Total mass transfer due to phase change
81 scalar totalMassPC_;
82
83
84public:
85
86 //- Runtime type information
87 TypeName("phaseChangeModel");
88
89
90 // Declare runtime constructor selection table
93 (
94 autoPtr,
97 (
99 const dictionary& dict
100 ),
101 (film, dict)
102 );
103
104 // Constructors
105
106 //- Construct null
108
109 //- Construct from type name, dictionary and surface film model
111 (
112 const word& modelType,
114 const dictionary& dict
115 );
116
117
118 // Selectors
119
120 //- Return a reference to the selected phase change model
122 (
124 const dictionary& dict
125 );
126
127
128 //- Destructor
129 virtual ~phaseChangeModel();
130
131
132 // Member Functions
133
134 // Evolution
135
136 //- Correct
137 virtual void correct
138 (
139 const scalar dt,
140 scalarField& availableMass,
141 volScalarField& dMass,
142 volScalarField& dEnergy
143 );
144
145 //- Correct
146 virtual void correctModel
147 (
148 const scalar dt,
149 scalarField& availableMass,
150 scalarField& dMass,
151 scalarField& dEnergy
152 ) = 0;
153
154
155 // I-O
156
157 //- Provide some feedback
158 virtual void info(Ostream& os) const;
159};
160
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164} // End namespace surfaceFilmModels
165} // End namespace regionModels
166} // End namespace Foam
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#endif
171
172// ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Base class for surface film sub-models.
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
Base class for surface film phase change models.
declareRunTimeSelectionTable(autoPtr, phaseChangeModel, dictionary,(surfaceFilmRegionModel &film, const dictionary &dict),(film, dict))
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
TypeName("phaseChangeModel")
Runtime type information.
scalar totalMassPC_
Total mass transfer due to phase change.
virtual void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy)=0
Correct.
virtual void info(Ostream &os) const
Provide some feedback.
scalar latestMassPC_
Latest mass transfer due to phase change.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
const word & modelType() const
Return const access to the sub-model type.
Definition: subModelBase.C:125
A class for handling words, derived from Foam::string.
Definition: word.H:68
thermo correct()
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73