transferModel.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) 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::transferModel
28
29Description
30 Base class for film transfer models, handling mass transfer between the
31 film and the continuous phase.
32
33SourceFiles
34 transferModel.C
35 transferModelNew.C
36
37\*---------------------------------------------------------------------------*/
38
39#ifndef transferModel_H
40#define transferModel_H
41
42#include "filmSubModelBase.H"
44#include "scalarField.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50namespace regionModels
51{
52namespace surfaceFilmModels
53{
54
55/*---------------------------------------------------------------------------*\
56 Class transferModel Declaration
57\*---------------------------------------------------------------------------*/
59class transferModel
60:
61 public filmSubModelBase
62{
63 // Private data
64
65 //- Transferred mass
66 scalar transferredMass_;
67
68
69 // Private Member Functions
70
71 //- No copy construct
72 transferModel(const transferModel&) = delete;
73
74 //- No copy assignment
75 void operator=(const transferModel&) = delete;
76
77
78protected:
79
80 // Protected Member Functions
81
82 //- Add to transferred mass
83 void addToTransferredMass(const scalar dMass);
84
85 //- Correct
86 void correct();
87
88
89public:
90
91 //- Runtime type information
92 TypeName("transferModel");
93
94
95 // Declare runtime constructor selection table
98 (
99 autoPtr,
102 (
104 const dictionary& dict
105 ),
106 (film, dict)
107 );
108
109
110 // Constructors
111
112 //- Construct for film
114
115 //- Construct from type name, dictionary and surface film model
117 (
118 const word& modelType,
120 const dictionary& dict
121 );
122
123
124 // Selectors
125
126 //- Return a reference to the selected injection model
128 (
130 const dictionary& dict,
131 const word& modelType
132 );
133
134
135 //- Destructor
136 virtual ~transferModel();
137
138
139 // Member Functions
140
141 //- Correct kinematic transfers
142 virtual void correct
143 (
144 scalarField& availableMass,
145 scalarField& massToTransfer
146 ) = 0;
147
148 //- Correct kinematic and thermodynamic transfers
149 virtual void correct
150 (
151 scalarField& availableMass,
152 scalarField& massToTransfer,
153 scalarField& energyToTransfer
154 );
155
156 //- Return the total mass transferred
157 virtual scalar transferredMassTotal() const;
158
159 //- Accumulate the total mass transferred for the patches into the
160 // scalarField provided
161 virtual void patchTransferredMassTotals(scalarField& patchMasses) const
162 {}
163};
164
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168} // End namespace surfaceFilmModels
169} // End namespace regionModels
170} // End namespace Foam
171
172// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173
174#endif
175
176// ************************************************************************* //
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 film transfer models, handling mass transfer between the film and the continuous phase...
Definition: transferModel.H:61
virtual void patchTransferredMassTotals(scalarField &patchMasses) const
Accumulate the total mass transferred for the patches into the.
void addToTransferredMass(const scalar dMass)
Add to transferred mass.
Definition: transferModel.C:46
virtual scalar transferredMassTotal() const
Return the total mass transferred.
TypeName("transferModel")
Runtime type information.
static autoPtr< transferModel > New(surfaceFilmRegionModel &film, const dictionary &dict, const word &modelType)
Return a reference to the selected injection model.
virtual void correct(scalarField &availableMass, scalarField &massToTransfer)=0
Correct kinematic transfers.
declareRunTimeSelectionTable(autoPtr, transferModel, dictionary,(surfaceFilmRegionModel &film, const dictionary &dict),(film, dict))
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
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