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

kqRWallFunctionFvPatchField.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     Foam::compressible::RASModels::kqRWallFunctionFvPatchField
00027 
00028 Description
00029     Boundary condition for turbulence k, Q, and R when using wall functions.
00030     Simply acts as a zero gradient condition.
00031 
00032 SourceFiles
00033     kqRWallFunctionFvPatchField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef compressiblekqRWallFunctionFvPatchField_H
00038 #define compressiblekqRWallFunctionFvPatchField_H
00039 
00040 #include "zeroGradientFvPatchField.H"
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 namespace compressible
00047 {
00048 namespace RASModels
00049 {
00050 
00051 /*---------------------------------------------------------------------------*\
00052                 Class kqRWallFunctionFvPatchField Declaration
00053 \*---------------------------------------------------------------------------*/
00054 
00055 template<class Type>
00056 class kqRWallFunctionFvPatchField
00057 :
00058     public zeroGradientFvPatchField<Type>
00059 {
00060 
00061     // Private member functions
00062 
00063         //- Check the type of the patch
00064         void checkType();
00065 
00066 
00067 public:
00068 
00069     //- Runtime type information
00070     TypeName("compressible::kqRWallFunction");
00071 
00072 
00073     // Constructors
00074 
00075         //- Construct from patch and internal field
00076         kqRWallFunctionFvPatchField
00077         (
00078             const fvPatch&,
00079             const DimensionedField<Type, volMesh>&
00080         );
00081 
00082         //- Construct from patch, internal field and dictionary
00083         kqRWallFunctionFvPatchField
00084         (
00085             const fvPatch&,
00086             const DimensionedField<Type, volMesh>&,
00087             const dictionary&
00088         );
00089 
00090         //- Construct by mapping given
00091         // kqRWallFunctionFvPatchField
00092         //  onto a new patch
00093         kqRWallFunctionFvPatchField
00094         (
00095             const kqRWallFunctionFvPatchField&,
00096             const fvPatch&,
00097             const DimensionedField<Type, volMesh>&,
00098             const fvPatchFieldMapper&
00099         );
00100 
00101         //- Construct as copy
00102         kqRWallFunctionFvPatchField
00103         (
00104             const kqRWallFunctionFvPatchField&
00105         );
00106 
00107         //- Construct and return a clone
00108         virtual tmp<fvPatchField<Type> > clone() const
00109         {
00110             return tmp<fvPatchField<Type> >
00111             (
00112                 new kqRWallFunctionFvPatchField(*this)
00113             );
00114         }
00115 
00116         //- Construct as copy setting internal field reference
00117         kqRWallFunctionFvPatchField
00118         (
00119             const kqRWallFunctionFvPatchField&,
00120             const DimensionedField<Type, volMesh>&
00121         );
00122 
00123         //- Construct and return a clone setting internal field reference
00124         virtual tmp<fvPatchField<Type> > clone
00125         (
00126             const DimensionedField<Type, volMesh>& iF
00127         ) const
00128         {
00129             return tmp<fvPatchField<Type> >
00130             (
00131                 new kqRWallFunctionFvPatchField(*this, iF)
00132             );
00133         }
00134 
00135 
00136     // Member functions
00137 
00138         // Evaluation functions
00139 
00140             //- Evaluate the patchField
00141             virtual void evaluate
00142             (
00143                 const Pstream::commsTypes commsType=Pstream::Pstream::blocking
00144             );
00145 
00146 
00147         // I-O
00148 
00149             //- Write
00150             void write(Ostream&) const;
00151 };
00152 
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 } // End namespace RASModels
00157 } // End namespace compressible
00158 } // End namespace Foam
00159 
00160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00161 
00162 #ifdef NoRepository
00163 #   include "kqRWallFunctionFvPatchField.C"
00164 #endif
00165 
00166 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00167 
00168 #endif
00169 
00170 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd