Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / solvers / multiphase / twoPhaseEulerFoam / interfacialModels / dragModels / dragModel / dragModel.H
blobd957fabe09b7db9c58ec8d60a962b12ebcdf582f
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | foam-extend: Open Source CFD
4    \\    /   O peration     | Version:     3.2
5     \\  /    A nd           | Web:         http://www.foam-extend.org
6      \\/     M anipulation  | For copyright notice see file Copyright
7 -------------------------------------------------------------------------------
8 License
9     This file is part of foam-extend.
11     foam-extend is free software: you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation, either version 3 of the License, or (at your
14     option) any later version.
16     foam-extend is distributed in the hope that it will be useful, but
17     WITHOUT ANY WARRANTY; without even the implied warranty of
18     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19     General Public License for more details.
21     You should have received a copy of the GNU General Public License
22     along with foam-extend.  If not, see <http://www.gnu.org/licenses/>.
24 Class
25     Foam::dragModel
27 Description
29 SourceFiles
30     dragModel.C
31     newDragModel.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef dragModel_H
36 #define dragModel_H
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "dictionary.H"
41 #include "phaseModel.H"
42 #include "runTimeSelectionTables.H"
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                            Class dragModel Declaration
49 \*---------------------------------------------------------------------------*/
51 class dragModel
53 protected:
55     // Protected data
57         const dictionary& interfaceDict_;
58         const volScalarField& alpha_;
59         const phaseModel& phasea_;
60         const phaseModel& phaseb_;
63 public:
65     //- Runtime type information
66     TypeName("dragModel");
69     // Declare runtime construction
71         declareRunTimeSelectionTable
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         );
86     // Constructors
88         dragModel
89         (
90             const dictionary& interfaceDict,
91             const volScalarField& alpha,
92             const phaseModel& phasea,
93             const phaseModel& phaseb
94         );
97     // Destructor
99         virtual ~dragModel();
102     // Selectors
104         static autoPtr<dragModel> New
105         (
106             const dictionary& interfaceDict,
107             const volScalarField& alpha,
108             const phaseModel& phasea,
109             const phaseModel& phaseb
110         );
113     // Member Functions
115         //- the dragfunction K used in the momentum eq.
116         //    ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub)
117         //    ddt(beta*rhob*Ub) + ...  = ... alpha*beta*K*(Ub-Ua)
118         // ********************************** NB ! *****************************
119         // for numerical reasons alpha and beta has been
120         // extracted from the dragFunction K,
121         // so you MUST divide K by alpha*beta when implemnting the drag function
122         // ********************************** NB ! *****************************
123         virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 } // End namespace Foam
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 #endif
135 // ************************************************************************* //