ParticleStressModel.H
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-2020 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 Class
25  Foam::ParticleStressModel
26 
27 Description
28  Base class for inter-particle stress models.
29 
30 SourceFiles
31  exponential.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef ParticleStressModel_H
36 #define ParticleStressModel_H
37 
38 #include "Field.H"
39 #include "FieldField.H"
40 #include "dictionary.H"
41 #include "runTimeSelectionTables.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class ParticleStressModel Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private Member Functions
55 
56  //- Disallow default bitwise assignment
57  void operator=(const ParticleStressModel&) = delete;
58 
59 
60 protected:
61 
62  // Protected data
63 
64  //- Close pack volume fraction
65  scalar alphaPacked_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("particleStressModel");
72 
73  //- Declare runtime constructor selection table
75  (
76  autoPtr,
78  dictionary,
79  (const dictionary& dict),
80  (dict)
81  );
82 
83 
84  //- Constructors
85 
86  //- Construct from components
88 
89  //- Construct a copy
91 
92  //- Construct and return a clone
93  virtual autoPtr<ParticleStressModel> clone() const = 0;
94 
95 
96  //- Selector
98  (
99  const dictionary& dict
100  );
101 
102 
103  //- Destructor
104  virtual ~ParticleStressModel();
105 
106 
107  //- Member Functions
108 
109  //- Access max volume fraction
110  scalar alphaPacked() const;
111 
112  //- Collision stress
113  virtual tmp<Field<scalar>> tau
114  (
115  const Field<scalar>& alpha,
116  const Field<scalar>& rho,
117  const Field<scalar>& uRms
118  ) const = 0;
119 
120  //- Collision stress derivative w.r.t. the volume fraction
122  (
123  const Field<scalar>& alpha,
124  const Field<scalar>& rho,
125  const Field<scalar>& uRms
126  ) const = 0;
127 
128  //- Collision stress using FieldFields
130  (
133  const FieldField<Field, scalar>& uRms
134  ) const;
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
Generic field type.
Definition: FieldField.H:77
Base class for inter-particle stress models.
virtual tmp< Field< scalar > > dTaudTheta(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const =0
Collision stress derivative w.r.t. the volume fraction.
ParticleStressModel(const dictionary &dict)
Constructors.
declareRunTimeSelectionTable(autoPtr, ParticleStressModel, dictionary,(const dictionary &dict),(dict))
Declare runtime constructor selection table.
virtual tmp< Field< scalar > > tau(const Field< scalar > &alpha, const Field< scalar > &rho, const Field< scalar > &uRms) const =0
Collision stress.
virtual autoPtr< ParticleStressModel > clone() const =0
Construct and return a clone.
static autoPtr< ParticleStressModel > New(const dictionary &dict)
Selector.
virtual ~ParticleStressModel()
Destructor.
scalar alphaPacked_
Close pack volume fraction.
scalar alphaPacked() const
Member Functions.
TypeName("particleStressModel")
Runtime type information.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:162
A class for managing temporary objects.
Definition: tmp.H:55
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
Namespace for OpenFOAM.
Macros to ease declaration of run-time selection tables.
dictionary dict