vanDriestDelta.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,2022 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::vanDriestDelta
29 
30 Description
31  Simple cube-root of cell volume delta used in incompressible LES models.
32 
33  Example of the delta specification in turbulenceProperties:
34  \verbatim
35  delta vanDriest;
36 
37  vanDriestCoeffs
38  {
39  // Underlying geometric delta
40  delta cubeRootVol;
41  // Coefficients for geometric delta
42  cubeRootVolCoeffs
43  {
44  deltaCoeff 2.0;
45  }
46  // Optional update interval
47  // Default is 1 (update every step)
48  updateInterval 1000;
49  }
50  \endverbatim
51 
52 SourceFiles
53  vanDriestDelta.C
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef vanDriestDelta_H
58 #define vanDriestDelta_H
59 
60 #include "LESdelta.H"
61 
62 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
63 
64 namespace Foam
65 {
66 namespace LESModels
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class vanDriestDelta Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class vanDriestDelta
74 :
75  public LESdelta
76 {
77  // Private data
78 
79  autoPtr<LESdelta> geometricDelta_;
80  scalar kappa_;
81  scalar Aplus_;
82  scalar Cdelta_;
83  label calcInterval_;
84 
85 
86  // Private Member Functions
87 
88  //- No copy construct
89  vanDriestDelta(const vanDriestDelta&) = delete;
90 
91  //- No copy assignment
92  void operator=(const vanDriestDelta&) = delete;
93 
94  // Calculate the delta values
95  void calcDelta();
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("vanDriest");
102 
103 
104  // Constructors
105 
106  //- Construct from name, turbulenceModel and dictionary
108  (
109  const word& name,
111  const dictionary&
112  );
113 
114 
115  //- Destructor
116  virtual ~vanDriestDelta() = default;
117 
118 
119  // Member Functions
120 
121  //- Read the LESdelta dictionary
122  virtual void read(const dictionary&);
123 
124  // Correct values
125  virtual void correct();
126 };
127 
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 } // End namespace LESModels
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #endif
137 
138 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
const turbulenceModel & turbulence() const
Return turbulenceModel reference.
Definition: LESdelta.H:146
Abstract base class for LES deltas.
Definition: LESdelta.H:49
virtual ~vanDriestDelta()=default
Destructor.
Abstract base class for turbulence models (RAS, LES and laminar).
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition: exprTraits.C:127
A class for handling words, derived from Foam::string.
Definition: word.H:63
TypeName("vanDriest")
Runtime type information.
virtual void read(const dictionary &)
Read the LESdelta dictionary.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
Namespace for OpenFOAM.