Lun.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) 2013-2018 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 "Lun.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace ParticleStressModels
34 {
35  defineTypeNameAndDebug(Lun, 0);
36 
38  (
39  ParticleStressModel,
40  Lun,
41  dictionary
42  );
43 }
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
50 (
51  const dictionary& dict
52 )
53 :
54  ParticleStressModel(dict),
55  e_(readScalar(dict.lookup("e"))),
56  eps_(readScalar(dict.lookup("eps")))
57 {}
58 
59 
61 (
62  const Lun& ln
63 )
64 :
66  e_(ln.e_),
67  eps_(ln.eps_)
68 {}
69 
70 
71 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
72 
74 {}
75 
76 
77 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
78 
81 (
82  const Field<scalar>& alpha,
83  const Field<scalar>& rho,
84  const Field<scalar>& uSqr
85 ) const
86 {
88  (
89  0.6
90  / max
91  (
92  1.0 - pow(alpha/alphaPacked_,1.0/3.0),
93  max(eps_*(1.0 - alpha), small)
94  )
95  );
96 
97  tmp<Field<scalar>> gT(uSqr/3.0);
98 
99  return alpha*rho*(1.0 + alpha*(1.0 + e_)*g0)*gT;
100 }
101 
102 
105 (
106  const Field<scalar>& alpha,
107  const Field<scalar>& rho,
108  const Field<scalar>& uSqr
109 ) const
110 {
112 
113  return tmp<Field<scalar>>(nullptr);
114 }
115 
116 
117 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
tmp< Field< scalar > > dTaudTheta(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Collision stress derivaive w.r.t. the volume fraction.
Definition: Lun.C:105
Lun(const dictionary &dict)
Constructors.
Definition: Lun.C:50
Macros for easy insertion into run-time selection tables.
Inter-particle stress model of Lun et al.
Definition: Lun.H:69
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
Definition: doubleScalar.H:68
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
Definition: Lun.C:81
A class for managing temporary objects.
Definition: PtrList.H:53
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:366
virtual ~Lun()
Destructor.
Definition: Lun.C:73
Base class for inter-particle stress models.
Namespace for OpenFOAM.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:583
defineTypeNameAndDebug(exponential, 0)