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 -------------------------------------------------------------------------------
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::alphatPhaseChangeWallFunctionFvPatchScalarField
28 
29 Description
30  Abstract base-class for all alphatWallFunctions supporting phase-change.
31 
32 See also
33  Foam::fixedValueFvPatchScalarField
34  Foam::alphatWallFunctionFvPatchScalarField
35 
36 SourceFiles
37  alphatPhaseChangeWallFunctionFvPatchScalarField.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef alphatPhaseChangeWallFunctionFvPatchScalarField_H
42 #define alphatPhaseChangeWallFunctionFvPatchScalarField_H
43 
45 #include "phasePairKey.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 namespace compressible
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class alphatPhaseChangeWallFunctionFvPatchScalarField Declaration
56 \*---------------------------------------------------------------------------*/
57 
59 :
60  public fixedValueFvPatchScalarField
61 {
62 protected:
63 
64  // Protected Data
65 
66  //- Rate of phase-change
68 
69  //- Latent heat of the phase-change
71 
72 
73 public:
74 
75  //- Runtime type information
76  TypeName("compressible::alphatPhaseChangeWallFunction");
77 
78 
79  // Constructors
80 
81  //- Construct from patch and internal field
83  (
84  const fvPatch&,
86  );
87 
88  //- Construct from patch, internal field and dictionary
90  (
91  const fvPatch&,
93  const dictionary&
94  );
95 
96  //- Construct by mapping given
97  // alphatPhaseChangeWallFunctionFvPatchScalarField
98  // onto a new patch
100  (
102  const fvPatch&,
104  const fvPatchFieldMapper&
105  );
106 
107  //- Construct as copy
109  (
111  );
112 
113  //- Construct as copy setting internal field reference
115  (
118  );
119 
120  // No clone methods - abstract class
121 
122 
123  // Member Functions
124 
125  //- Return the rate of phase-change
126  virtual const scalarField& dmdt() const
127  {
128  return dmdt_;
129  }
130 
131  //- Return the enthalpy source due to phase-change
132  virtual const scalarField& mDotL() const
133  {
134  return mDotL_;
135  }
136 
137  //- Is there phase change mass transfer for this phasePair
138  virtual bool activePhasePair(const phasePairKey&) const
139  {
140  return false;
141  }
142 
143  //- Return the rate of phase-change for specific phase pair
144  virtual const scalarField& dmdt(const phasePairKey&) const
145  {
146  return dmdt_;
147  }
148 
149  //- Return the rate of phase-change for specific phase pair
150  virtual const scalarField& mDotL(const phasePairKey&) const
151  {
152  return mDotL_;
153  }
154 
155  //- Return the rate of phase-change for specific phase
156  virtual scalarField dmdt(const word&) const
157  {
158  return dmdt_;
159  }
160 
161  //- Return the enthalpy source due to phase-change for specific phase
162  virtual scalarField mDotL(const word&) const
163  {
164  return mDotL_;
165  }
166 
167 
168  // Evaluation Functions
169 
170  //- Update the coefficients associated with the patch field
171  virtual void updateCoeffs() = 0;
172 
173 
174  // I-O
175 
176  //- Write
177  virtual void write(Ostream&) const;
178 };
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 } // End namespace compressible
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #endif
189 
190 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual const scalarField & mDotL() const
Return the enthalpy source due to phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:131
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt_
scalarField dmdt_
Rate of phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:66
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
Abstract base-class for all alphatWallFunctions supporting phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:57
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt
virtual scalarField dmdt(const word &) const
Return the rate of phase-change for specific phase.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:155
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:143
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual scalarField mDotL(const word &) const
Return the enthalpy source due to phase-change for specific phase.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:161
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::activePhasePair
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:137
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
Definition: phasePairKey.H:57
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:121
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:69
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:125
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:149
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54