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  return BirdCorrection_;
77 }
78 
79 
80 template<class CloudType>
82 (
83  const scalar dp,
84  const scalar Re,
85  const scalar Pr,
86  const scalar kappa,
87  const scalar NCpW
88 ) const
89 {
90  const scalar Nu = this->Nu(Re, Pr);
91 
92  scalar htc = Nu*kappa/dp;
93 
94  if (BirdCorrection_ && (mag(htc) > ROOTVSMALL) && (mag(NCpW) > ROOTVSMALL))
95  {
96  const scalar phit = min(NCpW/htc, 50);
97  if (phit > 0.001)
98  {
99  htc *= phit/(exp(phit) - 1.0);
100  }
101  }
102 
103  return htc;
104 }
105 
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #include "HeatTransferModelNew.C"
110 
111 // ************************************************************************* //
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:70
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:58
Foam::cellModeller::lookup
const cellModel * lookup(const word &modelName)
Deprecated(2017-11) equivalent to cellModel::ptr static method.
Definition: cellModeller.H:46
Pr
dimensionedScalar Pr("Pr", dimless, laminarTransport)
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:82
Foam::HeatTransferModel::BirdCorrection
const Switch & BirdCorrection() const
Return the Bird htc correction flag.
Definition: HeatTransferModel.C:74