LESdelta.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) 2011-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::LESdelta
26 
27 Description
28  Abstract base class for LES deltas
29 
30 SourceFiles
31  LESdelta.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef LESdelta_H
36 #define LESdelta_H
37 
38 #include "momentumTransportModel.H"
39 #include "volFields.H"
40 #include "runTimeSelectionTables.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class LESdelta Declaration
49 \*---------------------------------------------------------------------------*/
50 
51 class LESdelta
52 {
53 protected:
54 
55  // Protected data
56 
58 
60 
61 
62 public:
63 
64  //- Runtime type information
65  TypeName("LESdelta");
66 
67 
68  // Declare run-time constructor selection table
69 
71  (
72  autoPtr,
73  LESdelta,
74  dictionary,
75  (
76  const word& name,
78  const dictionary& dict
79  ),
80  (name, turbulence, dict)
81  );
82 
83 
84  // Constructors
85 
86  //- Construct from name, momentumTransportModel and dictionary
87  LESdelta
88  (
89  const word& name,
91  );
92 
93  //- Disallow default bitwise copy construction
94  LESdelta(const LESdelta&) = delete;
95 
96 
97  // Selectors
98 
99  //- Return a reference to the selected LES delta
100  static autoPtr<LESdelta> New
101  (
102  const word& name,
104  const dictionary& dict
105  );
106 
107  //- Return a reference to the selected LES delta
108  static autoPtr<LESdelta> New
109  (
110  const word& name,
112  const dictionary& dict,
113  const dictionaryConstructorTable&
114  );
115 
116 
117  //- Destructor
118  virtual ~LESdelta()
119  {}
120 
121 
122  // Member Functions
123 
124  //- Return momentumTransportModel reference
125  const momentumTransportModel& turbulence() const
126  {
128  }
129 
130  //- Read the LESdelta dictionary
131  virtual void read(const dictionary&) = 0;
132 
133  // Correct values
134  virtual void correct() = 0;
135 
136 
137  // Member Operators
138 
139  void operator=(const LESdelta&) = delete;
140 
141  virtual operator const volScalarField&() const
142  {
143  return delta_;
144  }
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
Generic GeometricField class.
Abstract base class for LES deltas.
Definition: LESdelta.H:51
virtual void read(const dictionary &)=0
Read the LESdelta dictionary.
static autoPtr< LESdelta > New(const word &name, const momentumTransportModel &turbulence, const dictionary &dict)
Return a reference to the selected LES delta.
Definition: LESdelta.C:66
virtual void correct()=0
volScalarField delta_
Definition: LESdelta.H:58
void operator=(const LESdelta &)=delete
const momentumTransportModel & turbulence() const
Return momentumTransportModel reference.
Definition: LESdelta.H:124
LESdelta(const word &name, const momentumTransportModel &turbulence)
Construct from name, momentumTransportModel and dictionary.
Definition: LESdelta.C:40
TypeName("LESdelta")
Runtime type information.
virtual ~LESdelta()
Destructor.
Definition: LESdelta.H:117
declareRunTimeSelectionTable(autoPtr, LESdelta, dictionary,(const word &name, const momentumTransportModel &turbulence, const dictionary &dict),(name, turbulence, dict))
const momentumTransportModel & momentumTransportModel_
Definition: LESdelta.H:56
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
Abstract base class for turbulence models (RAS, LES and laminar).
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
word name(const bool)
Return a word representation of a bool.
Definition: boolIO.C:39
Macros to ease declaration of run-time selection tables.
dictionary dict