Merge branch 'feature-boundaryRadiationProperties' into 'develop'

Feature boundary radiation properties

Change of the frame work for the specification of radiation properties

See merge request !42
This commit is contained in:
Andrew Heather
2016-06-08 13:58:14 +01:00
16 changed files with 236 additions and 489 deletions

View File

@ -29,6 +29,7 @@ submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionE
submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C
submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C
submodels/boundaryRadiationProperties/boundaryRadiationProperties.C submodels/boundaryRadiationProperties/boundaryRadiationProperties.C
submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C
/* Soot model */ /* Soot model */
submodels/sootModel/sootModel/sootModel.C submodels/sootModel/sootModel/sootModel.C
@ -52,6 +53,5 @@ derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTempe
derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C
derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C
LIB = $(FOAM_LIBBIN)/libradiationModels LIB = $(FOAM_LIBBIN)/libradiationModels

View File

@ -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) 2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -24,8 +24,6 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boundaryRadiationProperties.H" #include "boundaryRadiationProperties.H"
#include "boundaryRadiationPropertiesFvPatchField.H"
#include "fvPatchField.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
@ -51,7 +49,7 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
Foam::GeometricMeshObject, Foam::GeometricMeshObject,
boundaryRadiationProperties boundaryRadiationProperties
>(mesh), >(mesh),
radBoundaryProperties_() radBoundaryPropertiesPtrList_(mesh.boundary().size())
{ {
IOobject boundaryIO IOobject boundaryIO
( (
@ -59,15 +57,28 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties
mesh.time().constant(), mesh.time().constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE,
false
); );
if (boundaryIO.typeHeaderOk<volScalarField>(true)) if (boundaryIO.typeHeaderOk<IOdictionary>(true))
{ {
radBoundaryProperties_.set const IOdictionary radiationDict(boundaryIO);
(
new volScalarField(boundaryIO, mesh) forAll (mesh.boundary(), patchi)
); {
const polyPatch& pp = mesh.boundaryMesh()[patchi];
if (radiationDict.isDict(pp.name()))
{
const dictionary& dict = radiationDict.subDict(pp.name());
radBoundaryPropertiesPtrList_[patchi].set
(
new boundaryRadiationPropertiesPatch(pp, dict)
);
}
}
} }
} }
@ -81,18 +92,15 @@ Foam::radiation::boundaryRadiationProperties::emissivity
const label bandI const label bandI
) const ) const
{ {
if (!radBoundaryProperties_.empty()) if (!radBoundaryPropertiesPtrList_[patchI].empty())
{ {
return refCast<const boundaryRadiationPropertiesFvPatchField> return radBoundaryPropertiesPtrList_[patchI]->emissivity(bandI);
(
radBoundaryProperties_->boundaryField()[patchI]
).emissivity(bandI);
} }
else else
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Field 'boundaryRadiationProperties'" << "Patch : " << mesh().boundaryMesh()[patchI].name()
<< "is not found in the constant directory. " << " is not found in the boundaryRadiationProperties. "
<< "Please add it" << "Please add it"
<< exit(FatalError); << exit(FatalError);
@ -108,19 +116,16 @@ Foam::radiation::boundaryRadiationProperties::absorptivity
const label bandI const label bandI
) const ) const
{ {
if (!radBoundaryProperties_.empty()) if (!radBoundaryPropertiesPtrList_[patchI].empty())
{ {
return refCast<const boundaryRadiationPropertiesFvPatchField> return radBoundaryPropertiesPtrList_[patchI]->absorptivity(bandI);
(
radBoundaryProperties_->boundaryField()[patchI]
).absorptivity(bandI);
} }
else else
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Field 'boundaryRadiationProperties'" << "Patch : " << mesh().boundaryMesh()[patchI].name()
<< "is not found in the constant directory. " << " is not found in the boundaryRadiationProperties. "
<< "Please add it " << "Please add it"
<< exit(FatalError); << exit(FatalError);
return tmp<scalarField>(new scalarField()); return tmp<scalarField>(new scalarField());
@ -135,18 +140,15 @@ Foam::radiation::boundaryRadiationProperties::transmissivity
const label bandI const label bandI
) const ) const
{ {
if (!radBoundaryProperties_.empty()) if (!radBoundaryPropertiesPtrList_[patchI].empty())
{ {
return refCast<const boundaryRadiationPropertiesFvPatchField> return radBoundaryPropertiesPtrList_[patchI]->transmissivity(bandI);
(
radBoundaryProperties_->boundaryField()[patchI]
).transmissivity(bandI);
} }
else else
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Field 'boundaryRadiationProperties'" << "Patch : " << mesh().boundaryMesh()[patchI].name()
<< "is not found in the constant directory. " << " is not found in the boundaryRadiationProperties. "
<< "Please add it" << "Please add it"
<< exit(FatalError); << exit(FatalError);
@ -162,18 +164,15 @@ Foam::radiation::boundaryRadiationProperties::reflectivity
const label bandI const label bandI
) const ) const
{ {
if (!radBoundaryProperties_.empty()) if (!radBoundaryPropertiesPtrList_[patchI].empty())
{ {
return refCast<const boundaryRadiationPropertiesFvPatchField> return radBoundaryPropertiesPtrList_[patchI]->reflectivity(bandI);
(
radBoundaryProperties_->boundaryField()[patchI]
).reflectivity(bandI);
} }
else else
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Field 'boundaryRadiationProperties'" << "Patch : " << mesh().boundaryMesh()[patchI].name()
<< "is not found in the constant directory. " << " is not found in the boundaryRadiationProperties. "
<< "Please add it" << "Please add it"
<< exit(FatalError); << exit(FatalError);

View File

@ -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) 2015 OpenCFD Ltd \\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,8 +36,7 @@ SourceFiles
#define boundaryRadiationProperties_H #define boundaryRadiationProperties_H
#include "MeshObject.H" #include "MeshObject.H"
#include "GeometricField.H" #include "boundaryRadiationPropertiesPatch.H"
#include "volMesh.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -50,7 +49,7 @@ namespace radiation
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class boundaryRadiationProperties Declaration Class boundaryRadiationProperties Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class boundaryRadiationProperties class boundaryRadiationProperties
@ -62,11 +61,11 @@ class boundaryRadiationProperties
boundaryRadiationProperties boundaryRadiationProperties
> >
{ {
// Private data // Private data
//- AutoPtr to volSacalarField properties //- Ptr list of boundaryRadiationProperties
autoPtr<volScalarField> radBoundaryProperties_; List<autoPtr<boundaryRadiationPropertiesPatch> >
radBoundaryPropertiesPtrList_;
public: public:
@ -115,7 +114,7 @@ public:
//- Destructor //- Destructor
virtual ~boundaryRadiationProperties(); ~boundaryRadiationProperties();
}; };

View File

@ -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) 2015 OpenCFD Ltd \\ / A nd | Copyright (C) 2015-2016 OpenCFD Ltd.
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,13 +23,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "boundaryRadiationPropertiesFvPatchField.H" #include "boundaryRadiationPropertiesPatch.H"
#include "volFields.H"
#include "mappedPatchBase.H" #include "mappedPatchBase.H"
#include "fvPatchFieldMapper.H"
#include "radiationModel.H" #include "radiationModel.H"
#include "absorptionEmissionModel.H" #include "absorptionEmissionModel.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * //
@ -38,7 +35,7 @@ namespace Foam
template<> template<>
const char* Foam::NamedEnum const char* Foam::NamedEnum
< <
Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType, Foam::radiation::boundaryRadiationPropertiesPatch::methodType,
3 3
>::names[] = >::names[] =
{ {
@ -50,70 +47,54 @@ namespace Foam
const Foam::NamedEnum const Foam::NamedEnum
< <
Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType, Foam::radiation::boundaryRadiationPropertiesPatch::methodType,
3 3
> Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodTypeNames_; > Foam::radiation::boundaryRadiationPropertiesPatch::methodTypeNames_;
// * * * * * * * * * * * * * * * * Private functions * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Private functions * * * * * * * * * * * * //
Foam::label Foam::label
Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrPatchIndex() const Foam::radiation::boundaryRadiationPropertiesPatch::nbrPatchIndex() const
{ {
// Get the coupling information from the mappedPatchBase // Get the coupling information from the mappedPatchBase
const mappedPatchBase& mpp = const mappedPatchBase& mpp =
refCast<const mappedPatchBase>(patch().patch()); refCast<const mappedPatchBase>(patch_);
return (mpp.samplePolyPatch().index()); return (mpp.samplePolyPatch().index());
} }
const Foam::fvMesh& const Foam::fvMesh&
Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrRegion() const Foam::radiation::boundaryRadiationPropertiesPatch::nbrRegion() const
{ {
const mappedPatchBase& mpp = const mappedPatchBase& mpp =
refCast<const mappedPatchBase>(patch().patch()); refCast<const mappedPatchBase>(patch_);
return (refCast<const fvMesh>(mpp.sampleMesh())); return (refCast<const fvMesh>(mpp.sampleMesh()));
} }
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::radiation::boundaryRadiationPropertiesPatch::
Foam::radiation::boundaryRadiationPropertiesFvPatchField:: boundaryRadiationPropertiesPatch
boundaryRadiationPropertiesFvPatchField
( (
const fvPatch& p, const polyPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
calculatedFvPatchScalarField(p, iF),
method_(LOOKUP),
dict_(),
absorptionEmission_(NULL),
transmissivity_(NULL)
{}
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
boundaryRadiationPropertiesFvPatchField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict const dictionary& dict
) )
: :
calculatedFvPatchScalarField(p, iF),
method_(methodTypeNames_.read(dict.lookup("mode"))), method_(methodTypeNames_.read(dict.lookup("mode"))),
dict_(dict), dict_(dict),
absorptionEmission_(NULL), absorptionEmission_(NULL),
transmissivity_(NULL) transmissivity_(NULL),
patch_(p)
{ {
switch (method_) switch (method_)
{ {
case SOLIDRADIATION: case SOLIDRADIATION:
{ {
if (!isA<mappedPatchBase>(p.patch())) if (!isA<mappedPatchBase>(p))
{ {
FatalErrorInFunction FatalErrorInFunction
<< "\n patch type '" << p.type() << "\n patch type '" << p.type()
@ -126,23 +107,18 @@ boundaryRadiationPropertiesFvPatchField
case MODEL: case MODEL:
{ {
const fvMesh& mesh = this->dimensionedInternalField().mesh(); const fvMesh& mesh =
refCast<const fvMesh>(p.boundaryMesh().mesh());
//if (dict.found("absorptionEmissionModel")) absorptionEmission_.reset
{ (
absorptionEmission_.reset absorptionEmissionModel::New(dict, mesh).ptr()
( );
absorptionEmissionModel::New(dict, mesh).ptr()
);
}
// if (dict.found("transmissivityModel")) transmissivity_.reset
{ (
transmissivity_.reset transmissivityModel::New(dict, mesh).ptr()
( );
transmissivityModel::New(dict, mesh).ptr()
);
}
} }
case LOOKUP: case LOOKUP:
{ {
@ -151,87 +127,33 @@ boundaryRadiationPropertiesFvPatchField
break; break;
} }
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
}
else
{
fvPatchScalarField::operator=(0.0);
}
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::radiation::boundaryRadiationPropertiesFvPatchField:: Foam::radiation::boundaryRadiationPropertiesPatch::
boundaryRadiationPropertiesFvPatchField ~boundaryRadiationPropertiesPatch()
(
const boundaryRadiationPropertiesFvPatchField& ptf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
calculatedFvPatchScalarField(ptf, p, iF, mapper),
method_(ptf.method_),
dict_(ptf.dict_),
absorptionEmission_(NULL),
transmissivity_(NULL)
{}
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
boundaryRadiationPropertiesFvPatchField
(
const boundaryRadiationPropertiesFvPatchField& ptf
)
:
calculatedFvPatchScalarField(ptf),
method_(ptf.method_),
dict_(ptf.dict_),
absorptionEmission_(NULL),
transmissivity_(NULL)
{}
Foam::radiation::boundaryRadiationPropertiesFvPatchField::
boundaryRadiationPropertiesFvPatchField
(
const boundaryRadiationPropertiesFvPatchField& ptf,
const DimensionedField<scalar, volMesh>& iF
)
:
calculatedFvPatchScalarField(ptf, iF),
method_(ptf.method_),
dict_(ptf.dict_),
absorptionEmission_(NULL),
transmissivity_(NULL)
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
const Foam::radiation::absorptionEmissionModel& const Foam::radiation::absorptionEmissionModel&
Foam::radiation::boundaryRadiationPropertiesFvPatchField:: Foam::radiation::boundaryRadiationPropertiesPatch::absorptionEmission() const
absorptionEmission() const
{ {
return absorptionEmission_(); return absorptionEmission_();
} }
const Foam::radiation::transmissivityModel& const Foam::radiation::transmissivityModel&
Foam::radiation::boundaryRadiationPropertiesFvPatchField:: Foam::radiation::boundaryRadiationPropertiesPatch::transmissiveModel() const
transmissiveModel() const
{ {
return transmissivity_(); return transmissivity_();
} }
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity Foam::radiation::boundaryRadiationPropertiesPatch::emissivity
( (
const label bandI const label bandI
) const ) const
@ -257,7 +179,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity
); );
const mappedPatchBase& mpp = const mappedPatchBase& mpp =
refCast<const mappedPatchBase>(patch().patch()); refCast<const mappedPatchBase>(patch_);
mpp.distribute(emissivity); mpp.distribute(emissivity);
@ -272,7 +194,11 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity
{ {
tmp<scalarField> e tmp<scalarField> e
( (
new scalarField("emissivity", dict_, patch().size()) new scalarField
(
patch_.size(),
readScalar(dict_.lookup("emissivity"))
)
); );
return e; return e;
@ -280,7 +206,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity
case MODEL: case MODEL:
{ {
const label index = patch().index(); const label index = patch_.index();
tmp<scalarField> e tmp<scalarField> e
( (
@ -307,7 +233,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity
( (
const label bandI const label bandI
) const ) const
@ -333,7 +259,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity
); );
const mappedPatchBase& mpp = const mappedPatchBase& mpp =
refCast<const mappedPatchBase>(patch().patch()); refCast<const mappedPatchBase>(patch_);
mpp.distribute(absorp); mpp.distribute(absorp);
@ -346,7 +272,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity
case MODEL: case MODEL:
{ {
const label index = patch().index(); const label index = patch_.index();
tmp<scalarField> a tmp<scalarField> a
( (
new scalarField new scalarField
@ -361,7 +287,11 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity
{ {
tmp<scalarField> a tmp<scalarField> a
( (
new scalarField("absorptivity", dict_, patch().size()) new scalarField
(
patch_.size(),
readScalar(dict_.lookup("absorptivity"))
)
); );
return a; return a;
@ -383,7 +313,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity
( (
const label bandI const label bandI
) const ) const
@ -409,7 +339,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity
); );
const mappedPatchBase& mpp = const mappedPatchBase& mpp =
refCast<const mappedPatchBase>(patch().patch()); refCast<const mappedPatchBase>(patch_);
mpp.distribute(trans); mpp.distribute(trans);
@ -422,7 +352,7 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity
case MODEL: case MODEL:
{ {
const label index = patch().index(); const label index = patch_.index();
tmp<scalarField> tau tmp<scalarField> tau
( (
new scalarField new scalarField
@ -439,9 +369,11 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity
( (
new scalarField new scalarField
( (
"transmissivity", dict_, patch().size() patch_.size(),
readScalar(dict_.lookup("transmissivity"))
) )
); );
return tau; return tau;
} }
@ -460,9 +392,8 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity
} }
Foam::tmp<Foam::scalarField> Foam::tmp<Foam::scalarField>
Foam::radiation::boundaryRadiationPropertiesFvPatchField::reflectivity Foam::radiation::boundaryRadiationPropertiesPatch::reflectivity
( (
const label bandI const label bandI
) const ) const
@ -474,13 +405,11 @@ Foam::radiation::boundaryRadiationPropertiesFvPatchField::reflectivity
} }
void Foam::radiation::boundaryRadiationPropertiesFvPatchField::write void Foam::radiation::boundaryRadiationPropertiesPatch::write
( (
Ostream& os Ostream& os
) const ) const
{ {
calculatedFvPatchScalarField::write(os);
os.writeKeyword("mode") << methodTypeNames_[method_] os.writeKeyword("mode") << methodTypeNames_[method_]
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
@ -517,18 +446,18 @@ void Foam::radiation::boundaryRadiationPropertiesFvPatchField::write
case LOOKUP: case LOOKUP:
{ {
const scalarField emissivity("emissivity", dict_, patch().size()); const scalarField emissivity("emissivity", dict_, patch_.size());
emissivity.writeEntry("emissivity", os); emissivity.writeEntry("emissivity", os);
const scalarField absorptivity const scalarField absorptivity
( (
"absorptivity", dict_, patch().size() "absorptivity", dict_, patch_.size()
); );
absorptivity.writeEntry("absorptivity", os); absorptivity.writeEntry("absorptivity", os);
const scalarField transmissivity const scalarField transmissivity
( (
"transmissivity", dict_, patch().size() "transmissivity", dict_, patch_.size()
); );
transmissivity.writeEntry("transmissivity", os); transmissivity.writeEntry("transmissivity", os);
@ -542,18 +471,4 @@ void Foam::radiation::boundaryRadiationPropertiesFvPatchField::write
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace radiation
{
makePatchTypeField
(
fvPatchScalarField,
boundaryRadiationPropertiesFvPatchField
);
}
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -22,7 +22,7 @@ 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::boundaryRadiationPropertiesFvPatchField Foam::boundaryRadiationPropertiesPatch
Description Description
Common functions to emissivity. It gets supplied from lookup into a Common functions to emissivity. It gets supplied from lookup into a
@ -33,12 +33,12 @@ Description
- 'model' : use a model - 'model' : use a model
SourceFiles SourceFiles
boundaryRadiationPropertiesFvPatchField.C boundaryRadiationPropertiesPatch.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef boundaryRadiationPropertiesFvPatchField_H #ifndef boundaryRadiationPropertiesPatch_H
#define boundaryRadiationPropertiesFvPatchField_H #define boundaryRadiationPropertiesPatch_H
#include "scalarField.H" #include "scalarField.H"
#include "NamedEnum.H" #include "NamedEnum.H"
@ -54,16 +54,14 @@ namespace Foam
namespace radiation namespace radiation
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class boundaryRadiationPropertiesFvPatchField Declaration Class boundaryRadiationPropertiesPatch Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class boundaryRadiationPropertiesFvPatchField class boundaryRadiationPropertiesPatch
:
public calculatedFvPatchScalarField
{ {
public: public:
// - Type of look up // - Type of method
enum methodType enum methodType
{ {
SOLIDRADIATION, SOLIDRADIATION,
@ -90,6 +88,9 @@ private:
//- transmissivity model //- transmissivity model
autoPtr<transmissivityModel> transmissivity_; autoPtr<transmissivityModel> transmissivity_;
//- reference to fvPatch
const polyPatch& patch_;
// Private functions // Private functions
@ -102,70 +103,19 @@ private:
public: public:
//- Runtime type information
TypeName("boundaryRadiation");
// Constructors // Constructors
//- Construct from patch and internal field
boundaryRadiationPropertiesFvPatchField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary //- Construct from patch, internal field and dictionary
boundaryRadiationPropertiesFvPatchField boundaryRadiationPropertiesPatch
( (
const fvPatch&, const polyPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary& const dictionary&
); );
//- Construct by mapping given a //- Destructor
// greyDiffusiveViewFactorFixedValueFvPatchScalarField onto a new patch virtual ~boundaryRadiationPropertiesPatch();
boundaryRadiationPropertiesFvPatchField
(
const boundaryRadiationPropertiesFvPatchField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
boundaryRadiationPropertiesFvPatchField
(
const boundaryRadiationPropertiesFvPatchField&
);
//- Construct as copy setting internal field reference
boundaryRadiationPropertiesFvPatchField
(
const boundaryRadiationPropertiesFvPatchField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new boundaryRadiationPropertiesFvPatchField(*this)
);
}
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new boundaryRadiationPropertiesFvPatchField(*this, iF)
);
}
// Member functions // Member functions
@ -196,7 +146,7 @@ public:
tmp<scalarField> reflectivity(const label bandI = 0) const; tmp<scalarField> reflectivity(const label bandI = 0) const;
//- Write //- Write
virtual void write(Ostream&) const; void write(Ostream&) const;
}; };

View File

@ -9,36 +9,25 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0; region0_to_pyrolysisRegion_coupledWall
boundaryField
{ {
region0_to_pyrolysisRegion_coupledWall mode solidRadiation;
{
type boundaryRadiation;
mode solidRadiation;
}
".*"
{
type boundaryRadiation;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
transmissivity uniform 0.0;
}
"procBoundary.*"
{
type processor;
value $internalField;
}
} }
".*"
{
mode lookup;
emissivity 1.0;
absorptivity 1.0;
transmissivity 0.0;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,35 +9,25 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0; ".*"
boundaryField
{ {
".*" type boundaryRadiation;
{ mode lookup;
type boundaryRadiation; emissivity 1.0;
mode lookup;
emissivity uniform 1.0;
value uniform 0;
}
"(region0_to.*)"
{
type boundaryRadiation;
mode solidRadiation;
value uniform 0;
}
"procBoundary.*"
{
type processor;
value $internalField;
}
} }
"(region0_to.*)"
{
type boundaryRadiation;
mode solidRadiation;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,33 +9,35 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; base
internalField uniform 0;
boundaryField
{ {
".*" mode lookup;
{ emissivity 1.0;
type boundaryRadiation;
mode lookup;
emissivity uniform 1.0;
value uniform 0;
}
frontAndBack
{
type empty;
}
"procBoundary.*"
{
type processor;
value $internalField;
}
} }
outlet
{
mode lookup;
emissivity 1.0;
}
sides
{
mode lookup;
emissivity 1.0;
}
inlet
{
mode lookup;
emissivity 1.0;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,7 +9,7 @@ application=`getApplication`
runApplication blockMesh runApplication blockMesh
runApplication topoSet runApplication topoSet
runApplication createPatch -overwrite runApplication createPatch -overwrite
runApplication decomposePar -force -constant runApplication decomposePar -force
# Run # Run
runParallel $application runParallel $application

View File

@ -9,30 +9,18 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; ".*"
internalField uniform 0;
boundaryField
{ {
".*" mode lookup;
{ emissivity 1.0;
type boundaryRadiation; absorptivity 0.0;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 0.0;
value uniform 0.0;
}
"procBoundary.*"
{
type processor;
value $internalField;
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,52 +9,18 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; ".*"
internalField uniform 0;
boundaryField
{ {
box mode lookup;
{ emissivity 1.0;
type boundaryRadiation; absorptivity 1.0;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
value uniform 0;
}
floor
{
type boundaryRadiation;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
value uniform 0;
}
ceiling
{
type boundaryRadiation;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
value uniform 0;
}
fixedWalls
{
type boundaryRadiation;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
value uniform 0;
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,25 +9,18 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; ".*"
internalField uniform 0;
boundaryField
{ {
".*" mode lookup;
{ emissivity 1.0;
type boundaryRadiation; absorptivity 1.0;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
value uniform 0.0;
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,42 +9,30 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; ".*"
internalField uniform 0;
boundaryField
{ {
".*" mode lookup;
{ emissivity uniform 1.0;
type boundaryRadiation; absorptivity uniform 0.0;
mode lookup; transmissivity uniform 1.0;
emissivity uniform 1.0; }
absorptivity uniform 0.0;
transmissivity uniform 1.0;
value uniform 0.0; air_to_solid
} {
mode solidRadiation;
air_to_solid value uniform 0;
{ }
type boundaryRadiation;
mode solidRadiation;
value uniform 0;
}
air_to_floor
{
type boundaryRadiation;
mode solidRadiation;
value uniform 0;
}
air_to_floor
{
mode solidRadiation;
value uniform 0;
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,32 +9,25 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0; ".*"
boundaryField
{ {
".*" mode lookup;
{ emissivity 1.0;
type boundaryRadiation; absorptivity 1.0;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 1.0;
value uniform 0; // Dummy value
}
"bottomAir_to_.*"
{
type boundaryRadiation;
mode solidRadiation;
value uniform 0; // Dummy value
}
} }
"bottomAir_to_.*"
{
type boundaryRadiation;
mode solidRadiation;
}
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,31 +9,21 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0]; ".*"
internalField uniform 0;
boundaryField
{ {
".*" mode lookup;
{ emissivity 1.0;
type boundaryRadiation; }
mode lookup;
emissivity uniform 1.0;
value uniform 0; // Dummy value
}
"topAir_to_.*" "topAir_to_.*"
{ {
type boundaryRadiation; mode solidRadiation;
mode solidRadiation;
value uniform 0; // Dummy value
}
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -9,33 +9,18 @@ FoamFile
{ {
version 2.0; version 2.0;
format ascii; format ascii;
class volScalarField; class dictionary;
location "constant";
object boundaryRadiationProperties; object boundaryRadiationProperties;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0; ".*"
boundaryField
{ {
".*" mode lookup;
{ emissivity 1.0;
type boundaryRadiation; absorptivity 0.0;
mode lookup;
emissivity uniform 1.0;
absorptivity uniform 0.0;
value uniform 0.0;
}
symmetry
{
type symmetryPlane;
}
frontAndBack
{
type empty;
}
} }
// ************************************************************************* // // ************************************************************************* //