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

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