exponential.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 "exponential.H"
30
31// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32
33namespace Foam
34{
35namespace ParticleStressModels
36{
38
40 (
44 );
45}
46}
47
48
49// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50
52(
53 const dictionary& dict
54)
55:
57 preExp_(dict.get<scalar>("preExp")),
58 expMax_(dict.get<scalar>("expMax")),
59 g0_(dict.get<scalar>("g0"))
60{}
61
62
64(
65 const exponential& hc
66)
67:
69 preExp_(hc.preExp_),
70 expMax_(hc.expMax_),
71 g0_(hc.g0_)
72{}
73
74
75// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
76
78{}
79
80
81// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
82
85(
86 const Field<scalar>& alpha,
87 const Field<scalar>& rho,
88 const Field<scalar>& uSqr
89) const
90{
91 return dTaudTheta(alpha, rho, uSqr)/preExp_;
92}
93
94
97(
98 const Field<scalar>& alpha,
99 const Field<scalar>& rho,
100 const Field<scalar>& uSqr
101) const
102{
103 return
104 g0_
105 *min
106 (
107 exp(preExp_*(alpha - alphaPacked_)),
108 expMax_
109 );
110}
111
112
113// ************************************************************************* //
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.
Exponential inter-particle stress model of the same form as used in twoPhaseEulerFoam.
Definition: exponential.H:59
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: exponential.C:97
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Particle-size distribution model wherein random samples are drawn from the doubly-truncated exponenti...
Definition: exponential.H:192
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
Namespace for OpenFOAM.
dimensionedScalar exp(const dimensionedScalar &ds)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
volScalarField & alpha
dictionary dict