Commit 5848b0af authored by sergio's avatar sergio
Browse files

BUG: Fixing ray dAve and omega for 1D and 2D cases

parent 698a6d59
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -137,6 +137,17 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
if (mesh_.nSolutionD() == 2)
{
// Omega for 2D
omega_ = deltaPhi;
// dAve for 2D
dAve_ = vector
(
2*sinPhi*Foam::sin(0.5*deltaPhi),
2*cosPhi*Foam::sin(0.5*deltaPhi),
0
);
vector meshDir(Zero);
if (dom_.meshOrientation() != vector::zero)
{
......@@ -158,6 +169,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
dAve_ = coordRot & dAve_;
d_ = coordRot & d_;
}
else if (mesh_.nSolutionD() == 1)
{
......@@ -180,6 +192,9 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
dAve_ = (dAve_ & normal)*meshDir;
d_ = (d_ & normal)*meshDir;
// Omega normalization for 1D
omega_ /= 2;
}
autoPtr<volScalarField> IDefaultPtr;
......
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