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 -------------------------------------------------------------------------------
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::dragModel
28 
29 Description
30 
31 SourceFiles
32  dragModel.C
33  newDragModel.C
34 
35 \*---------------------------------------------------------------------------*/
36 
37 #ifndef dragModel_H
38 #define dragModel_H
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 #include "volFields.H"
43 #include "dictionary.H"
44 #include "runTimeSelectionTables.H"
45 
46 namespace Foam
47 {
48 
49 class phasePair;
50 class swarmCorrection;
51 
52 /*---------------------------------------------------------------------------*\
53  Class dragModel Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class dragModel
57 :
58  public regIOobject
59 {
60 protected:
61 
62  // Protected data
63 
64  //- Phase pair
65  const phasePair& pair_;
66 
67  //- Swarm correction
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("dragModel");
75 
76 
77  // Declare runtime construction
78 
80  (
81  autoPtr,
82  dragModel,
83  dictionary,
84  (
85  const dictionary& dict,
86  const phasePair& pair,
87  const bool registerObject
88  ),
89  (dict, pair, registerObject)
90  );
91 
92 
93  // Static data members
94 
95  //- Coefficient dimensions
96  static const dimensionSet dimK;
97 
98 
99  // Constructors
100 
101  // Construct without residual constants
102  dragModel
103  (
104  const phasePair& pair,
105  const bool registerObject
106  );
107 
108  // Construct with residual constants
109  dragModel
110  (
111  const dictionary& dict,
112  const phasePair& pair,
113  const bool registerObject
114  );
115 
116 
117  //- Destructor
118  virtual ~dragModel();
119 
120 
121  // Selectors
122 
123  static autoPtr<dragModel> New
124  (
125  const dictionary& dict,
126  const phasePair& pair
127  );
128 
129 
130  // Member Functions
131 
132  //- Drag coefficient
133  virtual tmp<volScalarField> CdRe() const = 0;
134 
135  //- Return the phase-intensive drag coefficient Ki
136  // used in the momentum equations
137  // ddt(alpha1*rho1*U1) + ... = ... alphad*K*(U1-U2)
138  // ddt(alpha2*rho2*U2) + ... = ... alphad*K*(U2-U1)
139  virtual tmp<volScalarField> Ki() const;
140 
141  //- Return the drag coefficient K
142  // used in the momentum equations
143  // ddt(alpha1*rho1*U1) + ... = ... K*(U1-U2)
144  // ddt(alpha2*rho2*U2) + ... = ... K*(U2-U1)
145  virtual tmp<volScalarField> K() const;
146 
147  //- Return the drag coefficient Kf
148  // used in the face-momentum equations
149  virtual tmp<surfaceScalarField> Kf() const;
150 
151  //- Dummy write for regIOobject
152  bool writeData(Ostream& os) const;
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
Foam::dragModel::Kf
virtual tmp< surfaceScalarField > Kf() const
Return the drag coefficient Kf.
Definition: dragModel.C:127
volFields.H
Foam::dragModel::CdRe
virtual tmp< volScalarField > CdRe() const =0
Drag coefficient.
Foam::phasePair
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition: phasePair.H:51
Foam::tmp< volScalarField >
Foam::dragModel::swarmCorrection_
autoPtr< swarmCorrection > swarmCorrection_
Swarm correction.
Definition: dragModel.H:67
Foam::dragModel::K
virtual tmp< volScalarField > K() const
Return the drag coefficient K.
Definition: dragModel.C:121
Foam::dragModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, dragModel, dictionary,(const dictionary &dict, const phasePair &pair, const bool registerObject),(dict, pair, registerObject))
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:65
Foam::dragModel::Ki
virtual tmp< volScalarField > Ki() const
Return the phase-intensive drag coefficient Ki.
Definition: dragModel.C:109
Foam::IOobject::registerObject
bool registerObject() const
Should object created with this IOobject be registered?
Definition: IOobjectI.H:88
Foam::dragModel::TypeName
TypeName("dragModel")
Runtime type information.
Foam::dragModel::New
static autoPtr< dragModel > New(const dictionary &dict, const phasePair &pair)
Definition: newDragModel.C:35
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::dragModel::writeData
bool writeData(Ostream &os) const
Dummy write for regIOobject.
Definition: dragModel.C:138
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:67
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::dragModel::dragModel
dragModel(const phasePair &pair, const bool registerObject)
Definition: dragModel.C:49
dictionary.H
Foam::dragModel
Definition: dragModel.H:55
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::dragModel::dimK
static const dimensionSet dimK
Coefficient dimensions.
Definition: dragModel.H:95
Foam::dragModel::pair_
const phasePair & pair_
Phase pair.
Definition: dragModel.H:64
Foam::dragModel::~dragModel
virtual ~dragModel()
Destructor.
Definition: dragModel.C:103