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>
35:
37 BirdCorrection_(false)
38{}
39
40
41template<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
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.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Templated class to calculate the fluid-particle heat transfer coefficients based on a specified Nusse...
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:78
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling words, derived from Foam::string.
Definition: word.H:68
dimensionedScalar exp(const dimensionedScalar &ds)
scalarField Re(const UList< complex > &cf)
Extract real component.
Definition: complexField.C:159
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
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:33
dictionary dict
dimensionedScalar Pr("Pr", dimless, laminarTransport)