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>
40 {
41  if (!isA<wallFvPatch>(this->patch()))
42  {
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 // ************************************************************************* //
Foam::fvPatchField< Type >::write
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:349
Foam::kqRWallFunctionFvPatchField::kqRWallFunctionFvPatchField
kqRWallFunctionFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: kqRWallFunctionFvPatchField.C:58
p
p
Definition: pEqn.H:62
Foam::kqRWallFunctionFvPatchField::evaluate
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::Pstream::blocking)
Evaluate the patchField.
Definition: kqRWallFunctionFvPatchField.C:127
wallFvPatch.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
fvPatchFieldMapper.H
Foam::kqRWallFunctionFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: kqRWallFunctionFvPatchField.C:136
Foam::zeroGradientFvPatchField
This boundary condition applies a zero-gradient condition from the patch internal field onto the patc...
Definition: zeroGradientFvPatchField.H:63
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::kqRWallFunctionFvPatchField::checkType
void checkType()
Check the type of the patch.
Definition: kqRWallFunctionFvPatchField.C:39
kqRWallFunctionFvPatchField.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:131
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::zeroGradientFvPatchField::evaluate
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::blocking)
Evaluate the patch field.
Definition: zeroGradientFvPatchField.C:98
Foam::kqRWallFunctionFvPatchField
This boundary condition provides a suitable condition for turbulence k, q, and R fields for the case ...
Definition: kqRWallFunctionFvPatchField.H:69
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:45
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51