constant.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) 2011-2023 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::fv::heatTransferCoefficientModels::constant
26 
27 Description
28  Constant heat transfer model. The heat transfer coefficient [W/m^2/K] (htc)
29  must be provided as a value in the coefficients dictionary or as a field in
30  constant.
31 
32 Usage
33  Example usage:
34  \verbatim
35  {
36  heatTransferCoefficientModel constant;
37 
38  htc 1e5;
39  }
40  \endverbatim
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef constant_H
45 #define constant_H
46 
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 namespace fv
54 {
55 namespace heatTransferCoefficientModels
56 {
57 
58 /*---------------------------------------------------------------------------*\
59  Class constant Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 class constant
63 :
65 {
66  // Private Data
67 
68  //- Heat transfer coefficient [W/m^2/K]
69  dimensionedScalar htc_;
70 
71  //- Heat transfer coefficient [W/m^2/K]
73 
74 
75  // Private Member Functions
76 
77  //- Non-virtual read
78  void readCoeffs(const dictionary& dict);
79 
80 
81 public:
82 
83  //- Runtime type information
84  TypeName("constant");
85 
86 
87  // Constructors
88 
89  //- Construct from dictionary and mesh
90  constant(const dictionary& dict, const fvMesh& mesh);
91 
92  //- Construct from dictionary and model
93  constant(const dictionary& dict, const interRegionModel& model);
94 
95 
96  //- Destructor
97  virtual ~constant();
98 
99 
100  // Member Functions
101 
102  //- Get the heat transfer coefficient
103  virtual tmp<volScalarField> htc() const;
104 
105  //- Correct the heat transfer coefficient
106  virtual void correct();
107 
108  //- Read dictionary
109  virtual bool read(const dictionary& dict);
110 };
111 
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 } // End namespace heatTransferCoefficientModels
116 } // End namespace fv
117 } // End namespace Foam
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #endif
122 
123 // ************************************************************************* //
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 keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Base class for heat transfer coefficient modelling used in heat transfer fvModels.
Constant heat transfer model. The heat transfer coefficient [W/m^2/K] (htc) must be provided as a val...
Definition: constant.H:64
virtual void correct()
Correct the heat transfer coefficient.
Definition: constant.C:137
virtual bool read(const dictionary &dict)
Read dictionary.
Definition: constant.C:142
constant(const dictionary &dict, const fvMesh &mesh)
Construct from dictionary and mesh.
Definition: constant.C:92
TypeName("constant")
Runtime type information.
virtual tmp< volScalarField > htc() const
Get the heat transfer coefficient.
Definition: constant.C:124
Base class for inter-region exchange.
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.
labelList fv(nPoints)
dictionary dict