FreeFOAM The Cross-Platform CFD Toolkit
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) 1991-2010 OpenCFD Ltd.
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 <OpenFOAM/dictionary.H>
41 #include <phaseModel/phaseModel.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 
61 
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 volScalarField& alpha,
79  const phaseModel& phasea,
80  const phaseModel& phaseb
81  ),
82  (interfaceDict, alpha, phasea, phaseb)
83  );
84 
85 
86  // Constructors
87 
88  dragModel
89  (
90  const dictionary& interfaceDict,
91  const volScalarField& alpha,
92  const phaseModel& phasea,
93  const phaseModel& phaseb
94  );
95 
96 
97  //- Destructor
98  virtual ~dragModel();
99 
100 
101  // Selectors
102 
103  static autoPtr<dragModel> New
104  (
105  const dictionary& interfaceDict,
106  const volScalarField& alpha,
107  const phaseModel& phasea,
108  const phaseModel& phaseb
109  );
110 
111 
112  // Member Functions
113 
114  //- the dragfunction K used in the momentum eq.
115  // ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
116  // ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua)
117  // ********************************** NB ! *****************************
118  // for numerical reasons alpha and beta has been extracted from the
119  // dragFunction K, so you MUST divide K by alpha*beta when implementing
120  // the drag function
121  // ********************************** NB ! *****************************
122  virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************ vim: set sw=4 sts=4 et: ************************ //