FreeFOAM The Cross-Platform CFD Toolkit
HeatTransferModel.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
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 \*---------------------------------------------------------------------------*/
25 
26 #include "HeatTransferModel.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class CloudType>
32 :
33  dict_(dictionary::null),
34  owner_(owner),
35  coeffDict_(dictionary::null),
36  BirdCorrection_(false)
37 {}
38 
39 
40 template<class CloudType>
42 (
43  const dictionary& dict,
44  CloudType& owner,
45  const word& type
46 )
47 :
48  dict_(dict),
49  owner_(owner),
50  coeffDict_(dict.subDict(type + "Coeffs")),
51  BirdCorrection_(coeffDict_.lookup("BirdCorrection"))
52 {}
53 
54 
55 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
56 
57 template<class CloudType>
59 {}
60 
61 
62 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
63 
64 template<class CloudType>
66 {
67  return owner_;
68 }
69 
70 
71 template<class CloudType>
73 {
74  return dict_;
75 }
76 
77 
78 template<class CloudType>
80 {
81  return coeffDict_;
82 }
83 
84 
85 template<class CloudType>
87 {
88  return BirdCorrection_;
89 }
90 
91 
92 template<class CloudType>
94 (
95  const scalar dp,
96  const scalar Re,
97  const scalar Pr,
98  const scalar kappa,
99  const scalar NCpW
100 ) const
101 {
102  const scalar Nu = this->Nu(Re, Pr);
103 
104  scalar htc = Nu*kappa/dp;
105 
106  if (BirdCorrection_ && (mag(htc) > ROOTVSMALL) && (mag(NCpW) > ROOTVSMALL))
107  {
108  const scalar phit = min(NCpW/htc, 50);
109  if (phit > 0.001)
110  {
111  htc *= phit/(exp(phit) - 1.0);
112  }
113  }
114 
115  return htc;
116 }
117 
118 
119 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
120 
121 #include "NewHeatTransferModel.C"
122 
123 
124 // ************************ vim: set sw=4 sts=4 et: ************************ //
125