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 // ************************************************************************* //
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
dimensionedScalar Pr("Pr", dimless, laminarTransport)
dictionary dict
type
Types of root.
Definition: Roots.H:52
Templated class to calculate the fluid-particle heat transfer coefficients based on a specified Nusse...
Definition: ThermoCloud.H:55
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, any/none. Also accepts 0/1 as a string and shortcuts t/f, y/n.
Definition: Switch.H:77
Base class for cloud sub-models.
const dimensionedScalar kappa
Coulomb constant: default SI units: [N.m2/C2].
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 Foam::string.
Definition: word.H:63
HeatTransferModel(CloudType &owner)
Construct null from owner.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:26
scalarField Re(const UList< complex > &cmplx)
Extract real component.
Definition: complexField.C:207
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67