GidaspowErgunWenYu.C
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26\*---------------------------------------------------------------------------*/
27
28#include "GidaspowErgunWenYu.H"
29#include "phasePair.H"
30#include "Ergun.H"
31#include "WenYu.H"
33
34// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35
36namespace Foam
37{
38namespace dragModels
39{
40 defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
41 addToRunTimeSelectionTable(dragModel, GidaspowErgunWenYu, dictionary);
42}
43}
44
45
46// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
47
49(
50 const dictionary& dict,
51 const phasePair& pair,
52 const bool registerObject
53)
54:
55 dragModel(dict, pair, registerObject),
56 Ergun_
57 (
58 new Ergun
59 (
60 dict,
61 pair,
62 false
63 )
64 ),
65 WenYu_
66 (
67 new WenYu
68 (
69 dict,
70 pair,
71 false
72 )
73 )
74{}
75
76
77// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
78
80{}
81
82
83// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
84
87{
88 return
89 pos0(pair_.continuous() - 0.8)*WenYu_->CdRe()
90 + neg(pair_.continuous() - 0.8)*Ergun_->CdRe();
91}
92
93
94// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
virtual tmp< volScalarField > CdRe() const
Drag coefficient.
D. Gidaspow, Multiphase flow and fluidization, Academic Press, New York, 1994.
A class for managing temporary objects.
Definition: tmp.H:65
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
Namespace for OpenFOAM.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
dictionary dict