alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H
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) 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 Class
25  Foam::compressible::
26  alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
27 
28 Group
29  grpCmpWallFunctions
30 
31 Description
32  This boundary condition provides a thermal wall function for turbulent
33  thermal diffusivity (usually\c alphat) based on the Jayatilleke model for
34  the Eulerian multiphase solvers.
35 
36  \heading Patch usage
37 
38  \table
39  Property | Description | Required | Default value
40  Prt | Turbulent Prandtl number | no | 0.85
41  Cmu | Model coefficient | no | 0.09
42  kappa | von Karman constant | no | 0.41
43  E | Model coefficient | no | 9.8
44  \endtable
45 
46  Example of the boundary condition specification:
47  \verbatim
48  myPatch
49  {
50  type alphatPhaseChangeJayatillekeWallFunction;
51  Prt 0.85;
52  kappa 0.41;
53  E 9.8;
54  value uniform 0; // optional value entry
55  }
56  \endverbatim
57 
58 SeeAlso
59  Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
60 
61 SourceFiles
62  alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #ifndef compressiblealphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H
67 #define compressiblealphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H
68 
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 namespace compressible
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
83 :
84  public alphatPhaseChangeWallFunctionFvPatchScalarField
85 {
86 
87 protected:
88 
89  // Protected data
90 
91  //- Turbulent Prandtl number
92  scalar Prt_;
93 
94  //- Cmu coefficient
95  scalar Cmu_;
96 
97  //- Von Karman constant
98  scalar kappa_;
99 
100  //- E coefficient
101  scalar E_;
102 
103  // Solution parameters
104 
105  static scalar maxExp_;
106  static scalar tolerance_;
107  static label maxIters_;
108 
109 
110  // Protected Member Functions
111 
112  //- Check the type of the patch
113  void checkType();
114 
115  //- 'P' function
116  tmp<scalarField> Psmooth(const scalarField& Prat) const;
117 
118  //- Calculate y+ at the edge of the thermal laminar sublayer
120  (
121  const scalarField& P,
122  const scalarField& Prat
123  ) const;
124 
125  //- Update turbulent thermal diffusivity
127  (
128  const scalarField& prevAlphat
129  ) const;
130 
131 
132 public:
133 
134  //- Runtime type information
135  TypeName("compressible::alphatPhaseChangeJayatillekeWallFunction");
136 
137 
138  // Constructors
139 
140  //- Construct from patch and internal field
142  (
143  const fvPatch&,
145  );
146 
147  //- Construct from patch, internal field and dictionary
149  (
150  const fvPatch&,
152  const dictionary&
153  );
154 
155  //- Construct by mapping given
156  // alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
157  // onto a new patch
159  (
161  const fvPatch&,
163  const fvPatchFieldMapper&
164  );
165 
166  //- Construct as copy
168  (
170  );
171 
172  //- Construct and return a clone
173  virtual tmp<fvPatchScalarField> clone() const
174  {
176  (
178  (
179  *this
180  )
181  );
182  }
183 
184  //- Construct as copy setting internal field reference
186  (
189  );
190 
191  //- Construct and return a clone setting internal field reference
193  (
195  ) const
196  {
198  (
200  (
201  *this,
202  iF
203  )
204  );
205  }
206 
207 
208  // Member functions
209 
210  // Evaluation functions
211 
212  //- Update the coefficients associated with the patch field
213  virtual void updateCoeffs();
214 
215 
216  // I-O
217 
218  //- Write
219  virtual void write(Ostream&) const;
220 };
221 
222 
223 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
224 
225 } // End namespace compressible
226 } // End namespace Foam
227 
228 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
229 
230 #endif
231 
232 // ************************************************************************* //
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Psmooth
tmp< scalarField > Psmooth(const scalarField &Prat) const
'P' function
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Update turbulent thermal diffusivity.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::checkType
void checkType()
Check the type of the patch.
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:105
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
Abstract base-class for all alphatWallFunctions supporting phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:57
alphatPhaseChangeWallFunctionFvPatchScalarField.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Prt_
scalar Prt_
Turbulent Prandtl number.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:115
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Cmu_
scalar Cmu_
Cmu coefficient.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:118
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::E_
scalar E_
E coefficient.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:124
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxExp_
static scalar maxExp_
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:128
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
tmp< scalarField > yPlusTherm(const scalarField &P, const scalarField &Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:196
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::tolerance_
static scalar tolerance_
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:129
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::kappa_
scalar kappa_
Von Karman constant.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:121
compressible
bool compressible
Definition: pEqn.H:40
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::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatPhaseChangeJayatillekeWallFunction")
Runtime type information.
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxIters_
static label maxIters_
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:130
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:51