ENH: Added limiting to parcel temperature for phase change

This commit is contained in:
andy
2013-01-11 14:32:12 +00:00
parent e125cf5761
commit ad3e3c0ea7
7 changed files with 84 additions and 28 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -510,6 +510,9 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
const CompositionModel<reactingCloudType>& composition =
td.cloud().composition();
const scalar TMax = td.cloud().phaseChange().TMax(pc_, this->Tc_);
const scalar Tdash = min(T, TMax);
const scalar Tsdash = min(Ts, TMax);
// Calculate mass transfer due to phase change
td.cloud().phaseChange().calculate
@ -520,8 +523,8 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
Pr,
d,
nus,
T,
Ts,
Tdash,
Tsdash,
pc_,
this->Tc_,
YComponents,
@ -541,7 +544,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
const label idc = composition.localToGlobalCarrierId(idPhase, i);
const label idl = composition.globalIds(idPhase)[i];
const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, T);
const scalar dh = td.cloud().phaseChange().dh(idc, idl, pc_, Tdash);
Sh -= dMassPC[i]*dh/dt;
}
@ -558,12 +561,12 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange
const label idc = composition.localToGlobalCarrierId(idPhase, i);
const label idl = composition.globalIds(idPhase)[i];
const scalar Cp = composition.carrier().Cp(idc, pc_, Ts);
const scalar Cp = composition.carrier().Cp(idc, pc_, Tsdash);
const scalar W = composition.carrier().W(idc);
const scalar Ni = dMassPC[i]/(this->areaS(d)*dt*W);
const scalar Dab =
composition.liquids().properties()[idl].D(pc_, Ts, Wc);
composition.liquids().properties()[idl].D(pc_, Tsdash, Wc);
// Molar flux of species coming from the particle (kmol/m^2/s)
N += Ni;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -200,8 +200,8 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
(
const label idc,
const label idl,
const label p,
const label T
const scalar p,
const scalar T
) const
{
scalar dh = 0;
@ -230,8 +230,8 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
"("
"const label, "
"const label, "
"const label, "
"const label"
"const scalar, "
"const scalar"
") const"
) << "Unknown enthalpyTransfer type" << abort(FatalError);
}
@ -241,4 +241,21 @@ Foam::scalar Foam::LiquidEvaporation<CloudType>::dh
}
template<class CloudType>
Foam::scalar Foam::LiquidEvaporation<CloudType>::TMax
(
const scalar pIn,
const scalar TIn
) const
{
scalar T = -GREAT;
forAll(liquids_, i)
{
T = max(T, liquids_.properties()[i].pv(pIn, TIn));
}
return T;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -127,9 +127,12 @@ public:
(
const label idc,
const label idl,
const label p,
const label T
const scalar p,
const scalar T
) const;
//- Return maximum/limiting temperature
virtual scalar TMax(const scalar pIn, const scalar TIn) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -293,8 +293,8 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
(
const label idc,
const label idl,
const label p,
const label T
const scalar p,
const scalar T
) const
{
scalar dh = 0;
@ -329,8 +329,8 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
"("
"const label, "
"const label, "
"const label, "
"const label"
"const scalar, "
"const scalar"
") const"
) << "Unknown enthalpyTransfer type" << abort(FatalError);
}
@ -340,4 +340,21 @@ Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::dh
}
template<class CloudType>
Foam::scalar Foam::LiquidEvaporationBoil<CloudType>::TMax
(
const scalar pIn,
const scalar TIn
) const
{
scalar T = -GREAT;
forAll(liquids_, i)
{
T = max(T, liquids_.properties()[i].pv(pIn, TIn));
}
return T;
}
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -137,9 +137,12 @@ public:
(
const label idc,
const label idl,
const label p,
const label T
const scalar p,
const scalar T
) const;
//- Return maximum/limiting temperature
virtual scalar TMax(const scalar pIn, const scalar TIn) const;
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -170,14 +170,25 @@ Foam::scalar Foam::PhaseChangeModel<CloudType>::dh
(
const label idc,
const label idl,
const label p,
const label T
const scalar p,
const scalar T
) const
{
return 0.0;
}
template<class CloudType>
Foam::scalar Foam::PhaseChangeModel<CloudType>::TMax
(
const scalar,
const scalar
) const
{
return GREAT;
}
template<class CloudType>
void Foam::PhaseChangeModel<CloudType>::addToPhaseChangeMass(const scalar dMass)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -180,10 +180,12 @@ public:
(
const label idc,
const label idl,
const label p,
const label T
const scalar p,
const scalar T
) const;
//- Return maximum/limiting temperature
virtual scalar TMax(const scalar pIn, const scalar TIn) const;
//- Add to phase change mass
void addToPhaseChangeMass(const scalar dMass);