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-2015 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  \heading Patch usage
42 
43  \table
44  Property | Description | Required | Default value
45  Cmu | model coefficient | no | 0.09
46  kappa | Von Karman constant | no | 0.41
47  E | model coefficient | no | 9.8
48  \endtable
49 
50  Example of the boundary condition specification:
51  \verbatim
52  myPatch
53  {
54  type epsilonLowReWallFunction;
55  }
56  \endverbatim
57 
58 SeeAlso
59  Foam::epsilonWallFunctionFvPatchScalarField
60 
61 SourceFiles
62  epsilonLowReWallFunctionFvPatchScalarField.C
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #ifndef epsilonLowReWallFunctionFvPatchScalarField_H
67 #define epsilonLowReWallFunctionFvPatchScalarField_H
68 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class epsilonLowReWallFunctionFvPatchScalarField Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 class epsilonLowReWallFunctionFvPatchScalarField
81 :
82  public epsilonWallFunctionFvPatchScalarField
83 {
84 
85 protected:
86 
87  // Protected data
88 
89  //- Y+ at the edge of the laminar sublayer
90  scalar yPlusLam_;
91 
92 
93  // Protected Member Functions
94 
95  //- Calculate the Y+ at the edge of the laminar sublayer
96  scalar yPlusLam(const scalar kappa, const scalar E);
97 
98  //- Calculate the epsilon and G
99  virtual void calculate
100  (
102  const List<scalar>& cornerWeights,
103  const fvPatch& patch,
104  scalarField& G,
106  );
107 
108 
109 public:
110 
111  //- Runtime type information
112  TypeName("epsilonLowReWallFunction");
113 
114 
115  // Constructors
116 
117  //- Construct from patch and internal field
119  (
120  const fvPatch&,
122  );
123 
124  //- Construct from patch, internal field and dictionary
126  (
127  const fvPatch&,
129  const dictionary&
130  );
131 
132  //- Construct by mapping given
133  // epsilonLowReWallFunctionFvPatchScalarField
134  // onto a new patch
136  (
138  const fvPatch&,
140  const fvPatchFieldMapper&
141  );
142 
143  //- Construct as copy
145  (
147  );
148 
149  //- Construct and return a clone
150  virtual tmp<fvPatchScalarField> clone() const
151  {
153  (
155  );
156  }
157 
158  //- Construct as copy setting internal field reference
160  (
163  );
164 
165  //- Construct and return a clone setting internal field reference
167  (
169  ) const
170  {
172  (
174  );
175  }
176 
177  //- Destructor
179  {}
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace Foam
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #endif
190 
191 // ************************************************************************* //
scalarField & G(bool init=false)
Return non-const access to the master&#39;s G field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
scalar yPlusLam(const scalar kappa, const scalar E)
Calculate the Y+ at the edge of the laminar sublayer.
Foam::fvPatchFieldMapper.
This boundary condition provides a turbulence dissipation wall function condition for low- and high-R...
autoPtr< compressible::turbulenceModel > turbulence
Definition: createFields.H:23
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual void calculate(const turbulenceModel &turbulence, const List< scalar > &cornerWeights, const fvPatch &patch, scalarField &G, scalarField &epsilon)
Calculate the epsilon and G.
epsilonLowReWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Abstract base class for turbulence models (RAS, LES and laminar).
TypeName("epsilonLowReWallFunction")
Runtime type information.
scalarField & epsilon(bool init=false)
Return non-const access to the master&#39;s epsilon field.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
const fvPatch & patch() const
Return patch.
Definition: fvPatchField.H:300
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
A class for managing temporary objects.
Definition: PtrList.H:118