alphatPhaseChangeWallFunctionFvPatchScalarField.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-2018 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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\*---------------------------------------------------------------------------*/
27
29#include "fvPatchFieldMapper.H"
30#include "volFields.H"
32
33// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34
35namespace Foam
36{
37namespace compressible
38{
39
40// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41
43
44// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45
46alphatPhaseChangeWallFunctionFvPatchScalarField::
47alphatPhaseChangeWallFunctionFvPatchScalarField
48(
49 const fvPatch& p,
51)
52:
53 fixedValueFvPatchScalarField(p, iF),
54 dmdt_(p.size(), 0),
55 mDotL_(p.size(), 0)
56{}
57
58
59alphatPhaseChangeWallFunctionFvPatchScalarField::
60alphatPhaseChangeWallFunctionFvPatchScalarField
61(
62 const fvPatch& p,
64 const dictionary& dict
65)
66:
67 fixedValueFvPatchScalarField(p, iF, dict),
68 dmdt_(p.size(), 0),
69 mDotL_(p.size(), 0)
70{
71 if (dict.found("dmdt"))
72 {
73 dmdt_ = scalarField("dmdt", dict, p.size());
74 }
75
76 if (dict.found("mDotL"))
77 {
78 dmdt_ = scalarField("mDotL", dict, p.size());
79 }
80}
81
82
83alphatPhaseChangeWallFunctionFvPatchScalarField::
84alphatPhaseChangeWallFunctionFvPatchScalarField
85(
87 const fvPatch& p,
89 const fvPatchFieldMapper& mapper
90)
91:
92 fixedValueFvPatchScalarField(ptf, p, iF, mapper),
93 dmdt_(ptf.dmdt_, mapper),
94 mDotL_(ptf.mDotL_, mapper)
95{}
96
97
98alphatPhaseChangeWallFunctionFvPatchScalarField::
99alphatPhaseChangeWallFunctionFvPatchScalarField
100(
102)
103:
104 fixedValueFvPatchScalarField(awfpsf),
105 dmdt_(awfpsf.dmdt_),
106 mDotL_(awfpsf.mDotL_)
107{}
108
109
110alphatPhaseChangeWallFunctionFvPatchScalarField::
111alphatPhaseChangeWallFunctionFvPatchScalarField
112(
115)
116:
117 fixedValueFvPatchScalarField(awfpsf, iF),
118 dmdt_(awfpsf.dmdt_),
119 mDotL_(awfpsf.mDotL_)
120{}
121
122
123// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
124
126write(Ostream& os) const
127{
129 dmdt_.writeEntry("dmdt", os);
130 mDotL_.writeEntry("mDotL", os);
131 writeEntry("value", os);
132}
133
134
135// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136
137} // End namespace compressible
138} // End namespace Foam
139
140// ************************************************************************* //
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:614
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
void size(const label n)
Older name for setAddressableSize.
Definition: UList.H:114
Abstract base-class for all alphatWallFunctions supporting phase-change.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
Definition: dictionaryI.H:87
virtual bool write()
Write the output fields.
A FieldMapper for finite-volume patch fields.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:71
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Definition: className.H:121
volScalarField & p
OBJstream os(runTime.globalPath()/outputName)
bool compressible
Definition: pEqn.H:2
Namespace for OpenFOAM.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dictionary dict