atmBoundaryLayerInletOmegaFvPatchScalarField.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) 2020 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10  This file is part of OpenFOAM.
11 
12  OpenFOAM is free software: you can redistribute it and/or modify it
13  under the terms of the GNU General Public License as published by
14  the Free Software Foundation, either version 3 of the License, or
15  (at your option) any later version.
16 
17  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
18  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20  for more details.
21 
22  You should have received a copy of the GNU General Public License
23  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 
25 Class
26  Foam::atmBoundaryLayerInletOmegaFvPatchScalarField
27 
28 Group
29  grpRASBoundaryConditions grpInletBoundaryConditions
30 
31 Description
32  This boundary condition provides a log-law type ground-normal inlet
33  boundary condition for the specific dissipation rate (i.e. \c omega)
34  for homogeneous, two-dimensional, dry-air, equilibrium and neutral
35  atmospheric boundary layer modelling.
36 
37  The ground-normal \c omega profile expression:
38 
39  \f[
40  \omega = \frac{u^*}{\kappa \sqrt{C_\mu}} \frac{1}{z - d + z_0}
41  \f]
42 
43  where
44  \vartable
45  \omega | Ground-normal specific dissipation rate profile [m^2/s^3]
46  u^* | Friction velocity [m/s]
47  \kappa | von Kármán constant [-]
48  C_\mu | Empirical model constant [-]
49  z | Ground-normal coordinate component [m]
50  d | Ground-normal displacement height [m]
51  z_0 | Aerodynamic roughness length [m]
52  \endvartable
53 
54  Required fields:
55  \verbatim
56  omega | Specific dissipation rate [1/s]
57  \endverbatim
58 
59 Usage
60  Example of the boundary condition specification:
61  \verbatim
62  inlet
63  {
64  // Mandatory entries (unmodifiable)
65  type atmBoundaryLayerInletOmega;
66 
67  // Mandatory/Optional (inherited) entries (unmodifiable)
68  ...
69  }
70  \endverbatim
71 
72  where the entries mean:
73  \table
74  Property | Description | Type | Reqd | Deflt
75  type | Type name: atmBoundaryLayerInletOmega | word | yes | -
76  \endtable
77 
78  The inherited entries are elaborated in:
79  - \link atmBoundaryLayer.H \endlink
80  - \link inletOutletFvPatchField.H \endlink
81 
82 See also
83  - Foam::atmBoundaryLayer
84  - Foam::atmBoundaryLayerInletVelocityFvPatchVelocityField
85  - Foam::atmBoundaryLayerInletEpsilonFvPatchScalarField
86  - Foam::atmBoundaryLayerInletKFvPatchScalarField
87 
88 SourceFiles
89  atmBoundaryLayerInletOmegaFvPatchScalarField.C
90 
91 \*---------------------------------------------------------------------------*/
92 
93 #ifndef atmBoundaryLayerInletOmegaFvPatchScalarField_H
94 #define atmBoundaryLayerInletOmegaFvPatchScalarField_H
95 
96 #include "fvPatchFields.H"
98 #include "atmBoundaryLayer.H"
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 namespace Foam
103 {
104 
105 /*---------------------------------------------------------------------------*\
106  Class atmBoundaryLayerInletOmegaFvPatchScalarField Declaration
107 \*---------------------------------------------------------------------------*/
108 
109 class atmBoundaryLayerInletOmegaFvPatchScalarField
110 :
111  public inletOutletFvPatchScalarField,
112  public atmBoundaryLayer
113 {
115  typedef inletOutletFvPatchScalarField parent_bctype;
116 
117 public:
118 
119  //- Runtime type information
120  TypeName("atmBoundaryLayerInletOmega");
121 
122 
123  // Constructors
124 
125  //- Construct from patch and internal field
127  (
128  const fvPatch&,
129  const DimensionedField<scalar, volMesh>&
130  );
131 
132  //- Construct from patch, internal field and dictionary
134  (
135  const fvPatch&,
136  const DimensionedField<scalar, volMesh>&,
137  const dictionary&
138  );
139 
140  //- Construct by mapping onto a new patch
142  (
143  const this_bctype&,
144  const fvPatch&,
145  const DimensionedField<scalar, volMesh>&,
146  const fvPatchFieldMapper&
147  );
148 
149  //- Construct as copy setting internal field reference
151  (
152  const this_bctype&,
154  );
155 
156  //- No copy without an internal field
158  (
159  const this_bctype&
160  ) = delete;
161 
162  //- Clone with an internal field reference
164  (
166  ) const
167  {
168  return fvPatchField<scalar>::Clone(*this, iF);
169  }
170 
171 
172  // Member Functions
173 
174  //- Update the coefficients associated with the patch field
175  virtual void updateCoeffs();
176 
177 
178  // Mapping
179 
180  //- Map (and resize as needed) from self given a mapping object
181  virtual void autoMap
182  (
183  const fvPatchFieldMapper&
184  );
185 
186  //- Reverse map the given fvPatchField onto this fvPatchField
187  virtual void rmap
188  (
189  const fvPatchScalarField&,
190  const labelList&
191  );
192 
193 
194  //- Write
195  virtual void write(Ostream&) const;
196 
197 
198  // Member Operators
199 
200  //- Inherit assignment
201  using parent_bctype::operator=;
202 };
203 
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 } // End namespace Foam
208 
209 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210 
211 #endif
212 
213 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("atmBoundaryLayerInletOmega")
Runtime type information.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< fvPatchField< scalar > > clone(const DimensionedField< scalar, volMesh > &iF) const
Clone with an internal field reference.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:635
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
atmBoundaryLayerInletOmegaFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
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: HashPtrTable.H:50
Namespace for OpenFOAM.