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 | 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 \*---------------------------------------------------------------------------*/
27 
28 #include "HeatTransferModel.H"
29 
30 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
31 
32 template<class CloudType>
34 :
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  CloudSubModelBase<CloudType>(owner, dict, typeName, type),
49  BirdCorrection_(this->coeffDict().lookup("BirdCorrection"))
50 {}
51 
52 
53 template<class CloudType>
55 (
57 )
58 :
60  BirdCorrection_(htm.BirdCorrection_)
61 {}
62 
63 
64 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
65 
66 template<class CloudType>
68 {}
69 
70 
71 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
72 
73 template<class CloudType>
75 (
76  const scalar dp,
77  const scalar Re,
78  const scalar Pr,
79  const scalar kappa,
80  const scalar NCpW
81 ) const
82 {
83  const scalar Nu = this->Nu(Re, Pr);
84 
85  scalar htc = Nu*kappa/dp;
86 
87  if (BirdCorrection_ && (mag(htc) > ROOTVSMALL) && (mag(NCpW) > ROOTVSMALL))
88  {
89  const scalar phit = min(NCpW/htc, 50);
90  if (phit > 0.001)
91  {
92  htc *= phit/(exp(phit) - 1.0);
93  }
94  }
95 
96  return htc;
97 }
98 
99 
100 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
101 
102 #include "HeatTransferModelNew.C"
103 
104 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::HeatTransferModel::HeatTransferModel
HeatTransferModel(CloudType &owner)
Construct null from owner.
Definition: HeatTransferModel.C:33
Foam::HeatTransferModel::~HeatTransferModel
virtual ~HeatTransferModel()
Destructor.
Definition: HeatTransferModel.C:67
HeatTransferModelNew.C
Foam::CloudSubModelBase
Base class for cloud sub-models.
Definition: CloudSubModelBase.H:51
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:261
Foam::constant::electromagnetic::kappa
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Foam::HeatTransferModel
Templated heat transfer model class.
Definition: ThermoCloud.H:59
Pr
dimensionedScalar Pr("Pr", dimless, laminarTransport)
Foam::radiation::lookup
Lookup type of boundary radiation properties.
Definition: lookup.H:63
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:71
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::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
HeatTransferModel.H
Foam::Re
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
Foam::roots::type
type
Types of root.
Definition: Roots.H:54
Foam::HeatTransferModel::htc
virtual scalar htc(const scalar dp, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW) const
Return heat transfer coefficient.
Definition: HeatTransferModel.C:75