nutUWallFunctionFvPatchScalarField.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) 2011-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::nutUWallFunctionFvPatchScalarField
26 
27 Group
28  grpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulent kinematic viscosity condition
32  when using wall functions, based on velocity.
33 
34  \heading Patch usage
35 
36  Example of the boundary condition specification:
37  \verbatim
38  myPatch
39  {
40  type nutUWallFunction;
41  }
42  \endverbatim
43 
44 SeeAlso
45  Foam::nutWallFunctionFvPatchScalarField
46 
47 SourceFiles
48  nutUWallFunctionFvPatchScalarField.C
49 
50 \*---------------------------------------------------------------------------*/
51 
52 #ifndef nutUWallFunctionFvPatchScalarField_H
53 #define nutUWallFunctionFvPatchScalarField_H
54 
56 
57 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58 
59 namespace Foam
60 {
61 
62 /*---------------------------------------------------------------------------*\
63  Class nutUWallFunctionFvPatchScalarField Declaration
64 \*---------------------------------------------------------------------------*/
65 
67 :
69 {
70 protected:
71 
72  // Protected Member Functions
73 
74  //- Calculate yPLus
75  virtual tmp<scalarField> calcYPlus(const scalarField& magUp) const;
76 
77  //- Calculate the turbulence viscosity
78  virtual tmp<scalarField> calcNut() const;
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("nutUWallFunction");
85 
86 
87  // Constructors
88 
89  //- Construct from patch and internal field
91  (
92  const fvPatch&,
94  );
95 
96  //- Construct from patch, internal field and dictionary
98  (
99  const fvPatch&,
101  const dictionary&
102  );
103 
104  //- Construct by mapping given
105  // nutUWallFunctionFvPatchScalarField
106  // onto a new patch
108  (
110  const fvPatch&,
112  const fvPatchFieldMapper&
113  );
114 
115  //- Construct as copy
117  (
119  );
120 
121  //- Construct and return a clone
122  virtual tmp<fvPatchScalarField> clone() const
123  {
125  (
127  );
128  }
129 
130  //- Construct as copy setting internal field reference
132  (
135  );
136 
137  //- Construct and return a clone setting internal field reference
139  (
141  ) const
142  {
144  (
146  );
147  }
148 
149 
150  // Member functions
151 
152  // Evaluation functions
153 
154  //- Calculate and return the yPlus at the boundary
155  virtual tmp<scalarField> yPlus() const;
156 
157 
158  // I-O
159 
160  //- Write
161  virtual void write(Ostream& os) const;
162 };
163 
164 
165 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166 
167 } // End namespace Foam
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 #endif
172 
173 // ************************************************************************* //
Foam::nutUWallFunctionFvPatchScalarField::calcYPlus
virtual tmp< scalarField > calcYPlus(const scalarField &magUp) const
Calculate yPLus.
Definition: nutUWallFunctionFvPatchScalarField.C:76
Foam::nutUWallFunctionFvPatchScalarField::yPlus
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
Definition: nutUWallFunctionFvPatchScalarField.C:177
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
nutWallFunctionFvPatchScalarField.H
magUp
scalar magUp
Definition: evaluateNearWall.H:10
Foam::nutUWallFunctionFvPatchScalarField::nutUWallFunctionFvPatchScalarField
nutUWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: nutUWallFunctionFvPatchScalarField.C:124
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::nutUWallFunctionFvPatchScalarField::TypeName
TypeName("nutUWallFunction")
Runtime type information.
Foam::nutUWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: nutUWallFunctionFvPatchScalarField.H:121
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::nutUWallFunctionFvPatchScalarField::calcNut
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
Definition: nutUWallFunctionFvPatchScalarField.C:39
Foam::nutUWallFunctionFvPatchScalarField
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions,...
Definition: nutUWallFunctionFvPatchScalarField.H:65
Foam::nutUWallFunctionFvPatchScalarField::write
virtual void write(Ostream &os) const
Write.
Definition: nutUWallFunctionFvPatchScalarField.C:195
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::nutWallFunctionFvPatchScalarField
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions,...
Definition: nutWallFunctionFvPatchScalarField.H:101
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51