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-------------------------------------------------------------------------------
10License
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
33namespace Foam
34{
35namespace ParticleStressModels
36{
38
40 (
42 Lun,
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// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Generic templated field type.
Definition: Field.H:82
Base class for inter-particle stress models.
Inter-particle stress model of Lun et al.
Definition: Lun.H:77
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
virtual ~Lun()
Destructor.
Definition: Lun.C:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const vector & tau() const
Definition: moleculeI.H:557
A class for managing temporary objects.
Definition: tmp.H:65
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
dimensionedScalar cbrt(const dimensionedScalar &ds)
bool ln(const fileName &src, const fileName &dst)
Create a softlink. dst should not exist. Returns true if successful.
Definition: MSwindows.C:933
volScalarField & alpha
dictionary dict