BUG: Fixing ray dAve and omega for 1D and 2D cases
This commit is contained in:
parent
698a6d59e0
commit
5848b0afd5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user