initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / applications / solvers / multiphase / twoPhaseEulerFoam / interfacialModels / dragModels / dragModel / dragModel.H
blob5d1356c8c27c8073686fe9f2a23d9ab474b82bc3
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::dragModel
28 Description
30 SourceFiles
31     dragModel.C
32     newDragModel.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef dragModel_H
37 #define dragModel_H
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 #include "dictionary.H"
42 #include "phaseModel.H"
43 #include "runTimeSelectionTables.H"
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                            Class dragModel Declaration
50 \*---------------------------------------------------------------------------*/
52 class dragModel
54 protected:
56     // Protected data
58         const dictionary& interfaceDict_;
59         const volScalarField& alpha_;
60         const phaseModel& phasea_;
61         const phaseModel& phaseb_;
64 public:
66     //- Runtime type information
67     TypeName("dragModel");
70     // Declare runtime construction
72         declareRunTimeSelectionTable
73         (
74             autoPtr,
75             dragModel,
76             dictionary,
77             (
78                 const dictionary& interfaceDict,
79                 const volScalarField& alpha,
80                 const phaseModel& phasea,
81                 const phaseModel& phaseb
82             ),
83             (interfaceDict, alpha, phasea, phaseb)
84         );
87     // Constructors
89         dragModel
90         (
91             const dictionary& interfaceDict,
92             const volScalarField& alpha,
93             const phaseModel& phasea,
94             const phaseModel& phaseb
95         );
98     //- 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 // ************************************************************************* //