constantHeatTransfer.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  Copyright (C) 2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::fv::constantHeatTransfer
29 
30 Group
31  grpFvOptionsSources
32 
33 Description
34  Applies a constant heat transfer model for inter-region heat exchanges.
35 
36  Required fields:
37  \verbatim
38  htcConst | Constant heat transfer coefficient [W/m2/K]
39  AoV | Area per unit volume of heat exchanger [1/m]
40  \endverbatim
41 
42 Usage
43  Minimal example by using \c constant/fvOptions:
44  \verbatim
45  constantHeatTransfer1
46  {
47  // Mandatory entries (unmodifiable)
48  type constantHeatTransfer;
49 
50  // Mandatory/Optional (inherited) entries
51  ...
52  }
53  \endverbatim
54 
55  where the entries mean:
56  \table
57  Property | Description | Type | Reqd | Dflt
58  type | Type name: constantHeatTransfer | word | yes | -
59  \endtable
60 
61  The inherited entries are elaborated in:
62  - \link interRegionHeatTransfer.H \endlink
63 
64 See also
65  - Foam::fv::interRegionHeatTransferModel
66  - Foam::fv::tabulatedHeatTransfer
67  - Foam::fv::tabulatedNTUHeatTransfer
68  - Foam::fv::variableHeatTransfer
69 
70 SourceFiles
71  constantHeatTransfer.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef constantHeatTransfer_H
76 #define constantHeatTransfer_H
77 
79 #include "autoPtr.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace fv
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class constantHeatTransfer Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class constantHeatTransfer
93 :
94  public interRegionHeatTransferModel
95 {
96  // Private Data
97 
98  //- Constant heat transfer coefficient [W/m2/K]
99  autoPtr<volScalarField> htcConst_;
100 
101  //- Area per unit volume of heat exchanger [1/m]
102  autoPtr<volScalarField> AoV_;
103 
104 
105 public:
106 
107  //- Runtime type information
108  TypeName("constantHeatTransfer");
109 
110 
111  // Constructors
112 
113  //- Construct from components
115  (
116  const word& name,
117  const word& modelType,
118  const dictionary& dict,
119  const fvMesh& mesh
120  );
121 
122  //- No copy construct
124 
125  //- No copy assignment
126  void operator=(const constantHeatTransfer&) = delete;
127 
128 
129  //- Destructor
130  virtual ~constantHeatTransfer() = default;
131 
132 
133  // Public Functions
134 
135  //- Calculate the heat transfer coefficient
136  virtual void calculateHtc();
137 
138  //- Read dictionary
139  virtual bool read(const dictionary& dict);
140 };
141 
142 
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
144 
145 } // End namespace fv
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
Foam::fv::constantHeatTransfer
Applies a constant heat transfer model for inter-region heat exchanges.
Definition: constantHeatTransfer.H:103
Foam::fv::option::name
const word & name() const noexcept
Return const access to the source name.
Definition: fvOptionI.H:31
Foam::fv::constantHeatTransfer::~constantHeatTransfer
virtual ~constantHeatTransfer()=default
Destructor.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::fv::constantHeatTransfer::TypeName
TypeName("constantHeatTransfer")
Runtime type information.
Foam::fv::interRegionHeatTransferModel
Intermediate class for handling inter-region heat exchanges.
Definition: interRegionHeatTransferModel.H:142
Foam::fv::constantHeatTransfer::operator=
void operator=(const constantHeatTransfer &)=delete
No copy assignment.
interRegionHeatTransferModel.H
Foam::fv::constantHeatTransfer::read
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: constantHeatTransfer.C:103
Foam::fv::constantHeatTransfer::calculateHtc
virtual void calculateHtc()
Calculate the heat transfer coefficient.
Definition: constantHeatTransfer.C:99
Foam::fv::constantHeatTransfer::constantHeatTransfer
constantHeatTransfer(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Definition: constantHeatTransfer.C:47
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:123
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
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 noexcept
Return const access to the mesh database.
Definition: fvOptionI.H:37
autoPtr.H