From c07ab245561a704fd41b13c474df11ec3ee7b755 Mon Sep 17 00:00:00 2001 From: sergio Date: Mon, 22 Jul 2019 15:14:46 -0700 Subject: [PATCH] BUG: EP:1070. Adding check for coupled patches in faceReflecting --- .../solarLoad/faceReflecting/faceReflecting.C | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C index eb2b158dd3..418717da88 100644 --- a/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C +++ b/src/thermophysicalModels/radiation/radiationModels/solarLoad/faceReflecting/faceReflecting.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -413,23 +413,28 @@ void Foam::faceReflecting::calculate() // Fill patchr forAll(patchr, patchi) { - for (label bandI = 0; bandI < nBands; bandI++) - { - patchr[patchi][bandI] = - boundaryRadiation.specReflectivity - ( - patchi, - bandI, - new vectorField(patches[patchi].size(), sunDir) - ); + const polyPatch& pp = patches[patchi]; - patcha[patchi][bandI] = - boundaryRadiation.absorptivity - ( - patchi, - bandI, - new vectorField(patches[patchi].size(), sunDir) - ); + if (!pp.coupled() && !isA(pp)) + { + for (label bandI = 0; bandI < nBands; bandI++) + { + patchr[patchi][bandI] = + boundaryRadiation.specReflectivity + ( + patchi, + bandI, + new vectorField(patches[patchi].size(), sunDir) + ); + + patcha[patchi][bandI] = + boundaryRadiation.absorptivity + ( + patchi, + bandI, + new vectorField(patches[patchi].size(), sunDir) + ); + } } }