fixedReferenceTemperature.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-2020 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::fixedReferenceTemperature
28 
29 Description
30  Heat transfer coefficient calculation that employs a fixed reference
31  temperature
32 
33  The heat transfer coefficient is specified by:
34 
35  \f[
36  h = \frac{q}{T_{ref} - T_w}
37  \f]
38 
39 Usage
40  Example of function object specification:
41  \verbatim
42  type heatTransferCoeff;
43  libs (fieldFunctionObjects);
44  ...
45  htcModel fixedReferenceTemperature;
46  TRef 300;
47  ...
48  \endverbatim
49 
50  Where the entries comprise:
51  \table
52  Property | Description | Required | Default
53  type | type name: heatTransferCoeff | yes |
54  htcModel | selected htc model | yes |
55  TRef | reference temperature | yes |
56  \endtable
57 
58 SourceFiles
59  fixedReferenceTemperature.C
60 
61 SeeAlso
62  Foam::heatTransferCoeffModel
63 
64 \*---------------------------------------------------------------------------*/
65 
66 #ifndef heatTransferCoeffModels_fixedReferenceTemperature_H
67 #define heatTransferCoeffModels_fixedReferenceTemperature_H
68 
69 #include "heatTransferCoeffModel.H"
70 
71 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
72 
73 namespace Foam
74 {
75 namespace heatTransferCoeffModels
76 {
77 
78 /*---------------------------------------------------------------------------*\
79  Class fixedReferenceTemperature Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 class fixedReferenceTemperature
83 :
84  public heatTransferCoeffModel
85 {
86 protected:
87 
88  // Protected Data
89 
90  //- Reference temperature
91  scalar TRef_;
92 
93 
94  // Protected Member Functions
95 
96  //- Set the heat transfer coefficient
97  virtual void htc
98  (
100  const FieldField<Field, scalar>& q
101  );
102 
103  //- No copy construct
105 
106  //- No copy assignment
107  void operator=(const fixedReferenceTemperature&) = delete;
108 
109 
110 public:
111 
112  //- Runtime type information
113  TypeName("fixedReferenceTemperature");
114 
115 
116  // Constructors
117 
118  //- Construct from components
120  (
121  const dictionary& dict,
122  const fvMesh& mesh,
123  const word& TName
124  );
125 
126 
127  //- Destructor
128  virtual ~fixedReferenceTemperature() = default;
129 
130 
131  // Member Functions
132 
133  //- Read from dictionary
134  virtual bool read(const dictionary& dict);
135 };
136 
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 } // End namespace heatTransferCoeffModels
141 } // End namespace Foam
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 #endif
146 
147 // ************************************************************************* //
Foam::heatTransferCoeffModel::mesh
const fvMesh & mesh() const
The mesh reference.
Definition: heatTransferCoeffModel.H:151
Foam::heatTransferCoeffModel
An abstract base class for heat transfer coeffcient models.
Definition: heatTransferCoeffModel.H:63
Foam::heatTransferCoeffModels::fixedReferenceTemperature::TypeName
TypeName("fixedReferenceTemperature")
Runtime type information.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::heatTransferCoeffModels::fixedReferenceTemperature
Heat transfer coefficient calculation that employs a fixed reference temperature.
Definition: fixedReferenceTemperature.H:101
Foam::heatTransferCoeffModels::fixedReferenceTemperature::TRef_
scalar TRef_
Reference temperature.
Definition: fixedReferenceTemperature.H:110
Foam::volScalarField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:57
Foam::heatTransferCoeffModel::TName
const word & TName() const
Temperature name.
Definition: heatTransferCoeffModel.H:163
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::heatTransferCoeffModels::fixedReferenceTemperature::htc
virtual void htc(volScalarField &htc, const FieldField< Field, scalar > &q)
Set the heat transfer coefficient.
Definition: fixedReferenceTemperature.C:83
heatTransferCoeffModel.H
Foam::heatTransferCoeffModels::fixedReferenceTemperature::operator=
void operator=(const fixedReferenceTemperature &)=delete
No copy assignment.
Foam::heatTransferCoeffModels::fixedReferenceTemperature::fixedReferenceTemperature
fixedReferenceTemperature(const fixedReferenceTemperature &)=delete
No copy construct.
Foam::heatTransferCoeffModels::fixedReferenceTemperature::~fixedReferenceTemperature
virtual ~fixedReferenceTemperature()=default
Destructor.
Foam::GeometricField< scalar, fvPatchField, volMesh >
Foam::heatTransferCoeffModels::fixedReferenceTemperature::read
virtual bool read(const dictionary &dict)
Read from dictionary.
Definition: fixedReferenceTemperature.C:67
Foam::heatTransferCoeffModel::q
tmp< FieldField< Field, scalar > > q() const
Return q boundary fields.
Definition: heatTransferCoeffModel.C:46