Bromley.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2018-2021 OpenCFD Ltd
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "Bromley.H"
31 #include "constants.H"
32 
33 using namespace Foam::constant;
34 
35 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
36 
37 namespace Foam
38 {
39 namespace wallBoilingModels
40 {
41 namespace filmBoilingModels
42 {
43  defineTypeNameAndDebug(Bromley, 0);
45  (
47  Bromley,
48  dictionary
49  );
50 }
51 }
52 }
53 
54 
55 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
56 
57 Foam::wallBoilingModels::filmBoilingModels::Bromley::Bromley
58 (
59  const dictionary& dict
60 )
61 :
63  Cn_(dict.getOrDefault<scalar>("Cn", 0.62)),
64  emissivity_(dict.getOrDefault<scalar>("emissivity", 1)),
65  L_(dict.get<scalar>("L"))
66 {}
67 
68 
69 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
70 
73 (
74  const phaseModel& liquid,
75  const phaseModel& vapor,
76  const label patchi,
77  const scalarField& Tl,
78  const scalarField& Tsatw,
79  const scalarField& L
80 ) const
81 {
82  const fvPatchScalarField& Tw =
83  liquid.thermo().T().boundaryField()[patchi];
84  const auto& g =
85  liquid.mesh().time().lookupObject<uniformDimensionedVectorField>("g");
86 
87  const labelUList& cells = liquid.mesh().boundary()[patchi].faceCells();
88 
89  const scalarField& pw = liquid.thermo().p().boundaryField()[patchi];
90 
91  tmp<scalarField> trhoVapor = vapor.thermo().rhoEoS(pw, Tsatw, cells);
92  const scalarField& rhoVapor = trhoVapor.ref();
93 
94  tmp<scalarField> trhoLiq = liquid.thermo().rhoEoS(pw, Tsatw, cells);
95  const scalarField& rhoLiq = trhoLiq.ref();
96 
97 
98  const scalarField kappaVapor(vapor.kappa(patchi));
99 
100  tmp<scalarField> tCp = vapor.thermo().Cp(pw, Tsatw, cells);
101  const scalarField& CpVapor = tCp();
102 
103  const scalarField muVapor(vapor.mu(patchi));
104 
105  const scalarField htcRad
106  (
107  emissivity_*physicoChemical::sigma.value()*(pow4(Tw) - pow4(Tsatw))
108  / max((Tw - Tsatw), scalar(1e-4))
109  );
110 
111  return
112  Cn_*pow025
113  (
114  pow3(kappaVapor)
115  *rhoVapor*(rhoLiq - rhoVapor)*mag(g.value())
116  *(L + scalar(0.4)*CpVapor*max((Tw-Tsatw), scalar(0)))
117  /(L_*muVapor*max((Tw-Tsatw), scalar(1e-4)))
118  ) + scalar(0.75)*htcRad;
119 }
120 
121 
123 (
124  Ostream& os
125 ) const
126 {
128  os.writeEntry("Cn", Cn_);
129  os.writeEntry("L", L_);
130  os.writeEntry("emissivity", emissivity_);
131 }
132 
133 
134 // ************************************************************************* //
Foam::addToRunTimeSelectionTable
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
Foam::fvPatchField< scalar >
Foam::phaseModel::mu
virtual tmp< volScalarField > mu() const
Return the mixture dymanic viscosity.
Definition: phaseModel.C:297
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:54
L
const vector L(dict.get< vector >("L"))
Foam::phaseModel::kappa
const dimensionedScalar & kappa() const
Definition: phaseModel.H:157
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::basicThermo::Cp
virtual tmp< volScalarField > Cp() const =0
Heat capacity at constant pressure [J/kg/K].
Foam::constant
Different types of constants.
Definition: atomicConstants.C:38
Foam::wallBoilingModels::filmBoilingModel
Definition: filmBoilingModel.H:56
tCp
const tmp< volScalarField > & tCp
Definition: EEqn.H:4
Foam::liquid
Generic thermophysical properties class for a liquid in which the functions and coefficients for each...
Definition: liquid.H:54
Foam::phaseModel::thermo
virtual const rhoThermo & thermo() const =0
Access const to phase thermo.
Foam::pow025
dimensionedScalar pow025(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:133
Foam::pow4
dimensionedScalar pow4(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:100
Foam::tmp::ref
T & ref() const
Definition: tmpI.H:227
Foam::UniformDimensionedField< vector >
Bromley.H
Foam::Field< scalar >
Foam::pow3
dimensionedScalar pow3(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:89
filmBoilingModel
Base class for film boiling models.
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam::wallBoilingModels::filmBoilingModels::Bromley::htcFilmBoil
virtual tmp< scalarField > htcFilmBoil(const phaseModel &liquid, const phaseModel &vapor, const label patchi, const scalarField &Tl, const scalarField &Tsatw, const scalarField &L) const
Calculate and return the film boiling correlation.
Definition: Bromley.C:73
g
const uniformDimensionedVectorField & g
Definition: createFluidFields.H:26
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
constants.H
uniformDimensionedFields.H
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::UList< label >
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::constant::physicoChemical::sigma
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Foam::vtk::write
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
Definition: foamVtkOutputTemplates.C:36
Foam::wallBoilingModels::filmBoilingModels::Bromley::write
virtual void write(Ostream &os) const
Write.
Definition: Bromley.C:123
cells
const cellShapeList & cells
Definition: gmvOutputHeader.H:3
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::basicThermo::rhoEoS
virtual tmp< scalarField > rhoEoS(const scalarField &p, const scalarField &T, const labelList &cells) const =0
Density from pressure and temperature from EoS.