NonSphereDragForce.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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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.
15 
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.
20 
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/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "NonSphereDragForce.H"
27 
28 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
29 
30 template<class CloudType>
31 Foam::scalar Foam::NonSphereDragForce<CloudType>::CdRe(const scalar Re) const
32 {
33  return 24.0*(1.0 + a_*pow(Re, b_)) + Re*c_/(1 + d_/(Re + ROOTVSMALL));
34 }
35 
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
39 template<class CloudType>
41 (
42  CloudType& owner,
43  const fvMesh& mesh,
44  const dictionary& dict
45 )
46 :
47  ParticleForce<CloudType>(owner, mesh, dict, typeName, true),
48  phi_(readScalar(this->coeffs().lookup("phi"))),
49  a_(exp(2.3288 - 6.4581*phi_ + 2.4486*sqr(phi_))),
50  b_(0.0964 + 0.5565*phi_),
51  c_(exp(4.9050 - 13.8944*phi_ + 18.4222*sqr(phi_) - 10.2599*pow3(phi_))),
52  d_(exp(1.4681 + 12.2584*phi_ - 20.7322*sqr(phi_) + 15.8855*pow3(phi_)))
53 {
54  if (phi_ <= 0 || phi_ > 1)
55  {
57  << "Ratio of surface of sphere having same volume as particle to "
58  << "actual surface area of particle (phi) must be greater than 0 "
59  << "and less than or equal to 1" << exit(FatalError);
60  }
61 }
62 
63 
64 template<class CloudType>
66 (
68 )
69 :
71  phi_(df.phi_),
72  a_(df.a_),
73  b_(df.b_),
74  c_(df.c_),
75  d_(df.d_)
76 {}
77 
78 
79 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
80 
81 template<class CloudType>
83 {}
84 
85 
86 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
87 
88 template<class CloudType>
90 (
91  const typename CloudType::parcelType& p,
92  const scalar dt,
93  const scalar mass,
94  const scalar Re,
95  const scalar muc
96 ) const
97 {
98  forceSuSp value(Zero, 0.0);
99 
100  value.Sp() = mass*0.75*muc*CdRe(Re)/(p.rho()*sqr(p.d()));
101 
102  return value;
103 }
104 
105 
106 // ************************************************************************* //
#define readScalar
Definition: doubleScalar.C:38
dictionary dict
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
error FatalError
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:319
scalar phi_
Ratio of surface of sphere having same volume as particle to.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Abstract base class for particle forces.
Definition: ParticleForce.H:53
Helper container for force Su and Sp terms.
Definition: forceSuSp.H:61
stressControl lookup("compactNormalStress") >> compactNormalStress
dynamicFvMesh & mesh
dimensionedScalar exp(const dimensionedScalar &ds)
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
static const zero Zero
Definition: zero.H:91
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar pow3(const dimensionedScalar &ds)
scalar CdRe(const scalar Re) const
Drag coefficient multiplied by Reynolds number.
virtual ~NonSphereDragForce()
Destructor.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Drag model for non-spherical particles.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
scalar Sp() const
Return const access to the implicit coefficient [kg/s].
Definition: forceSuSpI.H:62
NonSphereDragForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.