atmBoundaryLayerInletVelocityFvPatchVectorField.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) 2011-2018 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::atmBoundaryLayerInletVelocityFvPatchVectorField
29
30Group
31 grpRASBoundaryConditions grpInletBoundaryConditions
32
33Description
34 This boundary condition provides a log-law type ground-normal inlet
35 boundary condition for the streamwise component of wind velocity
36 (i.e. \c u) for homogeneous, two-dimensional, dry-air, equilibrium
37 and neutral atmospheric boundary layer modelling.
38
39 The ground-normal streamwise flow speed profile expression:
40
41 \f[
42 u = \frac{u^*}{\kappa} \ln \left( \frac{z - d + z_0}{z_0} \right)
43 \f]
44
45 \f[
46 v = w = 0
47 \f]
48
49 where
50 \vartable
51 u | Ground-normal streamwise flow speed profile [m/s]
52 v | Spanwise flow speed [m/s]
53 w | Ground-normal flow speed [m/s]
54 u^* | Friction velocity [m/s]
55 \kappa | von Kármán constant [-]
56 z | Ground-normal coordinate component [m]
57 d | Ground-normal displacement height [m]
58 z_0 | Aerodynamic roughness length [m]
59 \endvartable
60
61 Required fields:
62 \verbatim
63 U | Velocity [m/s]
64 \endverbatim
65
66Usage
67 Example of the boundary condition specification:
68 \verbatim
69 inlet
70 {
71 // Mandatory entries (unmodifiable)
72 type atmBoundaryLayerInletVelocity;
73
74 // Mandatory/Optional (inherited) entries (unmodifiable)
75 ...
76 }
77 \endverbatim
78
79 where the entries mean:
80 \table
81 Property | Description | Type | Reqd | Deflt
82 type | Type name: atmBoundaryLayerInletVelocity | word | yes | -
83 \endtable
84
85 The inherited entries are elaborated in:
86 - \link atmBoundaryLayer.H \endlink
87 - \link inletOutletFvPatchField.H \endlink
88
89See also
90 - Foam::atmBoundaryLayer
91 - Foam::atmBoundaryLayerInletKFvPatchScalarField
92 - Foam::atmBoundaryLayerInletEpsilonFvPatchScalarField
93 - Foam::atmBoundaryLayerInletOmegaFvPatchScalarField
94
95SourceFiles
96 atmBoundaryLayerInletVelocityFvPatchVectorField.C
97
98\*---------------------------------------------------------------------------*/
99
100#ifndef atmBoundaryLayerInletVelocityFvPatchVectorField_H
101#define atmBoundaryLayerInletVelocityFvPatchVectorField_H
102
103#include "fvPatchFields.H"
105#include "atmBoundaryLayer.H"
106
107// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108
109namespace Foam
110{
111
112/*---------------------------------------------------------------------------*\
113 Class atmBoundaryLayerInletVelocityFvPatchVectorField Declaration
114\*---------------------------------------------------------------------------*/
115
116class atmBoundaryLayerInletVelocityFvPatchVectorField
117:
118 public inletOutletFvPatchVectorField,
119 public atmBoundaryLayer
120{
121
122public:
123
124 //- Runtime type information
125 TypeName("atmBoundaryLayerInletVelocity");
126
127
128 // Constructors
129
130 //- Construct from patch and internal field
132 (
133 const fvPatch&,
134 const DimensionedField<vector, volMesh>&
135 );
136
137 //- Construct from patch, internal field and dictionary
139 (
140 const fvPatch&,
141 const DimensionedField<vector, volMesh>&,
142 const dictionary&
143 );
144
145 //- Construct by mapping given
146 //- atmBoundaryLayerInletVelocityFvPatchVectorField onto a new patch
148 (
149 const atmBoundaryLayerInletVelocityFvPatchVectorField&,
150 const fvPatch&,
151 const DimensionedField<vector, volMesh>&,
152 const fvPatchFieldMapper&
153 );
154
155 //- Construct and return a clone
156 virtual tmp<fvPatchVectorField> clone() const
157 {
158 return tmp<fvPatchVectorField>
161 );
162 }
163
164 //- Construct as copy setting internal field reference
166 (
169 );
170
171 //- Construct and return a clone setting internal field reference
173 (
175 ) const
176 {
178 (
180 );
181 }
182
183
184 // Member Functions
185
186 //- Update the coefficients associated with the patch field
187 virtual void updateCoeffs();
188
189
190 // Mapping
191
192 //- Map (and resize as needed) from self given a mapping object
193 virtual void autoMap
194 (
195 const fvPatchFieldMapper&
196 );
197
198 //- Reverse map the given fvPatchField onto this fvPatchField
199 virtual void rmap
200 (
201 const fvPatchVectorField&,
202 const labelList&
203 );
204
205
206 //- Write
207 virtual void write(Ostream&) const;
208};
209
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213} // End namespace Foam
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217#endif
218
219// ************************************************************************* //
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:62
This boundary condition provides a log-law type ground-normal inlet boundary condition for the stream...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual tmp< fvPatchVectorField > clone(const DimensionedField< vector, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void rmap(const fvPatchVectorField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchVectorField > clone() const
Construct and return a clone.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("atmBoundaryLayerInletVelocity")
Runtime type information.
atmBoundaryLayerInletVelocityFvPatchVectorField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
Base class to set log-law type ground-normal inlet boundary conditions for wind velocity and turbulen...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
A class for managing temporary objects.
Definition: tmp.H:65
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73