mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Fixing ray dAve and omega for 1D and 2D cases
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -137,6 +137,17 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
|
|||||||
|
|
||||||
if (mesh_.nSolutionD() == 2)
|
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);
|
vector meshDir(Zero);
|
||||||
if (dom_.meshOrientation() != vector::zero)
|
if (dom_.meshOrientation() != vector::zero)
|
||||||
{
|
{
|
||||||
@ -158,6 +169,7 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
|
|||||||
|
|
||||||
dAve_ = coordRot & dAve_;
|
dAve_ = coordRot & dAve_;
|
||||||
d_ = coordRot & d_;
|
d_ = coordRot & d_;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (mesh_.nSolutionD() == 1)
|
else if (mesh_.nSolutionD() == 1)
|
||||||
{
|
{
|
||||||
@ -180,6 +192,9 @@ Foam::radiation::radiativeIntensityRay::radiativeIntensityRay
|
|||||||
|
|
||||||
dAve_ = (dAve_ & normal)*meshDir;
|
dAve_ = (dAve_ & normal)*meshDir;
|
||||||
d_ = (d_ & normal)*meshDir;
|
d_ = (d_ & normal)*meshDir;
|
||||||
|
|
||||||
|
// Omega normalization for 1D
|
||||||
|
omega_ /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
autoPtr<volScalarField> IDefaultPtr;
|
autoPtr<volScalarField> IDefaultPtr;
|
||||||
|
|||||||
Reference in New Issue
Block a user