TolubinskiKostanchuk.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "TolubinskiKostanchuk.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace wallBoilingModels
35 {
36 namespace departureDiameterModels
37 {
40  (
44  );
45 }
46 }
47 }
48 
49 
50 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
51 
52 template<class ScalarFieldType>
54 Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk::
55 calculate
56 (
57  const ScalarFieldType& Tl,
58  const ScalarFieldType& Tsatw
59 ) const
60 {
61  auto dRef = coefficient<ScalarFieldType>::value(dRef_);
62  auto dMax = coefficient<ScalarFieldType>::value(dMax_);
63  auto dMin = coefficient<ScalarFieldType>::value(dMin_);
64 
65  const dimensionedScalar T45_(dimTemperature, 45);
66 
67  auto T45 = coefficient<ScalarFieldType>::value(T45_);
68 
69  return max(min(dRef*exp(- (Tsatw - Tl)/T45), dMax), dMin);
70 }
71 
72 
73 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
74 
77 (
78  const dictionary& dict
79 )
80 :
82  dRef_(dimensionedScalar::lookupOrDefault("dRef", dict, dimLength, 6e-4)),
83  dMax_(dimensionedScalar::lookupOrDefault("dMax", dict, dimLength, 0.0014)),
84  dMin_(dimensionedScalar::lookupOrDefault("dMin", dict, dimLength, 1e-6))
85 {}
86 
87 
90 (
91  const TolubinskiKostanchuk& model
92 )
93 :
95  dRef_(model.dRef_),
96  dMax_(model.dMax_),
97  dMin_(model.dMin_)
98 {}
99 
100 
101 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
102 
105 {}
106 
107 
108 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
109 
113 (
114  const phaseModel& liquid,
115  const phaseModel& vapour,
116  const label patchi,
117  const scalarField& Tl,
118  const scalarField& Tsatw,
119  const scalarField& L
120 ) const
121 {
122  return calculate(Tl, Tsatw);
123 }
124 
125 
129 (
130  const phaseModel& liquid,
131  const phaseModel& vapour,
132  const phaseModel& solid,
133  const volScalarField& Tf,
134  const volScalarField& Tsatw,
135  const volScalarField& L
136 ) const
137 {
138  return calculate(liquid.thermo().T(), Tsatw);
139 }
140 
141 
143 write
144 (
145  Ostream& os
146 ) const
147 {
149  writeEntry(os, "dRef", dRef_);
150  writeEntry(os, "dMax", dMax_);
151  writeEntry(os, "dMin", dMin_);
152 }
153 
154 
155 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Generic thermophysical properties class for a liquid in which the functions and coefficients for each...
Definition: liquid.H:53
A class for managing temporary objects.
Definition: tmp.H:55
Base class for bubble departure diameter models.
virtual void write(Ostream &os) const
Write to stream.
Tolubinski-Kostanchuk correlation for bubble departure diameter.
TolubinskiKostanchuk(const dictionary &dict)
Construct from a dictionary.
virtual tmp< scalarField > dDeparture(const phaseModel &liquid, const phaseModel &vapour, const label patchi, const scalarField &Tl, const scalarField &Tsatw, const scalarField &L) const
Calculate and return the departure diameter field for a wall patch.
label patchi
label calculate(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction, GeometricField< scalar, PatchField, GeoMesh > &distance)
Calculate distance data from patches.
addToRunTimeSelectionTable(departureDiameterModel, KocamustafaogullariIshiiDepartureDiameter, dictionary)
defineTypeNameAndDebug(KocamustafaogullariIshiiDepartureDiameter, 0)
Namespace for OpenFOAM.
const doubleScalar e
Definition: doubleScalar.H:105
dimensionedScalar exp(const dimensionedScalar &ds)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
const dimensionSet dimLength
const dimensionSet dimTemperature
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dictionary dict