Corrected calculation of multi-layer resistance

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1447
This commit is contained in:
Henry
2014-12-16 08:38:18 +00:00
parent 1db5ee8f56
commit 6439b0306f
2 changed files with 6 additions and 12 deletions

View File

@ -117,14 +117,12 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
if (thicknessLayers_.size() > 0) if (thicknessLayers_.size() > 0)
{ {
// Calculate effective thermal resistance by harmonic averaging
forAll (thicknessLayers_, iLayer) forAll (thicknessLayers_, iLayer)
{ {
const scalar l = thicknessLayers_[iLayer]; contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
if (l > 0.0)
{
contactRes_ += kappaLayers_[iLayer]/l;
}
} }
contactRes_ = 1.0/contactRes_;
} }
} }

View File

@ -123,16 +123,12 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
if (thicknessLayers_.size() > 0) if (thicknessLayers_.size() > 0)
{ {
// total thermal transmittance by harmonic averaging // Calculate effective thermal resistance by harmonic averaging
forAll (thicknessLayers_, iLayer) forAll (thicknessLayers_, iLayer)
{ {
const scalar l = thicknessLayers_[iLayer]; contactRes_ += thicknessLayers_[iLayer]/kappaLayers_[iLayer];
if (l > 0.0)
{
contactRes_ += l/kappaLayers_[iLayer]; // inverse sum
} }
} contactRes_ = 1.0/contactRes_;
contactRes_ = 1.0/contactRes_; // new total inverse
} }
} }