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

kqRWallFunctionFvPatchField.C

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 \*---------------------------------------------------------------------------*/
00026 
00027 #include "kqRWallFunctionFvPatchField.H"
00028 #include "fvPatchFieldMapper.H"
00029 #include "addToRunTimeSelectionTable.H"
00030 #include "wallFvPatch.H"
00031 
00032 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00033 
00034 namespace Foam
00035 {
00036 namespace incompressible
00037 {
00038 namespace RASModels
00039 {
00040 
00041 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
00042 
00043 template<class Type>
00044 void kqRWallFunctionFvPatchField<Type>::checkType()
00045 {
00046     if (!isA<wallFvPatch>(this->patch()))
00047     {
00048         FatalErrorIn("kqRWallFunctionFvPatchField::checkType()")
00049             << "Invalid wall function specification" << nl
00050             << "    Patch type for patch " << this->patch().name()
00051             << " must be wall" << nl
00052             << "    Current patch type is " << this->patch().type() << nl << endl
00053             << abort(FatalError);
00054     }
00055 }
00056 
00057 
00058 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
00059 
00060 template<class Type>
00061 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
00062 (
00063     const fvPatch& p,
00064     const DimensionedField<Type, volMesh>& iF
00065 )
00066 :
00067     zeroGradientFvPatchField<Type>(p, iF)
00068 {
00069     checkType();
00070 }
00071 
00072 
00073 template<class Type>
00074 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
00075 (
00076     const kqRWallFunctionFvPatchField& ptf,
00077     const fvPatch& p,
00078     const DimensionedField<Type, volMesh>& iF,
00079     const fvPatchFieldMapper& mapper
00080 )
00081 :
00082     zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
00083 {
00084     checkType();
00085 }
00086 
00087 
00088 template<class Type>
00089 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
00090 (
00091     const fvPatch& p,
00092     const DimensionedField<Type, volMesh>& iF,
00093     const dictionary& dict
00094 )
00095 :
00096     zeroGradientFvPatchField<Type>(p, iF, dict)
00097 {
00098     checkType();
00099 }
00100 
00101 
00102 template<class Type>
00103 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
00104 (
00105     const kqRWallFunctionFvPatchField& tkqrwfpf
00106 )
00107 :
00108     zeroGradientFvPatchField<Type>(tkqrwfpf)
00109 {
00110     checkType();
00111 }
00112 
00113 
00114 template<class Type>
00115 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
00116 (
00117     const kqRWallFunctionFvPatchField& tkqrwfpf,
00118     const DimensionedField<Type, volMesh>& iF
00119 )
00120 :
00121     zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
00122 {
00123     checkType();
00124 }
00125 
00126 
00127 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
00128 
00129 template<class Type>
00130 void kqRWallFunctionFvPatchField<Type>::evaluate
00131 (
00132     const Pstream::commsTypes commsType
00133 )
00134 {
00135     zeroGradientFvPatchField<Type>::evaluate(commsType);
00136 }
00137 
00138 
00139 template<class Type>
00140 void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
00141 {
00142     zeroGradientFvPatchField<Type>::write(os);
00143     this->writeEntry("value", os);
00144 }
00145 
00146 
00147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00148 
00149 } // End namespace RASModels
00150 } // End namespace incompressible
00151 } // End namespace Foam
00152 
00153 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd