1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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
34 \*---------------------------------------------------------------------------*/
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 #include "dictionary.H"
42 #include "phaseModel.H"
43 #include "runTimeSelectionTables.H"
48 /*---------------------------------------------------------------------------*\
49 Class dragModel Declaration
50 \*---------------------------------------------------------------------------*/
58 const dictionary& interfaceDict_;
59 const volScalarField& alpha_;
60 const phaseModel& phasea_;
61 const phaseModel& phaseb_;
66 //- Runtime type information
67 TypeName("dragModel");
70 // Declare runtime construction
72 declareRunTimeSelectionTable
78 const dictionary& interfaceDict,
79 const volScalarField& alpha,
80 const phaseModel& phasea,
81 const phaseModel& phaseb
83 (interfaceDict, alpha, phasea, phaseb)
91 const dictionary& interfaceDict,
92 const volScalarField& alpha,
93 const phaseModel& phasea,
94 const phaseModel& phaseb
104 static autoPtr<dragModel> New
106 const dictionary& interfaceDict,
107 const volScalarField& alpha,
108 const phaseModel& phasea,
109 const phaseModel& phaseb
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 // ************************************************************************* //