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  Copyright (C) 2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "HeatTransferModel.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class CloudType>
35 :
37  BirdCorrection_(false)
38 {}
39 
40 
41 template<class CloudType>
43 (
44  const dictionary& dict,
45  CloudType& owner,
46  const word& type
47 )
48 :
49  CloudSubModelBase<CloudType>(owner, dict, typeName, type),
50  BirdCorrection_(this->coeffDict().template get<Switch>("BirdCorrection"))
51 {}
52 
53 
54 template<class CloudType>
56 (
58 )
59 :
61  BirdCorrection_(htm.BirdCorrection_)
62 {}
63 
64 
65 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66 
67 template<class CloudType>
69 (
70  const scalar dp,
71  const scalar Re,
72  const scalar Pr,
73  const scalar kappa,
74  const scalar NCpW
75 ) const
76 {
77  const scalar Nu = this->Nu(Re, Pr);
78 
79  scalar htc = Nu*kappa/dp;
80 
81  if (BirdCorrection_ && (mag(htc) > ROOTVSMALL) && (mag(NCpW) > ROOTVSMALL))
82  {
83  const scalar phit = min(NCpW/htc, 50);
84  if (phit > 0.001)
85  {
86  htc *= phit/(exp(phit) - 1.0);
87  }
88  }
89 
90  return htc;
91 }
92 
93 
94 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
95 
96 #include "HeatTransferModelNew.C"
97 
98 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::HeatTransferModel::HeatTransferModel
HeatTransferModel(CloudType &owner)
Construct null from owner.
Definition: HeatTransferModel.C:34
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 class to calculate the fluid-particle heat transfer coefficients based on a specified Nusse...
Definition: ThermoCloud.H:59
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:123
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:69