Commit 5c74b709 authored by sergio's avatar sergio
Browse files

BUG: setting to zero qem and qin in radiativeIntensityRay.

qem and qin were not set to zero for the wideBand model BC.
qin was used in the grey model BC to calculate Ir(the total
incoming heat flux). As it is now set to zero, the grey model
loops over the incoming rays to calculate Ir instead of relaying
on qin stored in radiativeIntensityRay.
parent ea1b531a
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2018 OpenFOAM Foundation
Copyright (C) 2016 OpenCFD Ltd.
Copyright (C) 2016-2019OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -193,13 +193,23 @@ updateCoeffs()
const vector& myRayId = dom.IRay(rayId).d();
// Use updated Ir while iterating over rays
// avoids to used lagged qin
scalarField Ir = dom.IRay(0).qin().boundaryField()[patchi];
for (label rayI=1; rayI < dom.nRay(); rayI++)
scalarField Ir(patch().size(), Zero);
forAll(Iw, facei)
{
Ir += dom.IRay(rayI).qin().boundaryField()[patchi];
for (label rayi=0; rayi < dom.nRay(); rayi++)
{
const vector& d = dom.IRay(rayi).d();
if ((-n[facei] & d) < 0.0)
{
// q into the wall
const scalarField& IFace =
dom.IRay(rayi).ILambda(lambdaId).boundaryField()[patchi];
const vector& rayDave = dom.IRay(rayi).dAve();
Ir[facei] += IFace[facei]*(n[facei] & rayDave);
}
}
}
if (dom.useSolarLoad())
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016 OpenCFD Ltd.
Copyright (C) 2016-2019 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -188,17 +188,6 @@ updateCoeffs()
scalarField& qem = ray.qem().boundaryFieldRef()[patchi];
scalarField& qin = ray.qin().boundaryFieldRef()[patchi];
// Use updated Ir while iterating over rays
// avoids to used lagged qin
/*
scalarField Ir = dom.IRay(0).qin().boundaryField()[patchi];
for (label rayI=1; rayI < dom.nRay(); rayI++)
{
Ir += dom.IRay(rayI).qin().boundaryField()[patchi];
}
*/
// Calculate Ir into the wall on the same lambdaId
scalarField Ir(patch().size(), Zero);
forAll(Iw, facei)
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd
Copyright (C) 2018-2019 OpenCFD Ltd
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -270,6 +270,8 @@ Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
{
// Reset boundary heat flux to zero
qr_.boundaryFieldRef() = 0.0;
qem_.boundaryFieldRef() = 0.0;
qin_.boundaryFieldRef() = 0.0;
scalar maxResidual = -GREAT;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment