radiationModels: Added errors when used in unsupported transforming geometries
This commit is contained in:
@ -45,6 +45,8 @@ Description
|
|||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
#include "distributedTriSurfaceMesh.H"
|
#include "distributedTriSurfaceMesh.H"
|
||||||
#include "cyclicAMIPolyPatch.H"
|
#include "cyclicAMIPolyPatch.H"
|
||||||
|
#include "symmetryPolyPatch.H"
|
||||||
|
#include "symmetryPlanePolyPatch.H"
|
||||||
#include "wedgePolyPatch.H"
|
#include "wedgePolyPatch.H"
|
||||||
#include "meshTools.H"
|
#include "meshTools.H"
|
||||||
#include "uindirectPrimitivePatch.H"
|
#include "uindirectPrimitivePatch.H"
|
||||||
@ -254,11 +256,17 @@ int main(int argc, char *argv[])
|
|||||||
forAll(patches, patchi)
|
forAll(patches, patchi)
|
||||||
{
|
{
|
||||||
const polyPatch& pp = patches[patchi];
|
const polyPatch& pp = patches[patchi];
|
||||||
if (isA<cyclicTransform>(pp) || isA<wedgePolyPatch>(pp))
|
if
|
||||||
|
(
|
||||||
|
isA<cyclicTransform>(pp)
|
||||||
|
|| isA<symmetryPolyPatch>(pp)
|
||||||
|
|| isA<symmetryPlanePolyPatch>(pp)
|
||||||
|
|| isA<wedgePolyPatch>(pp)
|
||||||
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn(args.executable()) << args.executable()
|
FatalErrorIn(args.executable()) << args.executable()
|
||||||
<< " does not currently support transforming patches, "
|
<< " does not currently support transforming patches: "
|
||||||
"cyclic and wedge."
|
"cyclic, symmetry and wedge."
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
#include "scatterModel.H"
|
#include "scatterModel.H"
|
||||||
#include "constants.H"
|
#include "constants.H"
|
||||||
#include "fvm.H"
|
#include "fvm.H"
|
||||||
|
#include "wedgePolyPatch.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
using namespace Foam::constant;
|
using namespace Foam::constant;
|
||||||
@ -49,6 +50,25 @@ namespace radiationModels
|
|||||||
|
|
||||||
void Foam::radiationModels::fvDOM::initialise()
|
void Foam::radiationModels::fvDOM::initialise()
|
||||||
{
|
{
|
||||||
|
forAll(mesh_.boundaryMesh(), patchi)
|
||||||
|
{
|
||||||
|
const polyPatch& pp = mesh_.boundaryMesh()[patchi];
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(
|
||||||
|
isA<cyclicTransform>(pp)
|
||||||
|
&& refCast<const cyclicTransform>(pp).transform().rotates()
|
||||||
|
)
|
||||||
|
|| isA<wedgePolyPatch>(pp)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalErrorInFunction << type()
|
||||||
|
<< " radiation model does not currently support"
|
||||||
|
" rotationally transforming patches: cyclic and wedge."
|
||||||
|
<< exit(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 3D
|
// 3D
|
||||||
if (mesh_.nSolutionD() == 3)
|
if (mesh_.nSolutionD() == 3)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user