compressible::alphatWallBoilingWallFunction: Naming consistency

Wall boiling properties and state have been named consistently through
the wall boiling boundary conditions and all of its related sub-models.
All changes are backwards compatible. Changes to tutorials will follow
in a separate commit.
This commit is contained in:
Will Bainbridge
2023-01-24 09:01:27 +00:00
parent c44a9d1097
commit 870f4e9dae
29 changed files with 426 additions and 294 deletions

View File

@ -64,7 +64,7 @@ alphatPhaseChangeWallFunctionBase::alphatPhaseChangeWallFunctionBase
if (phaseName_== otherPhaseName_)
{
FatalErrorInFunction
<< "otherPhase should be the name of the vapor phase that "
<< "otherPhase should be the name of the vapour phase that "
<< "corresponds to the liquid base or vice versa" << nl
<< "This phase: " << phaseName_ << nl
<< "otherPhase: " << otherPhaseName_

View File

@ -49,14 +49,14 @@ const char* Foam::NamedEnum
<
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::
phaseType,
2
>::names[] = {"vapor", "liquid"};
3
>::names[] = {"vapour", "vapor", "liquid"};
const Foam::NamedEnum
<
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::
phaseType,
2
3
>
Foam::compressible::alphatWallBoilingWallFunctionFvPatchScalarField::
phaseTypeNames_;
@ -302,11 +302,11 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
(
const boilingLiquidProperties& props,
const scalarField& Tw,
scalarField& dDep,
scalarField& fDep,
scalarField& N,
scalarField& qq,
scalarField& qe,
scalarField& dDeparture,
scalarField& fDeparture,
scalarField& nucleationSiteDensity,
scalarField& qQuenching,
scalarField& qEvaporative,
scalarField& dmdtf
) const
{
@ -344,7 +344,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
}
// Bubble departure diameter
dDep =
dDeparture =
departureDiameterModel_->dDeparture
(
props.phase,
@ -356,7 +356,7 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
);
// Bubble departure frequency
fDep =
fDeparture =
departureFrequencyModel_->fDeparture
(
props.phase,
@ -365,12 +365,12 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
Tl,
props.Tsat,
props.L,
dDep
dDeparture
);
// Nucleation site density
N =
nucleationSiteModel_->N
nucleationSiteDensity =
nucleationSiteModel_->nucleationSiteDensity
(
props.phase,
props.otherPhase,
@ -378,8 +378,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
Tl,
props.Tsat,
props.L,
dDep,
fDep
dDeparture,
fDeparture
);
// Del Valle & Kenning (1985)
@ -393,12 +393,18 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
const scalarField Al
(
fLiquid_*4.8*exp(min(-Ja/80, log(vGreat)))
wetFraction_*4.8*exp(min(-Ja/80, log(vGreat)))
);
scalarField A2(min(pi*sqr(dDep)*N*Al/4, scalar(1)));
scalarField A2
(
min(pi*sqr(dDeparture)*nucleationSiteDensity*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(dDeparture)*nucleationSiteDensity*Al/4, scalar(5))
);
if (props.volatileSpecie != "none" && !props.phase.pure())
{
@ -412,27 +418,32 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
// Volumetric mass source in the near wall cell due to the
// wall boiling
dmdtf = (1.0/6.0)*A2E*dDep*props.rhoVapourw*fDep*props.AbyV;
dmdtf = (1.0/6.0)*A2E*dDeparture*props.rhoVapourw*fDeparture*props.AbyV;
// Quenching heat transfer coefficient
const scalarField hQ
(
2*props.kappaByCp*props.Cpw*fDep
*sqrt((tau_/max(fDep, small))/(pi*props.kappaByCp/props.rhoLiquidw))
2*props.kappaByCp*props.Cpw*fDeparture
*sqrt
(
tau_
/max(fDeparture, small)
/(pi*props.kappaByCp/props.rhoLiquidw)
)
);
// Quenching heat flux
qq = A2*hQ*max(Tw - Tl, scalar(0));
qQuenching = A2*hQ*max(Tw - Tl, scalar(0));
// Evaporation heat flux
qe = dmdtf*props.L/props.AbyV;
qEvaporative = dmdtf*props.L/props.AbyV;
// Return total sum of convective, quenching and evaporative heat fluxes
const scalarField gradTw
(
patch().deltaCoeffs()*max(Tw - props.Tc, small*props.Tc)
);
return A1*props.alphatConv*props.Cpw*gradTw + qq_ + qe_;
return A1*props.alphatConv*props.Cpw*gradTw + qQuenching_ + qEvaporative_;
}
@ -443,14 +454,25 @@ alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
const scalarField& Tw
) const
{
scalarField dDep(dDep_);
scalarField fDep(fDep_);
scalarField N(N_);
scalarField qq(qq_);
scalarField qe(qe_);
scalarField dDeparture(dDeparture_);
scalarField fDeparture(fDeparture_);
scalarField nucleationSiteDensity(nucleationSiteDensity_);
scalarField qQuenching(qQuenching_);
scalarField qEvaporative(qEvaporative_);
scalarField dmdtf(dmdtf_);
return calcBoiling(props, Tw, dDep, fDep, N, qq, qe, dmdtf);
return
calcBoiling
(
props,
Tw,
dDeparture,
fDeparture,
nucleationSiteDensity,
qQuenching,
qEvaporative,
dmdtf
);
}
@ -461,7 +483,18 @@ alphatWallBoilingWallFunctionFvPatchScalarField::evaluateBoiling
const scalarField& Tw
)
{
return calcBoiling(props, Tw, dDep_, fDep_, N_, qq_, qe_, dmdtf_);
return
calcBoiling
(
props,
Tw,
dDeparture_,
fDeparture_,
nucleationSiteDensity_,
qQuenching_,
qEvaporative_,
dmdtf_
);
}
@ -551,12 +584,12 @@ alphatWallBoilingWallFunctionFvPatchScalarField
departureDiameterModel_(nullptr),
departureFrequencyModel_(nullptr),
fLiquid_(p.size(), 0),
dDep_(p.size(), 1e-5),
fDep_(p.size(), 0),
N_(p.size(), 0),
qq_(p.size(), 0),
qe_(p.size(), 0),
wetFraction_(p.size(), 0),
dDeparture_(p.size(), 1e-5),
fDeparture_(p.size(), 0),
nucleationSiteDensity_(p.size(), 0),
qQuenching_(p.size(), 0),
qEvaporative_(p.size(), 0),
dmdtf_(p.size(), 0)
{}
@ -587,12 +620,12 @@ alphatWallBoilingWallFunctionFvPatchScalarField
departureDiameterModel_(nullptr),
departureFrequencyModel_(nullptr),
fLiquid_(p.size(), 0),
dDep_(p.size(), 1e-5),
fDep_(p.size(), 0),
N_(p.size(), 0),
qq_(p.size(), 0),
qe_(p.size(), 0),
wetFraction_(p.size(), 0),
dDeparture_(p.size(), 1e-5),
fDeparture_(p.size(), 0),
nucleationSiteDensity_(p.size(), 0),
qQuenching_(p.size(), 0),
qEvaporative_(p.size(), 0),
dmdtf_(p.size(), 0)
{
// Sub-Models
@ -612,47 +645,70 @@ alphatWallBoilingWallFunctionFvPatchScalarField
departureDiameterModel_ =
wallBoilingModels::departureDiameterModel::New
(
dict.subDict("departureDiamModel")
dict.subDictBackwardsCompatible
(
{"departureDiameterModel", "departureDiamModel"}
)
);
departureFrequencyModel_ =
wallBoilingModels::departureFrequencyModel::New
(
dict.subDict("departureFreqModel")
dict.subDictBackwardsCompatible
(
{"departureFrequencyModel", "departureFreqModel"}
)
);
}
// State
if (dict.found("wallLiquidFraction"))
// Backwards compatible reading for old field keywords
auto readFieldBackwardsCompatible = [&p]
(
const dictionary& dict,
const wordList& keywords,
scalarField& field
)
{
fLiquid_ = scalarField("wallLiquidFraction", dict, p.size());
}
forAll(keywords, i)
{
if (dict.found(keywords[i]))
{
field = scalarField(keywords[i], dict, p.size());
return;
}
}
};
// State
readFieldBackwardsCompatible
(
dict,
{"wetFraction", "wallLiquidFraction"},
wetFraction_
);
if (phaseType_ == liquidPhase)
{
if (dict.found("dDeparture"))
{
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("qQuenching"))
{
qq_ = scalarField("qQuenching", dict, p.size());
}
if (dict.found("qEvaporative"))
{
qe_ = scalarField("qEvaporative", dict, p.size());
}
if (dict.found("dmdtf"))
{
dmdtf_ = scalarField("dmdtf", dict, p.size());
}
readFieldBackwardsCompatible(dict, {"dDeparture"}, dDeparture_);
readFieldBackwardsCompatible
(
dict,
{"fDeparture", "depFrequency"},
fDeparture_
);
readFieldBackwardsCompatible
(
dict,
{"nucleationSiteDensity", "nucSiteDensity"},
nucleationSiteDensity_
);
readFieldBackwardsCompatible(dict, {"qQuenching"}, qQuenching_);
readFieldBackwardsCompatible(dict, {"qEvaporative"}, qEvaporative_);
readFieldBackwardsCompatible(dict, {"dmdtf"}, dmdtf_);
}
}
@ -681,12 +737,12 @@ alphatWallBoilingWallFunctionFvPatchScalarField
departureDiameterModel_(psf.departureDiameterModel_, false),
departureFrequencyModel_(psf.departureFrequencyModel_, false),
fLiquid_(mapper(psf.fLiquid_)),
dDep_(mapper(psf.dDep_)),
fDep_(mapper(psf.fDep_)),
N_(mapper(psf.N_)),
qq_(mapper(psf.qq_)),
qe_(mapper(psf.qe_)),
wetFraction_(mapper(psf.wetFraction_)),
dDeparture_(mapper(psf.dDeparture_)),
fDeparture_(mapper(psf.fDeparture_)),
nucleationSiteDensity_(mapper(psf.nucleationSiteDensity_)),
qQuenching_(mapper(psf.qQuenching_)),
qEvaporative_(mapper(psf.qEvaporative_)),
dmdtf_(mapper(psf.dmdtf_))
{}
@ -713,12 +769,12 @@ alphatWallBoilingWallFunctionFvPatchScalarField
departureDiameterModel_(psf.departureDiameterModel_, false),
departureFrequencyModel_(psf.departureFrequencyModel_, false),
fLiquid_(psf.fLiquid_),
dDep_(psf.dDep_),
fDep_(psf.fDep_),
N_(psf.N_),
qq_(psf.qq_),
qe_(psf.qe_),
wetFraction_(psf.wetFraction_),
dDeparture_(psf.dDeparture_),
fDeparture_(psf.fDeparture_),
nucleationSiteDensity_(psf.nucleationSiteDensity_),
qQuenching_(psf.qQuenching_),
qEvaporative_(psf.qEvaporative_),
dmdtf_(psf.dmdtf_)
{}
@ -732,12 +788,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::autoMap
{
fixedValueFvPatchScalarField::autoMap(m);
m(fLiquid_, fLiquid_);
m(dDep_, dDep_);
m(fDep_, fDep_);
m(N_, N_);
m(qq_, qq_);
m(qe_, qe_);
m(wetFraction_, wetFraction_);
m(dDeparture_, dDeparture_);
m(fDeparture_, fDeparture_);
m(nucleationSiteDensity_, nucleationSiteDensity_);
m(qQuenching_, qQuenching_);
m(qEvaporative_, qEvaporative_);
m(dmdtf_, dmdtf_);
}
@ -753,12 +809,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::rmap
const alphatWallBoilingWallFunctionFvPatchScalarField& tiptf =
refCast<const alphatWallBoilingWallFunctionFvPatchScalarField>(ptf);
fLiquid_.rmap(tiptf.fLiquid_, addr);
dDep_.rmap(tiptf.dDep_, addr);
fDep_.rmap(tiptf.fDep_, addr);
N_.rmap(tiptf.N_, addr);
qq_.rmap(tiptf.qq_, addr);
qe_.rmap(tiptf.qe_, addr);
wetFraction_.rmap(tiptf.wetFraction_, addr);
dDeparture_.rmap(tiptf.dDeparture_, addr);
fDeparture_.rmap(tiptf.fDeparture_, addr);
nucleationSiteDensity_.rmap(tiptf.nucleationSiteDensity_, addr);
qQuenching_.rmap(tiptf.qQuenching_, addr);
qEvaporative_.rmap(tiptf.qEvaporative_, addr);
dmdtf_.rmap(tiptf.dmdtf_, addr);
}
@ -773,12 +829,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::reset
const alphatWallBoilingWallFunctionFvPatchScalarField& tiptf =
refCast<const alphatWallBoilingWallFunctionFvPatchScalarField>(ptf);
fLiquid_.reset(tiptf.fLiquid_);
dDep_.reset(tiptf.dDep_);
fDep_.reset(tiptf.fDep_);
N_.reset(tiptf.N_);
qq_.reset(tiptf.qq_);
qe_.reset(tiptf.qe_);
wetFraction_.reset(tiptf.wetFraction_);
dDeparture_.reset(tiptf.dDeparture_);
fDeparture_.reset(tiptf.fDeparture_);
nucleationSiteDensity_.reset(tiptf.nucleationSiteDensity_);
qQuenching_.reset(tiptf.qQuenching_);
qEvaporative_.reset(tiptf.qEvaporative_);
dmdtf_.reset(tiptf.dmdtf_);
}
@ -796,21 +852,22 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
switch (phaseType_)
{
case vapourPhase:
case vaporPhase:
{
const phaseModel& vapor = fluid.phases()[internalField().group()];
const phaseModel& vapour = fluid.phases()[internalField().group()];
const phaseModel& liquid = fluid.phases()[otherPhaseName_];
// Construct boiling properties
const properties props(*this, vapor, liquid);
const properties props(*this, vapour, liquid);
// Partitioning. Note: Assumes that there is only only one liquid
// phase and all other phases are vapor.
fLiquid_ = partitioningModel_->fLiquid(props.otherAlphaw);
// phase and all other phases are vapour.
wetFraction_ = partitioningModel_->wetFraction(props.otherAlphaw);
operator==
(
(1 - fLiquid_)
(1 - wetFraction_)
/max(1 - props.otherAlphaw, rootSmall)
*props.alphatConv
);
@ -821,7 +878,7 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
case liquidPhase:
{
const phaseModel& liquid = fluid.phases()[internalField().group()];
const phaseModel& vapor = fluid.phases()[otherPhaseName_];
const phaseModel& vapour = fluid.phases()[otherPhaseName_];
// Boiling is enabled by the presence of saturation temperature
// modelling. This is consistent with interfacial thermal phase
@ -831,11 +888,11 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
!fluid.foundInterfacialModel
<
interfaceSaturationTemperatureModel
>(phaseInterface(liquid, vapor))
>(phaseInterface(liquid, vapour))
)
{
// Construct non-boiling properties
const properties props(*this, liquid, vapor);
const properties props(*this, liquid, vapour);
Info<< "Saturation model for interface "
<< props.interface.name()
@ -846,11 +903,11 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
else
{
// Construct boiling properties
const boilingLiquidProperties props(*this, liquid, vapor);
const boilingLiquidProperties props(*this, liquid, vapour);
// Partitioning. Note: Assumes that there is only only one
// liquid phase and all other phases are vapor.
fLiquid_ = partitioningModel_->fLiquid(props.alphaw);
// liquid phase and all other phases are vapour.
wetFraction_ = partitioningModel_->wetFraction(props.alphaw);
// Get the temperature boundary condition and extract its
// physical parameters
@ -964,27 +1021,27 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
nucleationSiteModel_->write(os);
os << decrIndent << indent << token::END_BLOCK << nl;
writeKeyword(os, "departureDiamModel") << nl;
writeKeyword(os, "departureDiameterModel") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
departureDiameterModel_->write(os);
os << decrIndent << indent << token::END_BLOCK << nl;
writeKeyword(os, "departureFreqModel") << nl;
writeKeyword(os, "departureFrequencyModel") << nl;
os << indent << token::BEGIN_BLOCK << incrIndent << nl;
departureFrequencyModel_->write(os);
os << decrIndent << indent << token::END_BLOCK << nl;
}
// State
writeEntry(os, "wallLiquidFraction", fLiquid_);
writeEntry(os, "wetFraction", wetFraction_);
if (phaseType_ == liquidPhase)
{
writeEntry(os, "dDeparture", dDep_);
writeEntry(os, "depFrequency", fDep_);
writeEntry(os, "nucSiteDensity", N_);
writeEntry(os, "qQuenching", qq_);
writeEntry(os, "qEvaporative", qe_);
writeEntry(os, "dDeparture", dDeparture_);
writeEntry(os, "fDeparture", fDeparture_);
writeEntry(os, "nucleationSiteDensity", nucleationSiteDensity_);
writeEntry(os, "qQuenching", qQuenching_);
writeEntry(os, "qEvaporative", qEvaporative_);
writeEntry(os, "dmdtf", dmdtf_);
}
}

View File

@ -67,15 +67,14 @@ Description
Usage
\table
Property | Description | Required | Default value
phaseType | 'vapor' or 'liquid' | yes |
phaseType | 'vapour' or 'liquid' | yes |
useLiquidTemperatureWallFunction | \\
Use wall function to calculate liquid temperature? | no | yes
tolerance | solution tolerance | no | rootSmall
dmdt | phase change mass flux | no | uniform 0
Prt | turbulent Prandtl number | no | 0.85
\endtable
if phaseType 'vapor':
if phaseType 'vapour':
\table
partitioningModel | | yes |
\endtable
@ -84,8 +83,8 @@ Usage
\table
partitioningModel | | yes |
nucleationSiteModel | | yes |
departureDiamModel | | yes |
departureFreqModel | | yes |
departureDiameterModel | | yes |
departureFrequenctModel | | yes |
bubbleWaitingTimeRatio | | no | 0.8
\endtable
@ -108,11 +107,11 @@ Usage
{
type LemmertChawla;
}
departureDiamModel
departureDiameterModel
{
type TolubinskiKostanchuk;
}
departureFreqModel
departureFrequencyModel
{
type Cole;
}
@ -157,12 +156,13 @@ public:
//- Enumeration listing the possible operational modes
enum phaseType
{
vaporPhase,
vapourPhase,
vaporPhase, // <-- backwards compatibility
liquidPhase
};
//- Heat source type names
static const NamedEnum<phaseType, 2> phaseTypeNames_;
static const NamedEnum<phaseType, 3> phaseTypeNames_;
private:
@ -221,22 +221,22 @@ private:
// State
//- Wall liquid fraction
scalarField fLiquid_;
scalarField wetFraction_;
//- Departure diameter
scalarField dDep_;
scalarField dDeparture_;
//- Departure frequency
scalarField fDep_;
scalarField fDeparture_;
//- Nucleation site density
scalarField N_;
scalarField nucleationSiteDensity_;
//- Quenching surface heat flux
scalarField qq_;
scalarField qQuenching_;
//- Evaporative surface heat flux
scalarField qe_;
scalarField qEvaporative_;
//- Mass transfer rate
scalarField dmdtf_;
@ -251,11 +251,11 @@ private:
(
const boilingLiquidProperties& props,
const scalarField& Tw,
scalarField& dDep,
scalarField& fDep,
scalarField& N,
scalarField& qq,
scalarField& qe,
scalarField& dDeparture,
scalarField& fDeparture,
scalarField& nucleationSiteDensity,
scalarField& qQuenching,
scalarField& qEvaporative,
scalarField& dmdtf
) const;
@ -358,37 +358,37 @@ public:
//- Return the wall liquid fraction field [-]
const scalarField& wetFraction() const
{
return fLiquid_;
return wetFraction_;
}
//- Return the departure diameter field [m]
const scalarField& dDeparture() const
{
return dDep_;
return dDeparture_;
}
//- Return the departure frequency field [Hz]
const scalarField& fDeparture() const
{
return fDep_;
return fDeparture_;
}
//- Return the nucleation site density field [1/m^2]
const scalarField& nucleationSiteDensity() const
{
return N_;
return nucleationSiteDensity_;
}
//- Return the quenching surface heat flux field [W/m^2]
const scalarField& qQuenching() const
{
return qq_;
return qQuenching_;
}
//- Return the evaporative surface heat flux field [W/m^2]
const scalarField& qEvaporative() const
{
return qe_;
return qEvaporative_;
}
//- Return the rate of phase change

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -91,7 +91,7 @@ Foam::wallBoilingModels::departureDiameterModels::
KocamustafaogullariIshiiDepartureDiameter::dDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -103,13 +103,13 @@ KocamustafaogullariIshiiDepartureDiameter::dDeparture
liquid.mesh().lookupObject<uniformDimensionedVectorField>("g");
const scalarField rhoLiquid(liquid.thermo().rho(patchi));
const scalarField rhoVapor(vapor.thermo().rho(patchi));
const scalarField rhoVapor(vapour.thermo().rho(patchi));
const scalarField rhoM((rhoLiquid - rhoVapor)/rhoVapor);
const scalarField sigmaw
(
liquid.fluid().sigma(phaseInterface(liquid, vapor), patchi)
liquid.fluid().sigma(phaseInterface(liquid, vapour), patchi)
);
return

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -106,13 +106,14 @@ public:
virtual tmp<scalarField> dDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
const scalarField& L
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,8 +48,8 @@ namespace departureDiameterModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallBoilingModels::departureDiameterModels::
TolubinskiKostanchuk::TolubinskiKostanchuk
Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk::
TolubinskiKostanchuk
(
const dictionary& dict
)
@ -61,8 +61,8 @@ TolubinskiKostanchuk::TolubinskiKostanchuk
{}
Foam::wallBoilingModels::departureDiameterModels::
TolubinskiKostanchuk::TolubinskiKostanchuk
Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk::
TolubinskiKostanchuk
(
const TolubinskiKostanchuk& model
)
@ -76,19 +76,19 @@ TolubinskiKostanchuk::TolubinskiKostanchuk
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallBoilingModels::departureDiameterModels::
TolubinskiKostanchuk::~TolubinskiKostanchuk()
Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk::
~TolubinskiKostanchuk()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::departureDiameterModels::
TolubinskiKostanchuk::dDeparture
Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk::
dDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -99,8 +99,8 @@ TolubinskiKostanchuk::dDeparture
}
void Foam::wallBoilingModels::departureDiameterModels::
TolubinskiKostanchuk::write(Ostream& os) const
void Foam::wallBoilingModels::departureDiameterModels::TolubinskiKostanchuk::
write(Ostream& os) const
{
departureDiameterModel::write(os);
writeEntry(os, "dRef", dRef_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,8 +62,7 @@ class TolubinskiKostanchuk
:
public departureDiameterModel
{
// Private Data:
// Private Data
//- Coefficient of the temperature term
scalar dRef_;
@ -74,6 +73,7 @@ class TolubinskiKostanchuk
//- Minimum diameter
scalar dMin_;
public:
//- Runtime type information
@ -108,13 +108,14 @@ public:
virtual tmp<scalarField> dDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
const scalarField& L
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,13 +102,14 @@ public:
virtual tmp<scalarField> dDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
const scalarField& L
) const = 0;
//- Write
virtual void write(Ostream& os) const;
@ -120,6 +121,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace wallBoilingModels
} // End namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -51,15 +51,19 @@ namespace departureFrequencyModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallBoilingModels::departureFrequencyModels::
Cole::Cole(const dictionary& dict)
Foam::wallBoilingModels::departureFrequencyModels::Cole::Cole
(
const dictionary& dict
)
:
departureFrequencyModel()
{}
Foam::wallBoilingModels::departureFrequencyModels::
Cole::Cole(const Cole& model)
Foam::wallBoilingModels::departureFrequencyModels::Cole::Cole
(
const Cole& model
)
:
departureFrequencyModel(model)
{}
@ -67,19 +71,17 @@ Cole::Cole(const Cole& model)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallBoilingModels::departureFrequencyModels::
Cole::~Cole()
Foam::wallBoilingModels::departureFrequencyModels::Cole::~Cole()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::departureFrequencyModels::
Cole::fDeparture
Foam::wallBoilingModels::departureFrequencyModels::Cole::fDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -92,7 +94,7 @@ Cole::fDeparture
liquid.mesh().lookupObject<uniformDimensionedVectorField>("g");
const scalarField rhoLiquid(liquid.thermo().rho(patchi));
const scalarField rhoVapor(vapor.thermo().rho(patchi));
const scalarField rhoVapor(vapour.thermo().rho(patchi));
return sqrt
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -93,7 +93,7 @@ public:
virtual tmp<scalarField> fDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -88,7 +88,7 @@ Foam::wallBoilingModels::departureFrequencyModels::
KocamustafaogullariIshiiDepartureFrequency::fDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -101,11 +101,11 @@ KocamustafaogullariIshiiDepartureFrequency::fDeparture
liquid.mesh().lookupObject<uniformDimensionedVectorField>("g");
const scalarField rhoLiquid(liquid.thermo().rho(patchi));
const scalarField rhoVapor(min(vapor.thermo().rho(patchi), rhoLiquid));
const scalarField rhoVapor(min(vapour.thermo().rho(patchi), rhoLiquid));
const tmp<volScalarField> tsigma
(
liquid.fluid().sigma(phaseInterface(liquid, vapor))
liquid.fluid().sigma(phaseInterface(liquid, vapour))
);
const volScalarField& sigma = tsigma();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -106,7 +106,7 @@ public:
virtual tmp<scalarField> fDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -114,6 +114,7 @@ public:
const scalarField& dDep
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -102,7 +102,7 @@ public:
virtual tmp<scalarField> fDeparture
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -110,6 +110,7 @@ public:
const scalarField& dDep
) const = 0;
//- Write
virtual void write(Ostream& os) const;
@ -121,6 +122,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace wallBoilingModels
} // End namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -83,10 +83,10 @@ KocamustafaogullariIshiiNucleationSite::
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::nucleationSiteModels::
KocamustafaogullariIshiiNucleationSite::N
KocamustafaogullariIshiiNucleationSite::nucleationSiteDensity
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -99,12 +99,12 @@ KocamustafaogullariIshiiNucleationSite::N
liquid.thermo().T().boundaryField()[patchi];
const scalarField rhoLiquid(liquid.thermo().rho(patchi));
const scalarField rhoVapor(vapor.thermo().rho(patchi));
const scalarField rhoVapor(vapour.thermo().rho(patchi));
const scalarField rhoM((rhoLiquid - rhoVapor)/rhoVapor);
const scalarField sigmaw
(
liquid.fluid().sigma(phaseInterface(liquid, vapor), patchi)
liquid.fluid().sigma(phaseInterface(liquid, vapour), patchi)
);
//eq. (32)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2019-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2019-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -101,10 +101,10 @@ public:
// Member Functions
//- Calculate and return the nucleation-site density
virtual tmp<scalarField> N
virtual tmp<scalarField> nucleationSiteDensity
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -113,6 +113,7 @@ public:
const scalarField& fDep
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,10 +81,11 @@ Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::~LemmertChawla()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::N
Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::
nucleationSiteDensity
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -100,8 +101,10 @@ Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::N
}
void Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::
write(Ostream& os) const
void Foam::wallBoilingModels::nucleationSiteModels::LemmertChawla::write
(
Ostream& os
) const
{
nucleationSiteModel::write(os);
writeKeyword(os, "Cn") << Cn_ << token::END_STATEMENT << nl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,7 +67,7 @@ class LemmertChawla
:
public nucleationSiteModel
{
// Private Data:
// Private Data
//- Coefficient for nucleation site density
scalar Cn_;
@ -106,10 +106,10 @@ public:
// Member Functions
//- Calculate and return the nucleation-site density
virtual tmp<scalarField> N
virtual tmp<scalarField> nucleationSiteDensity
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -118,6 +118,7 @@ public:
const scalarField& fDep
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -99,10 +99,10 @@ public:
// Member Functions
//- Calculate and return the nucleation-site density
virtual tmp<scalarField> N
virtual tmp<scalarField> nucleationSiteDensity
(
const phaseModel& liquid,
const phaseModel& vapor,
const phaseModel& vapour,
const label patchi,
const scalarField& Tl,
const scalarField& Tsatw,
@ -111,6 +111,7 @@ public:
const scalarField& fDep
) const = 0;
//- Write
virtual void write(Ostream& os) const;
@ -122,6 +123,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace wallBoilingModels
} // End namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,16 +48,20 @@ namespace partitioningModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
Lavieville::Lavieville(const dictionary& dict)
Foam::wallBoilingModels::partitioningModels::Lavieville::Lavieville
(
const dictionary& dict
)
:
partitioningModel(),
alphaCrit_(dict.lookup<scalar>("alphaCrit"))
{}
Foam::wallBoilingModels::partitioningModels::
Lavieville::Lavieville(const Lavieville& model)
Foam::wallBoilingModels::partitioningModels::Lavieville::Lavieville
(
const Lavieville& model
)
:
partitioningModel(model),
alphaCrit_(model.alphaCrit_)
@ -66,16 +70,14 @@ Lavieville::Lavieville(const Lavieville& model)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
Lavieville::~Lavieville()
Foam::wallBoilingModels::partitioningModels::Lavieville::~Lavieville()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::partitioningModels::
Lavieville::fLiquid
Foam::wallBoilingModels::partitioningModels::Lavieville::wetFraction
(
const scalarField& alphaLiquid
) const
@ -92,8 +94,10 @@ Lavieville::fLiquid
}
void Foam::wallBoilingModels::partitioningModels::
Lavieville::write(Ostream& os) const
void Foam::wallBoilingModels::partitioningModels::Lavieville::write
(
Ostream& os
) const
{
partitioningModel::write(os);
writeEntry(os, "alphaCrit", alphaCrit_);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,9 +98,13 @@ public:
// Member Functions
//- Liquid blending function
virtual tmp<scalarField> fLiquid(const scalarField& alphaLiquid) const;
//- Return the wet fraction
virtual tmp<scalarField> wetFraction
(
const scalarField& alphaLiquid
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,36 +48,38 @@ namespace partitioningModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
cosine::cosine(const dictionary& dict)
Foam::wallBoilingModels::partitioningModels::cosine::cosine
(
const dictionary& dict
)
:
partitioningModel(),
alphaLiquid1_(dict.lookup<scalar>("alphaLiquid1")),
alphaLiquid0_(dict.lookup<scalar>("alphaLiquid0"))
alphaLiquid0_(dict.lookup<scalar>("alphaLiquid0")),
alphaLiquid1_(dict.lookup<scalar>("alphaLiquid1"))
{}
Foam::wallBoilingModels::partitioningModels::
cosine::cosine(const cosine& model)
Foam::wallBoilingModels::partitioningModels::cosine::cosine
(
const cosine& model
)
:
partitioningModel(model),
alphaLiquid1_(model.alphaLiquid1_),
alphaLiquid0_(model.alphaLiquid0_)
alphaLiquid0_(model.alphaLiquid0_),
alphaLiquid1_(model.alphaLiquid1_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
cosine::~cosine()
Foam::wallBoilingModels::partitioningModels::cosine::~cosine()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::partitioningModels::
cosine::fLiquid
Foam::wallBoilingModels::partitioningModels::cosine::wetFraction
(
const scalarField& alphaLiquid
) const
@ -102,12 +104,14 @@ cosine::fLiquid
}
void Foam::wallBoilingModels::partitioningModels::
cosine::write(Ostream& os) const
void Foam::wallBoilingModels::partitioningModels::cosine::write
(
Ostream& os
) const
{
partitioningModel::write(os);
writeEntry(os, "alphaLiquid1", alphaLiquid1_);
writeEntry(os, "alphaLiquid0", alphaLiquid0_);
writeEntry(os, "alphaLiquid1", alphaLiquid1_);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,10 +68,12 @@ class cosine
{
// Private Data
// Model parameters, threshold liquid phase fractions
scalar alphaLiquid1_;
//- Lower threshold liquid phase fraction
scalar alphaLiquid0_;
//- Upper threshold liquid phase fraction
scalar alphaLiquid1_;
public:
@ -100,9 +102,13 @@ public:
// Member Functions
//- Calculate and return the wall heat-flux partitioning
virtual tmp<scalarField> fLiquid(const scalarField& alphaLiquid) const;
//- Return the wet fraction
virtual tmp<scalarField> wetFraction
(
const scalarField& alphaLiquid
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,59 +48,63 @@ namespace partitioningModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
linear::linear(const dictionary& dict)
Foam::wallBoilingModels::partitioningModels::linear::linear
(
const dictionary& dict
)
:
partitioningModel(),
alphaLiquid1_(dict.lookup<scalar>("alphaLiquid1")),
alphaLiquid0_(dict.lookup<scalar>("alphaLiquid0"))
alphaLiquid0_(dict.lookup<scalar>("alphaLiquid0")),
alphaLiquid1_(dict.lookup<scalar>("alphaLiquid1"))
{}
Foam::wallBoilingModels::partitioningModels::
linear::linear(const linear& model)
Foam::wallBoilingModels::partitioningModels::linear::linear
(
const linear& model
)
:
partitioningModel(model),
alphaLiquid1_(model.alphaLiquid1_),
alphaLiquid0_(model.alphaLiquid0_)
alphaLiquid0_(model.alphaLiquid0_),
alphaLiquid1_(model.alphaLiquid1_)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
linear::~linear()
Foam::wallBoilingModels::partitioningModels::linear::~linear()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::partitioningModels::
linear::fLiquid
Foam::wallBoilingModels::partitioningModels::linear::wetFraction
(
const scalarField& alphaLiquid
) const
{
return max
return
min
(
scalar(0),
min
max
(
scalar(1)-(alphaLiquid1_ - alphaLiquid)
/(alphaLiquid1_ - alphaLiquid0_),
scalar(1)
)
(alphaLiquid - alphaLiquid0_)/(alphaLiquid1_ - alphaLiquid0_),
scalar(0)
),
scalar(1)
);
}
void Foam::wallBoilingModels::partitioningModels::
linear::write(Ostream& os) const
void Foam::wallBoilingModels::partitioningModels::linear::write
(
Ostream& os
) const
{
partitioningModel::write(os);
writeEntry(os, "alphaLiquid1", alphaLiquid1_);
writeEntry(os, "alphaLiquid0", alphaLiquid0_);
writeEntry(os, "alphaLiquid1", alphaLiquid1_);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -69,10 +69,12 @@ class linear
{
// Private Data
//- Model parameters, threshold liquid phase fractions
scalar alphaLiquid1_;
//- Lower threshold liquid phase fraction
scalar alphaLiquid0_;
//- Upper threshold liquid phase fraction
scalar alphaLiquid1_;
public:
@ -101,9 +103,13 @@ public:
// Member Functions
//- Calculate and return the wall heat-flux partitioning
virtual tmp<scalarField> fLiquid(const scalarField& alphaLiquid) const;
//- Return the wet fraction
virtual tmp<scalarField> wetFraction
(
const scalarField& alphaLiquid
) const;
//- Write
virtual void write(Ostream& os) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -96,12 +96,13 @@ public:
// Member Functions
//- Calculate and return the wall heat-flux partitioning
virtual tmp<scalarField> fLiquid
//- Return the wet fraction
virtual tmp<scalarField> wetFraction
(
const scalarField& alphaLiquid
) const = 0;
//- Write
virtual void write(Ostream& os) const;
@ -113,6 +114,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace wallBoilingModels
} // End namespace Foam

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,15 +48,19 @@ namespace partitioningModels
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
phaseFraction::phaseFraction(const dictionary& dict)
Foam::wallBoilingModels::partitioningModels::phaseFraction::phaseFraction
(
const dictionary& dict
)
:
partitioningModel()
{}
Foam::wallBoilingModels::partitioningModels::
phaseFraction::phaseFraction(const phaseFraction& model)
Foam::wallBoilingModels::partitioningModels::phaseFraction::phaseFraction
(
const phaseFraction& model
)
:
partitioningModel(model)
{}
@ -64,16 +68,14 @@ phaseFraction::phaseFraction(const phaseFraction& model)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::wallBoilingModels::partitioningModels::
phaseFraction::~phaseFraction()
Foam::wallBoilingModels::partitioningModels::phaseFraction::~phaseFraction()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::tmp<Foam::scalarField>
Foam::wallBoilingModels::partitioningModels::
phaseFraction::fLiquid
Foam::wallBoilingModels::partitioningModels::phaseFraction::wetFraction
(
const scalarField& alphaLiquid
) const

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2022 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -82,8 +82,11 @@ public:
// Member Functions
//- Calculate and return the wall heat-flux partitioning
virtual tmp<scalarField> fLiquid(const scalarField& alphaLiquid) const;
//- Return the wet fraction
virtual tmp<scalarField> wetFraction
(
const scalarField& alphaLiquid
) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -1029,6 +1029,26 @@ Foam::dictionary& Foam::dictionary::subDict(const word& keyword)
}
const Foam::dictionary& Foam::dictionary::subDictBackwardsCompatible
(
const wordList& keywords
) const
{
const entry* entryPtr =
lookupEntryPtrBackwardsCompatible(keywords, false, true);
if (entryPtr == nullptr)
{
// Generate error message using the first keyword
return subDict(keywords[0]);
}
else
{
return entryPtr->dict();
}
}
Foam::dictionary Foam::dictionary::subOrEmptyDict
(
const word& keyword,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -521,6 +521,10 @@ public:
//- Find and return a sub-dictionary for manipulation
dictionary& subDict(const word&);
//- Find and return a sub-dictionary, trying a list of keywords in
// sequence, otherwise error.
const dictionary& subDictBackwardsCompatible(const wordList&) const;
//- Find and return a sub-dictionary as a copy, or
// return an empty dictionary if the sub-dictionary does not exist
dictionary subOrEmptyDict