Loading...
Searching...
No Matches
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{
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(
71 const NonSphereDragForce<CloudType>& df
72)
73:
74 ParticleForce<CloudType>(df),
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// ************************************************************************* //
NonSphereDragForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict)
Construct from mesh.
scalar CdRe(const scalar Re) const
Drag coefficient multiplied by Reynolds number.
scalar phi_
Ratio of surface of sphere having same volume as particle to actual surface area of particle (0 < phi...
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.
const fvMesh & mesh() const noexcept
Return the mesh database.
const CloudType & owner() const noexcept
Return const access to the cloud owner.
ParticleForce(CloudType &owner, const fvMesh &mesh, const dictionary &dict, const word &forceType, const bool readCoeffs)
Construct from mesh.
const dictionary & coeffs() const noexcept
Return the force coefficients dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Helper container for force Su and Sp terms.
Definition forceSuSp.H:63
Mesh data needed to do the Finite Volume discretisation.
Definition fvMesh.H:85
volScalarField & p
dynamicFvMesh & mesh
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition error.H:600
wallPoints::trackData td(isBlockedFace, regionToBlockSize)
DSMCCloud< dsmcParcel > CloudType
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
scalarField Re(const UList< complex > &cmplx)
Extract real component.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition errorManip.H:125
dictionary dict