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-2018 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:
56 
57  //- Private member functions
58 
59  //- Disallow default bitwise assignment
60  void operator=(const TimeScaleModel&);
61 
62 
63 protected:
64 
65  // Protected data
66 
67  //- Close pack volume fraction
68  scalar alphaPacked_;
69 
70  //- Coefficient of restitution
71  scalar e_;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("timeScaleModel");
78 
79  //- Declare runtime constructor selection table
81  (
82  autoPtr,
84  dictionary,
85  (const dictionary& dict),
86  (dict)
87  );
88 
89 
90  //- Constructors
91 
92  //- Construct from components
93  TimeScaleModel(const dictionary& dict);
94 
95  //- Construct a copy
96  TimeScaleModel(const TimeScaleModel& sm);
97 
98  //- Construct and return a clone
99  virtual autoPtr<TimeScaleModel> clone() const = 0;
100 
101 
102  //- Selector
104  (
105  const dictionary& dict
106  );
107 
108 
109  //- Destructor
110  virtual ~TimeScaleModel();
111 
112 
113  //- Member Functions
114 
115  //- Time scale
117  (
119  const FieldField<Field, scalar>& r32,
120  const FieldField<Field, scalar>& uSqr,
122  ) const = 0;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #endif
133 
134 // ************************************************************************* //
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:137
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.
A class for managing temporary objects.
Definition: PtrList.H:53
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Namespace for OpenFOAM.
scalar alphaPacked_
Close pack volume fraction.