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-2020 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 {
36 
38  (
40  Lun,
42  );
43 }
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
50 (
51  const dictionary& dict
52 )
53 :
55  e_(dict.template lookup<scalar>("e")),
56  eps_(dict.template lookup<scalar>("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 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Base class for inter-particle stress models.
Inter-particle stress model of Lun et al.
Definition: Lun.H:72
Lun(const dictionary &dict)
Constructors.
Definition: Lun.C:50
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
Definition: Lun.C:81
tmp< Field< scalar > > dTaudTheta(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Collision stress derivative w.r.t. the volume fraction.
Definition: Lun.C:105
virtual ~Lun()
Destructor.
Definition: Lun.C:73
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:381
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
defineTypeNameAndDebug(exponential, 0)
Namespace for OpenFOAM.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
Definition: POSIX.C:908
dictionary dict