kqRWallFunctionFvPatchField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
27 #include "fvPatchFieldMapper.H"
29 #include "wallFvPatch.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 
36 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
37 
38 template<class Type>
39 void kqRWallFunctionFvPatchField<Type>::checkType()
40 {
41  if (!isA<wallFvPatch>(this->patch()))
42  {
43  FatalErrorIn("kqRWallFunctionFvPatchField::checkType()")
44  << "Invalid wall function specification" << nl
45  << " Patch type for patch " << this->patch().name()
46  << " must be wall" << nl
47  << " Current patch type is " << this->patch().type()
48  << nl << endl
49  << abort(FatalError);
50  }
51 }
52 
53 
54 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
55 
56 template<class Type>
58 (
59  const fvPatch& p,
61 )
62 :
64 {
65  checkType();
66 }
67 
68 
69 template<class Type>
71 (
72  const kqRWallFunctionFvPatchField& ptf,
73  const fvPatch& p,
75  const fvPatchFieldMapper& mapper
76 )
77 :
78  zeroGradientFvPatchField<Type>(ptf, p, iF, mapper)
79 {
80  checkType();
81 }
82 
83 
84 template<class Type>
86 (
87  const fvPatch& p,
89  const dictionary& dict
90 )
91 :
93 {
94  checkType();
95 }
96 
97 
98 template<class Type>
100 (
101  const kqRWallFunctionFvPatchField& tkqrwfpf
102 )
103 :
105 {
106  checkType();
107 }
108 
109 
110 template<class Type>
112 (
113  const kqRWallFunctionFvPatchField& tkqrwfpf,
115 )
116 :
117  zeroGradientFvPatchField<Type>(tkqrwfpf, iF)
118 {
119  checkType();
120 }
121 
122 
123 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
124 
125 template<class Type>
127 (
128  const Pstream::commsTypes commsType
129 )
130 {
132 }
133 
134 
135 template<class Type>
137 {
139  this->writeEntry("value", os);
140 }
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace Foam
146 
147 // ************************************************************************* //
virtual void write(Ostream &) const
Write.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
This boundary condition provides a suitable condition for turbulence k, q, and R fields for the case ...
Foam::fvPatchFieldMapper.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:354
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::blocking)
Evaluate the patch field.
Namespace for OpenFOAM.
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
dictionary dict
static const char nl
Definition: Ostream.H:260
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
volScalarField & p
Definition: createFields.H:51
commsTypes
Types of communications.
Definition: UPstream.H:64
Macros for easy insertion into run-time selection tables.
errorManip< error > abort(error &err)
Definition: errorManip.H:131
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Definition: error.H:314
error FatalError
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::Pstream::blocking)
Evaluate the patchField.
kqRWallFunctionFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.