TimeScaleModel.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::TimeScaleModel
26 
27 Description
28  Base class for time scale models.
29 
30 SourceFiles
31  TimeScaleModel.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef TimeScaleModel_H
36 #define TimeScaleModel_H
37 
38 #include "constants.H"
39 #include "Field.H"
40 #include "FieldField.H"
41 #include "dictionary.H"
42 #include "runTimeSelectionTables.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class TimeScaleModel Declaration
51 \*---------------------------------------------------------------------------*/
52 
53 class TimeScaleModel
54 {
55  // Private Member Functions
56 
57  //- Disallow default bitwise assignment
58  void operator=(const TimeScaleModel&) = delete;
59 
60 
61 protected:
62 
63  // Protected data
64 
65  //- Close pack volume fraction
66  scalar alphaPacked_;
67 
68  //- Coefficient of restitution
69  scalar e_;
70 
71 
72 public:
73 
74  //- Runtime type information
75  TypeName("timeScaleModel");
76 
77  //- Declare runtime constructor selection table
79  (
80  autoPtr,
82  dictionary,
83  (const dictionary& dict),
84  (dict)
85  );
86 
87 
88  //- Constructors
89 
90  //- Construct from components
91  TimeScaleModel(const dictionary& dict);
92 
93  //- Construct a copy
94  TimeScaleModel(const TimeScaleModel& sm);
95 
96  //- Construct and return a clone
97  virtual autoPtr<TimeScaleModel> clone() const = 0;
98 
99 
100  //- Selector
102  (
103  const dictionary& dict
104  );
105 
106 
107  //- Destructor
108  virtual ~TimeScaleModel();
109 
110 
111  //- Member Functions
112 
113  //- Time scale
115  (
117  const FieldField<Field, scalar>& r32,
118  const FieldField<Field, scalar>& uSqr,
120  ) const = 0;
121 };
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
dictionary dict
static autoPtr< TimeScaleModel > New(const dictionary &dict)
Selector.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
scalar e_
Coefficient of restitution.
virtual tmp< FieldField< Field, scalar > > oneByTau(const FieldField< Field, scalar > &alpha, const FieldField< Field, scalar > &r32, const FieldField< Field, scalar > &uSqr, const FieldField< Field, scalar > &f) const =0
Member Functions.
virtual ~TimeScaleModel()
Destructor.
Generic field type.
Definition: FieldField.H:51
TimeScaleModel(const dictionary &dict)
Constructors.
labelList f(nPoints)
TypeName("timeScaleModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, TimeScaleModel, dictionary,(const dictionary &dict),(dict))
Declare runtime constructor selection table.
virtual autoPtr< TimeScaleModel > clone() const =0
Construct and return a clone.
Base class for time scale models.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Macros to ease declaration of run-time selection tables.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
scalar alphaPacked_
Close pack volume fraction.