From 33497a978e9a32e36d88518304007cdb64b68401 Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 27 Jan 2010 12:35:15 +0000 Subject: [PATCH] BUG: Have sensible value for refValue. The refValue was being converted by mixedEnthalpy (even though it is not used) so a sensible value is necessary to get it to go through the conversion. So it now just gets the value --- .../solidWallMixedTemperatureCoupledFvPatchScalarField.C | 6 ++++-- .../turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C index a2940ef1..5d5c8d99 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallMixedTemperatureCoupled/solidWallMixedTemperatureCoupledFvPatchScalarField.C @@ -319,13 +319,15 @@ void Foam::solidWallMixedTemperatureCoupledFvPatchScalarField::updateCoeffs() if (normalGradient()[i] < 0.0) { this->refValue()[i] = operator[](i); - this->refGrad()[i] = 0.0; // not used + this->refGrad()[i] = 0.0; // not used by me this->valueFraction()[i] = 1.0; nFixed++; } else { - this->refValue()[i] = 0.0; // not used + // Fixed gradient. Make sure to have valid refValue (even though + // I am not using it - other boundary conditions might) + this->refValue()[i] = operator[](i); this->refGrad()[i] = normalGradient()[i]; this->valueFraction()[i] = 0.0; } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C index c44ec765..494a1e32 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C @@ -391,13 +391,15 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() if (normalGradient()[i] < 0.0) { this->refValue()[i] = operator[](i); - this->refGrad()[i] = 0.0; // not used + this->refGrad()[i] = 0.0; // not used by me this->valueFraction()[i] = 1.0; nFixed++; } else { - this->refValue()[i] = 0.0; // not used + // Fixed gradient. Make sure to have valid refValue (even though + // I am not using it - other boundary conditions might) + this->refValue()[i] = operator[](i); this->refGrad()[i] = normalGradient()[i]; this->valueFraction()[i] = 0.0; } -- 2.11.4.GIT