BUG: UListIO: byteSize overflowing on really big faceLists
[OpenFOAM-2.0.x.git] / src / turbulenceModels / incompressible / RAS / derivedFvPatchFields / atmBoundaryLayerInletEpsilon / atmBoundaryLayerInletEpsilonFvPatchScalarField.H
blobfb9224a13e421ba8726c0d75c818f00adb522b60
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 3 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     atmBoundaryLayerInletEpsilonFvPatchScalarField
28 Description
29     Boundary condition specifies a epsilon inlet for the atmospheric boundary
30     layer (ABL). This boundaty is to be used in conjunction with
31     ABLInletVelocity.
33     \verbatim
34         epsilon = Ustar^3 / (K(z - zGround + z0))
36     where:
38         Ustar is the frictional velocity
39         K is karman's constant
40         z is the verical coordinate
41         z0 is the surface roughness lenght
42         zGround minium vlaue in z direction
44     \endverbatim
46     Reference:
47     D.M. Hargreaves and N.G. Wright
48     "On the use of the k-epsilon model in commercial CFD software to model the
49      neutral atmospheric boundary layer"
50     Journal of Wind Engineering and Industrial Aerodynamics 95(2007) 355-369.
52 SourceFiles
53     atmBoundaryLayerInletEpsilonFvPatchScalarField.C
55 \*---------------------------------------------------------------------------*/
57 #ifndef atmBoundaryLayerInletEpsilonFvPatchScalarField_H
58 #define atmBoundaryLayerInletEpsilonFvPatchScalarField_H
60 #include "fvPatchFields.H"
61 #include "fixedValueFvPatchFields.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 namespace Foam
67 namespace incompressible
70 /*---------------------------------------------------------------------------*\
71         Class atmBoundaryLayerInletEpsilonFvPatchScalarField Declaration
72 \*---------------------------------------------------------------------------*/
74 class atmBoundaryLayerInletEpsilonFvPatchScalarField
76     public fixedValueFvPatchScalarField
78     // Private data
80         //- Frictional velocity
81         const scalar Ustar_;
83         //- Direction of the z-coordinate
84         vector z_;
86         //- Surface roughness lenght
87         const scalar z0_;
89         //- Von Karman constant
90         const scalar kappa_;
92         //- Minimum corrdinate value in z direction
93         scalarField zGround_;
96 public:
98     //- Runtime type information
99     TypeName("atmBoundaryLayerInletEpsilon");
102     // Constructors
104         //- Construct from patch and internal field
105         atmBoundaryLayerInletEpsilonFvPatchScalarField
106         (
107             const fvPatch&,
108             const DimensionedField<scalar, volMesh>&
109         );
111         //- Construct from patch, internal field and dictionary
112         atmBoundaryLayerInletEpsilonFvPatchScalarField
113         (
114             const fvPatch&,
115             const DimensionedField<scalar, volMesh>&,
116             const dictionary&
117         );
119         //- Construct by mapping given
120         //  atmBoundaryLayerInletEpsilonFvPatchScalarField onto a new patch
121         atmBoundaryLayerInletEpsilonFvPatchScalarField
122         (
123             const atmBoundaryLayerInletEpsilonFvPatchScalarField&,
124             const fvPatch&,
125             const DimensionedField<scalar, volMesh>&,
126             const fvPatchFieldMapper&
127         );
129         //- Construct and return a clone
130         virtual tmp<fvPatchScalarField> clone() const
131         {
132             return tmp<fvPatchScalarField>
133             (
134                 new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this)
135             );
136         }
138         //- Construct as copy setting internal field reference
139         atmBoundaryLayerInletEpsilonFvPatchScalarField
140         (
141             const atmBoundaryLayerInletEpsilonFvPatchScalarField&,
142             const DimensionedField<scalar, volMesh>&
143         );
145         //- Construct and return a clone setting internal field reference
146         virtual tmp<fvPatchScalarField> clone
147         (
148             const DimensionedField<scalar, volMesh>& iF
149         ) const
150         {
151             return tmp<fvPatchScalarField>
152             (
153                 new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this, iF)
154             );
155         }
158     // Member functions
160         //- Return max value
161         scalar Ustar() const
162         {
163             return Ustar_;
164         }
166         //- Return z direction
167         const vector& z() const
168         {
169             return z_;
170         }
172         //- Update coefficients
173         virtual void updateCoeffs();
175         //- Write
176         virtual void write(Ostream&) const;
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace incompressible
183 } // End namespace Foam
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 #endif
189 // ************************************************************************* //