variableHeatTransfer.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) 2011-2015 OpenFOAM Foundation
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::fv::variableHeatTransfer
28 
29 Group
30  grpFvOptionsSources
31 
32 Description
33  Variable heat transfer model depending on local values. The area of contact
34  between regions (area) must be provided. The Nu number is calculated as:
35 
36  Nu = a*pow(Re, b)*pow(Pr, c)
37 
38  and the heat transfer coefficient as:
39 
40  htc = Nu*K/ds
41 
42  where:
43  K is the heat conduction
44  ds is the strut diameter
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef variableHeatTransfer_H
49 #define variableHeatTransfer_H
50 
52 #include "autoPtr.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace fv
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class variableHeatTransfer Declaration
63 \*---------------------------------------------------------------------------*/
64 
66 :
68 {
69 private:
70 
71  // Private data
72 
73  //- Name of neighbour velocity field; default = U
74  word UNbrName_;
75 
76  //- Model constants
77  scalar a_;
78  scalar b_;
79  scalar c_;
80 
81  //- Strut diameter
82  scalar ds_;
83 
84  //- Fluid Prandtl number
85  scalar Pr_;
86 
87  //- Area per unit volume of heat exchanger
89 
90 
91 public:
92 
93  //- Runtime type information
94  TypeName("variableHeatTransfer");
95 
96 
97  // Constructors
98 
99  //- Construct from dictionary
101  (
102  const word& name,
103  const word& modelType,
104  const dictionary& dict,
105  const fvMesh& mesh
106  );
107 
108 
109  //- Destructor
110  virtual ~variableHeatTransfer() = default;
111 
112 
113  // Public Functions
114 
115  //- Calculate the heat transfer coefficient
116  virtual void calculateHtc();
117 
118  //- Read dictionary
119  virtual bool read(const dictionary& dict);
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace fv
126 } // End namespace Foam
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 #endif
131 
132 // ************************************************************************* //
Foam::fv::variableHeatTransfer
Variable heat transfer model depending on local values. The area of contact between regions (area) mu...
Definition: variableHeatTransfer.H:64
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::fv::option::name
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:30
Foam::fv::interRegionHeatTransferModel
Base class for inter region heat exchange. The derived classes must provide the heat transfer coeffis...
Definition: interRegionHeatTransferModel.H:59
Foam::fv::variableHeatTransfer::~variableHeatTransfer
virtual ~variableHeatTransfer()=default
Destructor.
interRegionHeatTransferModel.H
Foam::fv::variableHeatTransfer::calculateHtc
virtual void calculateHtc()
Calculate the heat transfer coefficient.
Definition: variableHeatTransfer.C:98
Foam::fv::variableHeatTransfer::variableHeatTransfer
variableHeatTransfer(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
Definition: variableHeatTransfer.C:53
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::fv::variableHeatTransfer::TypeName
TypeName("variableHeatTransfer")
Runtime type information.
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
fv
labelList fv(nPoints)
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::fv::option::mesh
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:36
Foam::fv::variableHeatTransfer::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: variableHeatTransfer.C:127
autoPtr.H