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 {
114 
115 public:
116 
117  //- Runtime type information
118  TypeName("atmBoundaryLayerInletOmega");
119 
120 
121  // Constructors
122 
123  //- Construct from patch and internal field
125  (
126  const fvPatch&,
127  const DimensionedField<scalar, volMesh>&
128  );
129 
130  //- Construct from patch, internal field and dictionary
132  (
133  const fvPatch&,
134  const DimensionedField<scalar, volMesh>&,
135  const dictionary&
136  );
137 
138  //- Construct by mapping given
139  //- atmBoundaryLayerInletOmegaFvPatchScalarField onto a new patch
141  (
143  const fvPatch&,
144  const DimensionedField<scalar, volMesh>&,
145  const fvPatchFieldMapper&
146  );
147 
148  //- Construct as copy setting internal field reference
150  (
153  );
154 
155  //- Return a clone
156  virtual tmp<fvPatchField<scalar>> clone() const
157  {
158  return fvPatchField<scalar>::Clone(*this);
159  }
160 
161  //- Clone with an internal field reference
163  (
165  ) const
166  {
167  return fvPatchField<scalar>::Clone(*this, iF);
168  }
169 
170 
171  // Member Functions
172 
173  //- Update the coefficients associated with the patch field
174  virtual void updateCoeffs();
175 
176 
177  // Mapping
178 
179  //- Map (and resize as needed) from self given a mapping object
180  virtual void autoMap
181  (
182  const fvPatchFieldMapper&
183  );
184 
185  //- Reverse map the given fvPatchField onto this fvPatchField
186  virtual void rmap
187  (
188  const fvPatchScalarField&,
189  const labelList&
190  );
191 
192 
193  //- Write
194  virtual void write(Ostream&) const;
195 };
196 
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 } // End namespace Foam
201 
202 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
203 
204 #endif
205 
206 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual tmp< fvPatchField< scalar > > clone() const
Return a clone.
TypeName("atmBoundaryLayerInletOmega")
Runtime type information.
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
static tmp< fvPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
Definition: fvPatchField.H:597
fvPatchField< scalar > fvPatchScalarField
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...
List< label > labelList
A List of labels.
Definition: List.H:62
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.