Commit c0bc17ea authored by Will Bainbridge's avatar Will Bainbridge Committed by Andrew Heather
Browse files

ThermoParcel: Improved numerical stability of heat transfer term

Patch contributed by Timo Niemi, VTT.
Resolves bug-report https://bugs.openfoam.org/view.php?id=2655
parent 0a97c3fc
......@@ -282,7 +282,8 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
const scalar As = this->areaS(d);
scalar ap = Tc_ + Sh/(As*htc);
scalar bp = 6.0*(Sh/As + htc*(Tc_ - T_));
const scalar bp = 6.0*htc/max(rho*d*Cp_, ROOTVSMALL);
if (td.cloud().radiation())
{
tetIndices tetIs = this->currentTetIndices();
......@@ -294,9 +295,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer
scalar s = epsilon*(Gc/4.0 - sigma*pow4(T_));
ap += s/htc;
bp += 6.0*s;
}
bp /= rho*d*Cp_*(ap - T_) + ROOTVSMALL;
// Integrate to find the new parcel temperature
IntegrationScheme<scalar>::integrationResult Tres =
......
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