SchillerNaumannDrag.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2025-2026 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 "SchillerNaumannDrag.H"
29 #include "coupledToFluid.H"
30 #include "sphericalCoupled.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
36 namespace Lagrangian
37 {
40  (
44  );
45 }
46 }
47 
48 
49 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
50 
52 Foam::Lagrangian::SchillerNaumannDrag::calcD
53 (
54  const LagrangianModelRef& model,
55  const LagrangianSubMesh& subMesh
56 ) const
57 {
58  const clouds::spherical& sCloud = cloud<clouds::spherical>();
59  const clouds::sphericalCoupled& scCloud = cloud<clouds::sphericalCoupled>();
60 
61  tmp<LagrangianSubScalarSubField> td = sCloud.d(model, subMesh);
62  const LagrangianSubScalarSubField& d = td();
63  const LagrangianSubScalarField& Re = scCloud.Re(model, subMesh);
64 
66  <
67  clouds::coupledToConstantDensityFluid,
68  clouds::coupledToFluid
69  >();
70 
71  tmp<LagrangianSubScalarField> tmucByRhoOrMuc =
72  isCloud<clouds::coupledToConstantDensityFluid>()
73  ? (
74  cloud<clouds::coupledToConstantDensityFluid>().nuc(model, subMesh)
75  /cloud<clouds::coupledToConstantDensityFluid>().rhoByRhoc
76  )
77  : tmp<LagrangianSubScalarField>
78  (
79  cloud<clouds::coupledToFluid>().muc(model, subMesh)
80  );
81 
82  return CdRe(Re)*(constant::mathematical::pi/8)*d*tmucByRhoOrMuc;
83 }
84 
85 
86 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
87 
90 (
92 )
93 {
94  return
95  neg(Re - 1000)*24*(1 + 0.15*pow(Re, 0.687))
96  + pos0(Re - 1000)*0.44*Re;
97 }
98 
99 
100 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Base class for Lagrangian models.
Drag model of Schiller and Naumann for spherical particles in a turbulent carrier flow.
static tmp< LagrangianSubScalarField > CdRe(const LagrangianSubScalarField &Re)
Return the drag coefficient times Reynold's number, as a function.
void assertCloud() const
Generate an error if the cloud is not one of the given types.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
defineTypeNameAndDebug(collisionPhaseTransfer, 0)
addToRunTimeSelectionTable(LagrangianModel, collisionPhaseTransfer, dictionary)
Namespace for OpenFOAM.
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
LagrangianSubSubField< scalar > LagrangianSubScalarSubField
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
LagrangianSubField< scalar > LagrangianSubScalarField
scalarField Re(const UList< complex > &cf)
Definition: complexFields.C:97