exponential.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-2019 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 "exponential.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace ParticleStressModels
34 {
36 
38  (
42  );
43 }
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
50 (
51  const dictionary& dict
52 )
53 :
54  ParticleStressModel(dict),
55  preExp_(dict.template lookup<scalar>("preExp")),
56  expMax_(dict.template lookup<scalar>("expMax")),
57  g0_(dict.template lookup<scalar>("g0"))
58 {}
59 
60 
62 (
63  const exponential& hc
64 )
65 :
67  preExp_(hc.preExp_),
68  expMax_(hc.expMax_),
69  g0_(hc.g0_)
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 {
89  return dTaudTheta(alpha, rho, uSqr)/preExp_;
90 }
91 
92 
95 (
96  const Field<scalar>& alpha,
97  const Field<scalar>& rho,
98  const Field<scalar>& uSqr
99 ) const
100 {
101  return
102  g0_
103  *min
104  (
105  exp(preExp_*(alpha - alphaPacked_)),
106  expMax_
107  );
108 }
109 
110 
111 // ************************************************************************* //
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
Definition: exponential.C:83
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
Exponential inter-particle stress model of the same form as used in twoPhaseEulerFoam.
Definition: exponential.H:51
Macros for easy insertion into run-time selection tables.
dimensionedScalar exp(const dimensionedScalar &ds)
virtual ~exponential()
Destructor.
Definition: exponential.C:75
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
exponential(const dictionary &dict)
Constructors.
Definition: exponential.C:50
A class for managing temporary objects.
Definition: PtrList.H:53
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:95
Base class for inter-particle stress models.
Namespace for OpenFOAM.
defineTypeNameAndDebug(exponential, 0)