initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / LES / derivedFvPatchFields / wallFunctions / alphaSgsWallFunctions / alphaSgsJayatillekeWallFunction / alphaSgsJayatillekeWallFunctionFvPatchScalarField.H
blobe7f6184d814f6633342b290164b19d523abb5faf
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
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 2 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     alphaSgsJayatillekeWallFunctionFvPatchScalarField
28 Description
29     Thermal wall function for turbulent thermal diffusivity based on the
30     Jayatilleke thermal wall function
32 SourceFiles
33     alphaSgsJayatillekeWallFunctionFvPatchScalarField.C
35 \*---------------------------------------------------------------------------*/
37 #ifndef alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
38 #define alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
40 #include "fixedValueFvPatchFields.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
46 namespace compressible
48 namespace LESModels
51 /*---------------------------------------------------------------------------*\
52      Class alphaSgsJayatillekeWallFunctionFvPatchScalarField Declaration
53 \*---------------------------------------------------------------------------*/
55 class alphaSgsJayatillekeWallFunctionFvPatchScalarField
57     public fixedValueFvPatchScalarField
59     // Private data
61         //- Turbulent Prandtl number
62         scalar Prt_;
64         //- Von Karman constant
65         scalar kappa_;
67         //- E coefficient
68         scalar E_;
71         // Solution parameters
73             static scalar maxExp_;
74             static scalar tolerance_;
75             static label maxIters_;
78     // Private member functions
80         //- Check the type of the patch
81         void checkType();
83         //- `P' function
84         scalar Psmooth(const scalar Prat) const;
86         //- Calculate y+ at the edge of the thermal laminar sublayer
87         scalar yPlusTherm
88         (
89             const scalar P,
90             const scalar Prat
91         ) const;
94 public:
96     //- Runtime type information
97     TypeName("alphaSgsJayatillekeWallFunction");
100     // Constructors
102         //- Construct from patch and internal field
103         alphaSgsJayatillekeWallFunctionFvPatchScalarField
104         (
105             const fvPatch&,
106             const DimensionedField<scalar, volMesh>&
107         );
109         //- Construct from patch, internal field and dictionary
110         alphaSgsJayatillekeWallFunctionFvPatchScalarField
111         (
112             const fvPatch&,
113             const DimensionedField<scalar, volMesh>&,
114             const dictionary&
115         );
117         //- Construct by mapping given an
118         //  alphaSgsJayatillekeWallFunctionFvPatchScalarField
119         //  onto a new patch
120         alphaSgsJayatillekeWallFunctionFvPatchScalarField
121         (
122             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
123             const fvPatch&,
124             const DimensionedField<scalar, volMesh>&,
125             const fvPatchFieldMapper&
126         );
128         //- Construct as copy
129         alphaSgsJayatillekeWallFunctionFvPatchScalarField
130         (
131             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&
132         );
134         //- Construct and return a clone
135         virtual tmp<fvPatchScalarField> clone() const
136         {
137             return tmp<fvPatchScalarField>
138             (
139                 new alphaSgsJayatillekeWallFunctionFvPatchScalarField(*this)
140             );
141         }
143         //- Construct as copy setting internal field reference
144         alphaSgsJayatillekeWallFunctionFvPatchScalarField
145         (
146             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
147             const DimensionedField<scalar, volMesh>&
148         );
150         //- Construct and return a clone setting internal field reference
151         virtual tmp<fvPatchScalarField> clone
152         (
153             const DimensionedField<scalar, volMesh>& iF
154         ) const
155         {
156             return tmp<fvPatchScalarField>
157             (
158                 new alphaSgsJayatillekeWallFunctionFvPatchScalarField
159                 (
160                     *this,
161                     iF
162                 )
163             );
164         }
167     // Member functions
169         // Evaluation functions
171             //- Evaluate the patchField
172             virtual void evaluate
173             (
174                 const Pstream::commsTypes commsType=Pstream::Pstream::blocking
175             );
178         // I-O
180             //- Write
181             void write(Ostream&) const;
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 } // End namespace LESModels
188 } // End namespace compressible
189 } // End namespace Foam
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 #endif
195 // ************************************************************************* //