1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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 <finiteVolume/fvPatchFieldMapper.H>
29 #include <OpenFOAM/addToRunTimeSelectionTable.H>
30 #include <finiteVolume/wallFvPatch.H>
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 namespace incompressible
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44 void kqRWallFunctionFvPatchField<Type>::checkType()
46 if (!isA<wallFvPatch>(this->patch()))
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
58 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
61 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
64 const DimensionedField<Type, volMesh>& iF
67 zeroGradientFvPatchField<Type>(p, iF)
74 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
76 const kqRWallFunctionFvPatchField& ptf,
78 const DimensionedField<Type, volMesh>& iF,
79 const fvPatchFieldMapper& mapper
82 zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
89 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
92 const DimensionedField<Type, volMesh>& iF,
93 const dictionary& dict
96 zeroGradientFvPatchField<Type>(p, iF, dict)
103 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
105 const kqRWallFunctionFvPatchField& tkqrwfpf
108 zeroGradientFvPatchField<Type>(tkqrwfpf)
115 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
117 const kqRWallFunctionFvPatchField& tkqrwfpf,
118 const DimensionedField<Type, volMesh>& iF
121 zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
127 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
130 void kqRWallFunctionFvPatchField<Type>::evaluate
132 const Pstream::commsTypes commsType
135 zeroGradientFvPatchField<Type>::evaluate(commsType);
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 incompressible
151 } // End namespace Foam
153 // ************************ vim: set sw=4 sts=4 et: ************************ //