atmBoundaryLayerInletKFvPatchScalarField.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) 2014-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::atmBoundaryLayerInletKFvPatchScalarField
29
30Group
31 grpRASBoundaryConditions grpInletBoundaryConditions
32
33Description
34 This boundary condition provides a log-law type ground-normal inlet
35 boundary condition for the turbulent kinetic energy (i.e. \c k)
36 for homogeneous, two-dimensional, dry-air, equilibrium and neutral
37 atmospheric boundary layer modelling.
38
39 The ground-normal \c k profile expression:
40
41 \f[
42 k = \frac{(u^*)^2}{\sqrt{C_\mu}}
43 \sqrt{C_1 \ln \left( \frac{z - d + z_0}{z_0} \right) + C_2}
44 \f]
45
46 where
47 \vartable
48 k | Ground-normal turbulent kinetic energy profile [m^2/s^3]
49 u^* | Friction velocity [m/s]
50 C_\mu | Empirical model constant [-]
51 C_1 | Curve-fitting coefficient for \c YGCJ profiles [-]
52 C_2 | Curve-fitting coefficient for \c YGCJ profiles [-]
53 \endvartable
54
55 Required fields:
56 \verbatim
57 k | Turbulent kinetic energy [m2/s2]
58 \endverbatim
59
60Usage
61 Example of the boundary condition specification:
62 \verbatim
63 inlet
64 {
65 // Mandatory entries (unmodifiable)
66 type atmBoundaryLayerInletK;
67
68 // Mandatory/Optional (inherited) entries (unmodifiable)
69 ...
70 flowDir (1 0 0); // not used
71 zDir (0 0 1); // not used
72 }
73 \endverbatim
74
75 where the entries mean:
76 \table
77 Property | Description | Type | Reqd | Deflt
78 type | Type name: atmBoundaryLayerInletK | word | yes | -
79 \endtable
80
81 The inherited entries are elaborated in:
82 - \link atmBoundaryLayer.H \endlink
83 - \link inletOutletFvPatchField.H \endlink
84
85See also
86 - Foam::atmBoundaryLayer
87 - Foam::atmBoundaryLayerInletVelocityFvPatchVectorField
88 - Foam::atmBoundaryLayerInletEpsilonFvPatchScalarField
89 - Foam::atmBoundaryLayerInletOmegaFvPatchScalarField
90
91SourceFiles
92 atmBoundaryLayerInletKFvPatchScalarField.C
93
94\*---------------------------------------------------------------------------*/
95
96#ifndef atmBoundaryLayerInletKFvPatchScalarField_H
97#define atmBoundaryLayerInletKFvPatchScalarField_H
98
99#include "fvPatchFields.H"
101#include "atmBoundaryLayer.H"
102
103// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104
105namespace Foam
106{
107
108/*---------------------------------------------------------------------------*\
109 Class atmBoundaryLayerInletKFvPatchScalarField Declaration
110\*---------------------------------------------------------------------------*/
111
112class atmBoundaryLayerInletKFvPatchScalarField
113:
114 public inletOutletFvPatchScalarField,
115 public atmBoundaryLayer
116{
117
118public:
119
120 //- Runtime type information
121 TypeName("atmBoundaryLayerInletK");
122
123
124 // Constructors
125
126 //- Construct from patch and internal field
128 (
129 const fvPatch&,
130 const DimensionedField<scalar, volMesh>&
131 );
132
133 //- Construct from patch, internal field and dictionary
135 (
136 const fvPatch&,
137 const DimensionedField<scalar, volMesh>&,
138 const dictionary&
139 );
140
141 //- Construct by mapping given
142 //- atmBoundaryLayerInletKFvPatchScalarField onto a new patch
144 (
146 const fvPatch&,
148 const fvPatchFieldMapper&
149 );
150
151 //- Construct and return a clone
153 {
155 (
157 );
158 }
159
160 //- Construct as copy setting internal field reference
162 (
165 );
166
167 //- Construct and return a clone setting internal field reference
169 (
171 ) const
172 {
174 (
176 );
177 }
178
179
180 // Member Functions
181
182 //- Update the coefficients associated with the patch field
183 virtual void updateCoeffs();
184
185
186 // Mapping
187
188 //- Map (and resize as needed) from self given a mapping object
189 virtual void autoMap
190 (
191 const fvPatchFieldMapper&
192 );
193
194 //- Reverse map the given fvPatchField onto this fvPatchField
195 virtual void rmap
196 (
197 const fvPatchScalarField&,
198 const labelList&
199 );
200
201
202 //- Write
203 virtual void write(Ostream&) const;
204};
205
206
207// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
208
209} // End namespace Foam
210
211// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212
213#endif
214
215// ************************************************************************* //
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 turbul...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
atmBoundaryLayerInletKFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("atmBoundaryLayerInletK")
Runtime type information.
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