1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright held by original author
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 "fvPatchFieldMapper.H"
29 #include "addToRunTimeSelectionTable.H"
30 #include "wallFvPatch.H"
32 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 namespace incompressible
41 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
44 void kqRWallFunctionFvPatchField<Type>::checkType()
46 if (!this->patch().isWall())
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()
59 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
62 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
65 const DimensionedField<Type, volMesh>& iF
68 zeroGradientFvPatchField<Type>(p, iF)
75 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
77 const kqRWallFunctionFvPatchField& ptf,
79 const DimensionedField<Type, volMesh>& iF,
80 const fvPatchFieldMapper& mapper
83 zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
90 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
93 const DimensionedField<Type, volMesh>& iF,
94 const dictionary& dict
97 zeroGradientFvPatchField<Type>(p, iF, dict)
104 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
106 const kqRWallFunctionFvPatchField& tkqrwfpf
109 zeroGradientFvPatchField<Type>(tkqrwfpf)
116 kqRWallFunctionFvPatchField<Type>::kqRWallFunctionFvPatchField
118 const kqRWallFunctionFvPatchField& tkqrwfpf,
119 const DimensionedField<Type, volMesh>& iF
122 zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
128 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
131 void kqRWallFunctionFvPatchField<Type>::evaluate
133 const Pstream::commsTypes commsType
136 zeroGradientFvPatchField<Type>::evaluate(commsType);
141 void kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
143 zeroGradientFvPatchField<Type>::write(os);
144 this->writeEntry("value", os);
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
150 } // End namespace RASModels
151 } // End namespace incompressible
152 } // End namespace Foam
154 // ************************************************************************* //