STYLE: updated license version in header
[OpenFOAM-1.7.x.git] / applications / solvers / multiphase / twoPhaseEulerFoam / interfacialModels / dragModels / dragModel / dragModel.H
blob8e8ce0ca3c78c156b2481a1243ce2e65fae5e414
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.
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.
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, 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
98     virtual ~dragModel();
101     // Selectors
103         static autoPtr<dragModel> New
104         (
105             const dictionary& interfaceDict,
106             const volScalarField& alpha,
107             const phaseModel& phasea,
108             const phaseModel& phaseb
109         );
112     // Member Functions
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
119         // extracted from the dragFunction K,
120         // so you MUST divide K by alpha*beta when implemnting the drag function
121         // ********************************** NB ! *****************************
122         virtual tmp<volScalarField> K(const volScalarField& Ur) const = 0;
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 } // End namespace Foam
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 #endif
134 // ************************************************************************* //