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 -------------------------------------------------------------------------------
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 \*---------------------------------------------------------------------------*/
27 
29 #include "fvPatchFieldMapper.H"
30 #include "volFields.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 namespace Foam
36 {
37 namespace compressible
38 {
39 
40 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
41 
42 defineTypeNameAndDebug(alphatPhaseChangeWallFunctionFvPatchScalarField, 0);
43 
44 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
45 
48 (
49  const fvPatch& p,
51 )
52 :
53  fixedValueFvPatchScalarField(p, iF),
54  dmdt_(p.size(), 0),
55  mDotL_(p.size(), 0)
56 {}
57 
58 
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 
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 
100 (
102 )
103 :
104  fixedValueFvPatchScalarField(awfpsf),
105  dmdt_(awfpsf.dmdt_),
106  mDotL_(awfpsf.mDotL_)
107 {}
108 
109 
112 (
115 )
116 :
117  fixedValueFvPatchScalarField(awfpsf, iF),
118  dmdt_(awfpsf.dmdt_),
119  mDotL_(awfpsf.mDotL_)
120 {}
121 
122 
123 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
124 
126 write(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 // ************************************************************************* //
volFields.H
Foam::fvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:384
Foam::scalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Definition: primitiveFieldsFwd.H:52
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::dmdt_
scalarField dmdt_
Rate of phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:109
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField
Abstract base-class for all alphatWallFunctions supporting phase-change.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.H:100
fvPatchFieldMapper.H
Foam::compressible::alphatPhaseChangeWallFunctionFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: alphatPhaseChangeWallFunctionFvPatchScalarField.C:126
alphatPhaseChangeWallFunctionFvPatchScalarField.H
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
compressible
bool compressible
Definition: pEqn.H:2
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
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:112
Foam::Field::writeEntry
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition: Field.C:608
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::compressible::defineTypeNameAndDebug
defineTypeNameAndDebug(alphatPhaseChangeWallFunctionFvPatchScalarField, 0)
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54