LemmertChawla.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 "LemmertChawla.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace wallBoilingModels
35 {
36 namespace nucleationSiteModels
37 {
40  (
44  );
45 }
46 }
47 }
48 
49 
50 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
51 
52 template<class ScalarFieldType>
54 Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::calculate
55 (
56  const ScalarFieldType& Tsatw,
57  const ScalarFieldType& Tw
58 ) const
59 {
61  auto NRef = coefficient<ScalarFieldType>::value(NRef_);
62  auto deltaTRef = coefficient<ScalarFieldType>::value(deltaTRef_);
63 
64  return Cn*NRef*pow(max((Tw - Tsatw)/deltaTRef, scalar(0)), 1.805);
65 }
66 
67 
68 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
69 
71 (
72  const dictionary& dict
73 )
74 :
76  Cn_("Cn", dimless, dict, 1),
77  NRef_("NRef", dimless/dimArea, dict, 9.922e5),
78  deltaTRef_("deltaTRef", dimTemperature, dict, 10)
79 {}
80 
81 
83 (
84  const LemmertChawla& model
85 )
86 :
88  Cn_(model.Cn_),
89  NRef_(model.NRef_),
90  deltaTRef_(model.deltaTRef_)
91 {}
92 
93 
94 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
95 
97 {}
98 
99 
100 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
101 
105 (
106  const phaseModel& liquid,
107  const phaseModel& vapour,
108  const label patchi,
109  const scalarField& Tl,
110  const scalarField& Tsatw,
111  const scalarField& L,
112  const scalarField& dDep,
113  const scalarField& fDep
114 ) const
115 {
116  const scalarField& Tw =
117  liquid.thermo().T().boundaryField()[patchi];
118 
119  return calculate(Tsatw, Tw);
120 }
121 
122 
126 (
127  const phaseModel& liquid,
128  const phaseModel& vapour,
129  const phaseModel& solid,
130  const volScalarField::Internal& Tf,
131  const volScalarField::Internal& Tsatw,
132  const volScalarField::Internal& L,
133  const volScalarField::Internal& dDep,
134  const volScalarField::Internal& fDep
135 ) const
136 {
137  return calculate(Tsatw, Tf);
138 }
139 
140 
144 (
145  const phaseModel& liquid,
146  const phaseModel& vapour,
147  const phaseModel& solid,
148  const volScalarField& Tf,
149  const volScalarField& Tsatw,
150  const volScalarField& L,
151  const volScalarField& dDep,
152  const volScalarField& fDep
153 ) const
154 {
155  return calculate(Tsatw, Tf);
156 }
157 
158 
160 (
161  Ostream& os
162 ) const
163 {
165  writeKeyword(os, "Cn") << Cn_ << token::END_STATEMENT << nl;
166  writeKeyword(os, "NRef") << NRef_ << token::END_STATEMENT << nl;
167  writeKeyword(os, "deltaTRef") << deltaTRef_ << token::END_STATEMENT << nl;
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
@ END_STATEMENT
Definition: token.H:108
Base class for nucleation site density models.
virtual void write(Ostream &os) const
Write to stream.
Lemmert & Chawla function for nucleation site density, correlation by Egorov & Menter.
Definition: LemmertChawla.H:68
virtual tmp< scalarField > nucleationSiteDensity(const phaseModel &liquid, const phaseModel &vapour, const label patchi, const scalarField &Tl, const scalarField &Tsatw, const scalarField &L, const scalarField &dDep, const scalarField &fDep) const
Calculate and return the nucleation-site density.
virtual void write(Ostream &os) const
Write to stream.
LemmertChawla(const dictionary &dict)
Construct from a dictionary.
Definition: LemmertChawla.C:71
label patchi
label calculate(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction, GeometricField< scalar, GeoMesh > &distance)
Calculate distance data from patches.
defineTypeNameAndDebug(KocamustafaogullariIshiiNucleationSite, 0)
addToRunTimeSelectionTable(nucleationSiteModel, KocamustafaogullariIshiiNucleationSite, dictionary)
Namespace for OpenFOAM.
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 dimless
const dimensionSet dimTemperature
void pow(LagrangianPatchField< typename powProduct< Type, r >::type > &f, const LagrangianPatchField< Type > &f1)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimArea
Ostream & writeKeyword(Foam::Ostream &os, const keyType &kw)
Write the keyword to the Ostream with the current level of indentation.
Definition: keyType.C:155
static const char nl
Definition: Ostream.H:267
dictionary dict