LESdelta.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) 2011-2015 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::LESdelta
29 
30 Description
31  Abstract base class for LES deltas
32 
33 SourceFiles
34  LESdelta.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef LESdelta_H
39 #define LESdelta_H
40 
41 #include "turbulenceModel.H"
42 #include "volFields.H"
43 #include "runTimeSelectionTables.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 
50 /*---------------------------------------------------------------------------*\
51  Class LESdelta Declaration
52 \*---------------------------------------------------------------------------*/
53 
54 class LESdelta
55 {
56 
57 protected:
58 
59  // Protected data
60 
62 
64 
65 
66  // Protected Member Functions
67 
68  //- No copy construct
69  LESdelta(const LESdelta&) = delete;
70 
71  //- No copy assignment
72  void operator=(const LESdelta&) = delete;
73 
74 
75 public:
76 
77  //- Runtime type information
78  TypeName("LESdelta");
79 
80 
81  // Declare run-time constructor selection table
82 
84  (
85  autoPtr,
86  LESdelta,
87  dictionary,
88  (
89  const word& name,
91  const dictionary& dict
92  ),
93  (name, turbulence, dict)
94  );
95 
96 
97  // Constructors
98 
99  //- Construct from name, turbulenceModel and dictionary
100  LESdelta
101  (
102  const word& name,
104  );
105 
106 
107  // Selectors
108 
109  //- Return a reference to the selected LES delta
110  static autoPtr<LESdelta> New
111  (
112  const word& name,
114  const dictionary& dict,
115  const word& lookupName = "delta"
116  );
117 
118  //- Return a reference to the selected LES delta
119  static autoPtr<LESdelta> New
120  (
121  const word& name,
123  const dictionary& dict,
124  const dictionaryConstructorTable& additionalConstructors,
125  const word& lookupName = "delta"
126  );
127 
128 
129  //- Destructor
130  virtual ~LESdelta() = default;
131 
132 
133  // Member Functions
134 
135  //- Return turbulenceModel reference
136  const turbulenceModel& turbulence() const
137  {
138  return turbulenceModel_;
139  }
140 
141  //- Read the LESdelta dictionary
142  virtual void read(const dictionary&) = 0;
143 
144  // Correct values
145  virtual void correct() = 0;
146 
147 
148  // Member Operators
149 
150  virtual operator const volScalarField&() const
151  {
152  return delta_;
153  }
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
volFields.H
Foam::LESdelta::New
static autoPtr< LESdelta > New(const word &name, const turbulenceModel &turbulence, const dictionary &dict, const word &lookupName="delta")
Return a reference to the selected LES delta.
Definition: LESdelta.C:69
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::LESdelta::~LESdelta
virtual ~LESdelta()=default
Destructor.
Foam::LESdelta::delta_
volScalarField delta_
Definition: LESdelta.H:62
Foam::LESdelta::turbulence
const turbulenceModel & turbulence() const
Return turbulenceModel reference.
Definition: LESdelta.H:135
Foam::LESdelta::turbulenceModel_
const turbulenceModel & turbulenceModel_
Definition: LESdelta.H:60
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::LESdelta::LESdelta
LESdelta(const LESdelta &)=delete
No copy construct.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::turbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: turbulenceModel.H:63
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::LESdelta
Abstract base class for LES deltas.
Definition: LESdelta.H:53
Foam::LESdelta::operator=
void operator=(const LESdelta &)=delete
No copy assignment.
Foam::LESdelta::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, LESdelta, dictionary,(const word &name, const turbulenceModel &turbulence, const dictionary &dict),(name, turbulence, dict))
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::LESdelta::correct
virtual void correct()=0
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::LESdelta::TypeName
TypeName("LESdelta")
Runtime type information.
Foam::LESdelta::read
virtual void read(const dictionary &)=0
Read the LESdelta dictionary.
turbulenceModel.H