localReferenceTemperature.H
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) 2017-2022 OpenCFD Ltd.
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 Class
27  Foam::heatTransferCoeffModels::localReferenceTemperature
28 
29 Description
30  Heat transfer coefficient calculation that employs
31  the patch internal field as the reference temperature.
32 
33  The heat transfer coefficient is calculated by:
34 
35  \f[
36  h = \frac{q}{T_c - T_p}
37  \f]
38 
39  where
40  \vartable
41  h | Heat transfer coefficient [W/m^2/K]
42  q | Heat flux [W/m^2]
43  T_c | Patch internal temperature field [K]
44  T_p | Patch temperature [K]
45  \endvartable
46 
47 Usage
48  Minimal example by using \c system/controlDict.functions:
49  \verbatim
50  heatTransferCoeff1
51  {
52  // Inherited entries
53  ...
54 
55  // Mandatory entries
56  htcModel localReferenceTemperature;
57  }
58  \endverbatim
59 
60  where the entries mean:
61  \table
62  Property | Description | Type | Reqd | Deflt
63  type | Model name: localReferenceTemperature | word | yes | -
64  \endtable
65 
66 SourceFiles
67  localReferenceTemperature.C
68 
69 \*---------------------------------------------------------------------------*/
70 
71 #ifndef heatTransferCoeffModels_localReferenceTemperature_H
72 #define heatTransferCoeffModels_localReferenceTemperature_H
73 
74 #include "heatTransferCoeffModel.H"
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 namespace Foam
79 {
80 namespace heatTransferCoeffModels
81 {
82 
83 /*---------------------------------------------------------------------------*\
84  Class localReferenceTemperature Declaration
85 \*---------------------------------------------------------------------------*/
86 
87 class localReferenceTemperature
88 :
89  public heatTransferCoeffModel
90 {
91 protected:
92 
93  // Protected Member Functions
94 
95  //- Set the heat transfer coefficient
96  virtual void htc
97  (
99  const FieldField<Field, scalar>& q
100  );
101 
102  //- No copy construct
104 
105  //- No copy assignment
106  void operator=(const localReferenceTemperature&) = delete;
107 
108 
109 public:
111  //- Runtime type information
112  TypeName("localReferenceTemperature");
113 
114 
115  // Constructors
116 
117  //- Construct from components
119  (
120  const dictionary& dict,
121  const fvMesh& mesh,
122  const word& TName
123  );
124 
125 
126  //- Destructor
127  virtual ~localReferenceTemperature() = default;
128 
129 
130  // Member Functions
131 
132  //- Read from dictionary
133  virtual bool read(const dictionary& dict);
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace heatTransferCoeffModels
140 } // End namespace Foam
141 
142 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 
144 #endif
145 
146 // ************************************************************************* //
localReferenceTemperature(const localReferenceTemperature &)=delete
No copy construct.
void operator=(const localReferenceTemperature &)=delete
No copy assignment.
dictionary dict
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
virtual bool read(const dictionary &dict)
Read from dictionary.
TypeName("localReferenceTemperature")
Runtime type information.
const word & TName() const noexcept
Return const reference to name of temperature field.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:81
A class for handling words, derived from Foam::string.
Definition: word.H:63
const fvMesh & mesh() const noexcept
Return const reference to the mesh.
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:79
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)
Set the heat transfer coefficient.
tmp< FieldField< Field, scalar > > q() const
Return boundary fields of heat-flux field.
virtual ~localReferenceTemperature()=default
Destructor.
Namespace for OpenFOAM.