1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2010 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
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
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/>.
33 \*---------------------------------------------------------------------------*/
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 #include "dictionary.H"
41 #include "phaseModel.H"
42 #include "runTimeSelectionTables.H"
47 /*---------------------------------------------------------------------------*\
48 Class dragModel Declaration
49 \*---------------------------------------------------------------------------*/
57 const dictionary& interfaceDict_;
58 const volScalarField& alpha_;
59 const phaseModel& phasea_;
60 const phaseModel& phaseb_;
65 //- Runtime type information
66 TypeName("dragModel");
69 // Declare runtime construction
71 declareRunTimeSelectionTable
77 const dictionary& interfaceDict,
78 const volScalarField& alpha,
79 const phaseModel& phasea,
80 const phaseModel& phaseb
82 (interfaceDict, alpha, phasea, phaseb)
90 const dictionary& interfaceDict,
91 const volScalarField& alpha,
92 const phaseModel& phasea,
93 const phaseModel& phaseb
103 static autoPtr<dragModel> New
105 const dictionary& interfaceDict,
106 const volScalarField& alpha,
107 const phaseModel& phasea,
108 const phaseModel& phaseb
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 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 // ************************************************************************* //