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

kappatJayatillekeWallFunctionFvPatchScalarField.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) 2010-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     Foam::incompressible::RASModels::
00026     kappatJayatillekeWallFunctionFvPatchScalarField
00027 
00028 Description
00029     Boundary condition for (kinematic) turbulent thermal conductivity when
00030     using wall functions, using Jayatilleke P function.
00031 
00032     Units of m2/s
00033 
00034 SourceFiles
00035     kappatJayatillekeWallFunctionFvPatchScalarField.C
00036 
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef kappatJayatillekeWallFunctionFvPatchScalarField_H
00040 #define kappatJayatillekeWallFunctionFvPatchScalarField_H
00041 
00042 #include <finiteVolume/fixedValueFvPatchFields.H>
00043 
00044 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00045 
00046 namespace Foam
00047 {
00048 namespace incompressible
00049 {
00050 namespace RASModels
00051 {
00052 
00053 /*---------------------------------------------------------------------------*\
00054        Class kappatJayatillekeWallFunctionFvPatchScalarField Declaration
00055 \*---------------------------------------------------------------------------*/
00056 
00057 class kappatJayatillekeWallFunctionFvPatchScalarField
00058 :
00059     public fixedValueFvPatchScalarField
00060 {
00061 protected:
00062 
00063     // Protected data
00064 
00065         //- Turbulent Prandtl number
00066         scalar Prt_;
00067 
00068         //- Cmu coefficient
00069         scalar Cmu_;
00070 
00071         //- Von Karman constant
00072         scalar kappa_;
00073 
00074         //- E coefficient
00075         scalar E_;
00076 
00077 
00078         // Solution parameters
00079 
00080             static scalar tolerance_;
00081             static label maxIters_;
00082 
00083 
00084     // Protected member functions
00085 
00086         //- Check the type of the patch
00087         virtual void checkType();
00088 
00089         //- `P' function
00090         scalar Psmooth(const scalar Prat) const;
00091 
00092         //- Calculate y+ at the edge of the thermal laminar sublayer
00093         scalar yPlusTherm
00094         (
00095             const scalar P,
00096             const scalar Prat
00097         ) const;
00098 
00099 
00100 public:
00101 
00102     //- Runtime type information
00103     TypeName("kappatJayatillekeWallFunction");
00104 
00105 
00106     // Constructors
00107 
00108         //- Construct from patch and internal field
00109         kappatJayatillekeWallFunctionFvPatchScalarField
00110         (
00111             const fvPatch&,
00112             const DimensionedField<scalar, volMesh>&
00113         );
00114 
00115         //- Construct from patch, internal field and dictionary
00116         kappatJayatillekeWallFunctionFvPatchScalarField
00117         (
00118             const fvPatch&,
00119             const DimensionedField<scalar, volMesh>&,
00120             const dictionary&
00121         );
00122 
00123         //- Construct by mapping given
00124         //  kappatJayatillekeWallFunctionFvPatchScalarField
00125         //  onto a new patch
00126         kappatJayatillekeWallFunctionFvPatchScalarField
00127         (
00128             const kappatJayatillekeWallFunctionFvPatchScalarField&,
00129             const fvPatch&,
00130             const DimensionedField<scalar, volMesh>&,
00131             const fvPatchFieldMapper&
00132         );
00133 
00134         //- Construct as copy
00135         kappatJayatillekeWallFunctionFvPatchScalarField
00136         (
00137             const kappatJayatillekeWallFunctionFvPatchScalarField&
00138         );
00139 
00140         //- Construct and return a clone
00141         virtual tmp<fvPatchScalarField> clone() const
00142         {
00143             return tmp<fvPatchScalarField>
00144             (
00145                 new kappatJayatillekeWallFunctionFvPatchScalarField(*this)
00146             );
00147         }
00148 
00149         //- Construct as copy setting internal field reference
00150         kappatJayatillekeWallFunctionFvPatchScalarField
00151         (
00152             const kappatJayatillekeWallFunctionFvPatchScalarField&,
00153             const DimensionedField<scalar, volMesh>&
00154         );
00155 
00156         //- Construct and return a clone setting internal field reference
00157         virtual tmp<fvPatchScalarField> clone
00158         (
00159             const DimensionedField<scalar, volMesh>& iF
00160         ) const
00161         {
00162             return tmp<fvPatchScalarField>
00163             (
00164                 new kappatJayatillekeWallFunctionFvPatchScalarField(*this, iF)
00165             );
00166         }
00167 
00168 
00169     // Member functions
00170 
00171         // Evaluation functions
00172 
00173             //- Update the coefficients associated with the patch field
00174             virtual void updateCoeffs();
00175 
00176 
00177         // I-O
00178 
00179             //- Write
00180             virtual void write(Ostream&) const;
00181 };
00182 
00183 
00184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00185 
00186 } // End namespace RASModels
00187 } // End namespace incompressible
00188 } // End namespace Foam
00189 
00190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00191 
00192 #endif
00193 
00194 // ************************************************************************* //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines