1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
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
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
26 atmBoundaryLayerInletEpsilonFvPatchScalarField
29 Boundary condition specifies a epsilon inlet for the atmospheric boundary
30 layer (ABL). This boundaty is to be used in conjunction with
34 epsilon = Ustar^3 / (K(z - zGround + z0))
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
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.
53 atmBoundaryLayerInletEpsilonFvPatchScalarField.C
55 \*---------------------------------------------------------------------------*/
57 #ifndef atmBoundaryLayerInletEpsilonFvPatchScalarField_H
58 #define atmBoundaryLayerInletEpsilonFvPatchScalarField_H
60 #include "fvPatchFields.H"
61 #include "fixedValueFvPatchFields.H"
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
67 namespace incompressible
70 /*---------------------------------------------------------------------------*\
71 Class atmBoundaryLayerInletEpsilonFvPatchScalarField Declaration
72 \*---------------------------------------------------------------------------*/
74 class atmBoundaryLayerInletEpsilonFvPatchScalarField
76 public fixedValueFvPatchScalarField
80 //- Frictional velocity
83 //- Direction of the z-coordinate
86 //- Surface roughness lenght
89 //- Von Karman constant
92 //- Minimum corrdinate value in z direction
98 //- Runtime type information
99 TypeName("atmBoundaryLayerInletEpsilon");
104 //- Construct from patch and internal field
105 atmBoundaryLayerInletEpsilonFvPatchScalarField
108 const DimensionedField<scalar, volMesh>&
111 //- Construct from patch, internal field and dictionary
112 atmBoundaryLayerInletEpsilonFvPatchScalarField
115 const DimensionedField<scalar, volMesh>&,
119 //- Construct by mapping given
120 // atmBoundaryLayerInletEpsilonFvPatchScalarField onto a new patch
121 atmBoundaryLayerInletEpsilonFvPatchScalarField
123 const atmBoundaryLayerInletEpsilonFvPatchScalarField&,
125 const DimensionedField<scalar, volMesh>&,
126 const fvPatchFieldMapper&
129 //- Construct and return a clone
130 virtual tmp<fvPatchScalarField> clone() const
132 return tmp<fvPatchScalarField>
134 new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this)
138 //- Construct as copy setting internal field reference
139 atmBoundaryLayerInletEpsilonFvPatchScalarField
141 const atmBoundaryLayerInletEpsilonFvPatchScalarField&,
142 const DimensionedField<scalar, volMesh>&
145 //- Construct and return a clone setting internal field reference
146 virtual tmp<fvPatchScalarField> clone
148 const DimensionedField<scalar, volMesh>& iF
151 return tmp<fvPatchScalarField>
153 new atmBoundaryLayerInletEpsilonFvPatchScalarField(*this, iF)
166 //- Return z direction
167 const vector& z() const
172 //- Update coefficients
173 virtual void updateCoeffs();
176 virtual void write(Ostream&) const;
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 } // End namespace incompressible
183 } // End namespace Foam
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
189 // ************************************************************************* //