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 -------------------------------------------------------------------------------
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::regionModels::surfaceFilmModels::phaseChangeModel
28 
29 Description
30  Base class for surface film phase change models
31 
32 SourceFiles
33  phaseChangeModel.C
34  phaseChangeModelNew.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef phaseChangeModel_H
39 #define phaseChangeModel_H
40 
41 #include "filmSubModelBase.H"
42 #include "runTimeSelectionTables.H"
43 #include "scalarField.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace regionModels
50 {
51 namespace surfaceFilmModels
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class phaseChangeModel Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class phaseChangeModel
59 :
60  public filmSubModelBase
61 {
62 private:
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 
73 protected:
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 
84 public:
85 
86  //- Runtime type information
87  TypeName("phaseChangeModel");
88 
89 
90  // Declare runtime constructor selection table
91 
93  (
94  autoPtr,
96  dictionary,
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 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
scalarField.H
Foam::regionModels::surfaceFilmModels::phaseChangeModel::info
virtual void info(Ostream &os) const
Provide some feedback.
Definition: phaseChangeModel.C:115
Foam::regionModels::surfaceFilmModels::filmSubModelBase::film
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
Definition: filmSubModelBaseI.H:39
Foam::Field< scalar >
Foam::regionModels::surfaceFilmModels::surfaceFilmRegionModel
Base class for surface film models.
Definition: surfaceFilmRegionModel.H:55
Foam::subModelBase::dict
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
Foam::regionModels::surfaceFilmModels::phaseChangeModel::New
static autoPtr< phaseChangeModel > New(surfaceFilmRegionModel &film, const dictionary &dict)
Return a reference to the selected phase change model.
Definition: phaseChangeModelNew.C:43
Foam::regionModels::surfaceFilmModels::phaseChangeModel::correct
virtual void correct(const scalar dt, scalarField &availableMass, volScalarField &dMass, volScalarField &dEnergy)
Correct.
Definition: phaseChangeModel.C:79
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::regionModels::surfaceFilmModels::phaseChangeModel::TypeName
TypeName("phaseChangeModel")
Runtime type information.
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::regionModels::surfaceFilmModels::phaseChangeModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, phaseChangeModel, dictionary,(surfaceFilmRegionModel &film, const dictionary &dict),(film, dict))
Foam::subModelBase::modelType
const word & modelType() const
Return const access to the sub-model type.
Definition: subModelBase.C:125
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::regionModels::surfaceFilmModels::phaseChangeModel::correctModel
virtual void correctModel(const scalar dt, scalarField &availableMass, scalarField &dMass, scalarField &dEnergy)=0
Correct.
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::regionModels::surfaceFilmModels::phaseChangeModel::~phaseChangeModel
virtual ~phaseChangeModel()
Destructor.
Definition: phaseChangeModel.C:72
Foam::regionModels::surfaceFilmModels::phaseChangeModel::latestMassPC_
scalar latestMassPC_
Latest mass transfer due to phase change.
Definition: phaseChangeModel.H:77
Foam::regionModels::surfaceFilmModels::phaseChangeModel::totalMassPC_
scalar totalMassPC_
Total mass transfer due to phase change.
Definition: phaseChangeModel.H:80
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::regionModels::surfaceFilmModels::filmSubModelBase
Base class for surface film sub-models.
Definition: filmSubModelBase.H:56
Foam::regionModels::surfaceFilmModels::phaseChangeModel
Base class for surface film phase change models.
Definition: phaseChangeModel.H:57