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-2025 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_("dRef", dimLength, dict, 6e-4),
83  dMax_("dMax", dimLength, dict, 0.0014),
84  dMin_("dMin", dimLength, dict, 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::Internal& Tf,
134  const volScalarField::Internal& Tsatw,
135  const volScalarField::Internal& L
136 ) const
137 {
138  return calculate(liquid.thermo().T()(), Tsatw);
139 }
140 
141 
145 (
146  const phaseModel& liquid,
147  const phaseModel& vapour,
148  const phaseModel& solid,
149  const volScalarField& Tf,
150  const volScalarField& Tsatw,
151  const volScalarField& L
152 ) const
153 {
154  return calculate(liquid.thermo().T(), Tsatw);
155 }
156 
157 
159 write
160 (
161  Ostream& os
162 ) const
163 {
165  writeEntry(os, "dRef", dRef_);
166  writeEntry(os, "dMax", dMax_);
167  writeEntry(os, "dMin", dMin_);
168 }
169 
170 
171 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
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 keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
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, GeoMesh > &distance)
Calculate distance data from patches.
addToRunTimeSelectionTable(departureDiameterModel, KocamustafaogullariIshiiDepartureDiameter, dictionary)
defineTypeNameAndDebug(KocamustafaogullariIshiiDepartureDiameter, 0)
Namespace for OpenFOAM.
const doubleScalar e
Definition: doubleScalar.H:106
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