Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
11License
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
33template<class CloudType>
37 BirdCorrection_(false)
38{}
39
40
41template<class CloudType>
43(
44 const dictionary& dict,
45 CloudType& owner,
46 const word& type
47)
50 BirdCorrection_(this->coeffDict().template get<Switch>("BirdCorrection"))
51{}
52
53
54template<class CloudType>
56(
58)
59:
61 BirdCorrection_(htm.BirdCorrection_)
62{}
63
64
65// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
66
67template<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
97
98// ************************************************************************* //
Base class for cloud sub-models.
const CloudType & owner() const
Return const access to the owner cloud.
CloudSubModelBase(CloudType &owner)
Construct null from owner cloud.
Templated class to calculate the fluid-particle heat transfer coefficients based on a specified Nusse...
virtual scalar htc(const scalar dp, const scalar Re, const scalar Pr, const scalar kappa, const scalar NCpW) const
Return heat transfer coefficient.
virtual scalar Nu(const scalar Re, const scalar Pr) const =0
Return Nusselt number.
HeatTransferModel(CloudType &owner)
Construct null from owner.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition Switch.H:81
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const dictionary & coeffDict() const
Return const access to the coefficients dictionary.
const dictionary & dict() const
Return const access to the cloud dictionary.
A class for handling words, derived from Foam::string.
Definition word.H:66
DSMCCloud< dsmcParcel > CloudType
dimensionedScalar exp(const dimensionedScalar &ds)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
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.
dictionary dict
dimensionedScalar Pr("Pr", dimless, laminarTransport)