dragModel.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-2018 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::dragModel
29
30Description
31
32SourceFiles
33 dragModel.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef dragModel_H
38#define dragModel_H
39
40// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41
42#include "volFields.H"
43#include "dictionary.H"
45
46namespace Foam
47{
48
49// Forward Declarations
50class phasePair;
51class swarmCorrection;
52
53/*---------------------------------------------------------------------------*\
54 Class dragModel Declaration
55\*---------------------------------------------------------------------------*/
57class dragModel
58:
59 public regIOobject
60{
61protected:
62
63 // Protected Data
64
65 //- Phase pair
66 const phasePair& pair_;
67
68 //- Swarm correction
70
71
72public:
73
74 //- Runtime type information
75 TypeName("dragModel");
76
77
78 // Declare runtime construction
81 (
82 autoPtr,
85 (
86 const dictionary& dict,
87 const phasePair& pair,
88 const bool registerObject
89 ),
90 (dict, pair, registerObject)
91 );
92
93
94 // Static Data Members
95
96 //- Coefficient dimensions
97 static const dimensionSet dimK;
98
99
100 // Constructors
101
102 // Construct without residual constants
104 (
105 const phasePair& pair,
106 const bool registerObject
107 );
108
109 // Construct with residual constants
111 (
112 const dictionary& dict,
113 const phasePair& pair,
114 const bool registerObject
115 );
116
117
118 //- Destructor
119 virtual ~dragModel();
120
121
122 // Selectors
123
125 (
126 const dictionary& dict,
127 const phasePair& pair
128 );
129
130
131 // Member Functions
132
133 //- Drag coefficient
134 virtual tmp<volScalarField> CdRe() const = 0;
135
136 //- Return the phase-intensive drag coefficient Ki
137 // used in the momentum equations
138 // ddt(alpha1*rho1*U1) + ... = ... alphad*K*(U1-U2)
139 // ddt(alpha2*rho2*U2) + ... = ... alphad*K*(U2-U1)
140 virtual tmp<volScalarField> Ki() const;
141
142 //- Return the drag coefficient K
143 // used in the momentum equations
144 // ddt(alpha1*rho1*U1) + ... = ... K*(U1-U2)
145 // ddt(alpha2*rho2*U2) + ... = ... K*(U2-U1)
146 virtual tmp<volScalarField> K() const;
147
148 //- Return the drag coefficient Kf
149 // used in the face-momentum equations
150 virtual tmp<surfaceScalarField> Kf() const;
151
152 //- Dummy write for regIOobject
153 bool writeData(Ostream& os) const;
154};
155
156
157// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158
159} // End namespace Foam
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163#endif
164
165// ************************************************************************* //
bool registerObject() const noexcept
Should object created with this IOobject be registered?
Definition: IOobjectI.H:107
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
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:109
virtual tmp< surfaceScalarField > Kf() const
Return the drag coefficient Kf.
Definition: dragModel.C:159
virtual ~dragModel()
Destructor.
Definition: dragModel.C:135
autoPtr< swarmCorrection > swarmCorrection_
Swarm correction.
Definition: dragModel.H:68
static const dimensionSet dimK
Coefficient dimensions.
Definition: dragModel.H:96
bool writeData(Ostream &os) const
Dummy write for regIOobject.
Definition: dragModel.C:170
TypeName("dragModel")
Runtime type information.
const phasePair & pair_
Phase pair.
Definition: dragModel.H:65
virtual tmp< volScalarField > Ki() const
Return the phase-intensive drag coefficient Ki.
Definition: dragModel.C:141
declareRunTimeSelectionTable(autoPtr, dragModel, dictionary,(const dictionary &dict, const phasePair &pair, const bool registerObject),(dict, pair, registerObject))
static autoPtr< dragModel > New(const dictionary &dict, const phasePair &pair)
Definition: dragModel.C:106
virtual tmp< volScalarField > K() const
Return the drag coefficient K.
Definition: dragModel.C:153
virtual tmp< volScalarField > CdRe() const =0
Drag coefficient.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:56
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:76
A class for managing temporary objects.
Definition: tmp.H:65
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)
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73