alphatPhaseChangeWallFunctionFvPatchScalarField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2015-2019 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,
48  const DimensionedField<scalar, volMesh>& iF
49 )
50 :
51  fixedValueFvPatchScalarField(p, iF),
52  dmdt_(p.size(), 0),
53  mDotL_(p.size(), 0)
54 {}
55 
56 
59 (
60  const fvPatch& p,
61  const DimensionedField<scalar, volMesh>& iF,
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,
86  const DimensionedField<scalar, volMesh>& iF,
87  const fvPatchFieldMapper& mapper
88 )
89 :
90  fixedValueFvPatchScalarField(ptf, p, iF, mapper),
91  dmdt_(mapper(ptf.dmdt_)),
92  mDotL_(mapper(ptf.mDotL_))
93 {}
94 
95 
98 (
100 )
101 :
102  fixedValueFvPatchScalarField(awfpsf),
103  dmdt_(awfpsf.dmdt_),
104  mDotL_(awfpsf.mDotL_)
105 {}
106 
107 
110 (
112  const DimensionedField<scalar, volMesh>& iF
113 )
114 :
115  fixedValueFvPatchScalarField(awfpsf, iF),
116  dmdt_(awfpsf.dmdt_),
117  mDotL_(awfpsf.mDotL_)
118 {}
119 
120 
121 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
122 
124 write(Ostream& os) const
125 {
127  writeEntry(os, "dmdt", dmdt_);
128  writeEntry(os, "mDotL", mDotL_);
129  writeEntry(os, "value", *this);
130 }
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace compressible
136 } // End namespace Foam
137 
138 // ************************************************************************* //
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:280
Macros for easy insertion into run-time selection tables.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
defineTypeNameAndDebug(combustionModel, 0)
alphatPhaseChangeWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
Namespace for OpenFOAM.