mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: using constant pressure approx for particle cell source update
This commit is contained in:
@ -49,6 +49,8 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (pc_ < td.cloud().constProps().pMin())
|
if (pc_ < td.cloud().constProps().pMin())
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
{
|
{
|
||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
@ -60,6 +62,7 @@ void Foam::ReactingParcel<ParcelType>::setCellValues
|
|||||||
")"
|
")"
|
||||||
) << "Limiting observed pressure in cell " << cellI << " to "
|
) << "Limiting observed pressure in cell " << cellI << " to "
|
||||||
<< td.cloud().constProps().pMin() << nl << endl;
|
<< td.cloud().constProps().pMin() << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
pc_ = td.cloud().constProps().pMin();
|
pc_ = td.cloud().constProps().pMin();
|
||||||
}
|
}
|
||||||
@ -86,42 +89,36 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
scalar massCell = this->massCell(cellI);
|
const scalar massCell = this->massCell(cellI);
|
||||||
|
|
||||||
const scalar V = td.cloud().pMesh().cellVolumes()[cellI];
|
this->rhoc_ += addedMass/td.cloud().pMesh().cellVolumes()[cellI];
|
||||||
this->rhoc_ += addedMass/V;
|
|
||||||
|
|
||||||
scalar massCellNew = massCell + addedMass;
|
const scalar massCellNew = massCell + addedMass;
|
||||||
this->Uc_ += td.cloud().UTrans()[cellI]/massCellNew;
|
this->Uc_ += td.cloud().UTrans()[cellI]/massCellNew;
|
||||||
|
|
||||||
scalar CpEff = 0.0;
|
scalar CpEff = 0.0;
|
||||||
scalar CsEff = 0.0;
|
|
||||||
scalar Csc = 0.0;
|
|
||||||
if (addedMass > ROOTVSMALL)
|
if (addedMass > ROOTVSMALL)
|
||||||
{
|
{
|
||||||
forAll(td.cloud().rhoTrans(), i)
|
forAll(td.cloud().rhoTrans(), i)
|
||||||
{
|
{
|
||||||
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass;
|
||||||
CpEff += Y*td.cloud().composition().carrier().Cp(i, this->Tc_);
|
CpEff += Y*td.cloud().composition().carrier().Cp(i, this->Tc_);
|
||||||
|
|
||||||
scalar W = td.cloud().composition().carrier().W(i);
|
|
||||||
CsEff += td.cloud().rhoTrans(i)[cellI]/V*Y/W;
|
|
||||||
scalar Yc = td.cloud().composition().carrier().Y(i)[cellI];
|
|
||||||
Csc += massCell/V*Yc/W;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CsEff = (massCell*Csc + addedMass*CsEff)/massCellNew;
|
|
||||||
|
|
||||||
const scalar Cpc = td.CpInterp().psi()[cellI];
|
const scalar Cpc = td.CpInterp().psi()[cellI];
|
||||||
this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew;
|
this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew;
|
||||||
|
|
||||||
this->Tc_ += td.cloud().hsTrans()[cellI]/(this->Cpc_*massCellNew);
|
this->Tc_ += td.cloud().hsTrans()[cellI]/(this->Cpc_*massCellNew);
|
||||||
|
|
||||||
if (this->Tc_ < td.cloud().constProps().TMin())
|
if (debug && (this->Tc_ < td.cloud().constProps().TMin()))
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
{
|
{
|
||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
"void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection"
|
"void Foam::ReactingParcel<ParcelType>::"
|
||||||
|
"cellValueSourceCorrection"
|
||||||
"("
|
"("
|
||||||
"TrackData&, "
|
"TrackData&, "
|
||||||
"const scalar, "
|
"const scalar, "
|
||||||
@ -129,11 +126,13 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection
|
|||||||
")"
|
")"
|
||||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||||
<< td.cloud().constProps().TMin() << nl << endl;
|
<< td.cloud().constProps().TMin() << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
this->Tc_ = td.cloud().constProps().TMin();
|
this->Tc_ = td.cloud().constProps().TMin();
|
||||||
}
|
}
|
||||||
|
|
||||||
this->pc_ = CsEff*specie::RR*this->Tc_;
|
// constant pressure
|
||||||
|
// this->pc_ = this->pc_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,6 +48,8 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
|||||||
Tc_ = td.TInterp().interpolate(this->position(), tetIs);
|
Tc_ = td.TInterp().interpolate(this->position(), tetIs);
|
||||||
|
|
||||||
if (Tc_ < td.cloud().constProps().TMin())
|
if (Tc_ < td.cloud().constProps().TMin())
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
{
|
{
|
||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
@ -59,6 +61,7 @@ void Foam::ThermoParcel<ParcelType>::setCellValues
|
|||||||
")"
|
")"
|
||||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||||
<< td.cloud().constProps().TMin() << nl << endl;
|
<< td.cloud().constProps().TMin() << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
Tc_ = td.cloud().constProps().TMin();
|
Tc_ = td.cloud().constProps().TMin();
|
||||||
}
|
}
|
||||||
@ -80,6 +83,8 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
|
|||||||
Tc_ += td.cloud().hsTrans()[cellI]/(CpMean*this->massCell(cellI));
|
Tc_ += td.cloud().hsTrans()[cellI]/(CpMean*this->massCell(cellI));
|
||||||
|
|
||||||
if (Tc_ < td.cloud().constProps().TMin())
|
if (Tc_ < td.cloud().constProps().TMin())
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
{
|
{
|
||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
@ -91,6 +96,7 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection
|
|||||||
")"
|
")"
|
||||||
) << "Limiting observed temperature in cell " << cellI << " to "
|
) << "Limiting observed temperature in cell " << cellI << " to "
|
||||||
<< td.cloud().constProps().TMin() << nl << endl;
|
<< td.cloud().constProps().TMin() << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
Tc_ = td.cloud().constProps().TMin();
|
Tc_ = td.cloud().constProps().TMin();
|
||||||
}
|
}
|
||||||
@ -115,6 +121,8 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
|||||||
Ts = (2.0*T + Tc_)/3.0;
|
Ts = (2.0*T + Tc_)/3.0;
|
||||||
|
|
||||||
if (Ts < td.cloud().constProps().TMin())
|
if (Ts < td.cloud().constProps().TMin())
|
||||||
|
{
|
||||||
|
if (debug)
|
||||||
{
|
{
|
||||||
WarningIn
|
WarningIn
|
||||||
(
|
(
|
||||||
@ -131,6 +139,7 @@ void Foam::ThermoParcel<ParcelType>::calcSurfaceValues
|
|||||||
") const"
|
") const"
|
||||||
) << "Limiting parcel surface temperature to "
|
) << "Limiting parcel surface temperature to "
|
||||||
<< td.cloud().constProps().TMin() << nl << endl;
|
<< td.cloud().constProps().TMin() << nl << endl;
|
||||||
|
}
|
||||||
|
|
||||||
Ts = td.cloud().constProps().TMin();
|
Ts = td.cloud().constProps().TMin();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user