HarrisCrighton.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-2016 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 "HarrisCrighton.H"
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace ParticleStressModels
34 {
35  defineTypeNameAndDebug(HarrisCrighton, 0);
36 
38  (
39  ParticleStressModel,
40  HarrisCrighton,
41  dictionary
42  );
43 }
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
50 (
51  const dictionary& dict
52 )
53 :
54  ParticleStressModel(dict),
55  pSolid_(readScalar(dict.lookup("pSolid"))),
56  beta_(readScalar(dict.lookup("beta"))),
57  eps_(readScalar(dict.lookup("eps")))
58 {}
59 
60 
62 (
63  const HarrisCrighton& hc
64 )
65 :
67  pSolid_(hc.pSolid_),
68  beta_(hc.beta_),
69  eps_(hc.eps_)
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
74 
76 {}
77 
78 
79 // * * * * * * * * * * * * * Privare Member Functions * * * * * * * * * * * //
80 
82 Foam::ParticleStressModels::HarrisCrighton::denominator
83 (
84  const Field<scalar>& alpha
85 ) const
86 {
87  return
88  max
89  (
90  alphaPacked_ - alpha,
91  max(eps_*(1.0 - alpha), SMALL)
92  );
93 }
94 
95 
96 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
97 
100 (
101  const Field<scalar>& alpha,
102  const Field<scalar>& rho,
103  const Field<scalar>& uSqr
104 ) const
105 {
106  return
107  (
108  pSolid_
109  * pow(alpha, beta_)
110  / denominator(alpha)
111  );
112 }
113 
114 
117 (
118  const Field<scalar>& alpha,
119  const Field<scalar>& rho,
120  const Field<scalar>& uSqr
121 ) const
122 {
123  const Field<scalar> d(denominator(alpha));
124 
125  return
126  (
127  pSolid_
128  * pow(alpha, beta_)
129  / d
130  * (beta_/alpha + 1.0/d)
131  );
132 }
133 
134 
135 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
Inter-particle stress model of Harris and Crighton.
HarrisCrighton(const dictionary &dict)
Constructors.
Macros for easy insertion into run-time selection tables.
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.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
Definition: doubleScalar.H:63
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
A class for managing temporary objects.
Definition: PtrList.H:53
Base class for inter-particle stress models.
Namespace for OpenFOAM.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:576
defineTypeNameAndDebug(exponential, 0)