Loading...
Searching...
No Matches
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField.C
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-2019 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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\*---------------------------------------------------------------------------*/
28
32
33// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34
35namespace Foam
36{
37namespace compressible
38{
39
40// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
41
44(
45 const fvPatch& p,
47)
48:
50 vaporPhaseName_("vapor"),
51 relax_(1.0),
66:
68 vaporPhaseName_(dict.get<word>("vaporPhase")),
69 relax_(dict.getOrDefault<scalar>("relax", 1)),
70 fixedDmdt_(dict.getOrDefault<scalar>("fixedDmdt", 0)),
71 L_(dict.getOrDefault<scalar>("L", 0))
72{}
73
74
77(
79 const fvPatch& p,
81 const fvPatchFieldMapper& mapper
82)
83:
85 (
86 psf,
87 p,
88 iF,
89 mapper
90 ),
91 vaporPhaseName_(psf.vaporPhaseName_),
92 relax_(psf.relax_),
93 fixedDmdt_(psf.fixedDmdt_),
94 L_(psf.L_)
95{}
96
97
100(
102)
103:
105 vaporPhaseName_(psf.vaporPhaseName_),
106 relax_(psf.relax_),
107 fixedDmdt_(psf.fixedDmdt_),
108 L_(psf.L_)
109{}
110
111
114(
117)
118:
120 vaporPhaseName_(psf.vaporPhaseName_),
121 relax_(psf.relax_),
122 fixedDmdt_(psf.fixedDmdt_),
123 L_(psf.L_)
124{}
125
126
127// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
128
131{
132 if (phasePair == phasePairKey(vaporPhaseName_, internalField().group()))
133 {
134 return true;
135 }
136
137 return false;
138}
139
140
142dmdt(const phasePairKey& phasePair) const
143{
145 {
146 return dmdt_;
147 }
148
150 << " dmdt requested for invalid phasePair!"
151 << abort(FatalError);
152
153 return mDotL_;
154}
155
156
158mDotL(const phasePairKey& phasePair) const
159{
161 {
162 return mDotL_;
163 }
164
166 << " mDotL requested for invalid phasePair!"
167 << abort(FatalError);
168
169 return mDotL_;
170}
171
172
174{
175 if (updated())
176 {
177 return;
178 }
179
180 dmdt_ *= (scalar(1) - relax_);
181 dmdt_ += relax_*fixedDmdt_;
182
183 mDotL_ = dmdt_*L_;
185 operator==(calcAlphat(*this));
186
187 fixedValueFvPatchScalarField::updateCoeffs();
188}
189
190
192(
193 Ostream& os
194) const
195{
197 os.writeEntry("vaporPhase", vaporPhaseName_);
198 os.writeEntry("relax", relax_);
199 os.writeEntry("fixedDmdt", fixedDmdt_);
200 os.writeEntry("L", L_);
203}
204
205
206// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207
209(
211 alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField
212);
213
214
215// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
216
217} // End namespace compressible
218} // End namespace Foam
219
220// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition Field.C:754
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A simple alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField with a fixed volumetric phase-cha...
virtual bool activePhasePair(const phasePairKey &) const
Is there phase change mass transfer for this phasePair.
alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
This boundary condition provides a thermal wall function for turbulent thermal diffusivity (usuallyal...
tmp< scalarField > calcAlphat(const scalarField &prevAlphat) const
Update turbulent thermal diffusivity.
alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
virtual const scalarField & mDotL() const
Return the enthalpy source due to phase-change.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
A FieldMapper for finite-volume patch fields.
virtual void write(Ostream &) const
Write.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition fvPatch.H:71
An ordered or unorder pair of phase names. Typically specified as follows.
Description for mass transfer between a pair of phases. The direction of the mass transfer is from th...
Definition phasePair.H:52
A class for handling words, derived from Foam::string.
Definition word.H:66
volScalarField & p
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition error.H:600
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
Define a concrete fvPatchField type and add to run-time tables Example, (fvPatchScalarField,...
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
errorManip< error > abort(error &err)
Definition errorManip.H:139
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
fvPatchField< scalar > fvPatchScalarField
dictionary dict