Commit e28694fe authored by andy's avatar andy
Browse files

BUG: LiquidEvaporation[Boil] - immediately evaporate mass if reached critical...

BUG: LiquidEvaporation[Boil] - immediately evaporate mass if reached critical condition - mantis #950
parent ad2c46f7
......@@ -151,6 +151,44 @@ void Foam::LiquidEvaporation<CloudType>::calculate
scalarField& dMassPC
) const
{
// liquid volume fraction
const scalarField X(liquids_.X(Yl));
// immediately evaporate mass that has reached critical condition
if (mag(T - liquids_.Tc(X)) < SMALL)
{
if (debug)
{
WarningIn
(
"void Foam::LiquidEvaporation<CloudType>::calculate"
"("
"const scalar, "
"const label, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalarField&, "
"scalarField&"
") const"
) << "Parcel reached critical conditions: "
<< "evaporating all avaliable mass" << endl;
}
forAll(activeLiquids_, i)
{
const label lid = liqToLiqMap_[i];
dMassPC[lid] = GREAT;
}
return;
}
// construct carrier phase species volume fractions for cell, cellI
const scalarField Xc(calcXc(cellI));
......@@ -242,9 +280,27 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
template<class CloudType>
Foam::scalar Foam::LiquidEvaporation<CloudType>::TMax(const scalar pIn) const
Foam::scalar Foam::LiquidEvaporation<CloudType>::Tvap
(
const scalarField& Y
) const
{
const scalarField X(liquids_.X(Y));
return liquids_.Tpt(X);
}
template<class CloudType>
Foam::scalar Foam::LiquidEvaporation<CloudType>::TMax
(
const scalar p,
const scalarField& Y
) const
{
return liquids_.TMax(pIn);
const scalarField X(liquids_.X(Y));
return liquids_.pvInvert(p, X);
}
......
......@@ -131,8 +131,11 @@ public:
const scalar T
) const;
//- Return vapourisation temperature
virtual scalar Tvap(const scalarField& Y) const;
//- Return maximum/limiting temperature
virtual scalar TMax(const scalar pIn) const;
virtual scalar TMax(const scalar p, const scalarField& Y) const;
};
......
......@@ -151,18 +151,53 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate
scalarField& dMassPC
) const
{
// construct carrier phase species volume fractions for cell, cellI
const scalarField XcMix(calcXc(cellI));
// liquid volume fraction
const scalarField X(liquids_.X(Yl));
// immediately evaporate mass that has reached critical condition
if (mag(T - liquids_.Tc(X)) < SMALL)
{
if (debug)
{
WarningIn
(
"void Foam::LiquidEvaporationBoil<CloudType>::calculate"
"("
"const scalar, "
"const label, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalar, "
"const scalarField&, "
"scalarField&"
") const"
) << "Parcel reached critical conditions: "
<< "evaporating all avaliable mass" << endl;
}
forAll(activeLiquids_, i)
{
const label lid = liqToLiqMap_[i];
dMassPC[lid] = GREAT;
}
return;
}
// droplet surface pressure assumed to surface vapour pressure
scalar ps = liquids_.pv(pc, Ts, X);
// vapour density at droplet surface [kg/m3]
scalar rhos = ps*liquids_.W(X)/(specie::RR*Ts);
// construct carrier phase species volume fractions for cell, cellI
const scalarField XcMix(calcXc(cellI));
// carrier thermo properties
scalar Hsc = 0.0;
scalar Hc = 0.0;
......@@ -340,13 +375,28 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
}
template<class CloudType>
Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::Tvap
(
const scalarField& Y
) const
{
const scalarField X(liquids_.X(Y));
return liquids_.Tpt(X);
}
template<class CloudType>
Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::TMax
(
const scalar pIn
const scalar p,
const scalarField& Y
) const
{
return liquids_.TMax(pIn);
const scalarField X(liquids_.X(Y));
return liquids_.pvInvert(p, X);
}
......
......@@ -141,8 +141,11 @@ public:
const scalar T
) const;
//- Return vapourisation temperature
virtual scalar Tvap(const scalarField& Y) const;
//- Return maximum/limiting temperature
virtual scalar TMax(const scalar pIn) const;
virtual scalar TMax(const scalar p, const scalarField& Y) const;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment