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 {}
49 
50 
51 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
52 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
53 (
54  const fvPatch& p,
55  const DimensionedField<scalar, volMesh>& iF,
56  const dictionary& dict
57 )
58 :
59  alphatPhaseChangeWallFunctionFvPatchScalarField(p, iF, dict),
60  fixedDmdtf_(dict.lookupOrDefault<scalar>("fixedDmdtf", 0))
61 {}
62 
63 
64 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
65 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
66 (
67  const alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField& psf,
68  const fvPatch& p,
69  const DimensionedField<scalar, volMesh>& iF,
70  const fvPatchFieldMapper& mapper
71 )
72 :
73  alphatPhaseChangeWallFunctionFvPatchScalarField
74  (
75  psf,
76  p,
77  iF,
78  mapper
79  ),
80  fixedDmdtf_(psf.fixedDmdtf_)
81 {}
82 
83 
84 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::
85 alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
86 (
87  const alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField& psf,
88  const DimensionedField<scalar, volMesh>& iF
89 )
90 :
91  alphatPhaseChangeWallFunctionFvPatchScalarField(psf, iF),
92  fixedDmdtf_(psf.fixedDmdtf_)
93 {}
94 
95 
96 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
97 
98 void alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
99 {
100  if (updated())
101  {
102  return;
103  }
104 
105  dmdtf_ = (1 - relax_)*dmdtf_ + relax_*fixedDmdtf_;
106 
107  operator==(calcAlphat(*this));
108 
109  fixedValueFvPatchScalarField::updateCoeffs();
110 }
111 
112 
114 (
115  Ostream& os
116 ) const
117 {
119 
120  writeEntry(os, "fixedDmdtf", fixedDmdtf_);
121 }
122 
123 
124 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
125 
127 (
129  alphatFixedDmdtfWallBoilingWallFunctionFvPatchScalarField
130 );
131 
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 } // End namespace compressible
136 } // End namespace Foam
137 
138 // ************************************************************************* //
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.