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 | Copyright (C) 2015-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
27 #include "fvPatchFieldMapper.H"
28 #include "volFields.H"
30 
31 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace compressible
36 {
37 
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 
40 defineTypeNameAndDebug(alphatPhaseChangeWallFunctionFvPatchScalarField,0);
41 
42 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
43 
46 (
47  const fvPatch& p,
49 )
50 :
51  fixedValueFvPatchScalarField(p, iF),
52  dmdt_(p.size(), 0),
53  mDotL_(p.size(), 0)
54 {}
55 
56 
59 (
60  const fvPatch& p,
62  const dictionary& dict
63 )
64 :
65  fixedValueFvPatchScalarField(p, iF, dict),
66  dmdt_(p.size(), 0),
67  mDotL_(p.size(), 0)
68 {
69  if (dict.found("dmdt"))
70  {
71  dmdt_ = scalarField("dmdt", dict, p.size());
72  }
73 
74  if (dict.found("mDotL"))
75  {
76  dmdt_ = scalarField("mDotL", dict, p.size());
77  }
78 }
79 
80 
83 (
85  const fvPatch& p,
87  const fvPatchFieldMapper& mapper
88 )
89 :
90  fixedValueFvPatchScalarField(ptf, p, iF, mapper),
91  dmdt_(ptf.dmdt_, mapper),
92  mDotL_(ptf.mDotL_, mapper)
93 {}
94 
95 
98 (
100 )
101 :
102  fixedValueFvPatchScalarField(awfpsf),
103  dmdt_(awfpsf.dmdt_),
104  mDotL_(awfpsf.mDotL_)
105 {}
106 
107 
110 (
113 )
114 :
115  fixedValueFvPatchScalarField(awfpsf, iF),
116  dmdt_(awfpsf.dmdt_),
117  mDotL_(awfpsf.mDotL_)
118 {}
119 
120 
121 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
122 
124 {
126  dmdt_.writeEntry("dmdt", os);
127  mDotL_.writeEntry("mDotL", os);
128  writeEntry("value", os);
129 }
130 
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 } // End namespace compressible
135 } // End namespace Foam
136 
137 // ************************************************************************* //
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Definition: dictionary.C:431
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition: Field.C:726
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:362
Macros for easy insertion into run-time selection tables.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Foam::fvPatchFieldMapper.
Abstract base-class for all alphatWallFunctions supporting phase-change.
virtual label size() const
Return size.
Definition: fvPatch.H:161
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:53
alphatPhaseChangeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
defineTypeNameAndDebug(alphatPhaseChangeWallFunctionFvPatchScalarField, 0)
Namespace for OpenFOAM.
bool compressible
Definition: pEqn.H:30