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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2018 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::compressible::
28  alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
29 
30 Description
31  This boundary condition provides a thermal wall function for turbulent
32  thermal diffusivity (usually\c alphat) based on the Jayatilleke model for
33  the Eulerian multiphase solvers.
34 
35 Usage
36  \table
37  Property | Description | Required | Default value
38  Prt | Turbulent Prandtl number | no | 0.85
39  Cmu | Model coefficient | no | 0.09
40  kappa | von Karman constant | no | 0.41
41  E | Model coefficient | no | 9.8
42  \endtable
43 
44  Example of the boundary condition specification:
45  \verbatim
46  <patchName>
47  {
48  type alphatPhaseChangeJayatillekeWallFunction;
49  Prt 0.85;
50  kappa 0.41;
51  E 9.8;
52  value uniform 0; // optional value entry
53  }
54  \endverbatim
55 
56 See also
57  Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
58 
59 SourceFiles
60  alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C
61 
62 \*---------------------------------------------------------------------------*/
63 
64 #ifndef compressible_alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H
65 #define compressible_alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField_H
66 
68 
69 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
70 
71 namespace Foam
72 {
73 namespace compressible
74 {
75 
76 /*---------------------------------------------------------------------------*\
77  Class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField Declaration
78 \*---------------------------------------------------------------------------*/
79 
80 class alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
81 :
82  public alphatPhaseChangeWallFunctionFvPatchScalarField
83 {
84 
85 protected:
86 
87  // Protected data
88 
89  //- Turbulent Prandtl number
90  scalar Prt_;
91 
92  //- Cmu coefficient
93  scalar Cmu_;
94 
95  //- Von Karman constant
96  scalar kappa_;
97 
98  //- E coefficient
99  scalar E_;
100 
101  // Solution parameters
102 
103  static scalar maxExp_;
104  static scalar tolerance_;
105  static label maxIters_;
106 
107 
108  // Protected Member Functions
109 
110  //- Check the type of the patch
111  void checkType();
112 
113  //- 'P' function
114  tmp<scalarField> Psmooth(const scalarField& Prat) const;
115 
116  //- Calculate y+ at the edge of the thermal laminar sublayer
118  (
119  const scalarField& P,
120  const scalarField& Prat
121  ) const;
122 
123  //- Update turbulent thermal diffusivity
125  (
126  const scalarField& prevAlphat
127  ) const;
128 
129 
130 public:
131 
132  //- Runtime type information
133  TypeName("compressible::alphatPhaseChangeJayatillekeWallFunction");
134 
135 
136  // Constructors
137 
138  //- Construct from patch and internal field
140  (
141  const fvPatch&,
143  );
144 
145  //- Construct from patch, internal field and dictionary
147  (
148  const fvPatch&,
150  const dictionary&
151  );
152 
153  //- Construct by mapping given
154  // alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
155  // onto a new patch
157  (
159  const fvPatch&,
161  const fvPatchFieldMapper&
162  );
163 
164  //- Construct as copy
166  (
168  );
169 
170  //- Construct and return a clone
171  virtual tmp<fvPatchScalarField> clone() const
172  {
174  (
176  (
177  *this
178  )
179  );
180  }
181 
182  //- Construct as copy setting internal field reference
184  (
187  );
188 
189  //- Construct and return a clone setting internal field reference
191  (
193  ) const
194  {
196  (
198  (
199  *this,
200  iF
201  )
202  );
203  }
204 
205 
206  // Member functions
207 
208  // Evaluation functions
209 
210  //- Update the coefficients associated with the patch field
211  virtual void updateCoeffs();
212 
213 
214  // I-O
215 
216  //- Write
217  virtual void write(Ostream&) const;
218 };
219 
220 
221 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
222 
223 } // End namespace compressible
224 } // End namespace Foam
225 
226 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
227 
228 #endif
229 
230 // ************************************************************************* //
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Update turbulent thermal diffusivity.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:121
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::checkType
void checkType()
Check the type of the patch.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:57
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:103
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
Abstract base-class for all alphatWallFunctions supporting phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:57
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Psmooth
tmp< scalarField > Psmooth(const scalarField &Prat) const
'P' function
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:71
alphatPhaseChangeWallFunctionFvPatchScalarField.H
Foam::Field< scalar >
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Prt_
scalar Prt_
Turbulent Prandtl number.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:113
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::Cmu_
scalar Cmu_
Cmu coefficient.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:116
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::E_
scalar E_
E coefficient.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:122
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:231
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
tmp< scalarField > yPlusTherm(const scalarField &P, const scalarField &Prat) const
Calculate y+ at the edge of the thermal laminar sublayer.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:81
compressible
bool compressible
Definition: pEqn.H:2
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxExp_
static scalar maxExp_
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:126
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:324
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:194
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::tolerance_
static scalar tolerance_
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:127
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::kappa_
scalar kappa_
Von Karman constant.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:119
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C:310
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatPhaseChangeJayatillekeWallFunction")
Runtime type information.
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::maxIters_
static label maxIters_
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:128
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54