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,
90  const momentumTransportModel& turbulence
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,
103  const momentumTransportModel& turbulence,
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,
111  const momentumTransportModel& turbulence,
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;
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 // ************************************************************************* //
dictionary dict
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 ~LESdelta()
Destructor.
Definition: LESdelta.H:117
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
const momentumTransportModel & turbulence() const
Return momentumTransportModel reference.
Definition: LESdelta.H:124
Abstract base class for LES deltas.
Definition: LESdelta.H:50
TypeName("LESdelta")
Runtime type information.
void operator=(const LESdelta &)=delete
LESdelta(const word &name, const momentumTransportModel &turbulence)
Construct from name, momentumTransportModel and dictionary.
Definition: LESdelta.C:40
A class for handling words, derived from string.
Definition: word.H:59
virtual void read(const dictionary &)=0
Read the LESdelta dictionary.
volScalarField delta_
Definition: LESdelta.H:58
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
Abstract base class for turbulence models (RAS, LES and laminar).
declareRunTimeSelectionTable(autoPtr, LESdelta, dictionary,(const word &name, const momentumTransportModel &turbulence, const dictionary &dict),(name, turbulence, dict))
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.
const momentumTransportModel & momentumTransportModel_
Definition: LESdelta.H:56
virtual void correct()=0
Namespace for OpenFOAM.