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 -------------------------------------------------------------------------------
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 "exponential.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace 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 // ************************************************************************* //
Foam::ParticleStressModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
Foam::ParticleStressModels::exponential::tau
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
Definition: exponential.C:85
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
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:261
rho
rho
Definition: readInitialConditions.H:88
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Foam::ParticleStressModels::exponential
Exponential inter-particle stress model of the same form as used in twoPhaseEulerFoam.
Definition: exponential.H:56
Foam::Field< scalar >
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::ParticleStressModels::exponential::~exponential
virtual ~exponential()
Destructor.
Definition: exponential.C:77
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::exponential::exponential
exponential(const dictionary &dict)
Constructors.
Definition: exponential.C:52
Foam::ParticleStressModel
Base class for inter-particle stress models.
Definition: ParticleStressModel.H:56
Foam::ParticleStressModels::exponential::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: exponential.C:97
exponential.H
Foam::ParticleStressModels::defineTypeNameAndDebug
defineTypeNameAndDebug(exponential, 0)