mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: boundaryRadiationProperties - updated to use caseConstant() for parallel usage and updated style
This commit is contained in:
@ -42,13 +42,14 @@ namespace Foam
|
|||||||
|
|
||||||
Foam::IOobject Foam::radiation::boundaryRadiationProperties::createIOobject
|
Foam::IOobject Foam::radiation::boundaryRadiationProperties::createIOobject
|
||||||
(
|
(
|
||||||
const fvMesh& mesh, const word name
|
const fvMesh& mesh,
|
||||||
|
const word name
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
IOobject io
|
IOobject io
|
||||||
(
|
(
|
||||||
name,
|
name,
|
||||||
mesh.time().constant(),
|
mesh.time().caseConstant(),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
IOobject::MUST_READ,
|
||||||
IOobject::NO_WRITE
|
IOobject::NO_WRITE
|
||||||
@ -71,7 +72,7 @@ Foam::IOobject Foam::radiation::boundaryRadiationProperties::createIOobject
|
|||||||
|
|
||||||
Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
|
Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
|
||||||
(
|
(
|
||||||
const fvMesh& mesh
|
const fvMesh& mesh
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
MeshObject
|
MeshObject
|
||||||
@ -99,15 +100,19 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member fucntions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member fucntions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
const Foam::volScalarField& Foam::radiation::boundaryRadiationProperties::
|
const Foam::volScalarField&
|
||||||
radBoundaryProperties() const
|
Foam::radiation::boundaryRadiationProperties::radBoundaryProperties() const
|
||||||
{
|
{
|
||||||
return radBoundaryProperties_();
|
return radBoundaryProperties_();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
Foam::tmp<Foam::scalarField>
|
||||||
emissivity(const label index, const label bandI) const
|
Foam::radiation::boundaryRadiationProperties::emissivity
|
||||||
|
(
|
||||||
|
const label index,
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
if (!radBoundaryProperties_.empty())
|
if (!radBoundaryProperties_.empty())
|
||||||
{
|
{
|
||||||
@ -120,8 +125,8 @@ emissivity(const label index, const label bandI) const
|
|||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Field 'boundaryRadiationProperties'"
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
<< "is not found in the constant directory."
|
<< "is not found in the constant directory. "
|
||||||
<< "Please add it "
|
<< "Please add it"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
||||||
return tmp<scalarField>(new scalarField());
|
return tmp<scalarField>(new scalarField());
|
||||||
@ -129,8 +134,12 @@ emissivity(const label index, const label bandI) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
Foam::tmp<Foam::scalarField>
|
||||||
absorptivity(const label index, const label bandI) const
|
Foam::radiation::boundaryRadiationProperties::absorptivity
|
||||||
|
(
|
||||||
|
const label index,
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
if (!radBoundaryProperties_.empty())
|
if (!radBoundaryProperties_.empty())
|
||||||
{
|
{
|
||||||
@ -143,7 +152,7 @@ absorptivity(const label index, const label bandI) const
|
|||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Field 'boundaryRadiationProperties'"
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
<< "is not found in the constant directory."
|
<< "is not found in the constant directory. "
|
||||||
<< "Please add it "
|
<< "Please add it "
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
||||||
@ -152,8 +161,12 @@ absorptivity(const label index, const label bandI) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
Foam::tmp<Foam::scalarField>
|
||||||
transmissivity(const label index, const label bandI) const
|
Foam::radiation::boundaryRadiationProperties::transmissivity
|
||||||
|
(
|
||||||
|
const label index,
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
if (!radBoundaryProperties_.empty())
|
if (!radBoundaryProperties_.empty())
|
||||||
{
|
{
|
||||||
@ -166,8 +179,8 @@ transmissivity(const label index, const label bandI) const
|
|||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Field 'boundaryRadiationProperties'"
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
<< "is not found in the constant directory."
|
<< "is not found in the constant directory. "
|
||||||
<< "Please add it "
|
<< "Please add it"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
||||||
return tmp<scalarField>(new scalarField());
|
return tmp<scalarField>(new scalarField());
|
||||||
@ -175,8 +188,12 @@ transmissivity(const label index, const label bandI) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::radiation::boundaryRadiationProperties::
|
Foam::tmp<Foam::scalarField>
|
||||||
reflectivity(const label index, const label bandI) const
|
Foam::radiation::boundaryRadiationProperties::reflectivity
|
||||||
|
(
|
||||||
|
const label index,
|
||||||
|
const label bandI
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
if (!radBoundaryProperties_.empty())
|
if (!radBoundaryProperties_.empty())
|
||||||
{
|
{
|
||||||
@ -189,8 +206,8 @@ reflectivity(const label index, const label bandI) const
|
|||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "Field 'boundaryRadiationProperties'"
|
<< "Field 'boundaryRadiationProperties'"
|
||||||
<< "is not found in the constant directory."
|
<< "is not found in the constant directory. "
|
||||||
<< "Please add it "
|
<< "Please add it"
|
||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
|
|
||||||
return tmp<scalarField>(new scalarField());
|
return tmp<scalarField>(new scalarField());
|
||||||
|
|||||||
@ -22,12 +22,11 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::fv::boundaryRadiationProperties
|
Foam::radiation::boundaryRadiationProperties
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Boundary radiation properties holder
|
Boundary radiation properties holder
|
||||||
|
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
boundaryRadiationProperties.C
|
boundaryRadiationProperties.C
|
||||||
|
|
||||||
@ -84,7 +83,7 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Construct given fvMesh and IOobject
|
//- Construct given fvMesh
|
||||||
boundaryRadiationProperties(const fvMesh&);
|
boundaryRadiationProperties(const fvMesh&);
|
||||||
|
|
||||||
|
|
||||||
@ -127,9 +126,9 @@ public:
|
|||||||
|
|
||||||
//- Destructor
|
//- Destructor
|
||||||
virtual ~boundaryRadiationProperties();
|
virtual ~boundaryRadiationProperties();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace radiation
|
} // End namespace radiation
|
||||||
|
|||||||
Reference in New Issue
Block a user