epsilonLowReWallFunctionFvPatchScalarField.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 | Copyright (C) 2012-2016 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::epsilonLowReWallFunctionFvPatchScalarField
26 
27 Group
28  grpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulence dissipation wall function
32  condition for low- and high-Reynolds number turbulent flow cases.
33 
34  The condition can be applied to wall boundaries, whereby it inserts near
35  wall epsilon values directly into the epsilon equation to act as a
36  constraint.
37 
38  The model operates in two modes, based on the computed laminar-to-turbulent
39  switch-over y+ value derived from kappa and E.
40 
41 Usage
42  \table
43  Property | Description | Required | Default value
44  Cmu | model coefficient | no | 0.09
45  kappa | Von Karman constant | no | 0.41
46  E | model coefficient | no | 9.8
47  \endtable
48 
49  Example of the boundary condition specification:
50  \verbatim
51  <patchName>
52  {
53  type epsilonLowReWallFunction;
54  }
55  \endverbatim
56 
57 See also
58  Foam::epsilonWallFunctionFvPatchScalarField
59 
60 SourceFiles
61  epsilonLowReWallFunctionFvPatchScalarField.C
62 
63 \*---------------------------------------------------------------------------*/
64 
65 #ifndef epsilonLowReWallFunctionFvPatchScalarField_H
66 #define epsilonLowReWallFunctionFvPatchScalarField_H
67 
69 
70 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
71 
72 namespace Foam
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class epsilonLowReWallFunctionFvPatchScalarField Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class epsilonLowReWallFunctionFvPatchScalarField
80 :
81  public epsilonWallFunctionFvPatchScalarField
82 {
83 
84 protected:
85 
86  // Protected data
87 
88  //- Y+ at the edge of the laminar sublayer
89  scalar yPlusLam_;
90 
91 
92  // Protected Member Functions
93 
94  //- Calculate the Y+ at the edge of the laminar sublayer
95  scalar yPlusLam(const scalar kappa, const scalar E);
96 
97  //- Calculate the epsilon and G
98  virtual void calculate
99  (
101  const List<scalar>& cornerWeights,
102  const fvPatch& patch,
103  scalarField& G,
105  );
106 
107 
108 public:
109 
110  //- Runtime type information
111  TypeName("epsilonLowReWallFunction");
112 
113 
114  // Constructors
115 
116  //- Construct from patch and internal field
118  (
119  const fvPatch&,
121  );
122 
123  //- Construct from patch, internal field and dictionary
125  (
126  const fvPatch&,
128  const dictionary&
129  );
130 
131  //- Construct by mapping given
132  // epsilonLowReWallFunctionFvPatchScalarField
133  // onto a new patch
135  (
137  const fvPatch&,
139  const fvPatchFieldMapper&
140  );
141 
142  //- Construct as copy
144  (
146  );
147 
148  //- Construct and return a clone
149  virtual tmp<fvPatchScalarField> clone() const
150  {
152  (
154  );
155  }
156 
157  //- Construct as copy setting internal field reference
159  (
162  );
163 
164  //- Construct and return a clone setting internal field reference
166  (
168  ) const
169  {
171  (
173  );
174  }
175 
176  //- Destructor
178  {}
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #endif
189 
190 // ************************************************************************* //
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
const fvPatch & patch() const
Return patch.
Definition: fvPatchField.H:339
scalar yPlusLam(const scalar kappa, const scalar E)
Calculate the Y+ at the edge of the laminar sublayer.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual void calculate(const turbulenceModel &turbulence, const List< scalar > &cornerWeights, const fvPatch &patch, scalarField &G, scalarField &epsilon)
Calculate the epsilon and G.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Abstract base class for turbulence models (RAS, LES and laminar).
TypeName("epsilonLowReWallFunction")
Runtime type information.
Foam::fvPatchFieldMapper.
scalarField & G(bool init=false)
Return non-const access to the master&#39;s G field.
epsilonLowReWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
This boundary condition provides a turbulence dissipation wall function condition for low- and high-R...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: PtrList.H:54
Namespace for OpenFOAM.
scalarField & epsilon(bool init=false)
Return non-const access to the master&#39;s epsilon field.