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) 2011-2015 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 \*---------------------------------------------------------------------------*/
25 
26 #include "HeatTransferModel.H"
27 
28 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
29 
30 template<class CloudType>
32 :
34  BirdCorrection_(false)
35 {}
36 
37 
38 template<class CloudType>
40 (
41  const dictionary& dict,
42  CloudType& owner,
43  const word& type
44 )
45 :
47  BirdCorrection_(this->coeffDict().lookup("BirdCorrection"))
48 {}
49 
50 
51 template<class CloudType>
53 (
55 )
56 :
58  BirdCorrection_(htm.BirdCorrection_)
59 {}
60 
61 
62 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
63 
64 template<class CloudType>
66 {}
67 
68 
69 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70 
71 template<class CloudType>
73 {
74  return BirdCorrection_;
75 }
76 
77 
78 template<class CloudType>
80 (
81  const scalar dp,
82  const scalar Re,
83  const scalar Pr,
84  const scalar kappa,
85  const scalar NCpW
86 ) const
87 {
88  const scalar Nu = this->Nu(Re, Pr);
89 
90  scalar htc = Nu*kappa/dp;
91 
92  if (BirdCorrection_ && (mag(htc) > ROOTVSMALL) && (mag(NCpW) > ROOTVSMALL))
93  {
94  const scalar phit = min(NCpW/htc, 50);
95  if (phit > 0.001)
96  {
97  htc *= phit/(exp(phit) - 1.0);
98  }
99  }
100 
101  return htc;
102 }
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 #include "HeatTransferModelNew.C"
108 
109 // ************************************************************************* //
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
Templated heat transfer model class.
Definition: ThermoCloud.H:53
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual ~HeatTransferModel()
Destructor.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
Definition: Switch.H:60
Base class for cloud sub-models.
const Switch & BirdCorrection() const
Return the Bird htc correction flag.
virtual scalar htc(const scalar dp, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW) const
Return heat transfer coefficient.
dimensionedScalar exp(const dimensionedScalar &ds)
A class for handling words, derived from string.
Definition: word.H:59
HeatTransferModel(CloudType &owner)
Construct null from owner.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
fileName::Type type(const fileName &)
Return the file type: DIRECTORY or FILE.
Definition: POSIX.C:461
dimensioned< scalar > mag(const dimensioned< Type > &)
const CloudType & owner() const
Return const access to the owner cloud.
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
Definition: subModelBase.C:128
virtual scalar Nu(const scalar Re, const scalar Pr) const =0
Nusselt number.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Definition: dictionary.C:451