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 
121  // Member functions
122 
123  //- Return the rate of phase-change
124  virtual const scalarField& dmdt() const
125  {
126  return dmdt_;
127  }
128 
129  //- Return the enthalpy source due to phase-change
130  virtual const scalarField& mDotL() const
131  {
132  return mDotL_;
133  }
134 
135  //- Is there phase change mass transfer for this phasePair
136  virtual bool activePhasePair(const phasePairKey&) const
137  {
138  return false;
139  }
140 
141  //- Return the rate of phase-change for specific phase pair
142  virtual const scalarField& dmdt(const phasePairKey&) const
143  {
144  return dmdt_;
145  }
146 
147  //- Return the rate of phase-change for specific phase pair
148  virtual const scalarField& mDotL(const phasePairKey&) const
149  {
150  return mDotL_;
151  }
152 
153  //- Return the rate of phase-change for specific phase
154  virtual scalarField dmdt(const word&) const
155  {
156  return dmdt_;
157  }
158 
159  //- Return the enthalpy source due to phase-change for specific phase
160  virtual scalarField mDotL(const word&) const
161  {
162  return mDotL_;
163  }
164 
165  // Evaluation functions
166 
167  //- Update the coefficients associated with the patch field
168  virtual void updateCoeffs() = 0;
169 
170 
171  // I-O
172 
173  //- Write
174  virtual void write(Ostream&) const;
175 };
176 
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 } // End namespace compressible
181 } // End namespace Foam
182 
183 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
184 
185 #endif
186 
187 // ************************************************************************* //
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:129
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:153
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:141
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::mDotL
virtual scalarField mDotL(const word &) const
Return the enthalpy source due to phase-change for specific phase.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:159
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::activePhasePair
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:135
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:63
Foam::phasePairKey
Definition: phasePairKey.H:59
compressible
bool compressible
Definition: pEqn.H:3
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:123
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:147
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54