Schroeder.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 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 "Schroeder.H"
31 
33 
34 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
35 
36 namespace Foam
37 {
38 namespace wallBoilingModels
39 {
40 namespace TDNBModels
41 {
44  (
45  TDNBModel,
46  Schroeder,
48  );
49 }
50 }
51 }
52 
54 
55 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
56 
58 (
59  const dictionary& dict
60 )
61 :
62  TDNBModel(),
63  kg_(dict.lookupOrDefault<scalar>("kg", 1.666))
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
68 
70 {}
71 
72 
73 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
74 
77 (
78  const phaseModel& liquid,
79  const phaseModel& vapor,
80  const label patchi,
81  const scalarField& Tl,
82  const scalarField& Tsatw,
83  const scalarField& L
84 ) const
85 {
86  // Converting from g/mol to Kg/mol
87  const scalarField W(1e-3*liquid.thermo().W()().boundaryField()[patchi]);
88 
89  // isoentropic expansion factor for ideal gases
90 
91  return
92  Tsatw
93  /
94  (
95  1 - log(2*kg_ + 1)*(R.value()*Tsatw)/(W*L)
96  );
97 }
98 
99 
101 (
102  Ostream& os
103 ) const
104 {
105  TDNBModel::write(os);
106  os.writeKeyword("kg") << kg_ << token::END_STATEMENT << nl;
107 }
108 
109 // ************************************************************************* //
110 
111 
Foam::wallBoilingModels::TDNBModel
Base class for nucleation site density models.
Definition: TDNBModel.H:57
Foam::phaseModel
Single incompressible phase derived from the phase-fraction. Used as part of the multiPhaseMixture fo...
Definition: phaseModel.H:57
L
const vector L(dict.get< vector >("L"))
Foam::basicThermo::W
virtual tmp< volScalarField > W() const =0
Molecular weight [kg/kmol].
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
Foam::wallBoilingModels::TDNBModels::Schroeder::~Schroeder
virtual ~Schroeder()
Destructor.
Definition: Schroeder.C:69
Foam::wallBoilingModels::TDNBModels::addToRunTimeSelectionTable
addToRunTimeSelectionTable(TDNBModel, Schroeder, dictionary)
Foam::phaseModel::thermo
virtual const rhoThermo & thermo() const =0
Return the thermophysical model.
Foam::constant::physicoChemical::R
const dimensionedScalar R
Universal gas constant: default SI units: [J/mol/K].
Definition: evaluateNearWall.H:6
wallBoilingModels
Critical heat flux (CHF) correlation.
R
#define R(A, B, C, D, E, F, K, M)
Foam::label
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:62
Foam::Field< scalar >
Schroeder.H
Foam::token::END_STATEMENT
End entry [isseparator].
Definition: token.H:116
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:121
Foam::log
dimensionedScalar log(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:262
addToRunTimeSelectionTable.H
Macros for easy insertion into run-time selection tables.
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::Ostream::writeKeyword
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
Definition: Ostream.C:57
Foam::wallBoilingModels::TDNBModels::defineTypeNameAndDebug
defineTypeNameAndDebug(Schroeder, 0)
Foam::wallBoilingModels::TDNBModel::write
virtual void write(Ostream &os) const
Definition: TDNBModel.C:56
Foam::wallBoilingModels::TDNBModels::Schroeder::Schroeder
Schroeder(const dictionary &dict)
Construct from a dictionary.
Definition: Schroeder.C:58
Foam::nl
constexpr char nl
Definition: Ostream.H:372
Foam::wallBoilingModels::TDNBModels::Schroeder::write
virtual void write(Ostream &os) const
Definition: Schroeder.C:101
physicoChemicalConstants.H
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::wallBoilingModels::TDNBModels::Schroeder::TDNB
virtual tmp< scalarField > TDNB(const phaseModel &liquid, const phaseModel &vapor, const label patchi, const scalarField &Tl, const scalarField &Tsatw, const scalarField &L) const
Calculate and return the nucleation-site density.
Definition: Schroeder.C:77
Foam::wallBoilingModels::TDNBModels::Schroeder
Definition: Schroeder.H:77