HrenyaSinclairViscosity.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) 2011-2024 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 
27 #include "mathematicalConstants.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace kineticTheoryModels
35 {
36 namespace viscosityModels
37 {
39 
41  (
45  );
46 }
47 }
48 }
49 
50 
51 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
52 
53 bool Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::readCoeffs
54 (
55  const dictionary& coeffDict
56 )
57 {
58  L_.readIfPresent(coeffDict);
59 
60  return true;
61 }
62 
63 
64 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
65 
67 (
68  const dictionary& coeffDict
69 )
70 :
71  viscosityModel(coeffDict),
72  L_("L", dimensionSet(0, 1, 0, 0, 0), coeffDict)
73 {}
74 
75 
76 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
77 
79 {}
80 
81 
82 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
83 
86 (
87  const volScalarField& alpha1,
88  const volScalarField& Theta,
89  const volScalarField& g0,
90  const volScalarField& rho1,
91  const volScalarField& da,
92  const dimensionedScalar& e
93 ) const
94 {
95  const scalar sqrtPi = sqrt(constant::mathematical::pi);
96 
97  const volScalarField lambda(1 + da/(6*sqrt(2.0)*(alpha1 + 1e-5))/L_);
98 
99  return volScalarField::New
100  (
102  (
103  Foam::typedName<viscosityModel>("nu"),
104  Theta.group()
105  ),
106  da*sqrt(Theta)*
107  (
108  (4.0/5.0)*sqr(alpha1)*g0*(1 + e)/sqrtPi
109  + (1.0/15.0)*sqrtPi*g0*(1 + e)*(3*e - 1)*sqr(alpha1)/(3 - e)
110  + (1.0/6.0)*sqrtPi*alpha1*(0.5*lambda + 0.25*(3*e - 1))
111  /(0.5*(3 - e)*lambda)
112  + (10.0/96.0)*sqrtPi/((1 + e)*0.5*(3 - e)*g0*lambda)
113  )
114  );
115 }
116 
117 
118 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
static word group(const word &name)
Return group (extension part of name)
Definition: IOobject.C:131
static word groupName(Name name, const word &group)
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Dimension set for the base types.
Definition: dimensionSet.H:125
bool readIfPresent(const dictionary &, const unitConversion &defaultUnits=NullObjectRef< unitConversion >())
Update the value of dimensioned<Type> if found in the dictionary.
tmp< volScalarField > nu(const volScalarField &alpha1, const volScalarField &Theta, const volScalarField &g0, const volScalarField &rho1, const volScalarField &da, const dimensionedScalar &e) const
HrenyaSinclair(const dictionary &coeffDict)
Construct from the coefficients dictionary.
A class for managing temporary objects.
Definition: tmp.H:55
dimensionedScalar lambda(viscosity->lookup("lambda"))
addToRunTimeSelectionTable(viscosityModel, Gidaspow, dictionary)
Namespace for OpenFOAM.
const doubleScalar e
Definition: doubleScalar.H:106
void sqr(LagrangianPatchField< typename outerProduct< Type, Type >::type > &f, const LagrangianPatchField< Type > &f1)
void sqrt(LagrangianPatchField< scalar > &f, const LagrangianPatchField< scalar > &f1)