viewFactorsGen: Handle baffles
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1680
This commit is contained in:
@ -69,6 +69,7 @@ Description
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
triSurface triangulate
|
||||
(
|
||||
@ -208,6 +209,9 @@ scalar calculateViewFactorFij
|
||||
{
|
||||
vector r = i - j;
|
||||
scalar rMag = mag(r);
|
||||
|
||||
if (rMag > SMALL)
|
||||
{
|
||||
scalar dAiMag = mag(dAi);
|
||||
scalar dAjMag = mag(dAj);
|
||||
|
||||
@ -221,6 +225,11 @@ scalar calculateViewFactorFij
|
||||
(cosThetaI*cosThetaJ*dAjMag*dAiMag)
|
||||
/(sqr(rMag)*constant::mathematical::pi)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user