nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2026 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::nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField
26 
27 Description
28  This boundary condition provides a turbulent kinematic viscosity for
29  atmospheric velocity profiles. It is designed to be used in conjunction
30  with the atmosphericBoundaryLayerVelocity boundary condition. The values
31  are calculated using:
32 
33  \f[
34  U = frac{U_f}{\kappa} ln(\frac{z + z_0}{z_0})
35  \f]
36 
37  where
38 
39  \vartable
40  U_f | frictional velocity
41  \kappa | Von Karman's constant
42  z_0 | surface roughness length
43  z | vertical co-ordinate
44  \endvartable
45 
46 See also
47  Foam::atmosphericBoundaryLayer
48  Foam::atmosphericBoundaryLayerVelocityFvPatchVectorField
49  Foam::nutkWallFunctionFvPatchField
50 
51 SourceFiles
52  nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField_H
57 #define nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField_H
58 
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField
68 \*---------------------------------------------------------------------------*/
69 
70 class nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField
71 :
72  public nutkWallFunctionFvPatchScalarField
73 {
74 protected:
75 
76  // Protected Member Functions
77 
78  //- Calculate the turbulence viscosity
79  virtual tmp<scalarField> nut() const;
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("nutAtmosphericBoundaryLayerWallFunction");
86 
87 
88  // Constructors
89 
90  //- Construct from patch, internal field and dictionary
92  (
93  const fvPatch&,
95  const dictionary&
96  );
97 
98  //- Construct by mapping given
99  // nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField
100  // onto a new patch
102  (
104  const fvPatch&,
106  const fieldMapper&
107  );
108 
109  //- Disallow copy without setting internal field reference
111  (
113  ) = delete;
114 
115  //- Copy constructor setting internal field reference
117  (
120  );
121 
122  //- Construct and return a clone setting internal field reference
124  (
126  ) const
127  {
129  (
131  (
132  *this,
133  iF
134  )
135  );
136  }
137 
138 
139  // Member Functions
140 
141  // I-O
142 
143  //- Write
144  virtual void write(Ostream&) const;
145 
146 
147  // Member Operators
148 
149  //- Inherit assignment
150  using nutkWallFunctionFvPatchScalarField::operator=;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Abstract base class for field mapping.
Definition: fieldMapper.H:48
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:58
This boundary condition provides a turbulent kinematic viscosity for atmospheric velocity profiles....
nutAtmosphericBoundaryLayerWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, fvMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, fvMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("nutAtmosphericBoundaryLayerWallFunction")
Runtime type information.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.