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-2021 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 protected:
57 
58  // Protected Data
59 
61 
63 
64 
65  // Protected Member Functions
66 
67  //- No copy construct
68  LESdelta(const LESdelta&) = delete;
69 
70  //- No copy assignment
71  void operator=(const LESdelta&) = delete;
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("LESdelta");
78 
79 
80  // Declare run-time constructor selection table
81 
83  (
84  autoPtr,
85  LESdelta,
86  dictionary,
87  (
88  const word& name,
90  const dictionary& dict
91  ),
92  (name, turbulence, dict)
93  );
94 
95 
96  // Constructors
97 
98  //- Construct from name, turbulenceModel and dictionary
99  LESdelta
100  (
101  const word& name,
103  );
104 
105 
106  // Selectors
107 
108  //- Return a reference to the selected LES delta
109  static autoPtr<LESdelta> New
110  (
111  const word& name,
113  const dictionary& dict,
114  const word& lookupName = "delta"
115  );
116 
117  //- Return a reference to the selected LES delta
118  static autoPtr<LESdelta> New
119  (
120  const word& name,
122  const dictionary& dict,
123  const dictionaryConstructorTableType& additionalConstructors,
124  const word& lookupName = "delta"
125  );
126 
127 
128  //- Destructor
129  virtual ~LESdelta() = default;
130 
131 
132  // Member Functions
133 
134  //- Return turbulenceModel reference
135  const turbulenceModel& turbulence() const
136  {
137  return turbulenceModel_;
138  }
139 
140  //- Read the LESdelta dictionary
141  virtual void read(const dictionary&) = 0;
142 
143  // Correct values
144  virtual void correct() = 0;
145 
146 
147  // Member Operators
148 
149  virtual operator const volScalarField&() const
150  {
151  return delta_;
152  }
153 };
154 
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 } // End namespace Foam
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 #endif
163 
164 // ************************************************************************* //
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:65
Foam::LESdelta::~LESdelta
virtual ~LESdelta()=default
Destructor.
Foam::LESdelta::delta_
volScalarField delta_
Definition: LESdelta.H:61
Foam::LESdelta::turbulence
const turbulenceModel & turbulence() const
Return turbulenceModel reference.
Definition: LESdelta.H:134
Foam::LESdelta::turbulenceModel_
const turbulenceModel & turbulenceModel_
Definition: LESdelta.H:59
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:123
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::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
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