From 4569a8b3c5636ae30122ac570cbbca697fc1e07f Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 12 Apr 2019 10:24:38 +0200 Subject: [PATCH] BUG: inconsistent emissivity for externalWallHeatFlux (fixes #1280) - the emissivity was ignored for 'hpTa' when there is no solid resistance STYLE: adjust debug statement in externalWallHeatFlux --- ...allHeatFluxTemperatureFvPatchScalarField.C | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C index cdc526810f..e0fab90a42 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C @@ -411,14 +411,14 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() scalarField lambdaTa4(pow4((1 - TpLambda)*Ta)); hp += emissivity_*sigma.value()*(pow4(Ts) - lambdaTa4)/Tp; - hpTa += sigma.value()*(emissivity_*lambdaTa4 + pow4(Ta)); + hpTa += emissivity_*sigma.value()*(lambdaTa4 + pow4(Ta)); } else { // ... if there is no solid wall thermal resistance use // the current wall temperature hp += emissivity_*sigma.value()*pow3(Tp); - hpTa += sigma.value()*pow4(Ta); + hpTa += emissivity_*sigma.value()*pow4(Ta); } } @@ -454,20 +454,14 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() mixedFvPatchScalarField::updateCoeffs(); - if (debug) - { - const scalar Q = gSum(kappa(Tp)*patch().magSf()*snGrad()); - - Info<< patch().boundaryMesh().mesh().name() << ':' - << patch().name() << ':' - << internalField().name() << " :" - << " heat transfer rate:" << Q - << " wall temperature " - << " min:" << gMin(*this) - << " max:" << gMax(*this) - << " avg:" << gAverage(*this) - << endl; - } + DebugInfo + << patch().boundaryMesh().mesh().name() << ':' << patch().name() << ':' + << internalField().name() << " :" + << " heat transfer rate:" << gSum(kappa(Tp)*patch().magSf()*snGrad()) + << " wall temperature " + << " min:" << gMin(*this) + << " max:" << gMax(*this) + << " avg:" << gAverage(*this) << nl; } -- GitLab