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 | 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 "HarrisCrighton.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace ParticleStressModels
36 {
37  defineTypeNameAndDebug(HarrisCrighton, 0);
38 
40  (
41  ParticleStressModel,
42  HarrisCrighton,
43  dictionary
44  );
45 }
46 }
47 
48 
49 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50 
52 (
53  const dictionary& dict
54 )
55 :
57  pSolid_(dict.get<scalar>("pSolid")),
58  beta_(dict.get<scalar>("beta")),
59  eps_(dict.get<scalar>("eps"))
60 {}
61 
62 
64 (
65  const HarrisCrighton& hc
66 )
67 :
69  pSolid_(hc.pSolid_),
70  beta_(hc.beta_),
71  eps_(hc.eps_)
72 {}
73 
74 
75 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
76 
78 {}
79 
80 
81 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
82 
84 Foam::ParticleStressModels::HarrisCrighton::denominator
85 (
86  const Field<scalar>& alpha
87 ) const
88 {
89  return
90  max
91  (
92  alphaPacked_ - alpha,
93  max(eps_*(1.0 - alpha), SMALL)
94  );
95 }
96 
97 
98 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
99 
102 (
103  const Field<scalar>& alpha,
104  const Field<scalar>& rho,
105  const Field<scalar>& uSqr
106 ) const
107 {
108  return
109  (
110  pSolid_
111  * pow(alpha, beta_)
112  / denominator(alpha)
113  );
114 }
115 
116 
119 (
120  const Field<scalar>& alpha,
121  const Field<scalar>& rho,
122  const Field<scalar>& uSqr
123 ) const
124 {
125  const Field<scalar> d(denominator(alpha));
126 
127  return
128  (
129  pSolid_
130  * pow(alpha, beta_)
131  / d
132  * (beta_/alpha + 1.0/d)
133  );
134 }
135 
136 
137 // ************************************************************************* //
Foam::ParticleStressModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(ParticleStressModel, exponential, dictionary)
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
rho
rho
Definition: readInitialConditions.H:88
Foam::Field< scalar >
Foam::ParticleStressModels::HarrisCrighton
Inter-particle stress model of Harris and Crighton.
Definition: HarrisCrighton.H:73
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
dict
dictionary dict
Definition: searchingEngine.H:14
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.
HarrisCrighton.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::ParticleStressModels::HarrisCrighton::HarrisCrighton
HarrisCrighton(const dictionary &dict)
Constructors.
Definition: HarrisCrighton.C:52
Foam::ParticleStressModels::HarrisCrighton::~HarrisCrighton
virtual ~HarrisCrighton()
Destructor.
Definition: HarrisCrighton.C:77
Foam::ParticleStressModel
Base class for inter-particle stress models.
Definition: ParticleStressModel.H:56
Foam::ParticleStressModels::HarrisCrighton::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: HarrisCrighton.C:119
Foam::ParticleStressModels::HarrisCrighton::tau
tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const
Member Functions.
Definition: HarrisCrighton.C:102
Foam::ParticleStressModels::defineTypeNameAndDebug
defineTypeNameAndDebug(exponential, 0)