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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2017 OpenFOAM Foundation
9 Copyright (C) 2021 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "NonSphereDragForce.H"
30
31// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
32
33template<class CloudType>
34Foam::scalar Foam::NonSphereDragForce<CloudType>::CdRe(const scalar Re) const
35{
36 // (HL:Eq. 10-11)
37 return 24.0*(1.0 + a_*pow(Re, b_)) + Re*c_/(1 + d_/(Re + ROOTVSMALL));
38}
39
40
41// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
42
43template<class CloudType>
45(
46 CloudType& owner,
47 const fvMesh& mesh,
48 const dictionary& dict
49)
50:
51 ParticleForce<CloudType>(owner, mesh, dict, typeName, true),
52 phi_(this->coeffs().getScalar("phi")),
53 a_(exp(2.3288 - 6.4581*phi_ + 2.4486*sqr(phi_))),
54 b_(0.0964 + 0.5565*phi_),
55 c_(exp(4.9050 - 13.8944*phi_ + 18.4222*sqr(phi_) - 10.2599*pow3(phi_))),
56 d_(exp(1.4681 + 12.2584*phi_ - 20.7322*sqr(phi_) + 15.8855*pow3(phi_)))
57{
58 if (phi_ <= 0 || phi_ > 1)
59 {
61 << "Ratio of surface of sphere having same volume as particle to "
62 << "actual surface area of particle (phi) must be greater than 0 "
63 << "and less than or equal to 1" << exit(FatalError);
64 }
65}
66
67
68template<class CloudType>
70(
72)
73:
75 phi_(df.phi_),
76 a_(df.a_),
77 b_(df.b_),
78 c_(df.c_),
79 d_(df.d_)
80{}
81
82
83// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
84
85template<class CloudType>
87(
88 const typename CloudType::parcelType& p,
89 const typename CloudType::parcelType::trackingData& td,
90 const scalar dt,
91 const scalar mass,
92 const scalar Re,
93 const scalar muc
94) const
95{
96 return forceSuSp(Zero, mass*0.75*muc*CdRe(Re)/(p.rho()*sqr(p.d())));
97}
98
99
100// ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Particle-drag model wherein drag forces (per unit carrier-fluid velocity) are dynamically computed ba...
virtual forceSuSp calcCoupled(const typename CloudType::parcelType &p, const typename CloudType::parcelType::trackingData &td, const scalar dt, const scalar mass, const scalar Re, const scalar muc) const
Calculate the non-coupled force.
Abstract base class for particle forces.
Definition: ParticleForce.H:60
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
virtual tmp< volScalarField > CdRe() const
Drag coefficient.
Class used to pass data into container.
Helper container for force Su and Sp terms.
Definition: forceSuSp.H:67
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
volScalarField & p
dynamicFvMesh & mesh
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
error FatalError
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
dictionary dict