KocamustafaogullariIshiiDepartureFrequency.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) 2019-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 
28 #include "phaseSystem.H"
30 
31 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
32 
33 namespace Foam
34 {
35 namespace wallBoilingModels
36 {
37 namespace departureFrequencyModels
38 {
41  (
45  );
46 }
47 }
48 }
49 
50 
51 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
52 
53 template<class ScalarFieldType>
55 Foam::wallBoilingModels::departureFrequencyModels::
56 KocamustafaogullariIshiiDepartureFrequency::calculate
57 (
58  const fvMesh& mesh,
59  const ScalarFieldType& dDep,
60  const ScalarFieldType& rhoLiquid,
61  const ScalarFieldType& rhoVapour,
62  const ScalarFieldType& sigma
63 ) const
64 {
66  (
68  );
69 
71 
72  return
73  (Cf/dDep)*pow025(sigma*mag(g)*(rhoLiquid - rhoVapour)/sqr(rhoLiquid));
74 }
75 
76 
77 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
78 
82 (
83  const dictionary& dict
84 )
85 :
87  Cf_(dimensionedScalar::lookupOrDefault("Cf", dict, dimless, 1.18))
88 {}
89 
90 
94 (
96 )
97 :
99  Cf_(model.Cf_)
100 {}
101 
102 
103 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
104 
108 {}
109 
110 
111 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
112 
116 (
117  const phaseModel& liquid,
118  const phaseModel& vapour,
119  const label patchi,
120  const scalarField& Tl,
121  const scalarField& Tsatw,
122  const scalarField& L,
123  const scalarField& dDep
124 ) const
125 {
126  return
127  calculate
128  (
129  liquid.mesh(),
130  dDep,
131  static_cast<const scalarField&>
132  (
133  liquid.rho().boundaryField()[patchi]
134  ),
135  static_cast<const scalarField&>
136  (
137  vapour.rho().boundaryField()[patchi]
138  ),
139  liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour), patchi)()
140  );
141 }
142 
143 
147 (
148  const phaseModel& liquid,
149  const phaseModel& vapour,
150  const phaseModel& solid,
151  const volScalarField& Tf,
152  const volScalarField& Tsatw,
153  const volScalarField& L,
154  const volScalarField& dDep
155 ) const
156 {
157  return
158  calculate
159  (
160  liquid.mesh(),
161  dDep,
162  liquid.rho(),
163  vapour.rho(),
164  liquid.fluid().sigma(phaseInterfaceKey(liquid, vapour))()
165  );
166 }
167 
168 
171 {
173  writeKeyword(os, "Cf") << Cf_ << token::END_STATEMENT << nl;
174 }
175 
176 
177 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
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:162
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:99
Generic thermophysical properties class for a liquid in which the functions and coefficients for each...
Definition: liquid.H:53
scalar rho(scalar p, scalar T) const
Liquid density [kg/m^3].
Definition: liquidI.H:26
scalar sigma(scalar p, scalar T) const
Surface tension [N/m].
Definition: liquidI.H:104
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type and name.
Word-pair based class used for keying interface models in hash tables.
virtual const volScalarField & rho() const =0
Return the density field.
A class for managing temporary objects.
Definition: tmp.H:55
@ END_STATEMENT
Definition: token.H:108
Base class for bubble departure frequency models.
virtual void write(Ostream &os) const
Write to stream.
virtual tmp< scalarField > fDeparture(const phaseModel &liquid, const phaseModel &vapour, const label patchi, const scalarField &Tl, const scalarField &Tsatw, const scalarField &L, const scalarField &dDep) const
Calculate and return the bubble departure frequency.
label patchi
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
label calculate(const fvMesh &mesh, const labelHashSet &patchIDs, const scalar minFaceFraction, GeometricField< scalar, PatchField, GeoMesh > &distance)
Calculate distance data from patches.
addToRunTimeSelectionTable(departureFrequencyModel, Cole, 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
dimensionedSymmTensor sqr(const dimensionedVector &dv)
const dimensionSet dimless
dimensioned< scalar > mag(const dimensioned< Type > &)
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:266
dimensionedScalar pow025(const dimensionedScalar &ds)
dictionary dict