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 | Copyright (C) 2013 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 :
55  preExp_(readScalar(dict.lookup("preExp"))),
56  expMax_(readScalar(dict.lookup("expMax"))),
57  g0_(readScalar(dict.lookup("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 // ************************************************************************* //
Foam::ParticleStressModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
exponential.H
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:83
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:216
Foam::ParticleStressModels::exponential::preExp_
scalar preExp_
Pre-exponential factor.
Definition: exponential.H:58
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:252
Foam::ParticleStressModels::exponential
Exponential inter-particle stress model of the same form as used in twoPhaseEulerFoam.
Definition: exponential.H:51
Foam::ParticleStressModels::exponential::g0_
scalar g0_
Front coefficient.
Definition: exponential.H:64
Foam::Field< scalar >
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::ParticleStressModels::exponential::~exponential
virtual ~exponential()
Destructor.
Definition: exponential.C:75
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
readScalar
#define readScalar
Definition: doubleScalar.C:38
rho
rho
Definition: pEqn.H:3
Foam::ParticleStressModels::exponential::exponential
exponential(const dictionary &dict)
Constructors.
Definition: exponential.C:50
Foam::ParticleStressModel
Base class for inter-particle stress models.
Definition: ParticleStressModel.H:51
Foam::ParticleStressModels::exponential::dTaudTheta
tmp< Field< scalar > > dTaudTheta(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Collision stress derivaive w.r.t. the volume fraction.
Definition: exponential.C:95
Foam::ParticleStressModels::exponential::expMax_
scalar expMax_
Maximum limit of the exponential.
Definition: exponential.H:61
Foam::min
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::ParticleStressModels::defineTypeNameAndDebug
defineTypeNameAndDebug(exponential, 0)