externalWallLayersHeatTransferCoefficient_DimensionedFieldFunction.H
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 Class
25  Foam::DimensionedFieldFunctions::externalWallLayersHeatTransferCoefficient
26 
27 Description
28  Runtime selectable DimensionedFieldFunction providing the heat transfer
29  coefficient for a number of layers of conductive materials.
30 
31  Typically used to provide the thermal resistance or insulation layers with
32  the Foam::externalTemperatureFvPatchScalarField boundary condition.
33 
34 Usage
35  \table
36  Property | Description | Required | Default value
37  h | Heat transfer coefficient [W/m^2/K] | yes |
38  thicknessLayers | list of thicknesses per layer [m] | yes |
39  kappaLayers | list of thermal conductivities per layer [W/m/K] | yes |
40  \endtable
41 
42  Example of the boundary condition specification:
43  \verbatim
44  <patchName>
45  {
46  type externalTemperature;
47 
48  Ta constant 300.0;
49 
50  h
51  {
52  type externalWallLayersHeatTransferCoefficient;
53 
54  h 10.0;
55  thicknessLayers (0.1 0.2 0.3 0.4);
56  kappaLayers (1 2 3 4);
57  }
58 
59  value $internalField;
60  }
61  \endverbatim
62 
63 SourceFiles
64  externalWallLayersHeatTransferCoefficient_DimensionedFieldFunction.C
65 
66 \*---------------------------------------------------------------------------*/
67 
68 #ifndef externalWallLayersHeatTransferCoefficient_DimensionedFieldFunction_H
69 #define externalWallLayersHeatTransferCoefficient_DimensionedFieldFunction_H
70 
72 
73 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
74 
75 namespace Foam
76 {
77 namespace DimensionedFieldFunctions
78 {
79 
80 /*---------------------------------------------------------------------------*\
81  Class externalWallLayersHeatTransferCoefficient Declaration
82 \*---------------------------------------------------------------------------*/
83 
84 class externalWallLayersHeatTransferCoefficient
85 :
86  public wallLayersHeatTransferCoefficient
87 {
88  // Private Data
89 
90  //- External heat transfer coefficient [W/m^2K]
91  scalar h_;
92 
93 
94 public:
95 
96  //- Runtime type information
97  TypeName("externalWallLayersHeatTransferCoefficient");
98 
99 
100  // Constructors
101 
102  //- Construct with dictionary to initialise given field
104  (
105  const dictionary& dict,
107  );
108 
109  //- Construct a copy for the given field
111  (
114  );
115 
116  //- Construct and return a clone for the specified field
117  virtual
120 
121 
122  //- Destructor
124  {}
125 
126 
127  // Member Functions
128 
129  //- Evaluate the function and set the field
130  virtual void evaluate();
131 
132  //- Write data to dictionary stream
133  virtual void write(Ostream& os) const;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace DimensionedFieldFunctions
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
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.
TypeName("externalWallLayersHeatTransferCoefficient")
Runtime type information.
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
Namespace for OpenFOAM.
dictionary dict