mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
fvDOM: check mesh is on x-y plane for 2D cases and in x-direction for 1D cases
This commit is contained in:
@ -2,7 +2,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-2013 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -49,7 +49,8 @@ namespace Foam
|
|||||||
|
|
||||||
void Foam::radiation::fvDOM::initialise()
|
void Foam::radiation::fvDOM::initialise()
|
||||||
{
|
{
|
||||||
if (mesh_.nSolutionD() == 3) //3D
|
// 3D
|
||||||
|
if (mesh_.nSolutionD() == 3)
|
||||||
{
|
{
|
||||||
nRay_ = 4*nPhi_*nTheta_;
|
nRay_ = 4*nPhi_*nTheta_;
|
||||||
IRay_.setSize(nRay_);
|
IRay_.setSize(nRay_);
|
||||||
@ -83,10 +84,17 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
// 2D
|
||||||
|
else if (mesh_.nSolutionD() == 2)
|
||||||
{
|
{
|
||||||
if (mesh_.nSolutionD() == 2) //2D (X & Y)
|
// Currently 2D solution is limited to the x-y plane
|
||||||
|
if (mesh_.solutionD()[vector::Z] != -1)
|
||||||
{
|
{
|
||||||
|
FatalErrorIn("fvDOM::initialise()")
|
||||||
|
<< "Currently 2D solution is limited to the x-y plane"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
scalar thetai = piByTwo;
|
scalar thetai = piByTwo;
|
||||||
scalar deltaTheta = pi;
|
scalar deltaTheta = pi;
|
||||||
nRay_ = 4*nPhi_;
|
nRay_ = 4*nPhi_;
|
||||||
@ -116,8 +124,17 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else //1D (X)
|
// 1D
|
||||||
|
else
|
||||||
{
|
{
|
||||||
|
// Currently 1D solution is limited to the x-direction
|
||||||
|
if (mesh_.solutionD()[vector::X] != 1)
|
||||||
|
{
|
||||||
|
FatalErrorIn("fvDOM::initialise()")
|
||||||
|
<< "Currently 1D solution is limited to the x-direction"
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
scalar thetai = piByTwo;
|
scalar thetai = piByTwo;
|
||||||
scalar deltaTheta = pi;
|
scalar deltaTheta = pi;
|
||||||
nRay_ = 2;
|
nRay_ = 2;
|
||||||
@ -147,7 +164,6 @@ void Foam::radiation::fvDOM::initialise()
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Construct absorption field for each wavelength
|
// Construct absorption field for each wavelength
|
||||||
@ -388,6 +404,7 @@ Foam::radiation::fvDOM::fvDOM
|
|||||||
initialise();
|
initialise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::radiation::fvDOM::~fvDOM()
|
Foam::radiation::fvDOM::~fvDOM()
|
||||||
|
|||||||
Reference in New Issue
Block a user