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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2018 OpenFOAM Foundation
9  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::compressible::
29  alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
30 
31 Description
32  A simple \c alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField with
33  a fixed volumetric phase-change mass flux.
34 
35 Usage
36  Example of the boundary condition specification:
37  \verbatim
38  <patch>
39  {
40  // Mandatory entries
41  type compressible::alphatFixedDmdtWallBoilingWallFunction;
42  vaporPhase <word>;
43 
44  // Optional entries
45  relax <scalar>;
46  fixedDmdt <scalar>;
47  L <scalar>;
48 
49  // Inherited entries
50  ...
51  }
52  \endverbatim
53 
54  where the entries mean:
55  \table
56  Property | Description | Type | Reqd | Deflt
57  type | Type name: <!--
58  --> compressible::alphatFixedDmdtWallBoilingWallFunction <!--
59  --> | word | yes | -
60  vaporPhase | Name of the vapor phase | word | yes | -
61  relax | Relaxation factor for dmdt | scalar | no | 1.0
62  fixedDmdt | Volumetric phase-change mass flux in near wall cells <!--
63  --> | scalar | no | 0.0
64  L | Latent heat | scalar | no | 0.0
65  \endtable
66 
67  The inherited entries are elaborated in:
68  -\link alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H\endlink
69 
70 See also
71  Foam::compressible::
72  alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
73 
74 SourceFiles
75  alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
76 
77 \*---------------------------------------------------------------------------*/
78 
79 #ifndef alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H
80 #define alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField_H
81 
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 namespace Foam
87 {
88 namespace compressible
89 {
90 
91 /*---------------------------------------------------------------------------*\
92  Class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField Declaration
93 \*---------------------------------------------------------------------------*/
94 
95 class alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
96 :
97  public alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
98 {
99  // Private Data
100 
101  //- Name of the vapor phase
102  word vaporPhaseName_;
103 
104  //- Relaxation factor for dmdt
105  scalar relax_;
106 
107  //- Volumetric phase-change mass flux in near wall cells
108  scalar fixedDmdt_;
109 
110  //- Latent heat
111  scalar L_;
112 
113 
114 public:
115 
116  //- Runtime type information
117  TypeName("compressible::alphatFixedDmdtWallBoilingWallFunction");
118 
119 
120  // Constructors
121 
122  //- Construct from patch and internal field
124  (
125  const fvPatch&,
126  const DimensionedField<scalar, volMesh>&
127  );
128 
129  //- Construct from patch, internal field and dictionary
131  (
132  const fvPatch&,
133  const DimensionedField<scalar, volMesh>&,
134  const dictionary&
135  );
136 
137  //- Construct by mapping given
138  //- alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
139  //- onto a new patch
141  (
143  const fvPatch&,
145  const fvPatchFieldMapper&
146  );
147 
148  //- Construct as copy
150  (
152  );
153 
154  //- Construct and return a clone
155  virtual tmp<fvPatchScalarField> clone() const
156  {
158  (
160  (
161  *this
162  )
163  );
164  }
165 
166  //- Construct as copy setting internal field reference
168  (
171  );
172 
173  //- Construct and return a clone setting internal field reference
175  (
177  ) const
178  {
180  (
182  (
183  *this,
184  iF
185  )
186  );
187  }
188 
189 
190  // Member Functions
191 
192  //- Is there phase change mass transfer for this phasePair
193  virtual bool activePhasePair(const phasePairKey&) const;
194 
195  //- Return the rate of phase-change for specific phase pair
196  virtual const scalarField& dmdt(const phasePairKey&) const;
197 
198  //- Return the rate of phase-change for specific phase pair
199  virtual const scalarField& mDotL(const phasePairKey&) const;
200 
201 
202  // Evaluation
203 
204  //- Update the coefficients associated with the patch field
205  virtual void updateCoeffs();
206 
207 
208  // I-O
209 
210  //- Write
211  virtual void write(Ostream&) const;
212 };
213 
214 
215 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216 
217 } // End namespace compressible
218 } // End namespace Foam
219 
220 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
221 
222 #endif
223 
224 // ************************************************************************* //
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
A simple alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField with a fixed volumetric phase-cha...
Definition: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H:135
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual const scalarField & mDotL() const
Return the enthalpy source due to phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:174
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::compressible::alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
Definition: alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H:132
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::activePhasePair
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
Definition: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C:130
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.H
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C:192
Foam::Field< scalar >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.H:195
Foam::phasePairKey
An ordered or unorder pair of phase names. Typically specified as follows.
Definition: phasePairKey.H:65
compressible
bool compressible
Definition: pEqn.H:2
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C:173
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C:44
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt
virtual const scalarField & dmdt() const
Return the rate of phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:168
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::compressible::alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatFixedDmdtWallBoilingWallFunction")
Runtime type information.
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54