mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
radiationCoupledBase: Improved error message when solid region radiation is not defined
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-2015 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -28,6 +28,7 @@ License
|
|||||||
#include "mappedPatchBase.H"
|
#include "mappedPatchBase.H"
|
||||||
#include "fvPatchFieldMapper.H"
|
#include "fvPatchFieldMapper.H"
|
||||||
#include "radiationModel.H"
|
#include "radiationModel.H"
|
||||||
|
#include "noRadiation.H"
|
||||||
#include "absorptionEmissionModel.H"
|
#include "absorptionEmissionModel.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
|
||||||
@ -35,11 +36,7 @@ License
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
defineTypeNameAndDebug(radiationCoupledBase, 0);
|
defineTypeNameAndDebug(radiationCoupledBase, 0);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
template<>
|
template<>
|
||||||
const char* Foam::NamedEnum
|
const char* Foam::NamedEnum
|
||||||
<
|
<
|
||||||
@ -52,7 +49,6 @@ namespace Foam
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const Foam::NamedEnum<Foam::radiationCoupledBase::emissivityMethodType, 2>
|
const Foam::NamedEnum<Foam::radiationCoupledBase::emissivityMethodType, 2>
|
||||||
Foam::radiationCoupledBase::emissivityMethodTypeNames_;
|
Foam::radiationCoupledBase::emissivityMethodTypeNames_;
|
||||||
|
|
||||||
@ -161,6 +157,16 @@ Foam::scalarField Foam::radiationCoupledBase::emissivity() const
|
|||||||
"radiationProperties"
|
"radiationProperties"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (isType<radiation::noRadiation>(radiation))
|
||||||
|
{
|
||||||
|
FatalErrorInFunction
|
||||||
|
<< "No radiation model defined for region "
|
||||||
|
<< nbrMesh.name() << nl
|
||||||
|
<< " required for option 'solidRadiation' "
|
||||||
|
"of patchField type " << type()
|
||||||
|
<< " on patch " << patch_.name()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
|
||||||
const fvMesh& nbrFvMesh = refCast<const fvMesh>(nbrMesh);
|
const fvMesh& nbrFvMesh = refCast<const fvMesh>(nbrMesh);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user