TimeScaleModel.H
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 Class
27  Foam::TimeScaleModel
28 
29 Group
30  grpLagrangianIntermediateMPPICTimeScaleSubModels
31 
32 Description
33  Base class for time scale models.
34 
35 SourceFiles
36  TimeScaleModel.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef TimeScaleModel_H
41 #define TimeScaleModel_H
42 
43 #include "constants.H"
44 #include "Field.H"
45 #include "FieldField.H"
46 #include "dictionary.H"
47 #include "runTimeSelectionTables.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class TimeScaleModel Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 class TimeScaleModel
59 {
60 private:
61 
62  //- Private member functions
63 
64  //- No copy assignment
65  void operator=(const TimeScaleModel&) = delete;
66 
67 
68 protected:
69 
70  // Protected data
71 
72  //- Close pack volume fraction
73  scalar alphaPacked_;
74 
75  //- Coefficient of restitution
76  scalar e_;
77 
78 
79 public:
80 
81  //- Runtime type information
82  TypeName("timeScaleModel");
83 
84  //- Declare runtime constructor selection table
86  (
87  autoPtr,
89  dictionary,
90  (const dictionary& dict),
91  (dict)
92  );
93 
94 
95  //- Constructors
96 
97  //- Construct from components
99 
100  //- Construct a copy
101  TimeScaleModel(const TimeScaleModel& sm);
102 
103  //- Construct and return a clone
104  virtual autoPtr<TimeScaleModel> clone() const = 0;
105 
106 
107  //- Selector
109  (
110  const dictionary& dict
111  );
112 
113 
114  //- Destructor
115  virtual ~TimeScaleModel();
116 
117 
118  //- Member Functions
119 
120  //- Time scale
122  (
124  const FieldField<Field, scalar>& r32,
125  const FieldField<Field, scalar>& uSqr,
127  ) const = 0;
128 };
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
FieldField.H
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
Foam::TimeScaleModel::~TimeScaleModel
virtual ~TimeScaleModel()
Destructor.
Definition: TimeScaleModel.C:94
Foam::TimeScaleModel::oneByTau
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.
Foam::TimeScaleModel::e_
scalar e_
Coefficient of restitution.
Definition: TimeScaleModel.H:75
Foam::TimeScaleModel::TimeScaleModel
TimeScaleModel(const dictionary &dict)
Constructors.
Definition: TimeScaleModel.C:43
Field.H
Foam::TimeScaleModel::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, TimeScaleModel, dictionary,(const dictionary &dict),(dict))
Declare runtime constructor selection table.
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
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
constants.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::TimeScaleModel
Base class for time scale models.
Definition: TimeScaleModel.H:57
f
labelList f(nPoints)
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
dictionary.H
Foam::TimeScaleModel::TypeName
TypeName("timeScaleModel")
Runtime type information.
Foam::TimeScaleModel::clone
virtual autoPtr< TimeScaleModel > clone() const =0
Construct and return a clone.
Foam::TimeScaleModel::alphaPacked_
scalar alphaPacked_
Close pack volume fraction.
Definition: TimeScaleModel.H:72
Foam::TimeScaleModel::New
static autoPtr< TimeScaleModel > New(const dictionary &dict)
Selector.
Definition: TimeScaleModel.C:67