compressible::alphatWallBoilingWallFunction: Improved solution procedure
This boundary condition now solves for the wall temperature by interval
bisection, which should be significantly more robust than the previous
fixed-point iteration procedure. There is a new non-dimensional
"tolerance" setting that controls how tightly this solution procedure
solves the wall temperature. The "relax" setting is no longer used.
The boundary condition no longer triggers re-evaluation of the
temperature condition in order to re-calculate the heat flux within the
solution iteration. Instead, it extracts physical coefficients from the
form of the boundary condition and uses these to form a linearised
approximation of the heat flux. This is a more general approach, and
will not trigger side-effects associated with re-evaluating the
temperature condition.
The fixedMultiphaseHeatFlux condition has been replaced by a
uniformFixedMultiphaseHeatFlux condition, which constructs a mixed
constraint which portions a specified heat flux between the phases in
such a way as to keep the boundary temperature uniform across all
phases. This can be applied to all phases. It is no longer necessary to
apply a heat flux model to one "master" phase, then map the resulting
temperature to the others. An example specification of this boundary
condition is as follows:
wall
{
type uniformFixedMultiphaseHeatFlux;
q 1000;
relax 0.3;
value $internalField;
}
The wall boiling tutorials have been updated to use these new functions,
and time-varying heat input has been used to replace the
stop-modify-restart pattern present in the single-region cases.
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -165,10 +165,8 @@ bool Foam::functionObjects::wallBoilingProperties::write()
|
|||||||
if (isA<alphatWallBoilingWallFunction>(alphatBf[patchi]))
|
if (isA<alphatWallBoilingWallFunction>(alphatBf[patchi]))
|
||||||
{
|
{
|
||||||
const alphatWallBoilingWallFunction& alphatw =
|
const alphatWallBoilingWallFunction& alphatw =
|
||||||
refCast
|
refCast<const alphatWallBoilingWallFunction>
|
||||||
<
|
(alphatBf[patchi]);
|
||||||
const alphatWallBoilingWallFunction
|
|
||||||
>(alphatBf[patchi]);
|
|
||||||
|
|
||||||
dDeparture.boundaryFieldRef()[patchi] =
|
dDeparture.boundaryFieldRef()[patchi] =
|
||||||
alphatw.dDeparture();
|
alphatw.dDeparture();
|
||||||
|
|||||||
@ -22,7 +22,7 @@ derivedFvPatchFields/wallBoilingSubModels/departureFrequencyModels/Kocamustafaog
|
|||||||
|
|
||||||
derivedFvPatchFields/alphatPhaseChangeWallFunctionBase/alphatPhaseChangeWallFunctionBase.C
|
derivedFvPatchFields/alphatPhaseChangeWallFunctionBase/alphatPhaseChangeWallFunctionBase.C
|
||||||
derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
|
derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.C
|
||||||
derivedFvPatchFields/fixedMultiphaseHeatFlux/fixedMultiphaseHeatFluxFvPatchScalarField.C
|
derivedFvPatchFields/uniformFixedMultiphaseHeatFlux/uniformFixedMultiphaseHeatFluxFvPatchScalarField.C
|
||||||
derivedFvPatchFields/coupledMultiphaseTemperature/coupledMultiphaseTemperatureFvPatchScalarField.C
|
derivedFvPatchFields/coupledMultiphaseTemperature/coupledMultiphaseTemperatureFvPatchScalarField.C
|
||||||
|
|
||||||
LIB = $(FOAM_LIBBIN)/libmultiphaseThermophysicalTransportModels
|
LIB = $(FOAM_LIBBIN)/libmultiphaseThermophysicalTransportModels
|
||||||
|
|||||||
@ -94,23 +94,6 @@ bool alphatPhaseChangeWallFunctionBase::activeInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const scalarField& alphatPhaseChangeWallFunctionBase::dmdtf
|
|
||||||
(
|
|
||||||
const phaseInterface& interface
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
if (!activeInterface(interface))
|
|
||||||
{
|
|
||||||
FatalErrorInFunction
|
|
||||||
<< "Phase change mass transfer rate requested for interface on "
|
|
||||||
<< "which there is no phase change "
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dmdtf();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void alphatPhaseChangeWallFunctionBase::write(Ostream& os) const
|
void alphatPhaseChangeWallFunctionBase::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
writeEntry(os, "otherPhase", otherPhaseName_);
|
writeEntry(os, "otherPhase", otherPhaseName_);
|
||||||
|
|||||||
@ -96,9 +96,6 @@ public:
|
|||||||
//- Return the rate of phase-change
|
//- Return the rate of phase-change
|
||||||
virtual const scalarField& dmdtf() const = 0;
|
virtual const scalarField& dmdtf() const = 0;
|
||||||
|
|
||||||
//- Return the rate of phase-change for the given interface
|
|
||||||
const scalarField& dmdtf(const phaseInterface&) const;
|
|
||||||
|
|
||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -32,6 +32,12 @@ License
|
|||||||
#include "phaseCompressibleMomentumTransportModel.H"
|
#include "phaseCompressibleMomentumTransportModel.H"
|
||||||
#include "interfaceSaturationTemperatureModel.H"
|
#include "interfaceSaturationTemperatureModel.H"
|
||||||
#include "rhoMulticomponentThermo.H"
|
#include "rhoMulticomponentThermo.H"
|
||||||
|
|
||||||
|
#include "fixedValueFvPatchFields.H"
|
||||||
|
#include "zeroGradientFvPatchFields.H"
|
||||||
|
#include "fixedGradientFvPatchFields.H"
|
||||||
|
#include "mixedFvPatchFields.H"
|
||||||
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
using namespace Foam::constant::mathematical;
|
using namespace Foam::constant::mathematical;
|
||||||
@ -63,6 +69,464 @@ namespace Foam
|
|||||||
namespace compressible
|
namespace compressible
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
struct alphatWallBoilingWallFunctionFvPatchScalarField::properties
|
||||||
|
{
|
||||||
|
// Data
|
||||||
|
|
||||||
|
//- Wall function field
|
||||||
|
const alphatWallBoilingWallFunctionFvPatchScalarField& field;
|
||||||
|
|
||||||
|
//- Phase
|
||||||
|
const phaseModel& phase;
|
||||||
|
|
||||||
|
//- Other phase
|
||||||
|
const phaseModel& otherPhase;
|
||||||
|
|
||||||
|
//- Volume fraction
|
||||||
|
const scalarField& alphaw;
|
||||||
|
|
||||||
|
//- Other volume fraction
|
||||||
|
const scalarField& otherAlphaw;
|
||||||
|
|
||||||
|
//- Interface
|
||||||
|
const phaseInterface interface;
|
||||||
|
|
||||||
|
//- Phase thermophysical transport model
|
||||||
|
const fluidThermophysicalTransportModel& ttm;
|
||||||
|
|
||||||
|
//- Phase convective turbulent thermal diffusivity
|
||||||
|
const scalarField alphatConv;
|
||||||
|
|
||||||
|
|
||||||
|
//- Constructor
|
||||||
|
properties
|
||||||
|
(
|
||||||
|
const alphatWallBoilingWallFunctionFvPatchScalarField& field,
|
||||||
|
const phaseModel& phase,
|
||||||
|
const phaseModel& otherPhase
|
||||||
|
)
|
||||||
|
:
|
||||||
|
field(field),
|
||||||
|
phase(phase),
|
||||||
|
otherPhase(otherPhase),
|
||||||
|
alphaw(phase.boundaryField()[patchi()]),
|
||||||
|
otherAlphaw(otherPhase.boundaryField()[patchi()]),
|
||||||
|
interface(phase, otherPhase),
|
||||||
|
ttm
|
||||||
|
(
|
||||||
|
field.db().lookupType<fluidThermophysicalTransportModel>
|
||||||
|
(
|
||||||
|
phase.name()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
alphatConv
|
||||||
|
(
|
||||||
|
alphatJayatillekeWallFunctionFvPatchScalarField::alphat
|
||||||
|
(
|
||||||
|
ttm,
|
||||||
|
field.Prt_,
|
||||||
|
patchi()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Fuctions
|
||||||
|
|
||||||
|
//- Patch
|
||||||
|
inline const fvPatch& patch() const
|
||||||
|
{
|
||||||
|
return field.patch();
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Patch index
|
||||||
|
inline label patchi() const
|
||||||
|
{
|
||||||
|
return patch().index();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct alphatWallBoilingWallFunctionFvPatchScalarField::boilingLiquidProperties
|
||||||
|
:
|
||||||
|
public alphatWallBoilingWallFunctionFvPatchScalarField::properties
|
||||||
|
{
|
||||||
|
// Data
|
||||||
|
|
||||||
|
//- Name of the volatile specie
|
||||||
|
const word volatileSpecie;
|
||||||
|
|
||||||
|
//- Patch area by neighbouring cell volume ratio
|
||||||
|
const scalarField AbyV;
|
||||||
|
|
||||||
|
//- Liquid density
|
||||||
|
const tmp<scalarField> trhoLiquidw;
|
||||||
|
const scalarField& rhoLiquidw;
|
||||||
|
|
||||||
|
//- Vapour density
|
||||||
|
const tmp<scalarField> trhoVapourw;
|
||||||
|
const scalarField& rhoVapourw;
|
||||||
|
|
||||||
|
//- Liquid heat capacity
|
||||||
|
const scalarField& Cpw;
|
||||||
|
|
||||||
|
//- Liquid laminar kinematic viscosity
|
||||||
|
const tmp<scalarField> tnuw;
|
||||||
|
const scalarField& nuw;
|
||||||
|
|
||||||
|
//- Liquid laminar thermal diffusivity
|
||||||
|
const scalarField kappaByCp;
|
||||||
|
|
||||||
|
//- Liquid viscosity wall function
|
||||||
|
const nutWallFunctionFvPatchScalarField& nutw;
|
||||||
|
|
||||||
|
//- Dimensionless wall distance
|
||||||
|
const scalarField yPlus;
|
||||||
|
|
||||||
|
//- Smoothing function
|
||||||
|
const scalarField P;
|
||||||
|
|
||||||
|
//- Cell temperature
|
||||||
|
const scalarField Tc;
|
||||||
|
|
||||||
|
//- Saturation temperature
|
||||||
|
const scalarField Tsat;
|
||||||
|
|
||||||
|
//- Latent heat
|
||||||
|
const scalarField L;
|
||||||
|
|
||||||
|
|
||||||
|
//- Constructor
|
||||||
|
boilingLiquidProperties
|
||||||
|
(
|
||||||
|
const alphatWallBoilingWallFunctionFvPatchScalarField& field,
|
||||||
|
const phaseModel& liquid,
|
||||||
|
const phaseModel& vapour
|
||||||
|
)
|
||||||
|
:
|
||||||
|
properties(field, liquid, vapour),
|
||||||
|
volatileSpecie
|
||||||
|
(
|
||||||
|
liquid.fluid().lookupOrDefault<word>("volatile", "none")
|
||||||
|
),
|
||||||
|
AbyV
|
||||||
|
(
|
||||||
|
patch().magSf()
|
||||||
|
/scalarField
|
||||||
|
(
|
||||||
|
patch().boundaryMesh().mesh().V(),
|
||||||
|
patch().faceCells()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
trhoLiquidw(liquid.thermo().rho(patchi())),
|
||||||
|
rhoLiquidw(trhoLiquidw()),
|
||||||
|
trhoVapourw(vapour.thermo().rho(patchi())),
|
||||||
|
rhoVapourw(trhoVapourw()),
|
||||||
|
Cpw(liquid.thermo().Cp().boundaryField()[patchi()]),
|
||||||
|
tnuw(liquid.thermo().nu(patchi())),
|
||||||
|
nuw(tnuw()),
|
||||||
|
kappaByCp
|
||||||
|
(
|
||||||
|
liquid.thermo().kappa().boundaryField()[patchi()]
|
||||||
|
/liquid.thermo().Cp().boundaryField()[patchi()]
|
||||||
|
),
|
||||||
|
nutw
|
||||||
|
(
|
||||||
|
nutWallFunctionFvPatchScalarField::nutw
|
||||||
|
(
|
||||||
|
ttm.momentumTransport(),
|
||||||
|
patchi()
|
||||||
|
)
|
||||||
|
),
|
||||||
|
yPlus
|
||||||
|
(
|
||||||
|
pow025(nutw.Cmu())
|
||||||
|
*sqrt(ttm.momentumTransport().k()().boundaryField()[patchi()])
|
||||||
|
*ttm.momentumTransport().y()[patchi()]
|
||||||
|
/nuw
|
||||||
|
),
|
||||||
|
P
|
||||||
|
(
|
||||||
|
alphatJayatillekeWallFunctionFvPatchScalarField::P
|
||||||
|
(
|
||||||
|
rhoLiquidw*nuw/kappaByCp/field.Prt_
|
||||||
|
)
|
||||||
|
),
|
||||||
|
Tc
|
||||||
|
(
|
||||||
|
liquid.thermo().T().boundaryField()[patchi()].patchInternalField()
|
||||||
|
),
|
||||||
|
Tsat
|
||||||
|
(
|
||||||
|
liquid.fluid().lookupInterfacialModel
|
||||||
|
<
|
||||||
|
interfaceSaturationTemperatureModel
|
||||||
|
>
|
||||||
|
(interface)
|
||||||
|
.Tsat(liquid.thermo().p())()
|
||||||
|
.boundaryField()[patchi()]
|
||||||
|
),
|
||||||
|
L
|
||||||
|
(
|
||||||
|
volatileSpecie != "none"
|
||||||
|
? -refCast<const heatTransferPhaseSystem>(liquid.fluid())
|
||||||
|
.Li
|
||||||
|
(
|
||||||
|
interface,
|
||||||
|
volatileSpecie,
|
||||||
|
scalarField(patch().size(), +1),
|
||||||
|
Tsat,
|
||||||
|
patch().faceCells(),
|
||||||
|
heatTransferPhaseSystem::latentHeatScheme::upwind
|
||||||
|
)
|
||||||
|
: -refCast<const heatTransferPhaseSystem>(liquid.fluid())
|
||||||
|
.L
|
||||||
|
(
|
||||||
|
interface,
|
||||||
|
scalarField(patch().size(), +1),
|
||||||
|
Tsat,
|
||||||
|
patch().faceCells(),
|
||||||
|
heatTransferPhaseSystem::latentHeatScheme::upwind
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
tmp<scalarField>
|
||||||
|
alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
const scalarField& Tw,
|
||||||
|
scalarField& dDep,
|
||||||
|
scalarField& fDep,
|
||||||
|
scalarField& N,
|
||||||
|
scalarField& qq,
|
||||||
|
scalarField& qe,
|
||||||
|
scalarField& dmdtf
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
scalarField Tl;
|
||||||
|
if (!useLiquidTemperatureWallFunction_)
|
||||||
|
{
|
||||||
|
Tl = props.Tc;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Liquid temperature at y+=250 is estimated from the
|
||||||
|
// logarithmic thermal wall function of Koncar, Krepper
|
||||||
|
// & Egorov (2005)
|
||||||
|
const scalarField TyPlus250
|
||||||
|
(
|
||||||
|
Prt_
|
||||||
|
*(
|
||||||
|
log(props.nutw.E()*250)
|
||||||
|
/props.nutw.kappa()
|
||||||
|
+ props.P
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
const scalarField TyPlus
|
||||||
|
(
|
||||||
|
Prt_
|
||||||
|
*(
|
||||||
|
log(props.nutw.E()*max(props.yPlus, scalar(11)))
|
||||||
|
/props.nutw.kappa()
|
||||||
|
+ props.P
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
Tl = Tw - (TyPlus250/TyPlus)*(Tw - props.Tc);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Bubble departure diameter
|
||||||
|
dDep =
|
||||||
|
departureDiameterModel_->dDeparture
|
||||||
|
(
|
||||||
|
props.phase,
|
||||||
|
props.otherPhase,
|
||||||
|
patch().index(),
|
||||||
|
Tl,
|
||||||
|
props.Tsat,
|
||||||
|
props.L
|
||||||
|
);
|
||||||
|
|
||||||
|
// Bubble departure frequency
|
||||||
|
fDep =
|
||||||
|
departureFrequencyModel_->fDeparture
|
||||||
|
(
|
||||||
|
props.phase,
|
||||||
|
props.otherPhase,
|
||||||
|
patch().index(),
|
||||||
|
Tl,
|
||||||
|
props.Tsat,
|
||||||
|
props.L,
|
||||||
|
dDep
|
||||||
|
);
|
||||||
|
|
||||||
|
// Nucleation site density
|
||||||
|
N =
|
||||||
|
nucleationSiteModel_->N
|
||||||
|
(
|
||||||
|
props.phase,
|
||||||
|
props.otherPhase,
|
||||||
|
patch().index(),
|
||||||
|
Tl,
|
||||||
|
props.Tsat,
|
||||||
|
props.L,
|
||||||
|
dDep,
|
||||||
|
fDep
|
||||||
|
);
|
||||||
|
|
||||||
|
// Del Valle & Kenning (1985)
|
||||||
|
const scalarField Ja
|
||||||
|
(
|
||||||
|
props.rhoLiquidw
|
||||||
|
*props.Cpw
|
||||||
|
*(props.Tsat - Tl)
|
||||||
|
/(props.rhoVapourw*props.L)
|
||||||
|
);
|
||||||
|
|
||||||
|
const scalarField Al
|
||||||
|
(
|
||||||
|
fLiquid_*4.8*exp(min(-Ja/80, log(vGreat)))
|
||||||
|
);
|
||||||
|
|
||||||
|
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)));
|
||||||
|
|
||||||
|
if (props.volatileSpecie != "none" && !props.phase.pure())
|
||||||
|
{
|
||||||
|
const scalarField& Yvolatile =
|
||||||
|
props.phase
|
||||||
|
.Y(props.volatileSpecie)
|
||||||
|
.boundaryField()[patch().index()];
|
||||||
|
A2E *= Yvolatile;
|
||||||
|
A2 *= Yvolatile;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
// Quenching heat transfer coefficient
|
||||||
|
const scalarField hQ
|
||||||
|
(
|
||||||
|
2*props.kappaByCp*props.Cpw*fDep
|
||||||
|
*sqrt((tau_/max(fDep, small))/(pi*props.kappaByCp/props.rhoLiquidw))
|
||||||
|
);
|
||||||
|
|
||||||
|
// Quenching heat flux
|
||||||
|
qq = A2*hQ*max(Tw - Tl, scalar(0));
|
||||||
|
|
||||||
|
// Evaporation heat flux
|
||||||
|
qe = 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_;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<scalarField>
|
||||||
|
alphatWallBoilingWallFunctionFvPatchScalarField::calcBoiling
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
const scalarField& Tw
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
scalarField dDep(dDep_);
|
||||||
|
scalarField fDep(fDep_);
|
||||||
|
scalarField N(N_);
|
||||||
|
scalarField qq(qq_);
|
||||||
|
scalarField qe(qe_);
|
||||||
|
scalarField dmdtf(dmdtf_);
|
||||||
|
|
||||||
|
return calcBoiling(props, Tw, dDep, fDep, N, qq, qe, dmdtf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<scalarField>
|
||||||
|
alphatWallBoilingWallFunctionFvPatchScalarField::evaluateBoiling
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
const scalarField& Tw
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return calcBoiling(props, Tw, dDep_, fDep_, N_, qq_, qe_, dmdtf_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const fvPatchScalarField&
|
||||||
|
alphatWallBoilingWallFunctionFvPatchScalarField::getTemperaturePatchField
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
scalarField& isFixed,
|
||||||
|
scalarField& h,
|
||||||
|
scalarField& hTaPlusQa
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
isFixed.setSize(patch().size());
|
||||||
|
h.setSize(patch().size());
|
||||||
|
hTaPlusQa.setSize(patch().size());
|
||||||
|
|
||||||
|
const fvPatchScalarField& Tw =
|
||||||
|
props.phase.thermo().T().boundaryField()[patch().index()];
|
||||||
|
|
||||||
|
if (isA<fixedValueFvPatchScalarField>(Tw))
|
||||||
|
{
|
||||||
|
isFixed = 1;
|
||||||
|
h = rootVGreat;
|
||||||
|
hTaPlusQa = rootVGreat*Tw;
|
||||||
|
}
|
||||||
|
else if (isA<zeroGradientFvPatchScalarField>(Tw))
|
||||||
|
{
|
||||||
|
isFixed = 0;
|
||||||
|
h = 0;
|
||||||
|
hTaPlusQa = 0;
|
||||||
|
}
|
||||||
|
else if (isA<fixedGradientFvPatchScalarField>(Tw))
|
||||||
|
{
|
||||||
|
const fixedGradientFvPatchScalarField& Twm =
|
||||||
|
refCast<const fixedGradientFvPatchScalarField>(Tw);
|
||||||
|
|
||||||
|
isFixed = 0;
|
||||||
|
h = 0;
|
||||||
|
hTaPlusQa = (*this)*props.Cpw*Twm.gradient();
|
||||||
|
}
|
||||||
|
else if (isA<mixedFvPatchScalarField>(Tw))
|
||||||
|
{
|
||||||
|
const mixedFvPatchScalarField& Twm =
|
||||||
|
refCast<const mixedFvPatchScalarField>(Tw);
|
||||||
|
|
||||||
|
isFixed = pos(Twm.valueFraction() - 1 + rootSmall);
|
||||||
|
h =
|
||||||
|
Twm.valueFraction()
|
||||||
|
/max(1 - Twm.valueFraction(), rootVSmall)
|
||||||
|
*(*this)*props.Cpw*patch().deltaCoeffs();
|
||||||
|
hTaPlusQa =
|
||||||
|
h*Twm.refValue()
|
||||||
|
+ (*this)*props.Cpw*Twm.refGrad();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "Temperature boundary condition type not recognised"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Tw;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
alphatWallBoilingWallFunctionFvPatchScalarField::
|
alphatWallBoilingWallFunctionFvPatchScalarField::
|
||||||
@ -77,7 +541,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
phaseType_(liquidPhase),
|
phaseType_(liquidPhase),
|
||||||
useLiquidTemperatureWallFunction_(true),
|
useLiquidTemperatureWallFunction_(true),
|
||||||
relax_(1),
|
tolerance_(rootSmall),
|
||||||
|
|
||||||
Prt_(0.85),
|
Prt_(0.85),
|
||||||
tau_(0.8),
|
tau_(0.8),
|
||||||
|
|
||||||
@ -112,7 +577,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
(
|
(
|
||||||
dict.lookupOrDefault<Switch>("useLiquidTemperatureWallFunction", true)
|
dict.lookupOrDefault<Switch>("useLiquidTemperatureWallFunction", true)
|
||||||
),
|
),
|
||||||
relax_(dict.lookupOrDefault<scalar>("relax", 1)),
|
tolerance_(dict.lookupOrDefault<scalar>("tolerance", rootSmall)),
|
||||||
|
|
||||||
Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)),
|
Prt_(dict.lookupOrDefault<scalar>("Prt", 0.85)),
|
||||||
tau_(dict.lookupOrDefault<scalar>("bubbleWaitingTimeRatio", 0.8)),
|
tau_(dict.lookupOrDefault<scalar>("bubbleWaitingTimeRatio", 0.8)),
|
||||||
|
|
||||||
@ -179,9 +645,9 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
{
|
{
|
||||||
qq_ = scalarField("qQuenching", dict, p.size());
|
qq_ = scalarField("qQuenching", dict, p.size());
|
||||||
}
|
}
|
||||||
if (dict.found("qEvaporation"))
|
if (dict.found("qEvaporative"))
|
||||||
{
|
{
|
||||||
qe_ = scalarField("qEvaporation", dict, p.size());
|
qe_ = scalarField("qEvaporative", dict, p.size());
|
||||||
}
|
}
|
||||||
if (dict.found("dmdtf"))
|
if (dict.found("dmdtf"))
|
||||||
{
|
{
|
||||||
@ -205,7 +671,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
phaseType_(psf.phaseType_),
|
phaseType_(psf.phaseType_),
|
||||||
useLiquidTemperatureWallFunction_(psf.useLiquidTemperatureWallFunction_),
|
useLiquidTemperatureWallFunction_(psf.useLiquidTemperatureWallFunction_),
|
||||||
relax_(psf.relax_),
|
tolerance_(psf.tolerance_),
|
||||||
|
|
||||||
Prt_(psf.Prt_),
|
Prt_(psf.Prt_),
|
||||||
tau_(psf.tau_),
|
tau_(psf.tau_),
|
||||||
|
|
||||||
@ -236,7 +703,8 @@ alphatWallBoilingWallFunctionFvPatchScalarField
|
|||||||
|
|
||||||
phaseType_(psf.phaseType_),
|
phaseType_(psf.phaseType_),
|
||||||
useLiquidTemperatureWallFunction_(psf.useLiquidTemperatureWallFunction_),
|
useLiquidTemperatureWallFunction_(psf.useLiquidTemperatureWallFunction_),
|
||||||
relax_(psf.relax_),
|
tolerance_(psf.tolerance_),
|
||||||
|
|
||||||
Prt_(psf.Prt_),
|
Prt_(psf.Prt_),
|
||||||
tau_(psf.tau_),
|
tau_(psf.tau_),
|
||||||
|
|
||||||
@ -322,51 +790,29 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Lookup the fluid model
|
// Lookup the fluid model and the phases
|
||||||
const phaseSystem& fluid =
|
const phaseSystem& fluid =
|
||||||
db().lookupObject<phaseSystem>(phaseSystem::propertiesName);
|
db().lookupObject<phaseSystem>(phaseSystem::propertiesName);
|
||||||
|
|
||||||
const word volatileSpecie(fluid.lookupOrDefault<word>("volatile", "none"));
|
|
||||||
|
|
||||||
const label patchi = patch().index();
|
|
||||||
|
|
||||||
switch (phaseType_)
|
switch (phaseType_)
|
||||||
{
|
{
|
||||||
case vaporPhase:
|
case vaporPhase:
|
||||||
{
|
{
|
||||||
const phaseModel& vapor = fluid.phases()[internalField().group()];
|
const phaseModel& vapor = fluid.phases()[internalField().group()];
|
||||||
|
const phaseModel& liquid = fluid.phases()[otherPhaseName_];
|
||||||
|
|
||||||
// Vapor thermophysical transport model
|
// Construct boiling properties
|
||||||
const fluidThermophysicalTransportModel& vaporTtm =
|
const properties props(*this, vapor, liquid);
|
||||||
db().lookupType<fluidThermophysicalTransportModel>
|
|
||||||
(
|
|
||||||
vapor.name()
|
|
||||||
);
|
|
||||||
|
|
||||||
// Vapor phase fraction at the wall
|
|
||||||
const scalarField& vaporw = vapor.boundaryField()[patchi];
|
|
||||||
|
|
||||||
// Partitioning. Note: Assumes that there is only only one liquid
|
// Partitioning. Note: Assumes that there is only only one liquid
|
||||||
// phase and all other phases are vapor.
|
// phase and all other phases are vapor.
|
||||||
const phaseModel& liquid = fluid.phases()[otherPhaseName_];
|
fLiquid_ = partitioningModel_->fLiquid(props.otherAlphaw);
|
||||||
const scalarField& liquidw = liquid.boundaryField()[patchi];
|
|
||||||
fLiquid_ = partitioningModel_->fLiquid(liquidw);
|
|
||||||
|
|
||||||
// Vapour thermal diffusivity
|
|
||||||
const scalarField alphatConv
|
|
||||||
(
|
|
||||||
alphatJayatillekeWallFunctionFvPatchScalarField::alphat
|
|
||||||
(
|
|
||||||
vaporTtm,
|
|
||||||
Prt_,
|
|
||||||
patch().index()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
operator==
|
operator==
|
||||||
(
|
(
|
||||||
alphatConv*(vaporw/(1 - liquidw + small) )
|
(1 - fLiquid_)
|
||||||
*(1 - fLiquid_)/max(vaporw, scalar(1e-8))
|
/max(1 - props.otherAlphaw, rootSmall)
|
||||||
|
*props.alphatConv
|
||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -377,316 +823,100 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
const phaseModel& liquid = fluid.phases()[internalField().group()];
|
const phaseModel& liquid = fluid.phases()[internalField().group()];
|
||||||
const phaseModel& vapor = fluid.phases()[otherPhaseName_];
|
const phaseModel& vapor = fluid.phases()[otherPhaseName_];
|
||||||
|
|
||||||
const phaseInterface interface(vapor, liquid);
|
// Boiling is enabled by the presence of saturation temperature
|
||||||
|
// modelling. This is consistent with interfacial thermal phase
|
||||||
// Liquid thermophysical and momentum transport models
|
// changes.
|
||||||
const fluidThermophysicalTransportModel& liquidTtm =
|
|
||||||
db().lookupType<fluidThermophysicalTransportModel>
|
|
||||||
(
|
|
||||||
liquid.name()
|
|
||||||
);
|
|
||||||
const compressibleMomentumTransportModel& liquidMtm =
|
|
||||||
liquidTtm.momentumTransport();
|
|
||||||
|
|
||||||
// Convective thermal diffusivity
|
|
||||||
const scalarField alphatConv
|
|
||||||
(
|
|
||||||
alphatJayatillekeWallFunctionFvPatchScalarField::alphat
|
|
||||||
(
|
|
||||||
liquidTtm,
|
|
||||||
Prt_,
|
|
||||||
patch().index()
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Quit if no saturation temperature model exists for this
|
|
||||||
// interface. Saturation modelling is considered to be the
|
|
||||||
// fundamental enabling model for thermal mass transfers.
|
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
!fluid.foundInterfacialModel
|
!fluid.foundInterfacialModel
|
||||||
<
|
<
|
||||||
interfaceSaturationTemperatureModel
|
interfaceSaturationTemperatureModel
|
||||||
>
|
>(phaseInterface(liquid, vapor))
|
||||||
(interface)
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
Info<< "Saturation model for interface " << interface.name()
|
// Construct non-boiling properties
|
||||||
|
const properties props(*this, liquid, vapor);
|
||||||
|
|
||||||
|
Info<< "Saturation model for interface "
|
||||||
|
<< props.interface.name()
|
||||||
<< " not found. Wall boiling disabled." << endl;
|
<< " not found. Wall boiling disabled." << endl;
|
||||||
|
|
||||||
operator==(alphatConv);
|
operator==(props.alphatConv);
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
// Lookup and calculate turbulent and thermal properties
|
|
||||||
const nutWallFunctionFvPatchScalarField& nutw =
|
|
||||||
nutWallFunctionFvPatchScalarField::nutw(liquidMtm, patchi);
|
|
||||||
|
|
||||||
const scalar Cmu25(pow025(nutw.Cmu()));
|
|
||||||
|
|
||||||
const scalarField& y = liquidMtm.y()[patchi];
|
|
||||||
|
|
||||||
const tmp<scalarField> tnuw = liquidMtm.nu(patchi);
|
|
||||||
const scalarField& nuw = tnuw();
|
|
||||||
|
|
||||||
const tmp<scalarField> talphaw
|
|
||||||
(
|
|
||||||
liquid.thermo().kappa().boundaryField()[patchi]
|
|
||||||
/liquid.thermo().Cp().boundaryField()[patchi]
|
|
||||||
);
|
|
||||||
const scalarField& alphaw = talphaw();
|
|
||||||
|
|
||||||
const tmp<volScalarField> tk = liquidMtm.k();
|
|
||||||
const volScalarField& k = tk();
|
|
||||||
const fvPatchScalarField& kw = k.boundaryField()[patchi];
|
|
||||||
|
|
||||||
const fvPatchVectorField& Uw =
|
|
||||||
liquidMtm.U().boundaryField()[patchi];
|
|
||||||
const scalarField magUp(mag(Uw.patchInternalField() - Uw));
|
|
||||||
const scalarField magGradUw(mag(Uw.snGrad()));
|
|
||||||
|
|
||||||
const tmp<scalarField> trhoLiquidw = liquid.thermo().rho(patchi);
|
|
||||||
const scalarField rhoLiquidw = trhoLiquidw();
|
|
||||||
|
|
||||||
const tmp<scalarField> trhoVaporw = vapor.thermo().rho(patchi);
|
|
||||||
const scalarField rhoVaporw = trhoVaporw();
|
|
||||||
|
|
||||||
const fvPatchScalarField& hew =
|
|
||||||
liquid.thermo().he().boundaryField()[patchi];
|
|
||||||
|
|
||||||
const fvPatchScalarField& Tw =
|
|
||||||
liquid.thermo().T().boundaryField()[patchi];
|
|
||||||
|
|
||||||
const scalarField Tc(Tw.patchInternalField());
|
|
||||||
|
|
||||||
const scalarField uTau(Cmu25*sqrt(kw));
|
|
||||||
|
|
||||||
const scalarField yPlus(uTau*y/nuw);
|
|
||||||
|
|
||||||
const scalarField Pr(rhoLiquidw*nuw/alphaw);
|
|
||||||
|
|
||||||
// Molecular-to-turbulent Prandtl number ratio
|
|
||||||
const scalarField Prat(Pr/Prt_);
|
|
||||||
|
|
||||||
// Thermal sublayer thickness
|
|
||||||
const scalarField P
|
|
||||||
(
|
|
||||||
alphatJayatillekeWallFunctionFvPatchScalarField::P(Prat)
|
|
||||||
);
|
|
||||||
const scalarField yPlusTherm
|
|
||||||
(
|
|
||||||
alphatJayatillekeWallFunctionFvPatchScalarField::yPlusTherm
|
|
||||||
(
|
|
||||||
nutw,
|
|
||||||
P,
|
|
||||||
Prat
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
const scalarField Cpw(liquid.thermo().Cp(Tw, patchi));
|
|
||||||
|
|
||||||
// Saturation temperature
|
|
||||||
const interfaceSaturationTemperatureModel& satModel =
|
|
||||||
fluid.lookupInterfacialModel
|
|
||||||
<
|
|
||||||
interfaceSaturationTemperatureModel
|
|
||||||
>(interface);
|
|
||||||
const tmp<volScalarField> tTsat =
|
|
||||||
satModel.Tsat(liquid.thermo().p());
|
|
||||||
const volScalarField& Tsat = tTsat();
|
|
||||||
const fvPatchScalarField& Tsatw(Tsat.boundaryField()[patchi]);
|
|
||||||
|
|
||||||
// Latent heat
|
|
||||||
const scalarField L
|
|
||||||
(
|
|
||||||
volatileSpecie != "none"
|
|
||||||
? -refCast<const heatTransferPhaseSystem>(fluid)
|
|
||||||
.Li
|
|
||||||
(
|
|
||||||
interface,
|
|
||||||
volatileSpecie,
|
|
||||||
dmdtf_,
|
|
||||||
Tsat,
|
|
||||||
patch().faceCells(),
|
|
||||||
heatTransferPhaseSystem::latentHeatScheme::upwind
|
|
||||||
)
|
|
||||||
: -refCast<const heatTransferPhaseSystem>(fluid)
|
|
||||||
.L
|
|
||||||
(
|
|
||||||
interface,
|
|
||||||
dmdtf_,
|
|
||||||
Tsat,
|
|
||||||
patch().faceCells(),
|
|
||||||
heatTransferPhaseSystem::latentHeatScheme::upwind
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Liquid phase fraction at the wall
|
|
||||||
const scalarField liquidw(liquid.boundaryField()[patchi]);
|
|
||||||
|
|
||||||
// Partitioning
|
|
||||||
fLiquid_ = partitioningModel_->fLiquid(liquidw);
|
|
||||||
|
|
||||||
// Iterative solution for the wall temperature
|
|
||||||
label maxIter(10);
|
|
||||||
for (label i=0; i<maxIter; i++)
|
|
||||||
{
|
{
|
||||||
scalarField Tl(Tc);
|
// Construct boiling properties
|
||||||
|
const boilingLiquidProperties props(*this, liquid, vapor);
|
||||||
|
|
||||||
if (useLiquidTemperatureWallFunction_)
|
// Partitioning. Note: Assumes that there is only only one
|
||||||
|
// liquid phase and all other phases are vapor.
|
||||||
|
fLiquid_ = partitioningModel_->fLiquid(props.alphaw);
|
||||||
|
|
||||||
|
// Get the temperature boundary condition and extract its
|
||||||
|
// physical parameters
|
||||||
|
scalarField TwpfIsFixed, TwpfH, TwpfHTaPlusQa;
|
||||||
|
const fvPatchScalarField& Twpf =
|
||||||
|
getTemperaturePatchField
|
||||||
|
(
|
||||||
|
props,
|
||||||
|
TwpfIsFixed,
|
||||||
|
TwpfH,
|
||||||
|
TwpfHTaPlusQa
|
||||||
|
);
|
||||||
|
|
||||||
|
// Define the residual. This should be monotonic in Tw.
|
||||||
|
auto R = [&](const scalarField& Tw)
|
||||||
{
|
{
|
||||||
// Liquid temperature at y+=250 is estimated from the
|
return calcBoiling(props, Tw) - TwpfHTaPlusQa + TwpfH*Tw;
|
||||||
// logarithmic thermal wall function of Koncar, Krepper
|
};
|
||||||
// & Egorov (2005)
|
|
||||||
const scalarField TyPlus250
|
|
||||||
(
|
|
||||||
Prt_*(log(nutw.E()*250)/nutw.kappa() + P)
|
|
||||||
);
|
|
||||||
|
|
||||||
const scalarField TyPlus
|
// Solve using interval bisection. Boiling cannot occur below
|
||||||
(
|
// the saturation temperature, so that is taken to be the lower
|
||||||
Prt_
|
// bound. The upper bound is harder to define. For now, take
|
||||||
*(
|
// twice the current superheat as the maximum. The solution is
|
||||||
log(nutw.E()*max(yPlus, scalar(11)))
|
// likely to be below this value. If it is not, then the
|
||||||
/nutw.kappa()
|
// iteration will converge to this upper limit, creating a new
|
||||||
+ P
|
// superheat of twice the current value. Subsequent time-steps
|
||||||
)
|
// will then double this superheat again and again until it
|
||||||
);
|
// does eventually bound the solution.
|
||||||
|
const scalarField isBoiling(neg(R(props.Tsat)));
|
||||||
Tl = Tw - (TyPlus250/TyPlus)*(Tw - Tc);
|
scalarField Tw0(props.Tsat);
|
||||||
}
|
scalarField Tw1
|
||||||
|
|
||||||
// Bubble departure diameter
|
|
||||||
dDep_ =
|
|
||||||
departureDiameterModel_->dDeparture
|
|
||||||
(
|
|
||||||
liquid,
|
|
||||||
vapor,
|
|
||||||
patchi,
|
|
||||||
Tl,
|
|
||||||
Tsatw,
|
|
||||||
L
|
|
||||||
);
|
|
||||||
|
|
||||||
// Bubble departure frequency
|
|
||||||
fDep_ =
|
|
||||||
departureFrequencyModel_->fDeparture
|
|
||||||
(
|
|
||||||
liquid,
|
|
||||||
vapor,
|
|
||||||
patchi,
|
|
||||||
Tl,
|
|
||||||
Tsatw,
|
|
||||||
L,
|
|
||||||
dDep_
|
|
||||||
);
|
|
||||||
|
|
||||||
// Nucleation site density
|
|
||||||
N_ =
|
|
||||||
nucleationSiteModel_->N
|
|
||||||
(
|
|
||||||
liquid,
|
|
||||||
vapor,
|
|
||||||
patchi,
|
|
||||||
Tl,
|
|
||||||
Tsatw,
|
|
||||||
L,
|
|
||||||
dDep_,
|
|
||||||
fDep_
|
|
||||||
);
|
|
||||||
|
|
||||||
// Del Valle & Kenning (1985)
|
|
||||||
const scalarField Ja
|
|
||||||
(
|
(
|
||||||
rhoLiquidw*Cpw*(Tsatw - Tl)/(rhoVaporw*L)
|
max
|
||||||
);
|
|
||||||
|
|
||||||
const scalarField Al
|
|
||||||
(
|
|
||||||
fLiquid_*4.8*exp(min(-Ja/80, log(vGreat)))
|
|
||||||
);
|
|
||||||
|
|
||||||
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)));
|
|
||||||
|
|
||||||
if (volatileSpecie != "none" && !liquid.pure())
|
|
||||||
{
|
|
||||||
const volScalarField& Yvolatile =
|
|
||||||
liquid.Y(volatileSpecie);
|
|
||||||
A2E *= Yvolatile.boundaryField()[patchi];
|
|
||||||
A2 *= Yvolatile.boundaryField()[patchi];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Patch area by neighbouring cell volume ratio
|
|
||||||
const scalarField AbyV
|
|
||||||
(
|
|
||||||
patch().magSf()
|
|
||||||
/scalarField
|
|
||||||
(
|
(
|
||||||
patch().boundaryMesh().mesh().V(),
|
Twpf + (Twpf - props.Tsat),
|
||||||
patch().faceCells()
|
props.Tsat*(1 + sqrt(tolerance_))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
scalar e =
|
||||||
// Volumetric mass source in the near wall cell due to the
|
gMax((1 - TwpfIsFixed)*isBoiling*(Tw1 - Tw0)/(Tw0 + Tw1));
|
||||||
// wall boiling
|
for (; e > tolerance_; e /= 2)
|
||||||
dmdtf_ =
|
{
|
||||||
(1 - relax_)*dmdtf_
|
const scalarField TwM((Tw0 + Tw1)/2);
|
||||||
+ relax_*(1.0/6.0)*A2E*dDep_*rhoVaporw*fDep_*AbyV;
|
const scalarField rM(R(TwM));
|
||||||
|
Tw0 = pos(rM)*Tw0 + neg0(rM)*TwM;
|
||||||
// Quenching heat transfer coefficient
|
Tw1 = pos(rM)*TwM + neg0(rM)*Tw1;
|
||||||
const scalarField hQ
|
}
|
||||||
|
const scalarField Tw
|
||||||
(
|
(
|
||||||
2*alphaw*Cpw*fDep_
|
TwpfIsFixed*Twpf + (1 - TwpfIsFixed)*(Tw0 + Tw1)/2
|
||||||
*sqrt((tau_/max(fDep_, small))/(pi*alphaw/rhoLiquidw))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Quenching heat flux
|
// Use solution to re-evaluate the boiling and set the thermal
|
||||||
qq_ =
|
// diffusivity to recover the calculated heat flux
|
||||||
(1 - relax_)*qq_
|
const scalarField gradTw
|
||||||
+ relax_*(A2*hQ*max(Tw - Tl, scalar(0)));
|
(
|
||||||
|
patch().deltaCoeffs()*max(Tw - props.Tc, small*props.Tc)
|
||||||
|
);
|
||||||
|
|
||||||
// Evaporation heat flux
|
const scalarField q(evaluateBoiling(props, Tw));
|
||||||
qe_ = dmdtf_*L/AbyV;
|
|
||||||
|
|
||||||
// Set an effective thermal diffusivity that corresponds to the
|
|
||||||
// calculated convective, quenching and evaporative heat fluxes
|
|
||||||
operator==
|
operator==
|
||||||
(
|
(
|
||||||
(
|
isBoiling*q/props.Cpw/gradTw/max(props.alphaw, rootSmall)
|
||||||
A1*alphatConv
|
+ (1 - isBoiling)*props.alphatConv
|
||||||
+ (qq_ + qe_)/max(hew.snGrad(), scalar(1e-16))
|
|
||||||
)
|
|
||||||
/max(liquidw, scalar(1e-8))
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Evaluate the temperature condition and estimate the
|
|
||||||
// remaining residual error
|
|
||||||
const scalarField TsupPrev(max((Tw - Tsatw), scalar(0)));
|
|
||||||
const_cast<fvPatchScalarField&>(Tw).evaluate();
|
|
||||||
const scalarField TsupNew(max((Tw - Tsatw), scalar(0)));
|
|
||||||
const scalar maxErr(gMax(mag(TsupPrev - TsupNew)));
|
|
||||||
|
|
||||||
if (maxErr < 1e-1)
|
|
||||||
{
|
|
||||||
if (i > 0)
|
|
||||||
{
|
|
||||||
Info<< "Wall boiling wall function iterations: "
|
|
||||||
<< i + 1 << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == maxIter - 1)
|
|
||||||
{
|
|
||||||
Info<< "Maximum number of wall boiling wall function "
|
|
||||||
<< "iterations (" << maxIter << ") reached." << endl
|
|
||||||
<< "Maximum change in wall temperature on last "
|
|
||||||
<< "iteration: " << maxErr << endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -710,7 +940,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
"useLiquidTemperatureWallFunction",
|
"useLiquidTemperatureWallFunction",
|
||||||
useLiquidTemperatureWallFunction_
|
useLiquidTemperatureWallFunction_
|
||||||
);
|
);
|
||||||
writeEntry(os, "relax", relax_);
|
writeEntry(os, "tolerance", tolerance_);
|
||||||
|
|
||||||
|
// Parameters
|
||||||
writeEntry(os, "Prt", Prt_);
|
writeEntry(os, "Prt", Prt_);
|
||||||
writeEntry(os, "bubbleWaitingTimeRatio", tau_);
|
writeEntry(os, "bubbleWaitingTimeRatio", tau_);
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ Usage
|
|||||||
phaseType | 'vapor' or 'liquid' | yes |
|
phaseType | 'vapor' or 'liquid' | yes |
|
||||||
useLiquidTemperatureWallFunction | \\
|
useLiquidTemperatureWallFunction | \\
|
||||||
Use wall function to calculate liquid temperature? | no | yes
|
Use wall function to calculate liquid temperature? | no | yes
|
||||||
relax | relaxation factor | no | 1
|
tolerance | solution tolerance | no | rootSmall
|
||||||
dmdt | phase change mass flux | no | uniform 0
|
dmdt | phase change mass flux | no | uniform 0
|
||||||
Prt | turbulent Prandtl number | no | 0.85
|
Prt | turbulent Prandtl number | no | 0.85
|
||||||
\endtable
|
\endtable
|
||||||
@ -95,9 +95,8 @@ Usage
|
|||||||
\verbatim
|
\verbatim
|
||||||
hotWall
|
hotWall
|
||||||
{
|
{
|
||||||
type compressible::alphatWallBoiling2WallFunction;
|
type compressible::alphatWallBoilingWallFunction;
|
||||||
phaseType liquid;
|
phaseType liquid;
|
||||||
relax 0.1;
|
|
||||||
dmdt uniform 0;
|
dmdt uniform 0;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
partitioningModel
|
partitioningModel
|
||||||
@ -168,6 +167,15 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
// Private classes
|
||||||
|
|
||||||
|
//- Struct to hold cached properties for one of the phases
|
||||||
|
struct properties;
|
||||||
|
|
||||||
|
//- Struct to hold cached properties for the liquid when it is boiling
|
||||||
|
struct boilingLiquidProperties;
|
||||||
|
|
||||||
|
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
@ -178,8 +186,11 @@ private:
|
|||||||
//- Estimate liquid temperature using logarithmic wall function?
|
//- Estimate liquid temperature using logarithmic wall function?
|
||||||
Switch useLiquidTemperatureWallFunction_;
|
Switch useLiquidTemperatureWallFunction_;
|
||||||
|
|
||||||
//- Relaxation factor
|
//- Solution tolerance
|
||||||
scalar relax_;
|
scalar tolerance_;
|
||||||
|
|
||||||
|
|
||||||
|
// Parameters
|
||||||
|
|
||||||
//- Turbulent Prandtl number
|
//- Turbulent Prandtl number
|
||||||
scalar Prt_;
|
scalar Prt_;
|
||||||
@ -231,6 +242,57 @@ private:
|
|||||||
scalarField dmdtf_;
|
scalarField dmdtf_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Calculate the boiling for the given wall temperature. Return
|
||||||
|
// the total sum of all heat fluxes. Set the properties passed by
|
||||||
|
// non-const reference. Used by the functions below.
|
||||||
|
tmp<scalarField> calcBoiling
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
const scalarField& Tw,
|
||||||
|
scalarField& dDep,
|
||||||
|
scalarField& fDep,
|
||||||
|
scalarField& N,
|
||||||
|
scalarField& qq,
|
||||||
|
scalarField& qe,
|
||||||
|
scalarField& dmdtf
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Calculate the boiling for the given wall temperature. Return
|
||||||
|
// the total sum of all heat fluxes. Use this to solve the balance
|
||||||
|
// between the heat fluxes specified by the boiling models and the
|
||||||
|
// temperature boundary condition without changing the stored
|
||||||
|
// boiling state.
|
||||||
|
tmp<scalarField> calcBoiling
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
const scalarField& Tw
|
||||||
|
) const;
|
||||||
|
|
||||||
|
//- Calculate the boiling for the given wall temperature. Return
|
||||||
|
// the total sum of all heat fluxes. Also set the stored boiling
|
||||||
|
// state. Use this after solving with the final wall temperature
|
||||||
|
// to set the boiling state.
|
||||||
|
tmp<scalarField> evaluateBoiling
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
const scalarField& Tw
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Get the temperature patch field and the parameters associated
|
||||||
|
// with its boundary condition that are necessary for
|
||||||
|
// approximately evaluating the boundary condition's heat flux at
|
||||||
|
// a given wall temperature.
|
||||||
|
const fvPatchScalarField& getTemperaturePatchField
|
||||||
|
(
|
||||||
|
const boilingLiquidProperties& props,
|
||||||
|
scalarField& isFixed,
|
||||||
|
scalarField& h,
|
||||||
|
scalarField& hTaPlusQa
|
||||||
|
) const;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
|
|||||||
@ -1,214 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------*\
|
|
||||||
========= |
|
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
||||||
\\ / O peration | Website: https://openfoam.org
|
|
||||||
\\ / A nd | Copyright (C) 2015-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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
#include "fixedMultiphaseHeatFluxFvPatchScalarField.H"
|
|
||||||
#include "fvPatchFieldMapper.H"
|
|
||||||
#include "addToRunTimeSelectionTable.H"
|
|
||||||
|
|
||||||
#include "phaseSystem.H"
|
|
||||||
#include "compressibleMomentumTransportModels.H"
|
|
||||||
#include "phaseCompressibleMomentumTransportModel.H"
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
Foam::fixedMultiphaseHeatFluxFvPatchScalarField::
|
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
|
||||||
)
|
|
||||||
:
|
|
||||||
fixedValueFvPatchScalarField(p, iF),
|
|
||||||
q_(p.size(), 0.0),
|
|
||||||
relax_(1.0),
|
|
||||||
Tmin_(0.0)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::fixedMultiphaseHeatFluxFvPatchScalarField::
|
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
|
||||||
(
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
|
||||||
const dictionary& dict
|
|
||||||
)
|
|
||||||
:
|
|
||||||
fixedValueFvPatchScalarField(p, iF, dict),
|
|
||||||
q_("q", dict, p.size()),
|
|
||||||
relax_(dict.lookupOrDefault<scalar>("relax", 1.0)),
|
|
||||||
Tmin_(dict.lookupOrDefault<scalar>("Tmin", 273))
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::fixedMultiphaseHeatFluxFvPatchScalarField::
|
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
|
||||||
(
|
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField& psf,
|
|
||||||
const fvPatch& p,
|
|
||||||
const DimensionedField<scalar, volMesh>& iF,
|
|
||||||
const fvPatchFieldMapper& mapper
|
|
||||||
)
|
|
||||||
:
|
|
||||||
fixedValueFvPatchScalarField(psf, p, iF, mapper),
|
|
||||||
q_(mapper(psf.q_)),
|
|
||||||
relax_(psf.relax_),
|
|
||||||
Tmin_(psf.Tmin_)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
Foam::fixedMultiphaseHeatFluxFvPatchScalarField::
|
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
|
||||||
(
|
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField& psf,
|
|
||||||
const DimensionedField<scalar, volMesh>& iF
|
|
||||||
)
|
|
||||||
:
|
|
||||||
fixedValueFvPatchScalarField(psf, iF),
|
|
||||||
q_(psf.q_),
|
|
||||||
relax_(psf.relax_),
|
|
||||||
Tmin_(psf.Tmin_)
|
|
||||||
{}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
void Foam::fixedMultiphaseHeatFluxFvPatchScalarField::updateCoeffs()
|
|
||||||
{
|
|
||||||
if (updated())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lookup the fluid model
|
|
||||||
const phaseSystem& fluid =
|
|
||||||
db().lookupObject<phaseSystem>(phaseSystem::propertiesName);
|
|
||||||
|
|
||||||
const scalarField& Tp = *this;
|
|
||||||
|
|
||||||
scalarField A(Tp.size(), scalar(0));
|
|
||||||
scalarField B(Tp.size(), scalar(0));
|
|
||||||
scalarField Q(Tp.size(), scalar(0));
|
|
||||||
|
|
||||||
forAll(fluid.phases(), phasei)
|
|
||||||
{
|
|
||||||
const phaseModel& phase = fluid.phases()[phasei];
|
|
||||||
const fluidThermo& thermo = phase.thermo();
|
|
||||||
|
|
||||||
const fvPatchScalarField& alpha =
|
|
||||||
phase.boundaryField()[patch().index()];
|
|
||||||
|
|
||||||
const fvPatchScalarField& T =
|
|
||||||
thermo.T().boundaryField()[patch().index()];
|
|
||||||
|
|
||||||
const scalarField kappaEff(phase.kappaEff(patch().index()));
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
scalarField q0(T.snGrad()*alpha*kappaEff);
|
|
||||||
Q += q0;
|
|
||||||
|
|
||||||
Info<< patch().name() << " " << phase.name()
|
|
||||||
<< ": Heat flux " << gMin(q0) << " - " << gMax(q0) << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
A += T.patchInternalField()*alpha*kappaEff*patch().deltaCoeffs();
|
|
||||||
B += alpha*kappaEff*patch().deltaCoeffs();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Info<< patch().name() << " " << ": overall heat flux "
|
|
||||||
<< gMin(Q) << " - " << gMax(Q) << " W/m2, power: "
|
|
||||||
<< gSum(patch().magSf()*Q) << " W" << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
operator==((1 - relax_)*Tp + relax_*max(Tmin_,(q_ + A)/(B)));
|
|
||||||
|
|
||||||
fixedValueFvPatchScalarField::updateCoeffs();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fixedMultiphaseHeatFluxFvPatchScalarField::autoMap
|
|
||||||
(
|
|
||||||
const fvPatchFieldMapper& m
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::autoMap(m);
|
|
||||||
m(q_, q_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fixedMultiphaseHeatFluxFvPatchScalarField::rmap
|
|
||||||
(
|
|
||||||
const fvPatchScalarField& ptf,
|
|
||||||
const labelList& addr
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::rmap(ptf, addr);
|
|
||||||
|
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField& mptf =
|
|
||||||
refCast<const fixedMultiphaseHeatFluxFvPatchScalarField>(ptf);
|
|
||||||
|
|
||||||
q_.rmap(mptf.q_, addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fixedMultiphaseHeatFluxFvPatchScalarField::reset
|
|
||||||
(
|
|
||||||
const fvPatchScalarField& ptf
|
|
||||||
)
|
|
||||||
{
|
|
||||||
fixedValueFvPatchScalarField::reset(ptf);
|
|
||||||
|
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField& mptf =
|
|
||||||
refCast<const fixedMultiphaseHeatFluxFvPatchScalarField>(ptf);
|
|
||||||
|
|
||||||
q_.reset(mptf.q_);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Foam::fixedMultiphaseHeatFluxFvPatchScalarField::write(Ostream& os) const
|
|
||||||
{
|
|
||||||
fvPatchField<scalar>::write(os);
|
|
||||||
writeEntry(os, "relax", relax_);
|
|
||||||
writeEntry(os, "q", q_);
|
|
||||||
writeEntry(os, "value", *this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
makePatchTypeField
|
|
||||||
(
|
|
||||||
fvPatchScalarField,
|
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
|
||||||
@ -0,0 +1,198 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration | Website: https://openfoam.org
|
||||||
|
\\ / A nd | Copyright (C) 2015-2023 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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "uniformFixedMultiphaseHeatFluxFvPatchScalarField.H"
|
||||||
|
#include "fvPatchFieldMapper.H"
|
||||||
|
#include "phaseSystem.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField::
|
||||||
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mixedFvPatchScalarField(p, iF),
|
||||||
|
q_(nullptr),
|
||||||
|
relax_(1)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField::
|
||||||
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
|
(
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mixedFvPatchScalarField(p, iF, dict, false),
|
||||||
|
q_(Function1<scalar>::New("q", dict)),
|
||||||
|
relax_(dict.lookupOrDefault<scalar>("relax", 1))
|
||||||
|
{
|
||||||
|
valueFraction() = 1;
|
||||||
|
refValue() = patchInternalField();
|
||||||
|
refGrad() = Zero;
|
||||||
|
|
||||||
|
operator==(patchInternalField());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField::
|
||||||
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
|
(
|
||||||
|
const uniformFixedMultiphaseHeatFluxFvPatchScalarField& psf,
|
||||||
|
const fvPatch& p,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF,
|
||||||
|
const fvPatchFieldMapper& mapper
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mixedFvPatchScalarField(psf, p, iF, mapper),
|
||||||
|
q_(psf.q_, false),
|
||||||
|
relax_(psf.relax_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField::
|
||||||
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
|
(
|
||||||
|
const uniformFixedMultiphaseHeatFluxFvPatchScalarField& psf,
|
||||||
|
const DimensionedField<scalar, volMesh>& iF
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mixedFvPatchScalarField(psf, iF),
|
||||||
|
q_(psf.q_, false),
|
||||||
|
relax_(psf.relax_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField::updateCoeffs()
|
||||||
|
{
|
||||||
|
if (updated())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const label patchi = patch().index();
|
||||||
|
|
||||||
|
const scalar q = q_->value(db().time().userTimeValue());
|
||||||
|
|
||||||
|
const phaseSystem& fluid =
|
||||||
|
db().lookupObject<phaseSystem>(phaseSystem::propertiesName);
|
||||||
|
|
||||||
|
const phaseModel& thisPhase = fluid.phases()[internalField().group()];
|
||||||
|
|
||||||
|
// Sums of alpha*kappaEff
|
||||||
|
scalarField sumAlphaKappaEff(patch().size(), rootVSmall);
|
||||||
|
scalarField sumNotThisAlphaKappaEff(patch().size(), rootVSmall);
|
||||||
|
scalarField sumNotThisAlphaKappaEffT(patch().size(), rootVSmall);
|
||||||
|
|
||||||
|
// Contributions from phases other than this one
|
||||||
|
forAll(fluid.phases(), phasei)
|
||||||
|
{
|
||||||
|
const phaseModel& phase = fluid.phases()[phasei];
|
||||||
|
|
||||||
|
if (&phase != &thisPhase)
|
||||||
|
{
|
||||||
|
const scalarField& alpha = phase.boundaryField()[patchi];
|
||||||
|
const scalarField kappaEff(phase.kappaEff(patchi));
|
||||||
|
const scalarField alphaKappaEff(alpha*kappaEff);
|
||||||
|
const fvPatchScalarField& T =
|
||||||
|
phase.thermo().T().boundaryField()[patchi];
|
||||||
|
|
||||||
|
sumAlphaKappaEff += alphaKappaEff;
|
||||||
|
sumNotThisAlphaKappaEff += alphaKappaEff;
|
||||||
|
sumNotThisAlphaKappaEffT += alphaKappaEff*T.patchInternalField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contribution from this phase, and stabilisation
|
||||||
|
const scalarField& alpha = thisPhase.boundaryField()[patchi];
|
||||||
|
const scalarField kappaEff(thisPhase.kappaEff(patchi));
|
||||||
|
const scalarField alphaKappaEff(alpha*kappaEff);
|
||||||
|
const fvPatchScalarField& T =
|
||||||
|
thisPhase.thermo().T().boundaryField()[patchi];
|
||||||
|
|
||||||
|
sumAlphaKappaEff += alphaKappaEff;
|
||||||
|
sumNotThisAlphaKappaEff =
|
||||||
|
max
|
||||||
|
(
|
||||||
|
sumNotThisAlphaKappaEff,
|
||||||
|
rootSmall*kappaEff
|
||||||
|
);
|
||||||
|
sumNotThisAlphaKappaEffT =
|
||||||
|
max
|
||||||
|
(
|
||||||
|
sumNotThisAlphaKappaEffT,
|
||||||
|
rootSmall*kappaEff*T.patchInternalField()
|
||||||
|
);
|
||||||
|
|
||||||
|
// Mixed parameters
|
||||||
|
valueFraction() = sumNotThisAlphaKappaEff/sumAlphaKappaEff;
|
||||||
|
refValue() = sumNotThisAlphaKappaEffT/sumNotThisAlphaKappaEff;
|
||||||
|
refGrad() = q/max(alpha, rootSmall)/kappaEff;
|
||||||
|
|
||||||
|
// Modify mixed parameters for under-relaxation
|
||||||
|
if (relax_ != 1)
|
||||||
|
{
|
||||||
|
const scalarField f(valueFraction());
|
||||||
|
valueFraction() = 1 - relax_*(1 - f);
|
||||||
|
refValue() = (f*relax_*refValue() + (1 - relax_)*T)/valueFraction();
|
||||||
|
//refGrad() = refGrad(); // No change
|
||||||
|
}
|
||||||
|
|
||||||
|
mixedFvPatchScalarField::updateCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField::write
|
||||||
|
(
|
||||||
|
Ostream& os
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
mixedFvPatchScalarField::write(os);
|
||||||
|
writeEntry(os, q_());
|
||||||
|
writeEntry(os, "relax", relax_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
makePatchTypeField
|
||||||
|
(
|
||||||
|
fvPatchScalarField,
|
||||||
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -22,29 +22,44 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::fixedMultiphaseHeatFluxFvPatchScalarField
|
Foam::uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Calculates a wall temperature that produces the specified overall wall heat
|
Uniform fixed heat flux boundary condition for Eulerian multi-phase cases.
|
||||||
flux across all the phases in an Eulerian multi-phase simulation.
|
Constructs a mixed constraint which portions the heat flux between the
|
||||||
|
phases in such a way as to keep the boundary temperature uniform across all
|
||||||
|
phases. The heat flux can be specified as a time-varying function, and an
|
||||||
|
under-relaxation factor can be supplied if this is necessary to maintain
|
||||||
|
stability.
|
||||||
|
|
||||||
Intended to be used with copiedFixedValue to ensure that phase wall
|
Usage
|
||||||
temperature are consistent:
|
\table
|
||||||
- Set 'fixedMultiphaseHeatFlux' boundary for one of the phases
|
Property | Description | Required | Default value
|
||||||
- Use 'copiedFixedValue' for all the other phases.
|
q | Heat flux [w/m^2] | yes |
|
||||||
|
relax | Relaxation factor | no | 1
|
||||||
|
\endtable
|
||||||
|
|
||||||
See also
|
Example of the boundary condition specification:
|
||||||
Foam::fixedValueFvPatchField
|
\verbatim
|
||||||
|
<patchName>
|
||||||
|
{
|
||||||
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
|
q 1000;
|
||||||
|
relax 0.3;
|
||||||
|
value $internalField;
|
||||||
|
}
|
||||||
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField.C
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef fixedMultiphaseHeatFluxFvPatchScalarField_H
|
#ifndef uniformFixedMultiphaseHeatFluxFvPatchScalarField_H
|
||||||
#define fixedMultiphaseHeatFluxFvPatchScalarField_H
|
#define uniformFixedMultiphaseHeatFluxFvPatchScalarField_H
|
||||||
|
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "mixedFvPatchFields.H"
|
||||||
|
#include "Function1.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -52,42 +67,39 @@ namespace Foam
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class fixedMultiphaseHeatFluxFvPatchScalarField Declaration
|
Class uniformFixedMultiphaseHeatFluxFvPatchScalarField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class fixedMultiphaseHeatFluxFvPatchScalarField
|
class uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
:
|
:
|
||||||
public fixedValueFvPatchScalarField
|
public mixedFvPatchScalarField
|
||||||
{
|
{
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Heat power [W] or flux [W/m^2]
|
//- Heat flux [W/m^2]
|
||||||
scalarField q_;
|
autoPtr<Function1<scalar>> q_;
|
||||||
|
|
||||||
//- Relaxation factor
|
//- Relaxation factor
|
||||||
scalar relax_;
|
scalar relax_;
|
||||||
|
|
||||||
//- Minimum temperature limit [K]
|
|
||||||
scalar Tmin_;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("fixedMultiphaseHeatFlux");
|
TypeName("uniformFixedMultiphaseHeatFlux");
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct from patch and internal field
|
//- Construct from patch and internal field
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&
|
const DimensionedField<scalar, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from patch, internal field and dictionary
|
//- Construct from patch, internal field and dictionary
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<scalar, volMesh>&,
|
||||||
@ -95,26 +107,26 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct by mapping given
|
//- Construct by mapping given
|
||||||
// fixedMultiphaseHeatFluxFvPatchScalarField
|
// uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
// onto a new patch
|
// onto a new patch
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField&,
|
const uniformFixedMultiphaseHeatFluxFvPatchScalarField&,
|
||||||
const fvPatch&,
|
const fvPatch&,
|
||||||
const DimensionedField<scalar, volMesh>&,
|
const DimensionedField<scalar, volMesh>&,
|
||||||
const fvPatchFieldMapper&
|
const fvPatchFieldMapper&
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Disallow copy without setting internal field reference
|
//- Disallow copy without setting internal field reference
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField&
|
const uniformFixedMultiphaseHeatFluxFvPatchScalarField&
|
||||||
) = delete;
|
) = delete;
|
||||||
|
|
||||||
//- Copy constructor setting internal field reference
|
//- Copy constructor setting internal field reference
|
||||||
fixedMultiphaseHeatFluxFvPatchScalarField
|
uniformFixedMultiphaseHeatFluxFvPatchScalarField
|
||||||
(
|
(
|
||||||
const fixedMultiphaseHeatFluxFvPatchScalarField&,
|
const uniformFixedMultiphaseHeatFluxFvPatchScalarField&,
|
||||||
const DimensionedField<scalar, volMesh>&
|
const DimensionedField<scalar, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -126,28 +138,13 @@ public:
|
|||||||
{
|
{
|
||||||
return tmp<fvPatchScalarField>
|
return tmp<fvPatchScalarField>
|
||||||
(
|
(
|
||||||
new fixedMultiphaseHeatFluxFvPatchScalarField(*this, iF)
|
new uniformFixedMultiphaseHeatFluxFvPatchScalarField(*this, iF)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
// Mapping functions
|
|
||||||
|
|
||||||
//- Map (and resize as needed) from self given a mapping object
|
|
||||||
// Used to update fields following mesh topology change
|
|
||||||
virtual void autoMap(const fvPatchFieldMapper&);
|
|
||||||
|
|
||||||
//- Reverse map the given fvPatchField onto this fvPatchField
|
|
||||||
// Used to reconstruct fields
|
|
||||||
virtual void rmap(const fvPatchScalarField&, const labelList&);
|
|
||||||
|
|
||||||
//- Reset the fvPatchField to the given fvPatchField
|
|
||||||
// Used for mesh to mesh mapping
|
|
||||||
virtual void reset(const fvPatchScalarField&);
|
|
||||||
|
|
||||||
|
|
||||||
// Evaluation functions
|
// Evaluation functions
|
||||||
|
|
||||||
//- Update the coefficients associated with the patch field
|
//- Update the coefficients associated with the patch field
|
||||||
@ -624,7 +624,9 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
|
|||||||
|
|
||||||
// Nucleation mass transfer update
|
// Nucleation mass transfer update
|
||||||
{
|
{
|
||||||
typedef compressible::alphatPhaseChangeWallFunctionBase alphatwType;
|
typedef
|
||||||
|
compressible::alphatPhaseChangeWallFunctionBase
|
||||||
|
alphatWallFunction;
|
||||||
|
|
||||||
volScalarField& nDmdtf(*this->nDmdtfs_[interface]);
|
volScalarField& nDmdtf(*this->nDmdtfs_[interface]);
|
||||||
nDmdtf = Zero;
|
nDmdtf = Zero;
|
||||||
@ -649,10 +651,10 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
|
|||||||
const fvPatchScalarField& alphatp =
|
const fvPatchScalarField& alphatp =
|
||||||
alphat.boundaryField()[patchi];
|
alphat.boundaryField()[patchi];
|
||||||
|
|
||||||
if (!isA<alphatwType>(alphatp)) continue;
|
if (!isA<alphatWallFunction>(alphatp)) continue;
|
||||||
|
|
||||||
const alphatwType& alphatw =
|
const alphatWallFunction& alphatw =
|
||||||
refCast<const alphatwType>(alphatp);
|
refCast<const alphatWallFunction>(alphatp);
|
||||||
|
|
||||||
if (!alphatw.activeInterface(interface)) continue;
|
if (!alphatw.activeInterface(interface)) continue;
|
||||||
|
|
||||||
@ -667,7 +669,7 @@ Foam::ThermalPhaseChangePhaseSystem<BasePhaseSystem>::correctInterfaceThermo()
|
|||||||
nDmdtfp =
|
nDmdtfp =
|
||||||
scalarField(nDmdtfp)
|
scalarField(nDmdtfp)
|
||||||
- (interfaceIter.index() == 0 ? +1 : -1)
|
- (interfaceIter.index() == 0 ? +1 : -1)
|
||||||
*alphatw.dmdtf(interface);
|
*alphatw.dmdtf();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2018-2022 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2018-2023 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -78,10 +78,7 @@ void Foam::diameterModels::nucleationModels::wallBoiling::precompute()
|
|||||||
|
|
||||||
forAll(alphatBf, patchi)
|
forAll(alphatBf, patchi)
|
||||||
{
|
{
|
||||||
if
|
if (isA<alphatWallBoilingWallFunction>(alphatBf[patchi]))
|
||||||
(
|
|
||||||
isA<alphatWallBoilingWallFunction>(alphatBf[patchi])
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const alphatWallBoilingWallFunction& alphatw =
|
const alphatWallBoilingWallFunction& alphatw =
|
||||||
refCast<const alphatWallBoilingWallFunction>(alphatBf[patchi]);
|
refCast<const alphatWallBoilingWallFunction>(alphatBf[patchi]);
|
||||||
|
|||||||
@ -35,13 +35,10 @@ boundaryField
|
|||||||
otherPhase liquid;
|
otherPhase liquid;
|
||||||
phaseType vapor;
|
phaseType vapor;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,31 +32,27 @@ boundaryField
|
|||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type compressible::alphatWallBoilingWallFunction;
|
type compressible::alphatWallBoilingWallFunction;
|
||||||
Prt 0.85;
|
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
relax 1.0;
|
|
||||||
otherPhase gas;
|
otherPhase gas;
|
||||||
phaseType liquid;
|
phaseType liquid;
|
||||||
|
Prt 0.85;
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
nucleationSiteModel
|
nucleationSiteModel
|
||||||
{
|
{
|
||||||
type LemmertChawla;
|
type LemmertChawla;
|
||||||
Cn 1;
|
Cn 1;
|
||||||
NRef 30000000;
|
NRef 30000000;
|
||||||
deltaTRef 10;
|
deltaTRef 10;
|
||||||
}
|
}
|
||||||
departureDiamModel
|
departureDiamModel
|
||||||
{
|
{
|
||||||
type TolubinskiKostanchuk;
|
type TolubinskiKostanchuk;
|
||||||
dRef 0.00024;
|
dRef 0.00024;
|
||||||
dMax 0.0014;
|
dMax 0.0014;
|
||||||
dMin 1e-06;
|
dMin 1e-06;
|
||||||
}
|
}
|
||||||
departureFreqModel
|
departureFreqModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # run from this directory
|
|||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication extrudeMesh
|
runApplication extrudeMesh
|
||||||
runApplication splitMeshRegions -cellZones -overwrite
|
runApplication splitMeshRegions -cellZones -overwrite
|
||||||
runApplication foamDictionary constant/fluid/polyMesh/boundary -entry entry0/inlet/neighbourRegion -set "fluid"
|
|
||||||
paraFoam -region fluid -touch
|
paraFoam -region fluid -touch
|
||||||
paraFoam -region solid -touch
|
paraFoam -region solid -touch
|
||||||
|
|
||||||
@ -16,6 +16,7 @@ runApplication decomposePar -allRegions
|
|||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|
||||||
runApplication reconstructPar -latestTime -allRegions
|
runApplication reconstructPar -latestTime -allRegions
|
||||||
|
|
||||||
runApplication foamPostProcess -latestTime -region fluid -func "
|
runApplication foamPostProcess -latestTime -region fluid -func "
|
||||||
graphCell
|
graphCell
|
||||||
(
|
(
|
||||||
@ -24,9 +25,6 @@ runApplication foamPostProcess -latestTime -region fluid -func "
|
|||||||
end=(3.4901 0.0096 0),
|
end=(3.4901 0.0096 0),
|
||||||
fields=(alpha.gas T.liquid T.gas)
|
fields=(alpha.gas T.liquid T.gas)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createGraphs
|
|
||||||
|
|
||||||
runApplication -append foamPostProcess -region fluid -latestTime -func "
|
runApplication -append foamPostProcess -region fluid -latestTime -func "
|
||||||
patchSurface
|
patchSurface
|
||||||
(
|
(
|
||||||
@ -37,6 +35,10 @@ runApplication -append foamPostProcess -region fluid -latestTime -func "
|
|||||||
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createWallBoilingPropertiesGraphs
|
if ! isTest "$@"
|
||||||
|
then
|
||||||
|
./validation/createGraphs
|
||||||
|
./validation/createWallBoilingPropertiesGraphs
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -34,9 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type mappedValue;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
neighbourPatch wall;
|
q
|
||||||
field T.liquid;
|
{
|
||||||
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -34,10 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type fixedMultiphaseHeatFlux;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
relax 0.6;
|
q
|
||||||
q uniform 0;
|
{
|
||||||
phase "liquid";
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -36,13 +36,10 @@ boundaryField
|
|||||||
otherPhase liquid;
|
otherPhase liquid;
|
||||||
phaseType vapor;
|
phaseType vapor;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,31 +33,27 @@ boundaryField
|
|||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type compressible::alphatWallBoilingWallFunction;
|
type compressible::alphatWallBoilingWallFunction;
|
||||||
Prt 0.85;
|
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
relax 0.6;
|
|
||||||
otherPhase gas;
|
otherPhase gas;
|
||||||
phaseType liquid;
|
phaseType liquid;
|
||||||
|
Prt 0.85;
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
nucleationSiteModel
|
nucleationSiteModel
|
||||||
{
|
{
|
||||||
type LemmertChawla;
|
type LemmertChawla;
|
||||||
Cn 1;
|
Cn 1;
|
||||||
NRef 30000000;
|
NRef 30000000;
|
||||||
deltaTRef 10;
|
deltaTRef 10;
|
||||||
}
|
}
|
||||||
departureDiamModel
|
departureDiamModel
|
||||||
{
|
{
|
||||||
type TolubinskiKostanchuk;
|
type TolubinskiKostanchuk;
|
||||||
dRef 0.00024;
|
dRef 0.00024;
|
||||||
dMax 0.0014;
|
dMax 0.0014;
|
||||||
dMin 1e-06;
|
dMin 1e-06;
|
||||||
}
|
}
|
||||||
departureFreqModel
|
departureFreqModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -10,16 +10,8 @@ runApplication decomposePar
|
|||||||
|
|
||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|
||||||
if ! isTest "$@"
|
|
||||||
then
|
|
||||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
|
||||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
|
||||||
runParallel -a foamDictionary 0.5/T.liquid -entry boundaryField/wall/q -set "uniform 73890"
|
|
||||||
runParallel -a foamDictionary 0.5/U.liquid -entry boundaryField/inlet/type -set "fixedValue"
|
|
||||||
runParallel -a $(getApplication)
|
|
||||||
fi
|
|
||||||
|
|
||||||
runApplication reconstructPar -latestTime
|
runApplication reconstructPar -latestTime
|
||||||
|
|
||||||
runApplication foamPostProcess -latestTime -func "
|
runApplication foamPostProcess -latestTime -func "
|
||||||
graphCell
|
graphCell
|
||||||
(
|
(
|
||||||
@ -28,9 +20,6 @@ runApplication foamPostProcess -latestTime -func "
|
|||||||
end=(3.4901 0.0096 0),
|
end=(3.4901 0.0096 0),
|
||||||
fields=(alpha.gas T.liquid T.gas d.gas)
|
fields=(alpha.gas T.liquid T.gas d.gas)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createGraphs
|
|
||||||
|
|
||||||
runApplication -append foamPostProcess -latestTime -func "
|
runApplication -append foamPostProcess -latestTime -func "
|
||||||
patchSurface
|
patchSurface
|
||||||
(
|
(
|
||||||
@ -41,6 +30,10 @@ runApplication -append foamPostProcess -latestTime -func "
|
|||||||
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createWallBoilingPropertiesGraphs
|
if ! isTest "$@"
|
||||||
|
then
|
||||||
|
./validation/createGraphs
|
||||||
|
./validation/createWallBoilingPropertiesGraphs
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -24,7 +24,7 @@ startTime 0;
|
|||||||
|
|
||||||
stopAt endTime;
|
stopAt endTime;
|
||||||
|
|
||||||
endTime 0.5;
|
endTime 4;
|
||||||
|
|
||||||
deltaT 0.0001;
|
deltaT 0.0001;
|
||||||
|
|
||||||
@ -34,9 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type mappedValue;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
neighbourPatch wall;
|
q
|
||||||
field T.liquid;
|
{
|
||||||
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -34,10 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type fixedMultiphaseHeatFlux;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
relax 0.6;
|
q
|
||||||
q uniform 0;
|
{
|
||||||
phase "liquid";
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -36,13 +36,10 @@ boundaryField
|
|||||||
otherPhase liquid;
|
otherPhase liquid;
|
||||||
phaseType vapor;
|
phaseType vapor;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,31 +33,27 @@ boundaryField
|
|||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type compressible::alphatWallBoilingWallFunction;
|
type compressible::alphatWallBoilingWallFunction;
|
||||||
Prt 0.85;
|
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
relax 0.6;
|
|
||||||
otherPhase gas;
|
otherPhase gas;
|
||||||
phaseType liquid;
|
phaseType liquid;
|
||||||
|
Prt 0.85;
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
nucleationSiteModel
|
nucleationSiteModel
|
||||||
{
|
{
|
||||||
type LemmertChawla;
|
type LemmertChawla;
|
||||||
Cn 1;
|
Cn 1;
|
||||||
NRef 30000000;
|
NRef 30000000;
|
||||||
deltaTRef 10;
|
deltaTRef 10;
|
||||||
}
|
}
|
||||||
departureDiamModel
|
departureDiamModel
|
||||||
{
|
{
|
||||||
type TolubinskiKostanchuk;
|
type TolubinskiKostanchuk;
|
||||||
dRef 0.00024;
|
dRef 0.00024;
|
||||||
dMax 0.0014;
|
dMax 0.0014;
|
||||||
dMin 1e-06;
|
dMin 1e-06;
|
||||||
}
|
}
|
||||||
departureFreqModel
|
departureFreqModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,16 +11,8 @@ runApplication decomposePar
|
|||||||
|
|
||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|
||||||
if ! isTest "$@"
|
|
||||||
then
|
|
||||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
|
||||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
|
||||||
runParallel -a foamDictionary 0.5/T.liquid -entry boundaryField/wall/q -set "uniform 73890"
|
|
||||||
runParallel -a foamDictionary 0.5/U.liquid -entry boundaryField/inlet/type -set "fixedValue"
|
|
||||||
runParallel -a $(getApplication)
|
|
||||||
fi
|
|
||||||
|
|
||||||
runApplication reconstructPar -latestTime
|
runApplication reconstructPar -latestTime
|
||||||
|
|
||||||
runApplication foamPostProcess -latestTime -func "
|
runApplication foamPostProcess -latestTime -func "
|
||||||
graphCell
|
graphCell
|
||||||
(
|
(
|
||||||
@ -29,9 +21,6 @@ runApplication foamPostProcess -latestTime -func "
|
|||||||
end=(3.4901 0.0096 0),
|
end=(3.4901 0.0096 0),
|
||||||
fields=(alpha.gas T.liquid T.gas d.gas)
|
fields=(alpha.gas T.liquid T.gas d.gas)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createGraphs
|
|
||||||
|
|
||||||
runApplication -append foamPostProcess -latestTime -func "
|
runApplication -append foamPostProcess -latestTime -func "
|
||||||
patchSurface
|
patchSurface
|
||||||
(
|
(
|
||||||
@ -42,6 +31,10 @@ runApplication -append foamPostProcess -latestTime -func "
|
|||||||
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createWallBoilingPropertiesGraphs
|
if ! isTest "$@"
|
||||||
|
then
|
||||||
|
./validation/createGraphs
|
||||||
|
./validation/createWallBoilingPropertiesGraphs
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -24,7 +24,7 @@ startTime 0;
|
|||||||
|
|
||||||
stopAt endTime;
|
stopAt endTime;
|
||||||
|
|
||||||
endTime 0.5;
|
endTime 4;
|
||||||
|
|
||||||
deltaT 0.0001;
|
deltaT 0.0001;
|
||||||
|
|
||||||
@ -34,9 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type mappedValue;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
neighbourPatch wall;
|
q
|
||||||
field T.liquid;
|
{
|
||||||
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -10,7 +10,7 @@ FoamFile
|
|||||||
format ascii;
|
format ascii;
|
||||||
class volScalarField;
|
class volScalarField;
|
||||||
location "5";
|
location "5";
|
||||||
object T.gas2;
|
object T.gas;
|
||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -34,9 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type mappedValue;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
neighbourPatch wall;
|
q
|
||||||
field T.liquid;
|
{
|
||||||
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -34,10 +34,19 @@ boundaryField
|
|||||||
}
|
}
|
||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type fixedMultiphaseHeatFlux;
|
type uniformFixedMultiphaseHeatFlux;
|
||||||
relax 0.6;
|
q
|
||||||
q uniform 0;
|
{
|
||||||
phase "liquid";
|
type scale;
|
||||||
|
value 73890;
|
||||||
|
scale
|
||||||
|
{
|
||||||
|
type linearRamp;
|
||||||
|
start 0.5;
|
||||||
|
duration 0.01;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
relax 0.3;
|
||||||
value $internalField;
|
value $internalField;
|
||||||
}
|
}
|
||||||
front
|
front
|
||||||
|
|||||||
@ -36,13 +36,10 @@ boundaryField
|
|||||||
otherPhase liquid;
|
otherPhase liquid;
|
||||||
phaseType vapor;
|
phaseType vapor;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,13 +36,10 @@ boundaryField
|
|||||||
otherPhase liquid;
|
otherPhase liquid;
|
||||||
phaseType vapor;
|
phaseType vapor;
|
||||||
Prt 0.85;
|
Prt 0.85;
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
value uniform 0;
|
value uniform 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,31 +33,27 @@ boundaryField
|
|||||||
wall
|
wall
|
||||||
{
|
{
|
||||||
type compressible::alphatWallBoilingWallFunction;
|
type compressible::alphatWallBoilingWallFunction;
|
||||||
Prt 0.85;
|
|
||||||
Cmu 0.09;
|
|
||||||
kappa 0.41;
|
|
||||||
E 9.8;
|
|
||||||
relax 0.6;
|
|
||||||
otherPhase gas;
|
otherPhase gas;
|
||||||
phaseType liquid;
|
phaseType liquid;
|
||||||
|
Prt 0.85;
|
||||||
partitioningModel
|
partitioningModel
|
||||||
{
|
{
|
||||||
type Lavieville;
|
type Lavieville;
|
||||||
alphaCrit 0.2;
|
alphaCrit 0.2;
|
||||||
}
|
}
|
||||||
nucleationSiteModel
|
nucleationSiteModel
|
||||||
{
|
{
|
||||||
type LemmertChawla;
|
type LemmertChawla;
|
||||||
Cn 1;
|
Cn 1;
|
||||||
NRef 30000000;
|
NRef 30000000;
|
||||||
deltaTRef 10;
|
deltaTRef 10;
|
||||||
}
|
}
|
||||||
departureDiamModel
|
departureDiamModel
|
||||||
{
|
{
|
||||||
type TolubinskiKostanchuk;
|
type TolubinskiKostanchuk;
|
||||||
dRef 0.00024;
|
dRef 0.00024;
|
||||||
dMax 0.0014;
|
dMax 0.0014;
|
||||||
dMin 1e-06;
|
dMin 1e-06;
|
||||||
}
|
}
|
||||||
departureFreqModel
|
departureFreqModel
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,16 +11,8 @@ runApplication decomposePar
|
|||||||
|
|
||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|
||||||
if ! isTest "$@"
|
|
||||||
then
|
|
||||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
|
||||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
|
||||||
runParallel -a foamDictionary 0.5/T.liquid -entry boundaryField/wall/q -set "uniform 73890"
|
|
||||||
runParallel -a foamDictionary 0.5/U.liquid -entry boundaryField/inlet/type -set "fixedValue"
|
|
||||||
runParallel -a $(getApplication)
|
|
||||||
fi
|
|
||||||
|
|
||||||
runApplication reconstructPar -latestTime
|
runApplication reconstructPar -latestTime
|
||||||
|
|
||||||
runApplication foamPostProcess -latestTime -func "
|
runApplication foamPostProcess -latestTime -func "
|
||||||
graphCell
|
graphCell
|
||||||
(
|
(
|
||||||
@ -29,9 +21,6 @@ runApplication foamPostProcess -latestTime -func "
|
|||||||
end=(3.4901 0.0096 0),
|
end=(3.4901 0.0096 0),
|
||||||
fields=(alpha.gas alpha.gas2 alpha.liquid T.liquid T.gas d.bubbles)
|
fields=(alpha.gas alpha.gas2 alpha.liquid T.liquid T.gas d.bubbles)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createGraphs
|
|
||||||
|
|
||||||
runApplication -append foamPostProcess -latestTime -func "
|
runApplication -append foamPostProcess -latestTime -func "
|
||||||
patchSurface
|
patchSurface
|
||||||
(
|
(
|
||||||
@ -42,6 +31,10 @@ runApplication -append foamPostProcess -latestTime -func "
|
|||||||
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
fields=(dDeparture.liquid fDeparture.liquid nucleationSiteDensity.liquid wetFraction.liquid qQuenching.liquid qEvaporative.liquid)
|
||||||
)"
|
)"
|
||||||
|
|
||||||
./validation/createWallBoilingPropertiesGraphs
|
if ! isTest "$@"
|
||||||
|
then
|
||||||
|
./validation/createGraphs
|
||||||
|
./validation/createWallBoilingPropertiesGraphs
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -24,7 +24,7 @@ startTime 0;
|
|||||||
|
|
||||||
stopAt endTime;
|
stopAt endTime;
|
||||||
|
|
||||||
endTime 0.5;
|
endTime 4;
|
||||||
|
|
||||||
deltaT 0.0001;
|
deltaT 0.0001;
|
||||||
|
|
||||||
Reference in New Issue
Block a user