externalWallLayersHeatTransferCoefficient_DimensionedFieldFunction.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) 2026 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 "DimensionedFields.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace DimensionedFieldFunctions
35 {
37  (
39  0
40  );
41 
45  (
49  );
50 }
51 }
52 
53 
54 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
55 
59 (
60  const dictionary& dict,
62 )
63 :
65  h_(dict.lookup<scalar>("h", dimPower/dimArea/dimTemperature))
66 {}
67 
68 
72 (
75 )
76 :
78  h_(dff.h_)
79 {}
80 
81 
83 <
85  <
87  >
88 >
90 clone
91 (
93 ) const
94 {
96  (
98  (
99  *this,
100  field
101  )
102  );
103 }
104 
105 
106 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
107 
110 {
112  this->field_.primitiveFieldRef() =
113  1/(1/h_ + 1/this->field_.primitiveField());
114 }
115 
116 
119 (
120  Ostream& os
121 ) const
122 {
124  writeEntry(os, "h", h_);
125 }
126 
127 
128 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Base class for run-time selectable internal and patch field initialisation evaluation and update with...
virtual autoPtr< DimensionedFieldFunction< DimensionedField< scalar, fvPatch > > > clone() const
Construct and return a clone for the specified field.
Runtime selectable DimensionedFieldFunction providing the heat transfer coefficient for a number of l...
externalWallLayersHeatTransferCoefficient(const dictionary &dict, DimensionedField< scalar, fvPatch > &field)
Construct with dictionary to initialise given field.
Runtime selectable DimensionedFieldFunction providing the heat transfer coefficient for a number of l...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
defineTypeNameAndDebug(externalWallLayersHeatTransferCoefficient, 0)
DimensionedFieldFunction< DimensionedField< scalar, fvPatch > > DimensionedFieldFunctionScalarFvPatch
addToRunTimeSelectionTable(DimensionedFieldFunctionScalarFvPatch, externalWallLayersHeatTransferCoefficient, dictionary)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
Definition: units.C:346
Namespace for OpenFOAM.
const dimensionSet & dimPower
Definition: dimensions.C:161
const dimensionSet & dimArea
Definition: dimensions.C:149
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
const dimensionSet & dimTemperature
Definition: dimensions.C:143
dictionary dict