OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

alphaSgsJayatillekeWallFunctionFvPatchScalarField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     alphaSgsJayatillekeWallFunctionFvPatchScalarField
00027 
00028 Description
00029     Thermal wall function for turbulent thermal diffusivity based on the
00030     Jayatilleke thermal wall function
00031 
00032 SourceFiles
00033     alphaSgsJayatillekeWallFunctionFvPatchScalarField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
00038 #define alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
00039 
00040 #include "fixedValueFvPatchFields.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace compressible
00047 {
00048 namespace LESModels
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052      Class alphaSgsJayatillekeWallFunctionFvPatchScalarField Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 class alphaSgsJayatillekeWallFunctionFvPatchScalarField
00056 :
00057     public fixedValueFvPatchScalarField
00058 {
00059     // Private data
00060 
00061         //- Turbulent Prandtl number
00062         scalar Prt_;
00063 
00064         //- Von Karman constant
00065         scalar kappa_;
00066 
00067         //- E coefficient
00068         scalar E_;
00069 
00070 
00071         // Solution parameters
00072 
00073             static scalar maxExp_;
00074             static scalar tolerance_;
00075             static label maxIters_;
00076 
00077 
00078     // Private member functions
00079 
00080         //- Check the type of the patch
00081         void checkType();
00082 
00083         //- `P' function
00084         scalar Psmooth(const scalar Prat) const;
00085 
00086         //- Calculate y+ at the edge of the thermal laminar sublayer
00087         scalar yPlusTherm
00088         (
00089             const scalar P,
00090             const scalar Prat
00091         ) const;
00092 
00093 
00094 public:
00095 
00096     //- Runtime type information
00097     TypeName("alphaSgsJayatillekeWallFunction");
00098 
00099 
00100     // Constructors
00101 
00102         //- Construct from patch and internal field
00103         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00104         (
00105             const fvPatch&,
00106             const DimensionedField<scalar, volMesh>&
00107         );
00108 
00109         //- Construct from patch, internal field and dictionary
00110         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00111         (
00112             const fvPatch&,
00113             const DimensionedField<scalar, volMesh>&,
00114             const dictionary&
00115         );
00116 
00117         //- Construct by mapping given an
00118         //  alphaSgsJayatillekeWallFunctionFvPatchScalarField
00119         //  onto a new patch
00120         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00121         (
00122             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
00123             const fvPatch&,
00124             const DimensionedField<scalar, volMesh>&,
00125             const fvPatchFieldMapper&
00126         );
00127 
00128         //- Construct as copy
00129         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00130         (
00131             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&
00132         );
00133 
00134         //- Construct and return a clone
00135         virtual tmp<fvPatchScalarField> clone() const
00136         {
00137             return tmp<fvPatchScalarField>
00138             (
00139                 new alphaSgsJayatillekeWallFunctionFvPatchScalarField(*this)
00140             );
00141         }
00142 
00143         //- Construct as copy setting internal field reference
00144         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00145         (
00146             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
00147             const DimensionedField<scalar, volMesh>&
00148         );
00149 
00150         //- Construct and return a clone setting internal field reference
00151         virtual tmp<fvPatchScalarField> clone
00152         (
00153             const DimensionedField<scalar, volMesh>& iF
00154         ) const
00155         {
00156             return tmp<fvPatchScalarField>
00157             (
00158                 new alphaSgsJayatillekeWallFunctionFvPatchScalarField
00159                 (
00160                     *this,
00161                     iF
00162                 )
00163             );
00164         }
00165 
00166 
00167     // Member functions
00168 
00169         // Evaluation functions
00170 
00171             //- Evaluate the patchField
00172             virtual void evaluate
00173             (
00174                 const Pstream::commsTypes commsType=Pstream::Pstream::blocking
00175             );
00176 
00177 
00178         // I-O
00179 
00180             //- Write
00181             void write(Ostream&) const;
00182 };
00183 
00184 
00185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00186 
00187 } // End namespace LESModels
00188 } // End namespace compressible
00189 } // End namespace Foam
00190 
00191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00192 
00193 #endif
00194 
00195 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd