All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField.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-2020 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"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace compressible
35 {
36 
37 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
38 
41 (
42  const fvPatch& p,
43  const DimensionedField<scalar, volMesh>& iF
44 )
45 :
46  alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF),
47  fixedDmdtf_(0),
48  L_(0)
49 {}
50 
51 
52 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
53 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
54 (
55  const fvPatch& p,
56  const DimensionedField<scalar, volMesh>& iF,
57  const dictionary& dict
58 )
59 :
60  alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF, dict),
61  fixedDmdtf_(dict.lookupOrDefault<scalar>("fixedDmdtf", 0)),
62  L_(dict.lookupOrDefault<scalar>("L", 0))
63 {}
64 
65 
66 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
67 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
68 (
69  const alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField& psf,
70  const fvPatch& p,
71  const DimensionedField<scalar, volMesh>& iF,
72  const fvPatchFieldMapper& mapper
73 )
74 :
75  alphatPhaseChangeWallFunctionFvPatchScalarField
76  (
77  psf,
78  p,
79  iF,
80  mapper
81  ),
82  fixedDmdtf_(psf.fixedDmdtf_),
83  L_(psf.L_)
84 {}
85 
86 
87 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
88 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
89 (
90  const alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField& psf
91 )
92 :
93  alphatPhaseChangeWallFunctionFvPatchScalarField(psf),
94  fixedDmdtf_(psf.fixedDmdtf_),
95  L_(psf.L_)
96 {}
97 
98 
99 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
100 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
101 (
102  const alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField& psf,
103  const DimensionedField<scalar, volMesh>& iF
104 )
105 :
106  alphatPhaseChangeWallFunctionFvPatchScalarField(psf, iF),
107  fixedDmdtf_(psf.fixedDmdtf_),
108  L_(psf.L_)
109 {}
110 
111 
112 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
113 
114 void alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
115 {
116  if (updated())
117  {
118  return;
119  }
120 
121  dmdtf_ = (1 - relax_)*dmdtf_ + relax_*fixedDmdtf_;
122  dmdtLf_ = dmdtf_*L_;
123 
124  operator==(calcAlphat(*this));
125 
126  fixedValueFvPatchScalarField::updateCoeffs();
127 }
128 
129 
131 (
132  Ostream& os
133 ) const
134 {
136 
137  writeEntry(os, "fixedDmdtf", fixedDmdtf_);
138  writeEntry(os, "L", L_);
139 }
140 
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
145 (
147  alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
148 );
149 
150 
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 } // End namespace compressible
154 } // End namespace Foam
155 
156 // ************************************************************************* //
dictionary dict
Macros for easy insertion into run-time selection tables.
fvPatchField< scalar > fvPatchScalarField
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
volScalarField & p
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Namespace for OpenFOAM.