FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     alphaSgsJayatillekeWallFunctionFvPatchScalarField
00026 
00027 Description
00028     Thermal wall function for turbulent thermal diffusivity based on the
00029     Jayatilleke thermal wall function
00030 
00031 SourceFiles
00032     alphaSgsJayatillekeWallFunctionFvPatchScalarField.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
00037 #define alphaSgsJayatillekeWallFunctionFvPatchScalarField_H
00038 
00039 #include <finiteVolume/fixedValueFvPatchFields.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 namespace compressible
00046 {
00047 namespace LESModels
00048 {
00049 
00050 /*---------------------------------------------------------------------------*\
00051      Class alphaSgsJayatillekeWallFunctionFvPatchScalarField Declaration
00052 \*---------------------------------------------------------------------------*/
00053 
00054 class alphaSgsJayatillekeWallFunctionFvPatchScalarField
00055 :
00056     public fixedValueFvPatchScalarField
00057 {
00058     // Private data
00059 
00060         //- Turbulent Prandtl number
00061         scalar Prt_;
00062 
00063         //- Von Karman constant
00064         scalar kappa_;
00065 
00066         //- E coefficient
00067         scalar E_;
00068 
00069         //- Name of (sensible/total) enthalpy field
00070         word hsName_;
00071 
00072 
00073         // Solution parameters
00074 
00075             static scalar maxExp_;
00076             static scalar tolerance_;
00077             static label maxIters_;
00078 
00079 
00080     // Private member functions
00081 
00082         //- Check the type of the patch
00083         void checkType();
00084 
00085         //- `P' function
00086         scalar Psmooth(const scalar Prat) const;
00087 
00088         //- Calculate y+ at the edge of the thermal laminar sublayer
00089         scalar yPlusTherm
00090         (
00091             const scalar P,
00092             const scalar Prat
00093         ) const;
00094 
00095 
00096 public:
00097 
00098     //- Runtime type information
00099     TypeName("alphaSgsJayatillekeWallFunction");
00100 
00101 
00102     // Constructors
00103 
00104         //- Construct from patch and internal field
00105         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00106         (
00107             const fvPatch&,
00108             const DimensionedField<scalar, volMesh>&
00109         );
00110 
00111         //- Construct from patch, internal field and dictionary
00112         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00113         (
00114             const fvPatch&,
00115             const DimensionedField<scalar, volMesh>&,
00116             const dictionary&
00117         );
00118 
00119         //- Construct by mapping given an
00120         //  alphaSgsJayatillekeWallFunctionFvPatchScalarField
00121         //  onto a new patch
00122         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00123         (
00124             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
00125             const fvPatch&,
00126             const DimensionedField<scalar, volMesh>&,
00127             const fvPatchFieldMapper&
00128         );
00129 
00130         //- Construct as copy
00131         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00132         (
00133             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&
00134         );
00135 
00136         //- Construct and return a clone
00137         virtual tmp<fvPatchScalarField> clone() const
00138         {
00139             return tmp<fvPatchScalarField>
00140             (
00141                 new alphaSgsJayatillekeWallFunctionFvPatchScalarField(*this)
00142             );
00143         }
00144 
00145         //- Construct as copy setting internal field reference
00146         alphaSgsJayatillekeWallFunctionFvPatchScalarField
00147         (
00148             const alphaSgsJayatillekeWallFunctionFvPatchScalarField&,
00149             const DimensionedField<scalar, volMesh>&
00150         );
00151 
00152         //- Construct and return a clone setting internal field reference
00153         virtual tmp<fvPatchScalarField> clone
00154         (
00155             const DimensionedField<scalar, volMesh>& iF
00156         ) const
00157         {
00158             return tmp<fvPatchScalarField>
00159             (
00160                 new alphaSgsJayatillekeWallFunctionFvPatchScalarField
00161                 (
00162                     *this,
00163                     iF
00164                 )
00165             );
00166         }
00167 
00168 
00169     // Member functions
00170 
00171         // Evaluation functions
00172 
00173             //- Evaluate the patchField
00174             virtual void evaluate
00175             (
00176                 const Pstream::commsTypes commsType=Pstream::Pstream::blocking
00177             );
00178 
00179 
00180         // I-O
00181 
00182             //- Write
00183             void write(Ostream&) const;
00184 };
00185 
00186 
00187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00188 
00189 } // End namespace LESModels
00190 } // End namespace compressible
00191 } // End namespace Foam
00192 
00193 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00194 
00195 #endif
00196 
00197 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines