alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.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::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
26 
27 Group
28  grpCmpWallFunctions
29 
30 Description
31  A simple alphatPhaseChangeWallFunctionFvPatchScalarField with a fixed
32  volumetric phase-change mass flux.
33 
34 SeeAlso
35  Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
36 
37 SourceFiles
38  alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef compressibleAlphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H
43 #define compressibleAlphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H
44 
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace compressible
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
61 {
62  // Private data
63 
64  //- Turbulent Prandtl number
65  scalar Prt_;
66 
67  //- Cmu coefficient
68  scalar Cmu_;
69 
70  //- Von Karman constant
71  scalar kappa_;
72 
73  //- E coefficient
74  scalar E_;
75 
76  //- E coefficient
77  scalar fixedDmdt_;
78 
79 
80  // Solution parameters
81 
82  static scalar maxExp_;
83  static scalar tolerance_;
84  static label maxIters_;
85 
86 
87  // Private Member Functions
88 
89  //- Check the type of the patch
90  void checkType();
91 
92  //- 'P' function
93  tmp<scalarField> Psmooth(const scalarField& Prat) const;
94 
95  //- Calculate y+ at the edge of the thermal laminar sublayer
96  tmp<scalarField> yPlusTherm
97  (
98  const scalarField& P,
99  const scalarField& Prat
100  ) const;
101 
102 
103 public:
104 
105  //- Runtime type information
106  TypeName("compressible::alphatFixedDmdtWallBoilingWallFunction");
107 
108 
109  // Constructors
110 
111  //- Construct from patch and internal field
113  (
114  const fvPatch&,
116  );
117 
118  //- Construct from patch, internal field and dictionary
120  (
121  const fvPatch&,
123  const dictionary&
124  );
125 
126  //- Construct by mapping given
127  // alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
128  // onto a new patch
130  (
132  const fvPatch&,
134  const fvPatchFieldMapper&
135  );
136 
137  //- Construct as copy
139  (
141  );
142 
143  //- Construct and return a clone
144  virtual tmp<fvPatchScalarField> clone() const
145  {
147  (
149  (
150  *this
151  )
152  );
153  }
154 
155  //- Construct as copy setting internal field reference
157  (
160  );
161 
162  //- Construct and return a clone setting internal field reference
164  (
166  ) const
167  {
169  (
171  (
172  *this,
173  iF
174  )
175  );
176  }
177 
178 
179  // Member functions
180 
181  //- Return the rate of phase-change
182  virtual const scalarField& dmdt() const
183  {
184  return dmdt_;
185  }
186 
187 
188  // Evaluation functions
189 
190  //- Update the coefficients associated with the patch field
191  virtual void updateCoeffs();
192 
193 
194  // I-O
195 
196  //- Write
197  virtual void write(Ostream&) const;
198 };
199 
200 
201 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
202 
203 } // End namespace compressible
204 } // End namespace Foam
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 #endif
209 
210 // ************************************************************************* //
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Abstract base-class for all alphatWallFunctions supporting phase-change.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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::fvPatchFieldMapper.
A simple alphatPhaseChangeWallFunctionFvPatchScalarField with a fixed volumetric phase-change mass fl...
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
TypeName("compressible::alphatFixedDmdtWallBoilingWallFunction")
Runtime type information.
bool compressible
Definition: pEqn.H:40
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
A class for managing temporary objects.
Definition: PtrList.H:118