alphatPhaseChangeWallFunctionFvPatchScalarField.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::alphatPhaseChangeWallFunctionFvPatchScalarField
29 
30 Description
31  Abstract base-class for all alphatWallFunctions supporting phase-change.
32 
33 Usage
34  Example of the boundary condition specification:
35  \verbatim
36  <patchName>
37  {
38  // Optional entries
39  dmdt <scalarField>;
40  mDotL <scalarField>;
41 
42  // Inherited entries
43  ...
44  }
45  \endverbatim
46 
47  where the entries mean:
48  \table
49  Property | Description | Type | Reqd | Deflt
50  dmdt | Rate of phase-change | scalarField | no | 0.0
51  mDotL | Latent heat of the phase-change | scalarField | no | 0.0
52  \endtable
53 
54  The inherited entries are elaborated in:
55  - \link fixedValueFvPatchFields.H \endlink
56 
57 See also
58  - Foam::fixedValueFvPatchScalarField
59  - Foam::alphatWallFunctionFvPatchScalarField
60 
61 SourceFiles
62  alphatPhaseChangeWallFunctionFvPatchScalarField.C
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #ifndef alphatPhaseChangeWallFunctionFvPatchScalarField_H
67 #define alphatPhaseChangeWallFunctionFvPatchScalarField_H
68 
70 #include "phasePairKey.H"
71 
72 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
73 
74 namespace Foam
75 {
76 namespace compressible
77 {
78 
79 /*---------------------------------------------------------------------------*\
80  Class alphatPhaseChangeWallFunctionFvPatchScalarField Declaration
81 \*---------------------------------------------------------------------------*/
82 
83 class alphatPhaseChangeWallFunctionFvPatchScalarField
84 :
85  public fixedValueFvPatchScalarField
86 {
87 protected:
88 
89  // Protected Data
90 
91  //- Rate of phase-change
93 
94  //- Latent heat of the phase-change
96 
97 
98 public:
99 
100  //- Runtime type information
101  TypeName("compressible::alphatPhaseChangeWallFunction");
102 
103 
104  // Constructors
105 
106  //- Construct from patch and internal field
108  (
109  const fvPatch&,
111  );
112 
113  //- Construct from patch, internal field and dictionary
115  (
116  const fvPatch&,
118  const dictionary&
119  );
120 
121  //- Construct by mapping given
122  //- alphatPhaseChangeWallFunctionFvPatchScalarField
123  //- onto a new patch
125  (
127  const fvPatch&,
129  const fvPatchFieldMapper&
130  );
131 
132  //- Construct as copy
134  (
136  );
137 
138  //- Construct as copy setting internal field reference
140  (
143  );
144 
145  // No clone methods - abstract class
146 
147 
148  // Member Functions
149 
150  //- Return the rate of phase-change
151  virtual const scalarField& dmdt() const
152  {
153  return dmdt_;
154  }
155 
156  //- Return the enthalpy source due to phase-change
157  virtual const scalarField& mDotL() const
158  {
159  return mDotL_;
160  }
161 
162  //- Is there phase change mass transfer for this phasePair
163  virtual bool activePhasePair(const phasePairKey&) const
164  {
165  return false;
166  }
167 
168  //- Return the rate of phase-change for specific phase pair
169  virtual const scalarField& dmdt(const phasePairKey&) const
170  {
171  return dmdt_;
172  }
173 
174  //- Return the rate of phase-change for specific phase pair
175  virtual const scalarField& mDotL(const phasePairKey&) const
176  {
177  return mDotL_;
178  }
179 
180  //- Return the rate of phase-change for specific phase
181  virtual scalarField dmdt(const word&) const
182  {
183  return dmdt_;
184  }
185 
186  //- Return the enthalpy source due to phase-change for specific phase
187  virtual scalarField mDotL(const word&) const
188  {
189  return mDotL_;
190  }
191 
192 
193  // Evaluation
194 
195  //- Update the coefficients associated with the patch field
196  virtual void updateCoeffs() = 0;
197 
198 
199  // I-O
200 
201  //- Write
202  virtual void write(Ostream&) const;
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace compressible
209 } // End namespace Foam
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #endif
214 
215 // ************************************************************************* //
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
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::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt_
scalarField dmdt_
Rate of phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:109
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
Abstract base-class for all alphatWallFunctions supporting phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:100
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt
virtual scalarField dmdt(const word &) const
Return the rate of phase-change for specific phase.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:198
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.C:126
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt
virtual const scalarField & dmdt(const phasePairKey &) const
Return the rate of phase-change for specific phase pair.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:186
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual scalarField mDotL(const word &) const
Return the enthalpy source due to phase-change for specific phase.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:204
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::activePhasePair
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:180
Foam::Field< scalar >
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()=0
Update the coefficients associated with the patch field.
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
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::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::TypeName
TypeName("compressible::alphatPhaseChangeWallFunction")
Runtime type information.
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::alphatPhaseChangeWallFunctionFvPatchScalarField
alphatPhaseChangeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.C:48
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL_
scalarField mDotL_
Latent heat of the phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:112
fixedValueFvPatchFields.H
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::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual const scalarField & mDotL(const phasePairKey &) const
Return the rate of phase-change for specific phase pair.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:192
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54