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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::dragModel
26 
27 Description
28 
29 SourceFiles
30  dragModel.C
31  newDragModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef dragModel_H
36 #define dragModel_H
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 #include "dictionary.H"
41 #include "phaseModel.H"
42 #include "runTimeSelectionTables.H"
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class dragModel Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class dragModel
52 {
53 protected:
54 
55  // Protected data
56 
62 
63 public:
64 
65  //- Runtime type information
66  TypeName("dragModel");
67 
68 
69  // Declare runtime construction
70 
72  (
73  autoPtr,
74  dragModel,
75  dictionary,
76  (
77  const dictionary& interfaceDict,
78  const phaseModel& phase1,
79  const phaseModel& phase2
80  ),
81  (interfaceDict, phase1, phase2)
82  );
83 
84 
85  // Constructors
86 
87  dragModel
88  (
89  const dictionary& interfaceDict,
90  const phaseModel& phase1,
91  const phaseModel& phase2
92  );
93 
94 
95  //- Destructor
96  virtual ~dragModel();
97 
98 
99  // Selectors
100 
101  static autoPtr<dragModel> New
102  (
103  const dictionary& interfaceDict,
104  const phaseModel& phase1,
105  const phaseModel& phase2
106  );
107 
108 
109  // Member Functions
111  const phaseModel& phase1() const
112  {
113  return phase1_;
114  }
116  const phaseModel& phase2() const
117  {
118  return phase2_;
119  }
122  {
123  return residualPhaseFraction_;
124  }
126  const dimensionedScalar& residualSlip() const
127  {
128  return residualSlip_;
129  }
130 
131  //- The dragfunction K used in the momentum eq.
132  // ddt(alpha1*rho1*U1) + ... = ... alpha1*alpha2*K*(U1-U2)
133  // ddt(alpha2*rho2*U2) + ... = ... alpha1*alpha2*K*(U2-U1)
134  // ********************************** NB! *****************************
135  // for numerical reasons alpha1 and alpha2 has been
136  // extracted from the dragFunction K,
137  // so you MUST divide K by alpha1*alpha2 when implemnting the drag
138  // function
139  // ********************************** NB! *****************************
140  virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
141 };
142 
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
dimensionedScalar residualSlip_
Definition: dragModel.H:60
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
TypeName("dragModel")
Runtime type information.
const phaseModel & phase1_
Definition: dragModel.H:57
const phaseModel & phase1() const
Definition: dragModel.H:110
virtual ~dragModel()
Destructor.
const phaseModel & phase2_
Definition: dragModel.H:58
declareRunTimeSelectionTable(autoPtr, dragModel, dictionary,(const dictionary &interfaceDict, const phaseModel &phase1, const phaseModel &phase2),(interfaceDict, phase1, phase2))
static autoPtr< dragModel > New(const dictionary &interfaceDict, const phaseModel &phase1, const phaseModel &phase2)
virtual tmp< volScalarField > K() const
Return the drag coefficient K.
dimensionedScalar residualPhaseFraction_
Definition: dragModel.H:59
const dimensionedScalar & residualSlip() const
Definition: dragModel.H:125
const dimensionedScalar & residualPhaseFraction() const
Definition: dragModel.H:120
dragModel(const dictionary &interfaceDict, const phaseModel &phase1, const phaseModel &phase2)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:53
Macros to ease declaration of run-time selection tables.
const dictionary & interfaceDict_
Definition: dragModel.H:56
A class for managing temporary objects.
Definition: PtrList.H:54
const phaseModel & phase2() const
Definition: dragModel.H:115
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:53
Namespace for OpenFOAM.