FreeFOAM The Cross-Platform CFD Toolkit
alphatWallFunctionFvPatchScalarField.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) 2008-2010 OpenCFD Ltd.
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 
28 #include <finiteVolume/volFields.H>
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace compressible
36 {
37 namespace RASModels
38 {
39 
40 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41 
42 alphatWallFunctionFvPatchScalarField::
43 alphatWallFunctionFvPatchScalarField
44 (
45  const fvPatch& p,
47 )
48 :
49  fixedValueFvPatchScalarField(p, iF),
50  mutName_("mut"),
51  Prt_(0.85)
52 {}
53 
54 
55 alphatWallFunctionFvPatchScalarField::
56 alphatWallFunctionFvPatchScalarField
57 (
59  const fvPatch& p,
61  const fvPatchFieldMapper& mapper
62 )
63 :
64  fixedValueFvPatchScalarField(ptf, p, iF, mapper),
65  mutName_(ptf.mutName_),
66  Prt_(ptf.Prt_)
67 {}
68 
69 
70 alphatWallFunctionFvPatchScalarField::
71 alphatWallFunctionFvPatchScalarField
72 (
73  const fvPatch& p,
75  const dictionary& dict
76 )
77 :
78  fixedValueFvPatchScalarField(p, iF, dict),
79  mutName_(dict.lookupOrDefault<word>("mut", "mut")),
80  Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85))
81 {}
82 
83 
84 alphatWallFunctionFvPatchScalarField::
85 alphatWallFunctionFvPatchScalarField
86 (
88 )
89 :
90  fixedValueFvPatchScalarField(awfpsf),
91  mutName_(awfpsf.mutName_),
92  Prt_(awfpsf.Prt_)
93 {}
94 
95 
96 alphatWallFunctionFvPatchScalarField::
97 alphatWallFunctionFvPatchScalarField
98 (
101 )
102 :
103  fixedValueFvPatchScalarField(awfpsf, iF),
104  mutName_(awfpsf.mutName_),
105  Prt_(awfpsf.Prt_)
106 {}
107 
108 
109 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
110 
111 void alphatWallFunctionFvPatchScalarField::updateCoeffs()
112 {
113  if (updated())
114  {
115  return;
116  }
117 
118  const scalarField& mutw =
119  patch().lookupPatchField<volScalarField, scalar>(mutName_);
120 
121  operator==(mutw/Prt_);
122 
123  fixedValueFvPatchScalarField::updateCoeffs();
124 }
125 
126 
127 void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
128 {
130  writeEntryIfDifferent<word>(os, "mut", "mut", mutName_);
131  os.writeKeyword("Prt") << Prt_ << token::END_STATEMENT << nl;
132  writeEntry("value", os);
133 }
134 
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace RASModels
143 } // End namespace compressible
144 } // End namespace Foam
145 
146 // ************************ vim: set sw=4 sts=4 et: ************************ //