Lun.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) 2013-2016 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "Lun.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace ParticleStressModels
36 {
38 
40  (
41  ParticleStressModel,
42  Lun,
43  dictionary
44  );
45 }
46 }
47 
48 
49 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50 
52 (
53  const dictionary& dict
54 )
55 :
57  e_(dict.get<scalar>("e")),
58  eps_(dict.get<scalar>("eps"))
59 {}
60 
61 
63 (
64  const Lun& ln
65 )
66 :
68  e_(ln.e_),
69  eps_(ln.eps_)
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
74 
76 {}
77 
78 
79 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
80 
83 (
84  const Field<scalar>& alpha,
85  const Field<scalar>& rho,
86  const Field<scalar>& uSqr
87 ) const
88 {
90  (
91  0.6
92  / max
93  (
94  1.0 - cbrt(alpha/alphaPacked_),
95  max(eps_*(1.0 - alpha), SMALL)
96  )
97  );
98 
99  tmp<Field<scalar>> gT(uSqr/3.0);
100 
101  return alpha*rho*(1.0 + alpha*(1.0 + e_)*g0)*gT;
102 }
103 
104 
107 (
108  const Field<scalar>& alpha,
109  const Field<scalar>& rho,
110  const Field<scalar>& uSqr
111 ) const
112 {
114  return nullptr;
115 }
116 
117 
118 // ************************************************************************* //
Foam::ParticleStressModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
Foam::ParticleStressModels::Lun::~Lun
virtual ~Lun()
Destructor.
Definition: Lun.C:75
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
rho
rho
Definition: readInitialConditions.H:88
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Foam::ParticleStressModels::Lun::dTaudTheta
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:107
Foam::Field< scalar >
Foam::ParticleStressModels::Lun::Lun
Lun(const dictionary &dict)
Constructors.
Definition: Lun.C:52
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
dict
dictionary dict
Definition: searchingEngine.H:14
Lun
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ParticleStressModels::Lun::tau
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
Definition: Lun.C:83
Lun.H
Foam::ParticleStressModel
Base class for inter-particle stress models.
Definition: ParticleStressModel.H:56
Foam::ln
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
Definition: MSwindows.C:925
Foam::cbrt
dimensionedScalar cbrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:155
Foam::ParticleStressModels::Lun
Inter-particle stress model of Lun et al.
Definition: Lun.H:74
Foam::ParticleStressModels::defineTypeNameAndDebug
defineTypeNameAndDebug(exponential, 0)