initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / turbulenceModels / compressible / RAS / derivedFvPatchFields / wallFunctions / kqRWallFunctions / kqRWallFunction / kqRWallFunctionFvPatchField.C
blob16bab379df60bc31f2bd695b4684f1ab816bf1b8
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2008-2009 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 \*---------------------------------------------------------------------------*/
27 #include "kqRWallFunctionFvPatchField.H"
28 #include "fvPatchFieldMapper.H"
29 #include "addToRunTimeSelectionTable.H"
30 #include "wallFvPatch.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 namespace Foam
36 namespace compressible
38 namespace RASModels
41 // * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
43 template<class Type>
44 void kqRWallFunctionFvPatchField<Type>::checkType()
46     if (!isA<wallFvPatch>(this->patch()))
47     {
48         FatalErrorIn("kqRWallFunctionFvPatchField::checkType()")
49             << "Invalid wall function specification" << nl
50             << "    Patch type for patch " << this->patch().name()
51             << " must be wall" << nl
52             << "    Current patch type is " << this->patch().type() << nl << endl
53             << abort(FatalError);
54     }
58 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
60 template<class Type>
61 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
63     const fvPatch& p,
64     const DimensionedField<Type, volMesh>& iF
67     zeroGradientFvPatchField<Type>(p, iF)
69     checkType();
73 template<class Type>
74 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
76     const kqRWallFunctionFvPatchField& ptf,
77     const fvPatch& p,
78     const DimensionedField<Type, volMesh>& iF,
79     const fvPatchFieldMapper& mapper
82     zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
84     checkType();
88 template<class Type>
89 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
91     const fvPatch& p,
92     const DimensionedField<Type, volMesh>& iF,
93     const dictionary& dict
96     zeroGradientFvPatchField<Type>(p, iF, dict)
98     checkType();
102 template<class Type>
103 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
105     const kqRWallFunctionFvPatchField& tkqrwfpf
108     zeroGradientFvPatchField<Type>(tkqrwfpf)
110     checkType();
114 template<class Type>
115 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
117     const kqRWallFunctionFvPatchField& tkqrwfpf,
118     const DimensionedField<Type, volMesh>& iF
121     zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
123     checkType();
127 // * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //
129 template<class Type>
130 void kqRWallFunctionFvPatchField<Type>::evaluate
132     const Pstream::commsTypes commsType
135     zeroGradientFvPatchField<Type>::evaluate(commsType);
139 template<class Type>
140 void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
142     zeroGradientFvPatchField<Type>::write(os);
143     this->writeEntry("value", os);
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 } // End namespace RASModels
150 } // End namespace compressible
151 } // End namespace Foam
153 // ************************************************************************* //