atmBoundaryLayerInletKFvPatchScalarField.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) 2014-2022 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::atmBoundaryLayerInletKFvPatchScalarField
26 
27 Description
28  This boundary condition specifies an inlet value for the turbulence
29  kinetic energy, \f$k\f$, appropriate for atmospheric boundary layers.
30 
31  See Foam::atmBoundaryLayer for details.
32 
33  Example of the boundary condition specification:
34  \verbatim
35  ground
36  {
37  type atmBoundaryLayerInletK;
38  z (0 0 1);
39  Uref 10.0;
40  Zref 20.0;
41  z0 uniform 0.1;
42  zGround uniform 0.0;
43  }
44  \endverbatim
45 
46 See also
47  Foam::atmBoundaryLayer,
48  Foam::atmBoundaryLayerInletVelocityFvPatchVectorField,
49  Foam::atmBoundaryLayerInletEpsilonFvPatchScalarField
50 
51 SourceFiles
52  atmBoundaryLayerInletKFvPatchScalarField.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef atmBoundaryLayerInletKFvPatchScalarField_H
57 #define atmBoundaryLayerInletKFvPatchScalarField_H
58 
59 #include "fvPatchFields.H"
61 #include "atmBoundaryLayer.H"
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 namespace Foam
66 {
67 
68 /*---------------------------------------------------------------------------*\
69  Class atmBoundaryLayerInletKFvPatchScalarField Declaration
70 \*---------------------------------------------------------------------------*/
71 
73 :
74  public inletOutletFvPatchScalarField,
75  public atmBoundaryLayer
76 {
77 
78 public:
79 
80  //- Runtime type information
81  TypeName("atmBoundaryLayerInletK");
82 
83 
84  // Constructors
85 
86  //- Construct from patch and internal field
88  (
89  const fvPatch&,
91  );
92 
93  //- Construct from patch, internal field and dictionary
95  (
96  const fvPatch&,
98  const dictionary&
99  );
100 
101  //- Construct by mapping given
102  // atmBoundaryLayerInletKFvPatchScalarField onto a new patch
104  (
106  const fvPatch&,
108  const fvPatchFieldMapper&
109  );
110 
111  //- Construct as copy setting internal field reference
113  (
116  );
117 
118  //- Construct and return a clone setting internal field reference
120  (
122  ) const
123  {
125  (
127  );
128  }
129 
130 
131  // Member Functions
132 
133  // Mapping functions
134 
135  //- Map (and resize as needed) from self given a mapping object
136  // Used to update fields following mesh topology change
137  virtual void autoMap(const fvPatchFieldMapper&);
138 
139  //- Reverse map the given fvPatchField onto this fvPatchField
140  // Used to reconstruct fields
141  virtual void rmap(const fvPatchScalarField&, const labelList&);
142 
143  //- Reset the fvPatchField to the given fvPatchField
144  // Used for mesh to mesh mapping
145  virtual void reset(const fvPatchScalarField&);
146 
147 
148  //- Write
149  virtual void write(Ostream&) const;
150 };
151 
152 
153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
154 
155 } // End namespace Foam
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
This class provides functions to evaluate the velocity and turbulence distributions appropriate for a...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
This boundary condition specifies an inlet value for the turbulence kinetic energy, , appropriate for atmospheric boundary layers.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:63
TypeName("atmBoundaryLayerInletK")
Runtime type information.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:66
virtual void reset(const fvPatchScalarField &)
Reset the fvPatchField to the given fvPatchField.
Foam::fvPatchFieldMapper.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:54
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.
atmBoundaryLayerInletKFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.