diff --git a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/files b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/files
index 839b339b15..7fcf3645e3 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/files
+++ b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/files
@@ -2,5 +2,6 @@ populationBalanceMoments/populationBalanceMoments.C
populationBalanceSizeDistribution/populationBalanceSizeDistribution.C
phaseForces/phaseForces.C
phaseMap/phaseMap.C
+wallBoilingProperties/wallBoilingProperties.C
LIB = $(FOAM_LIBBIN)/libmultiphaseEulerFoamFunctionObjects
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options
index b8345e0763..68d8144209 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options
+++ b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/Make/options
@@ -1,6 +1,7 @@
EXE_INC = \
-I../phaseSystems/lnInclude \
-I../interfacialModels/lnInclude \
+ -I../multiphaseCompressibleMomentumTransportModels/lnInclude \
-I$(LIB_SRC)/physicalProperties/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \
@@ -15,6 +16,7 @@ EXE_INC = \
LIB_LIBS = \
-lphaseSystem \
-lmultiphaseSystems \
+ -lmultiphaseMomentumTransportModels \
-leulerianInterfacialModels \
-leulerianInterfacialCompositionModels \
-lmultiphaseMomentumTransportModels \
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/wallBoilingProperties/wallBoilingProperties.C b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/wallBoilingProperties/wallBoilingProperties.C
new file mode 100644
index 0000000000..6870767e2d
--- /dev/null
+++ b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/wallBoilingProperties/wallBoilingProperties.C
@@ -0,0 +1,200 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+\*---------------------------------------------------------------------------*/
+
+#include "wallBoilingProperties.H"
+#include "addToRunTimeSelectionTable.H"
+#include "alphatWallBoilingWallFunctionFvPatchScalarField.H"
+
+// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+ defineTypeNameAndDebug(wallBoilingProperties, 0);
+
+ addToRunTimeSelectionTable
+ (
+ functionObject,
+ wallBoilingProperties,
+ dictionary
+ );
+}
+}
+
+
+// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
+
+Foam::functionObjects::wallBoilingProperties::wallBoilingProperties
+(
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+)
+:
+ fvMeshFunctionObject(name, runTime, dict),
+ phase_
+ (
+ mesh_.lookupObject
+ (
+ IOobject::groupName("alpha", dict.lookup("phase"))
+ )
+ ),
+ fluid_(mesh_.lookupObject("phaseProperties"))
+{
+ read(dict);
+}
+
+
+// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
+
+Foam::functionObjects::wallBoilingProperties::~wallBoilingProperties()
+{}
+
+
+// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+
+bool Foam::functionObjects::wallBoilingProperties::read(const dictionary& dict)
+{
+ fvMeshFunctionObject::read(dict);
+
+ return true;
+}
+
+
+bool Foam::functionObjects::wallBoilingProperties::execute()
+{
+ return true;
+}
+
+
+bool Foam::functionObjects::wallBoilingProperties::write()
+{
+ volScalarField dDepartureField
+ (
+ volScalarField::New
+ (
+ IOobject::groupName("dDeparture", phase_.name()),
+ mesh_,
+ dimensionedScalar(dimLength, 0)
+ )
+ );
+ volScalarField fDepartureField
+ (
+ volScalarField::New
+ (
+ IOobject::groupName("fDeparture", phase_.name()),
+ mesh_,
+ dimensionedScalar(inv(dimTime), 0)
+ )
+ );
+ volScalarField nucSiteDensityField
+ (
+ volScalarField::New
+ (
+ IOobject::groupName("nucleationSiteDensity", phase_.name()),
+ mesh_,
+ dimensionedScalar(inv(dimArea), 0)
+ )
+ );
+ volScalarField fLiquidField
+ (
+ volScalarField::New
+ (
+ IOobject::groupName("fLiquid", phase_.name()),
+ mesh_,
+ dimensionedScalar(dimless, 0)
+ )
+ );
+ volScalarField quenchingHeatFluxField
+ (
+ volScalarField::New
+ (
+ IOobject::groupName("quenchingHeatFlux", phase_.name()),
+ mesh_,
+ dimensionedScalar(dimEnergy*inv(dimTime*dimArea), 0)
+ )
+ );
+ volScalarField evaporativeHeatFluxField
+ (
+ volScalarField::New
+ (
+ IOobject::groupName("evaporativeHeatFlux", phase_.name()),
+ mesh_,
+ dimensionedScalar(dimEnergy*inv(dimTime*dimArea), 0)
+ )
+ );
+
+ typedef compressible::alphatWallBoilingWallFunctionFvPatchScalarField
+ alphatWallBoilingWallFunction;
+
+ const word alphatName =
+ IOobject::groupName("alphat", phase_.name());
+
+ if (phase_.mesh().foundObject(alphatName))
+ {
+ const volScalarField& alphat =
+ phase_.mesh().lookupObject(alphatName);
+
+ const volScalarField::Boundary& alphatBf = alphat.boundaryField();
+
+ forAll(alphatBf, patchi)
+ {
+ if (isA(alphatBf[patchi]))
+ {
+ const alphatWallBoilingWallFunction& alphatw =
+ refCast
+ <
+ const alphatWallBoilingWallFunction
+ >(alphatBf[patchi]);
+
+ dDepartureField.boundaryFieldRef()[patchi] =
+ alphatw.dDeparture();
+ fDepartureField.boundaryFieldRef()[patchi] =
+ alphatw.depFrequency();
+ nucSiteDensityField.boundaryFieldRef()[patchi] =
+ alphatw.nucSiteDensity();
+ fLiquidField.boundaryFieldRef()[patchi] =
+ alphatw.wallLiquidFraction();
+ quenchingHeatFluxField.boundaryFieldRef()[patchi] =
+ alphatw.quenching();
+ evaporativeHeatFluxField.boundaryFieldRef()[patchi] =
+ alphatw.evaporative();
+ }
+ }
+ }
+
+ dDepartureField.write();
+ fDepartureField.write();
+ nucSiteDensityField.write();
+ fLiquidField.write();
+ quenchingHeatFluxField.write();
+ evaporativeHeatFluxField.write();
+
+ return true;
+}
+
+
+// ************************************************************************* //
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/wallBoilingProperties/wallBoilingProperties.H b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/wallBoilingProperties/wallBoilingProperties.H
new file mode 100644
index 0000000000..71cb65f921
--- /dev/null
+++ b/applications/solvers/modules/fluid/multiphaseEuler/functionObjects/wallBoilingProperties/wallBoilingProperties.H
@@ -0,0 +1,149 @@
+/*---------------------------------------------------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+License
+ This file is part of OpenFOAM.
+
+ OpenFOAM is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with OpenFOAM. If not, see .
+
+Class
+ Foam::functionObjects::wallBoilingProperties
+
+Description
+ This function looks up wall boiling wall functions and collects and writes
+ out out the following data:
+
+ - Bubble departure diameter
+ - Bubble departure frequency
+ - Nucleation site density
+ - Effective liquid fraction at the wall
+ - Quenching heat flux
+ - Evaporative heat flux
+
+ Example of function object specification:
+ \verbatim
+ writeWallBoilingProperties
+ {
+ type wallBoilingProperties;
+ functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
+ writeControl writeTime;
+ phase liquid;
+ }
+ \endverbatim
+
+Usage
+ \table
+ Property | Description | Required | Default value
+ type | type name: wallBoilingProperties | yes |
+ phase | phase name | yes | none
+ \endtable
+
+SourceFiles
+ wallBoilingProperties.C
+
+\*---------------------------------------------------------------------------*/
+
+#ifndef wallBoilingProperties_H
+#define wallBoilingProperties_H
+
+#include "fvMeshFunctionObject.H"
+#include "phaseSystem.H"
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+namespace Foam
+{
+namespace functionObjects
+{
+
+/*---------------------------------------------------------------------------*\
+ Class wallBoilingProperties Declaration
+\*---------------------------------------------------------------------------*/
+
+class wallBoilingProperties
+:
+ public fvMeshFunctionObject
+{
+ // Private data
+
+ //- Phase model
+ const phaseModel& phase_;
+
+ //- Constant access to phaseSystem
+ const phaseSystem& fluid_;
+
+
+public:
+
+ //- Runtime type information
+ TypeName("wallBoilingProperties");
+
+
+ // Constructors
+
+ //- Construct from Time and dictionary
+ wallBoilingProperties
+ (
+ const word& name,
+ const Time& runTime,
+ const dictionary& dict
+ );
+
+ //- Disallow default bitwise copy construction
+ wallBoilingProperties(const wallBoilingProperties&) = delete;
+
+
+ //- Destructor
+ virtual ~wallBoilingProperties();
+
+
+ // Member Functions
+
+ //- Read the wallBoilingProperties data
+ virtual bool read(const dictionary&);
+
+ //- Return the list of fields required
+ virtual wordList fields() const
+ {
+ return wordList::null();
+ }
+
+ //- Calculate the wallBoilingProperties field
+ virtual bool execute();
+
+ //- Write the wallBoilingProperties field
+ virtual bool write();
+
+
+ // Member Operators
+
+ //- Disallow default bitwise assignment
+ void operator=(const wallBoilingProperties&) = delete;
+};
+
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+} // End namespace functionObjects
+} // End namespace Foam
+
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+#endif
+
+// ************************************************************************* //
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
index dafe292c5e..e69815b963 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
@@ -79,7 +79,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField
AbyV_(p.size(), 0),
alphatConv_(p.size(), 0),
dDep_(p.size(), 1e-5),
+ fDep_(p.size(), 0),
+ N_(p.size(), 0),
+ fLiquid_(p.size(), 0),
qq_(p.size(), 0),
+ qe_(p.size(), 0),
partitioningModel_(nullptr),
nucleationSiteModel_(nullptr),
departureDiamModel_(nullptr),
@@ -107,7 +111,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField
AbyV_(p.size(), 0),
alphatConv_(p.size(), 0),
dDep_(p.size(), 1e-5),
+ fDep_(p.size(), 0),
+ N_(p.size(), 0),
+ fLiquid_(p.size(), 0),
qq_(p.size(), 0),
+ qe_(p.size(), 0),
partitioningModel_(nullptr),
nucleationSiteModel_(nullptr),
departureDiamModel_(nullptr),
@@ -164,9 +172,24 @@ alphatWallBoilingWallFunctionFvPatchScalarField
dict.subDict("departureFreqModel")
);
- if (dict.found("dDep"))
+ if (dict.found("dDeparture"))
{
- dDep_ = scalarField("dDep", dict, p.size());
+ dDep_ = scalarField("dDeparture", dict, p.size());
+ }
+
+ if (dict.found("depFrequency"))
+ {
+ fDep_ = scalarField("depFrequency", dict, p.size());
+ }
+
+ if (dict.found("nucSiteDensity"))
+ {
+ N_ = scalarField("nucSiteDensity", dict, p.size());
+ }
+
+ if (dict.found("wallLiquidFraction"))
+ {
+ fLiquid_ = scalarField("wallLiquidFraction", dict, p.size());
}
if (dict.found("qQuenching"))
@@ -174,6 +197,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField
qq_ = scalarField("qQuenching", dict, p.size());
}
+ if (dict.found("qEvaporation"))
+ {
+ qq_ = scalarField("qEvaporation", dict, p.size());
+ }
+
break;
}
}
@@ -212,7 +240,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField
AbyV_(mapper(psf.AbyV_)),
alphatConv_(mapper(psf.alphatConv_)),
dDep_(mapper(psf.dDep_)),
+ fDep_(mapper(psf.fDep_)),
+ N_(mapper(psf.N_)),
+ fLiquid_(mapper(psf.fLiquid_)),
qq_(mapper(psf.qq_)),
+ qe_(mapper(psf.qe_)),
partitioningModel_(psf.partitioningModel_, false),
nucleationSiteModel_(psf.nucleationSiteModel_, false),
departureDiamModel_(psf.departureDiamModel_, false),
@@ -232,7 +264,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField
AbyV_(psf.AbyV_),
alphatConv_(psf.alphatConv_),
dDep_(psf.dDep_),
+ fDep_(psf.fDep_),
+ N_(psf.N_),
+ fLiquid_(psf.fLiquid_),
qq_(psf.qq_),
+ qe_(psf.qe_),
partitioningModel_(psf.partitioningModel_, false),
nucleationSiteModel_(psf.nucleationSiteModel_, false),
departureDiamModel_(psf.departureDiamModel_, false),
@@ -252,7 +288,11 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::autoMap
m(AbyV_, AbyV_);
m(alphatConv_, alphatConv_);
m(dDep_, dDep_);
+ m(fDep_, fDep_);
+ m(N_, N_);
+ m(fLiquid_, fLiquid_);
m(qq_, qq_);
+ m(qe_, qe_);
}
@@ -270,7 +310,11 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::rmap
AbyV_.rmap(tiptf.AbyV_, addr);
alphatConv_.rmap(tiptf.alphatConv_, addr);
dDep_.rmap(tiptf.dDep_, addr);
+ fDep_.rmap(tiptf.fDep_, addr);
+ N_.rmap(tiptf.N_, addr);
+ fLiquid_.rmap(tiptf.fLiquid_, addr);
qq_.rmap(tiptf.qq_, addr);
+ qe_.rmap(tiptf.qe_, addr);
}
@@ -287,7 +331,11 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::reset
AbyV_.reset(tiptf.AbyV_);
alphatConv_.reset(tiptf.alphatConv_);
dDep_.reset(tiptf.dDep_);
+ fDep_.reset(tiptf.fDep_);
+ N_.reset(tiptf.N_);
+ fLiquid_.reset(tiptf.fLiquid_);
qq_.reset(tiptf.qq_);
+ qe_.reset(tiptf.qe_);
}
@@ -316,13 +364,17 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
const scalarField& vaporw = vapor.boundaryField()[patchi];
// Partitioning
- // NOTE! Assumes 1-thisPhase for liquid fraction in
- // multiphase simulations
- const scalarField fLiquid(partitioningModel_->fLiquid(1 - vaporw));
+ // NOTE! Assumes that there is only only one liquid phase and all
+ // other phases are vapor
+
+ const phaseModel& liquid = fluid.phases()[otherPhaseName_];
+ const scalarField& liquidw = liquid.boundaryField()[patchi];
+ fLiquid_ = partitioningModel_->fLiquid(liquidw);
operator==
(
- calcAlphat(*this)*(1 - fLiquid)/max(vaporw, scalar(1e-8))
+ calcAlphat(*this)*(vaporw/(1 - liquidw + small) )
+ *(1 - fLiquid_)/max(vaporw, scalar(1e-8))
);
break;
}
@@ -441,7 +493,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
const scalarField liquidw(liquid.boundaryField()[patchi]);
// Partitioning
- const scalarField fLiquid(partitioningModel_->fLiquid(liquidw));
+ fLiquid_ = partitioningModel_->fLiquid(liquidw);
// Convective thermal diffusivity
alphatConv_ = calcAlphat(alphatConv_);
@@ -483,8 +535,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
);
// Bubble departure frequency:
- const scalarField fDep
- (
+ fDep_ =
departureFreqModel_->fDeparture
(
liquid,
@@ -494,12 +545,10 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
Tsatw,
L,
dDep_
- )
- );
+ );
// Nucleation site density:
- const scalarField N
- (
+ N_ =
nucleationSiteModel_->N
(
liquid,
@@ -509,9 +558,8 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
Tsatw,
L,
dDep_,
- fDep
- )
- );
+ fDep_
+ );
// Area fractions:
@@ -523,12 +571,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
const scalarField Al
(
- fLiquid*4.8*exp(min(-Ja/80, log(vGreat)))
+ fLiquid_*4.8*exp(min(-Ja/80, log(vGreat)))
);
- scalarField A2(min(pi*sqr(dDep_)*N*Al/4, scalar(1)));
+ scalarField A2(min(pi*sqr(dDep_)*N_*Al/4, scalar(1)));
const scalarField A1(max(1 - A2, scalar(1e-4)));
- scalarField A2E(min(pi*sqr(dDep_)*N*Al/4, scalar(5)));
+ scalarField A2E(min(pi*sqr(dDep_)*N_*Al/4, scalar(5)));
if (volatileSpecie != "none" && !liquid.pure())
{
@@ -542,15 +590,15 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
// wall boiling
dmdtf_ =
(1 - relax_)*dmdtf_
- + relax_*(1.0/6.0)*A2E*dDep_*rhoVaporw*fDep*AbyV_;
+ + relax_*(1.0/6.0)*A2E*dDep_*rhoVaporw*fDep_*AbyV_;
// Quenching heat transfer coefficient
const scalarField hQ
(
- 2*(alphaw*Cpw)*fDep
+ 2*(alphaw*Cpw)*fDep_
*sqrt
(
- (0.8/max(fDep, small))/(pi*alphaw/rhoLiquidw)
+ (0.8/max(fDep_, small))/(pi*alphaw/rhoLiquidw)
)
);
@@ -560,7 +608,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
+ relax_*(A2*hQ*max(Tw - Tl, scalar(0)));
// Evaporation heat flux
- const scalarField qe(dmdtf_*L/AbyV_);
+ qe_ = dmdtf_*L/AbyV_;
// Effective thermal diffusivity that corresponds to the
// calculated convective, quenching and evaporative heat
@@ -570,7 +618,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
(
(
A1*alphatConv_
- + (qq_ + qe)/max(hew.snGrad(), scalar(1e-16))
+ + (qq_ + qe_)/max(hew.snGrad(), scalar(1e-16))
)
/max(liquidw, scalar(1e-8))
);
@@ -585,7 +633,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
{
const scalarField qc
(
- fLiquid*A1*(alphatConv_ + alphaw)*hew.snGrad()
+ fLiquid_*A1*(alphatConv_ + alphaw)*hew.snGrad()
);
const scalarField qEff
@@ -596,11 +644,11 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
Info<< " L: " << gMin(L) << " - " << gMax(L) << endl;
Info<< " Tl: " << gMin(Tl) << " - " << gMax(Tl)
<< endl;
- Info<< " N: " << gMin(N) << " - " << gMax(N) << endl;
+ Info<< " N: " << gMin(N_) << " - " << gMax(N_) << endl;
Info<< " dDep_: " << gMin(dDep_) << " - "
<< gMax(dDep_) << endl;
- Info<< " fDep: " << gMin(fDep) << " - "
- << gMax(fDep) << endl;
+ Info<< " fDep: " << gMin(fDep_) << " - "
+ << gMax(fDep_) << endl;
Info<< " Al: " << gMin(Al) << " - " << gMax(Al)
<< endl;
Info<< " A1: " << gMin(A1) << " - " << gMax(A1)
@@ -613,10 +661,10 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
<< gMax(dmdtf_) << endl;
Info<< " qc: " << gMin(qc) << " - " << gMax(qc)
<< endl;
- Info<< " qq: " << gMin(fLiquid*qq_) << " - "
- << gMax(fLiquid*qq_) << endl;
- Info<< " qe: " << gMin(fLiquid*qe) << " - "
- << gMax(fLiquid*qe) << endl;
+ Info<< " qq: " << gMin(fLiquid_*qq_) << " - "
+ << gMax(fLiquid_*qq_) << endl;
+ Info<< " qe: " << gMin(fLiquid_*qe_) << " - "
+ << gMax(fLiquid_*qe_) << endl;
Info<< " qEff: " << gMin(qEff) << " - "
<< gMax(qEff) << endl;
Info<< " alphat: " << gMin(*this) << " - "
@@ -672,8 +720,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
writeEntry(os, "phaseType", phaseTypeNames_[phaseType_]);
writeEntry(os, "alphatConv", alphatConv_);
- writeEntry(os, "dDep", dDep_);
+ writeEntry(os, "dDeparture", dDep_);
+ writeEntry(os, "depFrequency", fDep_);
+ writeEntry(os, "nucSiteDensity", N_);
+ writeEntry(os, "wallLiquidFraction", fLiquid_);
writeEntry(os, "qQuenching", qq_);
+ writeEntry(os, "qEvaporative", qe_);
switch (phaseType_)
{
diff --git a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H
index e7364645c3..6d416f31b1 100644
--- a/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H
+++ b/applications/solvers/modules/fluid/multiphaseEuler/multiphaseCompressibleMomentumTransportModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H
@@ -184,12 +184,25 @@ private:
//- Convective turbulent thermal diffusivity
scalarField alphatConv_;
- //- Departure diameter field
+ //- Departure diameter
scalarField dDep_;
+ //- Departure frequency
+ scalarField fDep_;
+
+ //- Nucleation site density
+ scalarField N_;
+
+ //- Wall liquid fraction
+ scalarField fLiquid_;
+
//- Quenching surface heat flux
scalarField qq_;
+ //- Evaporative surface heat flux
+ scalarField qe_;
+
+
//- Run-time selected heat flux partitioning model
autoPtr
partitioningModel_;
@@ -269,12 +282,42 @@ public:
// Member Functions
- //- Return the departure diameter field
+ //- Return the departure diameter field [m]
const scalarField& dDeparture() const
{
return dDep_;
}
+ //- Return the departure frequency field [Hz]
+ const scalarField& depFrequency() const
+ {
+ return fDep_;
+ }
+
+ //- Return the nucleation site density field [1/m^2]
+ const scalarField& nucSiteDensity() const
+ {
+ return N_;
+ }
+
+ //- Return the wall liquid fraction field [-]
+ const scalarField& wallLiquidFraction() const
+ {
+ return fLiquid_;
+ }
+
+ //- Return the quenching surface heat flux field [W/m^2]
+ const scalarField& quenching() const
+ {
+ return qq_;
+ }
+
+ //- Return the evaporative surface heat flux field [W/m^2]
+ const scalarField& evaporative() const
+ {
+ return qe_;
+ }
+
// Mapping functions
diff --git a/etc/caseDicts/postProcessing/multiphase/wallBoilingProperties b/etc/caseDicts/postProcessing/multiphase/wallBoilingProperties
new file mode 100644
index 0000000000..14e3ecea24
--- /dev/null
+++ b/etc/caseDicts/postProcessing/multiphase/wallBoilingProperties
@@ -0,0 +1,24 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Version: dev
+ \\/ M anipulation |
+-------------------------------------------------------------------------------
+Description
+ This function looks up wall boiling wall functions and collects and writes
+ out out fields of bubble departure diameter, bubble departure frequency,
+ nucleation site density, effective liquid fraction at the wall, quenching
+ heat flux, and evaporative heat flux.
+
+\*---------------------------------------------------------------------------*/
+
+type wallBoilingProperties;
+libs ("libmultiphaseEulerFoamFunctionObjects.so");
+
+phase ;
+
+writeControl writeTime;
+
+
+// ************************************************************************* //
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/0/omega.gas b/tutorials/modules/multiphaseEuler/wallBoiling/0/omega.gas
index 840b72f0c8..52493f420f 100644
--- a/tutorials/modules/multiphaseEuler/wallBoiling/0/omega.gas
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/0/omega.gas
@@ -10,7 +10,7 @@ FoamFile
format ascii;
class volScalarField;
location "0";
- object omega.liquid;
+ object omega.gas;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/Allrun b/tutorials/modules/multiphaseEuler/wallBoiling/Allrun
index 2b3eeca408..aa7c72cb87 100755
--- a/tutorials/modules/multiphaseEuler/wallBoiling/Allrun
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/Allrun
@@ -31,4 +31,16 @@ runApplication foamPostProcess -latestTime -func "
./validation/createGraphs
+runApplication -append foamPostProcess -latestTime -func "
+ patchSurface
+ (
+ funcName=patchWallBoilingProperties,
+ patch=wall,
+ surfaceFormat=raw,
+ interpolate=false,
+ fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid fLiquid.liquid quenchingHeatFlux.liquid evaporativeHeatFlux.liquid)
+ )"
+
+./validation/createWallBoilingPropertiesGraphs
+
#------------------------------------------------------------------------------
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/constant/fvModels b/tutorials/modules/multiphaseEuler/wallBoiling/constant/fvModels
new file mode 100644
index 0000000000..966ca382a8
--- /dev/null
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/constant/fvModels
@@ -0,0 +1,38 @@
+/*--------------------------------*- C++ -*----------------------------------*\
+ ========= |
+ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
+ \\ / O peration | Website: https://openfoam.org
+ \\ / A nd | Version: dev
+ \\/ M anipulation |
+\*---------------------------------------------------------------------------*/
+FoamFile
+{
+ version 2.0;
+ format ascii;
+ class dictionary;
+ location "constant";
+ object fvModels;
+}
+// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
+
+phaseTurbulenceStabilisationGas
+{
+ type phaseTurbulenceStabilisation;
+
+ libs ("libmultiphaseEulerFoamFvModels.so");
+
+ phase gas;
+
+ alphaInversion 0.1;
+}
+
+phaseTurbulenceStabilisationLiquid
+{
+ type phaseTurbulenceStabilisation;
+
+ libs ("libmultiphaseEulerFoamFvModels.so");
+
+ phase liquid;
+
+ alphaInversion 0.1;
+}
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/constant/momentumTransport.gas b/tutorials/modules/multiphaseEuler/wallBoiling/constant/momentumTransport.gas
index bceba9af18..d0b2ee96f5 100644
--- a/tutorials/modules/multiphaseEuler/wallBoiling/constant/momentumTransport.gas
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/constant/momentumTransport.gas
@@ -14,6 +14,15 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
-simulationType laminar;
+simulationType RAS;
+
+RAS
+{
+ model kOmegaSST;
+
+ turbulence on;
+ printCoeffs on;
+}
+
// ************************************************************************* //
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/constant/thermophysicalTransport.gas b/tutorials/modules/multiphaseEuler/wallBoiling/constant/thermophysicalTransport.gas
index 6126ac6692..058612ec9b 100644
--- a/tutorials/modules/multiphaseEuler/wallBoiling/constant/thermophysicalTransport.gas
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/constant/thermophysicalTransport.gas
@@ -19,4 +19,11 @@ laminar
model Fourier;
}
+RAS
+{
+ model eddyDiffusivity;
+
+ Prt 1;
+}
+
// ************************************************************************* //
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/system/controlDict.orig b/tutorials/modules/multiphaseEuler/wallBoiling/system/controlDict.orig
index cc905e581f..284437de28 100644
--- a/tutorials/modules/multiphaseEuler/wallBoiling/system/controlDict.orig
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/system/controlDict.orig
@@ -54,6 +54,13 @@ maxDeltaT 0.001;
functions
{
+ writeWallBoilingProperties
+ {
+ type wallBoilingProperties;
+ functionObjectLibs ( "libmultiphaseEulerFoamFunctionObjects.so" );
+ writeControl writeTime;
+ phase liquid;
+ }
outflow
{
type surfaceFieldValue;
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/system/fvSolution b/tutorials/modules/multiphaseEuler/wallBoiling/system/fvSolution
index 33cf3e5667..c4a1580136 100644
--- a/tutorials/modules/multiphaseEuler/wallBoiling/system/fvSolution
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/system/fvSolution
@@ -79,7 +79,7 @@ relaxationFactors
equations
{
".*" 1;
- "h\..*" 1.0;
+ "h\..*" 1;
}
}
diff --git a/tutorials/modules/multiphaseEuler/wallBoiling/validation/createWallBoilingPropertiesGraphs b/tutorials/modules/multiphaseEuler/wallBoiling/validation/createWallBoilingPropertiesGraphs
new file mode 100755
index 0000000000..dcb8b8e97f
--- /dev/null
+++ b/tutorials/modules/multiphaseEuler/wallBoiling/validation/createWallBoilingPropertiesGraphs
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+if ! which gnuplot > /dev/null 2>&1
+then
+ echo 'gnuplot not found - skipping graph creation' >&2
+ exit 1
+fi
+
+graphFile=$(foamListTimes -latestTime)/patch.xy
+
+gnuplot< /dev/null 2>&1
+then
+ echo 'gnuplot not found - skipping graph creation' >&2
+ exit 1
+fi
+
+graphFile=$(foamListTimes -latestTime)/patch.xy
+
+gnuplot< /dev/null 2>&1
+then
+ echo 'gnuplot not found - skipping graph creation' >&2
+ exit 1
+fi
+
+graphFile=$(foamListTimes -latestTime)/patch.xy
+
+gnuplot< /dev/null 2>&1
+then
+ echo 'gnuplot not found - skipping graph creation' >&2
+ exit 1
+fi
+
+graphFile=$(foamListTimes -latestTime)/patch.xy
+
+gnuplot<