KocamustafaogullariIshiiNucleationSite.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-2020 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"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace wallBoilingModels
35 {
36 namespace nucleationSiteModels
37 {
38  defineTypeNameAndDebug(KocamustafaogullariIshiiNucleationSite, 0);
40  (
41  nucleationSiteModel,
42  KocamustafaogullariIshiiNucleationSite,
43  dictionary
44  );
45 }
46 }
47 }
48 
49 
50 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
51 
54 (
55  const dictionary& dict
56 )
57 :
58  nucleationSiteModel(),
59  Cn_(dict.lookupOrDefault<scalar>("Cn", 1))
60 {}
61 
62 
65 (
66  const KocamustafaogullariIshiiNucleationSite& model
67 )
68 :
69  nucleationSiteModel(),
70  Cn_(model.Cn_)
71 {}
72 
73 
74 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
75 
79 {}
80 
81 
82 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
83 
87 (
88  const phaseModel& liquid,
89  const phaseModel& vapor,
90  const label patchi,
91  const scalarField& Tl,
92  const scalarField& Tsatw,
93  const scalarField& L,
94  const scalarField& dDep,
95  const scalarField& fDep
96 ) const
97 {
98  const fvPatchScalarField& Tw =
99  liquid.thermo().T().boundaryField()[patchi];
100 
101  const scalarField rhoLiquid(liquid.thermo().rho(patchi));
102  const scalarField rhoVapor(vapor.thermo().rho(patchi));
103  const scalarField rhoM((rhoLiquid - rhoVapor)/rhoVapor);
104 
105  const scalarField sigmaw
106  (
107  liquid.fluid().sigma(phasePairKey(liquid.name(), vapor.name()), patchi)
108  );
109 
110  //eq. (32)
111  const scalarField f(2.157e-7*pow(rhoM,-3.2)*pow(1 + 0.0049*rhoM,4.13));
112 
113  // eq. (17)
114  const scalarField rRc(max(Tw-Tsatw,scalar(0))*rhoVapor*L/(2*sigmaw*Tsatw));
115 
116  return (Cn_/sqr(dDep))*pow(rRc,4.4)*f;
117 }
118 
119 
122 {
124  writeKeyword(os, "Cn") << Cn_ << token::END_STATEMENT << nl;
125 }
126 
127 
128 // ************************************************************************* //
dictionary dict
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
Ostream & writeKeyword(Foam::Ostream &os, const keyType &kw)
Write the keyword to the Ostream with the current level of indentation.
Definition: keyType.C:155
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
virtual void write(Ostream &os) const
dimensionedSymmTensor sqr(const dimensionedVector &dv)
KocamustafaogullariIshiiNucleationSite(const dictionary &dict)
Construct from a dictionary.
virtual tmp< scalarField > N(const phaseModel &liquid, const phaseModel &vapor, 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.
Macros for easy insertion into run-time selection tables.
fvPatchField< scalar > fvPatchScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
static const char nl
Definition: Ostream.H:260
defineTypeNameAndDebug(combustionModel, 0)
labelList f(nPoints)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
label patchi
const doubleScalar e
Elementary charge.
Definition: doubleScalar.H:105
A class for managing temporary objects.
Definition: PtrList.H:53
Namespace for OpenFOAM.