Corrected calculation of multi-layer resistance
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1447
This commit is contained in:
@ -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_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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_; // new total inverse
|
contactRes_ = 1.0/contactRes_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user