kLowReWallFunctionFvPatchScalarField.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) 2012-2016, 2019 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::kLowReWallFunctionFvPatchScalarField
29 
30 Group
31  grpWallFunctions
32 
33 Description
34  This boundary condition provides a wall constraint on turbulent kinetic
35  energy, i.e. \c k, for low- and high-Reynolds number turbulence models.
36 
37  The model operates in two modes, based on the computed viscous-to-turbulent
38  switch-over \c y+ value derived from \c kappa and \c E.
39 
40 Usage
41  \table
42  Property | Description | Required | Default value
43  Ceps2 | Model coefficient | no | 1.9
44  Ck | Model coefficient | no | -0.416
45  Bk | Model coefficient | no | 8.366
46  C | Model coefficient | no | 11.0
47  \endtable
48 
49  Example of the boundary condition specification:
50  \verbatim
51  <patchName>
52  {
53  // Mandatory entries
54  type kLowReWallFunction;
55 
56  // Optional entries
57  }
58  \endverbatim
59 
60 Note
61  The coefficients \c Cmu, \c kappa, and \c E are obtained from
62  the specified \c nutWallFunction in order to ensure that each patch
63  possesses the same set of values for these coefficients.
64 
65 See also
66  Foam::fixedValueFvPatchField
67 
68 SourceFiles
69  kLowReWallFunctionFvPatchScalarField.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef kLowReWallFunctionFvPatchScalarField_H
74 #define kLowReWallFunctionFvPatchScalarField_H
75 
76 #include "fixedValueFvPatchField.H"
77 
78 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
79 
80 namespace Foam
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class kLowReWallFunctionFvPatchScalarField Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 class kLowReWallFunctionFvPatchScalarField
88 :
89  public fixedValueFvPatchField<scalar>
90 {
91 protected:
92 
93  // Protected Data
94 
95  //- Ceps2 coefficient
96  scalar Ceps2_;
97 
98  //- Ck coefficient
99  scalar Ck_;
100 
101  //- Bk coefficient
102  scalar Bk_;
103 
104  //- C coefficient
105  scalar C_;
106 
107 
108 public:
109 
110  //- Runtime type information
111  TypeName("kLowReWallFunction");
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 kLowReWallFunctionFvPatchScalarField
132  // onto a new patch
134  (
136  const fvPatch&,
138  const fvPatchFieldMapper&
139  );
140 
141  //- Construct as copy
143  (
145  );
146 
147  //- Construct and return a clone
148  virtual tmp<fvPatchScalarField> clone() const
149  {
151  (
153  );
154  }
155 
156  //- Construct as copy setting internal field reference
158  (
161  );
162 
163  //- Construct and return a clone setting internal field reference
165  (
167  ) const
168  {
170  (
172  );
173  }
174 
175 
176  // Member Functions
177 
178  // Evaluation functions
179 
180  //- Update the coefficients associated with the patch field
181  virtual void updateCoeffs();
182 
183 
184  // I-O
185 
186  //- Write
187  virtual void write(Ostream&) const;
188 };
189 
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 } // End namespace Foam
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************************************************************* //
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::kLowReWallFunctionFvPatchScalarField::Bk_
scalar Bk_
Bk coefficient.
Definition: kLowReWallFunctionFvPatchScalarField.H:126
Foam::kLowReWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: kLowReWallFunctionFvPatchScalarField.C:111
Foam::kLowReWallFunctionFvPatchScalarField::kLowReWallFunctionFvPatchScalarField
kLowReWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: kLowReWallFunctionFvPatchScalarField.C:38
Foam::fixedValueFvPatchField
This boundary condition supplies a fixed value constraint, and is the base class for a number of othe...
Definition: fixedValueFvPatchField.H:80
Foam::kLowReWallFunctionFvPatchScalarField::C_
scalar C_
C coefficient.
Definition: kLowReWallFunctionFvPatchScalarField.H:129
Foam::kLowReWallFunctionFvPatchScalarField::Ck_
scalar Ck_
Ck coefficient.
Definition: kLowReWallFunctionFvPatchScalarField.H:123
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
Foam::kLowReWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: kLowReWallFunctionFvPatchScalarField.H:172
Foam::kLowReWallFunctionFvPatchScalarField::Ceps2_
scalar Ceps2_
Ceps2 coefficient.
Definition: kLowReWallFunctionFvPatchScalarField.H:120
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::kLowReWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: kLowReWallFunctionFvPatchScalarField.C:177
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::kLowReWallFunctionFvPatchScalarField
This boundary condition provides a wall constraint on turbulent kinetic energy, i....
Definition: kLowReWallFunctionFvPatchScalarField.H:111
Foam::kLowReWallFunctionFvPatchScalarField::TypeName
TypeName("kLowReWallFunction")
Runtime type information.
fixedValueFvPatchField.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54