nutkFilmWallFunctionFvPatchScalarField.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::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField
26 
27 Group
28  grpSurfaceFilmBoundaryConditions grpCmpWallFunctions
29 
30 Description
31  This boundary condition provides a turbulent viscosity condition when
32  using wall functions, based on turbulence kinetic energy, for use with
33  surface film models.
34 
35  \heading Patch usage
36 
37  Example of the boundary condition specification:
38  \verbatim
39  myPatch
40  {
41  type nutkFilmWallFunction;
42  value uniform 0;
43  }
44  \endverbatim
45 
46 SeeAlso
47  Foam::nutkWallFunctionFvPatchScalarField
48 
49 SourceFiles
50  nutkFilmWallFunctionFvPatchScalarField.C
51 
52 \*---------------------------------------------------------------------------*/
53 
54 #ifndef nutkFilmWallFunctionFvPatchScalarField_H
55 #define nutkFilmWallFunctionFvPatchScalarField_H
56 
58 
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60 
61 namespace Foam
62 {
63 namespace compressible
64 {
65 namespace RASModels
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class nutkFilmWallFunctionFvPatchScalarField Declaration
70 \*---------------------------------------------------------------------------*/
71 
73 :
75 {
76 protected:
77 
78  // Protected data
79 
80  //- Name of film region
82 
83  //- B Coefficient (default = 5.5)
84  scalar B_;
85 
86  //- y+ value for laminar -> turbulent transition (default = 11.05)
87  scalar yPlusCrit_;
88 
89 
90  // Protected member functions
91 
92  //- Calculate the turbulence viscosity
93  virtual tmp<scalarField> calcNut() const;
94 
95  //- Calculate the friction velocity
96  virtual tmp<scalarField> calcUTau(const scalarField& magGradU) const;
97 
98 
99 public:
100 
101  //- Runtime type information
102  TypeName("nutkFilmWallFunction");
103 
104 
105  // Constructors
106 
107  //- Construct from patch and internal field
109  (
110  const fvPatch&,
112  );
113 
114  //- Construct from patch, internal field and dictionary
116  (
117  const fvPatch&,
119  const dictionary&
120  );
121 
122  //- Construct by mapping given
123  // nutkFilmWallFunctionFvPatchScalarField
124  // onto a new patch
126  (
128  const fvPatch&,
130  const fvPatchFieldMapper&
131  );
132 
133  //- Construct as copy
135  (
137  );
138 
139  //- Construct and return a clone
140  virtual tmp<fvPatchScalarField> clone() const
141  {
143  (
145  );
146  }
147 
148  //- Construct as copy setting internal field reference
150  (
153  );
154 
155  //- Construct and return a clone setting internal field reference
157  (
159  ) const
160  {
162  (
164  );
165  }
166 
167 
168  // Member functions
169 
170  // Evaluation functions
171 
172  //- Calculate and return the yPlus at the boundary
173  virtual tmp<scalarField> yPlus() const;
174 
175 
176  // I-O
177 
178  //- Write
179  virtual void write(Ostream& os) const;
180 };
181 
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 } // End namespace RASModels
186 } // End namespace compressible
187 } // End namespace Foam
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 #endif
192 
193 // ************************************************************************* //
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::write
virtual void write(Ostream &os) const
Write.
Definition: nutkFilmWallFunctionFvPatchScalarField.C:247
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::yPlusCrit_
scalar yPlusCrit_
y+ value for laminar -> turbulent transition (default = 11.05)
Definition: nutkFilmWallFunctionFvPatchScalarField.H:86
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::yPlus
virtual tmp< scalarField > yPlus() const
Calculate and return the yPlus at the boundary.
Definition: nutkFilmWallFunctionFvPatchScalarField.C:225
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::calcNut
virtual tmp< scalarField > calcNut() const
Calculate the turbulence viscosity.
Definition: nutkFilmWallFunctionFvPatchScalarField.C:125
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::B_
scalar B_
B Coefficient (default = 5.5)
Definition: nutkFilmWallFunctionFvPatchScalarField.H:83
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::nutkFilmWallFunctionFvPatchScalarField
nutkFilmWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: nutkFilmWallFunctionFvPatchScalarField.C:154
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::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::calcUTau
virtual tmp< scalarField > calcUTau(const scalarField &magGradU) const
Calculate the friction velocity.
Definition: nutkFilmWallFunctionFvPatchScalarField.C:47
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::filmRegionName_
word filmRegionName_
Name of film region.
Definition: nutkFilmWallFunctionFvPatchScalarField.H:80
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::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::TypeName
TypeName("nutkFilmWallFunction")
Runtime type information.
compressible
bool compressible
Definition: pEqn.H:40
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField
This boundary condition provides a turbulent viscosity condition when using wall functions,...
Definition: nutkFilmWallFunctionFvPatchScalarField.H:71
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
nutkWallFunctionFvPatchScalarField.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::compressible::RASModels::nutkFilmWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: nutkFilmWallFunctionFvPatchScalarField.H:139
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51
Foam::nutkWallFunctionFvPatchScalarField
This boundary condition provides a turbulent kinematic viscosity condition when using wall functions,...
Definition: nutkWallFunctionFvPatchScalarField.H:66