From 62144e4dd780d8fefec27eb4c61ec6d6235e1bc6 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Thu, 5 May 2016 12:21:23 +0100 Subject: [PATCH] Revert "Change boundaryRadiationProperties and boundaryRadiationPropertiesPatch to mesh object and changing tutorials accordingly" This reverts commit 662f9242e99af733d852a20604244945dd3d3794. Note: functionality moved to feature-boundaryRadiationProperties branch --- src/thermophysicalModels/radiation/Make/files | 2 +- ...boundaryRadiationPropertiesFvPatchField.C} | 186 +++++++++++++----- ...boundaryRadiationPropertiesFvPatchField.H} | 82 ++++++-- .../boundaryRadiationProperties.C | 75 +++---- .../boundaryRadiationProperties.H | 10 +- .../constant/boundaryRadiationProperties | 35 ++-- .../constant/boundaryRadiationProperties | 38 ++-- .../constant/boundaryRadiationProperties | 48 +++-- .../fireFoam/les/smallPoolFire3D/Allrun | 2 +- .../constant/boundaryRadiationProperties | 26 ++- .../constant/boundaryRadiationProperties | 48 ++++- .../constant/boundaryRadiationProperties | 21 +- .../constant/air/boundaryRadiationProperties | 46 +++-- .../bottomAir/boundaryRadiationProperties | 31 +-- .../topAir/boundaryRadiationProperties | 28 ++- .../constant/boundaryRadiationProperties | 27 ++- 16 files changed, 481 insertions(+), 224 deletions(-) rename src/thermophysicalModels/radiation/{submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C => derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C} (67%) rename src/thermophysicalModels/radiation/{submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.H => derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.H} (63%) diff --git a/src/thermophysicalModels/radiation/Make/files b/src/thermophysicalModels/radiation/Make/files index 2e9d71e8fb..ef6e105719 100644 --- a/src/thermophysicalModels/radiation/Make/files +++ b/src/thermophysicalModels/radiation/Make/files @@ -29,7 +29,6 @@ submodels/absorptionEmissionModel/wideBandAbsorptionEmission/wideBandAbsorptionE submodels/absorptionEmissionModel/greyMeanSolidAbsorptionEmission/greyMeanSolidAbsorptionEmission.C submodels/absorptionEmissionModel/multiBandSolidAbsorptionEmission/multiBandSolidAbsorptionEmission.C submodels/boundaryRadiationProperties/boundaryRadiationProperties.C -submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C /* Soot model */ submodels/sootModel/sootModel/sootModel.C @@ -53,5 +52,6 @@ derivedFvPatchFields/MarshakRadiationFixedTemperature/MarshakRadiationFixedTempe derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C derivedFvPatchFields/greyDiffusiveViewFactor/greyDiffusiveViewFactorFixedValueFvPatchScalarField.C +derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C LIB = $(FOAM_LIBBIN)/libradiationModels diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C similarity index 67% rename from src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C rename to src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C index 40e2a9d784..7e4f7f4bdc 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.C @@ -23,10 +23,13 @@ License \*---------------------------------------------------------------------------*/ -#include "boundaryRadiationPropertiesPatch.H" +#include "boundaryRadiationPropertiesFvPatchField.H" +#include "volFields.H" #include "mappedPatchBase.H" +#include "fvPatchFieldMapper.H" #include "radiationModel.H" #include "absorptionEmissionModel.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * * * // @@ -35,7 +38,7 @@ namespace Foam template<> const char* Foam::NamedEnum < - Foam::radiation::boundaryRadiationPropertiesPatch::methodType, + Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType, 3 >::names[] = { @@ -47,53 +50,70 @@ namespace Foam const Foam::NamedEnum < - Foam::radiation::boundaryRadiationPropertiesPatch::methodType, + Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodType, 3 -> Foam::radiation::boundaryRadiationPropertiesPatch::methodTypeNames_; +> Foam::radiation::boundaryRadiationPropertiesFvPatchField::methodTypeNames_; // * * * * * * * * * * * * * * * * Private functions * * * * * * * * * * * * // Foam::label -Foam::radiation::boundaryRadiationPropertiesPatch::nbrPatchIndex() const +Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrPatchIndex() const { // Get the coupling information from the mappedPatchBase const mappedPatchBase& mpp = - refCast(patch_); + refCast(patch().patch()); return (mpp.samplePolyPatch().index()); } const Foam::fvMesh& -Foam::radiation::boundaryRadiationPropertiesPatch::nbrRegion() const +Foam::radiation::boundaryRadiationPropertiesFvPatchField::nbrRegion() const { const mappedPatchBase& mpp = - refCast(patch_); + refCast(patch().patch()); return (refCast(mpp.sampleMesh())); } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::radiation::boundaryRadiationPropertiesPatch:: -boundaryRadiationPropertiesPatch + +Foam::radiation::boundaryRadiationPropertiesFvPatchField:: +boundaryRadiationPropertiesFvPatchField ( - const polyPatch& p, + const fvPatch& p, + const DimensionedField& iF +) +: + calculatedFvPatchScalarField(p, iF), + method_(LOOKUP), + dict_(), + absorptionEmission_(NULL), + transmissivity_(NULL) +{} + + +Foam::radiation::boundaryRadiationPropertiesFvPatchField:: +boundaryRadiationPropertiesFvPatchField +( + const fvPatch& p, + const DimensionedField& iF, const dictionary& dict ) : + calculatedFvPatchScalarField(p, iF), method_(methodTypeNames_.read(dict.lookup("mode"))), dict_(dict), absorptionEmission_(NULL), - transmissivity_(NULL), - patch_(p) + transmissivity_(NULL) { switch (method_) { case SOLIDRADIATION: { - if (!isA(p)) + if (!isA(p.patch())) { FatalErrorInFunction << "\n patch type '" << p.type() @@ -106,18 +126,23 @@ boundaryRadiationPropertiesPatch case MODEL: { - const fvMesh& mesh = - refCast(p.boundaryMesh().mesh()); + const fvMesh& mesh = this->dimensionedInternalField().mesh(); - absorptionEmission_.reset - ( - absorptionEmissionModel::New(dict, mesh).ptr() - ); + //if (dict.found("absorptionEmissionModel")) + { + absorptionEmission_.reset + ( + absorptionEmissionModel::New(dict, mesh).ptr() + ); + } - transmissivity_.reset - ( - transmissivityModel::New(dict, mesh).ptr() - ); + // if (dict.found("transmissivityModel")) + { + transmissivity_.reset + ( + transmissivityModel::New(dict, mesh).ptr() + ); + } } case LOOKUP: { @@ -126,19 +151,71 @@ boundaryRadiationPropertiesPatch break; } + if (dict.found("value")) + { + fvPatchScalarField::operator= + ( + scalarField("value", dict, p.size()) + ); + + } + else + { + fvPatchScalarField::operator=(0.0); + } } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::radiation::boundaryRadiationPropertiesPatch:: -~boundaryRadiationPropertiesPatch() +Foam::radiation::boundaryRadiationPropertiesFvPatchField:: +boundaryRadiationPropertiesFvPatchField +( + const boundaryRadiationPropertiesFvPatchField& ptf, + const fvPatch& p, + const DimensionedField& 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& iF +) +: + calculatedFvPatchScalarField(ptf, iF), + method_(ptf.method_), + dict_(ptf.dict_), + absorptionEmission_(NULL), + transmissivity_(NULL) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // const Foam::radiation::absorptionEmissionModel& -Foam::radiation::boundaryRadiationPropertiesPatch:: +Foam::radiation::boundaryRadiationPropertiesFvPatchField:: absorptionEmission() const { return absorptionEmission_(); @@ -146,7 +223,7 @@ absorptionEmission() const const Foam::radiation::transmissivityModel& -Foam::radiation::boundaryRadiationPropertiesPatch:: +Foam::radiation::boundaryRadiationPropertiesFvPatchField:: transmissiveModel() const { return transmissivity_(); @@ -154,7 +231,7 @@ transmissiveModel() const Foam::tmp -Foam::radiation::boundaryRadiationPropertiesPatch::emissivity +Foam::radiation::boundaryRadiationPropertiesFvPatchField::emissivity ( const label bandI ) const @@ -180,7 +257,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::emissivity ); const mappedPatchBase& mpp = - refCast(patch_); + refCast(patch().patch()); mpp.distribute(emissivity); @@ -195,7 +272,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::emissivity { tmp e ( - new scalarField("emissivity", dict_, patch_.size()) + new scalarField("emissivity", dict_, patch().size()) ); return e; @@ -203,7 +280,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::emissivity case MODEL: { - const label index = patch_.index(); + const label index = patch().index(); tmp e ( @@ -230,7 +307,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::emissivity Foam::tmp -Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity +Foam::radiation::boundaryRadiationPropertiesFvPatchField::absorptivity ( const label bandI ) const @@ -256,7 +333,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity ); const mappedPatchBase& mpp = - refCast(patch_); + refCast(patch().patch()); mpp.distribute(absorp); @@ -269,7 +346,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity case MODEL: { - const label index = patch_.index(); + const label index = patch().index(); tmp a ( new scalarField @@ -284,7 +361,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity { tmp a ( - new scalarField("absorptivity", dict_, patch_.size()) + new scalarField("absorptivity", dict_, patch().size()) ); return a; @@ -306,7 +383,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::absorptivity Foam::tmp -Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity +Foam::radiation::boundaryRadiationPropertiesFvPatchField::transmissivity ( const label bandI ) const @@ -332,7 +409,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity ); const mappedPatchBase& mpp = - refCast(patch_); + refCast(patch().patch()); mpp.distribute(trans); @@ -345,7 +422,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity case MODEL: { - const label index = patch_.index(); + const label index = patch().index(); tmp tau ( new scalarField @@ -362,7 +439,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity ( new scalarField ( - "transmissivity", dict_, patch_.size() + "transmissivity", dict_, patch().size() ) ); return tau; @@ -385,7 +462,7 @@ Foam::radiation::boundaryRadiationPropertiesPatch::transmissivity Foam::tmp -Foam::radiation::boundaryRadiationPropertiesPatch::reflectivity +Foam::radiation::boundaryRadiationPropertiesFvPatchField::reflectivity ( const label bandI ) const @@ -397,11 +474,13 @@ Foam::radiation::boundaryRadiationPropertiesPatch::reflectivity } -void Foam::radiation::boundaryRadiationPropertiesPatch::write +void Foam::radiation::boundaryRadiationPropertiesFvPatchField::write ( Ostream& os ) const { + calculatedFvPatchScalarField::write(os); + os.writeKeyword("mode") << methodTypeNames_[method_] << token::END_STATEMENT << nl; @@ -438,18 +517,18 @@ void Foam::radiation::boundaryRadiationPropertiesPatch::write case LOOKUP: { - const scalarField emissivity("emissivity", dict_, patch_.size()); + const scalarField emissivity("emissivity", dict_, patch().size()); emissivity.writeEntry("emissivity", os); const scalarField absorptivity ( - "absorptivity", dict_, patch_.size() + "absorptivity", dict_, patch().size() ); absorptivity.writeEntry("absorptivity", os); const scalarField transmissivity ( - "transmissivity", dict_, patch_.size() + "transmissivity", dict_, patch().size() ); transmissivity.writeEntry("transmissivity", os); @@ -462,4 +541,19 @@ void Foam::radiation::boundaryRadiationPropertiesPatch::write } } + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace radiation +{ + makePatchTypeField + ( + fvPatchScalarField, + boundaryRadiationPropertiesFvPatchField + ); +} +} + // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.H b/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.H similarity index 63% rename from src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.H rename to src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.H index a78b940bfe..e6cf0ac502 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationPropertiesPatch.H +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/boundaryRadiationProperties/boundaryRadiationPropertiesFvPatchField.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::boundaryRadiationPropertiesPatch + Foam::boundaryRadiationPropertiesFvPatchField Description Common functions to emissivity. It gets supplied from lookup into a @@ -33,12 +33,12 @@ Description - 'model' : use a model SourceFiles - boundaryRadiationPropertiesPatch.C + boundaryRadiationPropertiesFvPatchField.C \*---------------------------------------------------------------------------*/ -#ifndef boundaryRadiationPropertiesPatch_H -#define boundaryRadiationPropertiesPatch_H +#ifndef boundaryRadiationPropertiesFvPatchField_H +#define boundaryRadiationPropertiesFvPatchField_H #include "scalarField.H" #include "NamedEnum.H" @@ -54,14 +54,16 @@ namespace Foam namespace radiation { /*---------------------------------------------------------------------------*\ - Class boundaryRadiationPropertiesPatch Declaration + Class boundaryRadiationPropertiesFvPatchField Declaration \*---------------------------------------------------------------------------*/ -class boundaryRadiationPropertiesPatch +class boundaryRadiationPropertiesFvPatchField +: + public calculatedFvPatchScalarField { public: - // - Type of method + // - Type of look up enum methodType { SOLIDRADIATION, @@ -88,9 +90,6 @@ private: //- transmissivity model autoPtr transmissivity_; - //- reference to fvPatch - const polyPatch& patch_; - // Private functions @@ -103,19 +102,70 @@ private: public: + //- Runtime type information + TypeName("boundaryRadiation"); // Constructors - //- Construct from patch, internal field and dictionary - boundaryRadiationPropertiesPatch + //- Construct from patch and internal field + boundaryRadiationPropertiesFvPatchField ( - const polyPatch&, + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + boundaryRadiationPropertiesFvPatchField + ( + const fvPatch&, + const DimensionedField&, const dictionary& ); - //- Destructor - virtual ~boundaryRadiationPropertiesPatch(); + //- Construct by mapping given a + // greyDiffusiveViewFactorFixedValueFvPatchScalarField onto a new patch + boundaryRadiationPropertiesFvPatchField + ( + const boundaryRadiationPropertiesFvPatchField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + boundaryRadiationPropertiesFvPatchField + ( + const boundaryRadiationPropertiesFvPatchField& + ); + + //- Construct as copy setting internal field reference + boundaryRadiationPropertiesFvPatchField + ( + const boundaryRadiationPropertiesFvPatchField&, + const DimensionedField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new boundaryRadiationPropertiesFvPatchField(*this) + ); + } + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new boundaryRadiationPropertiesFvPatchField(*this, iF) + ); + } // Member functions @@ -146,7 +196,7 @@ public: tmp reflectivity(const label bandI = 0) const; //- Write - void write(Ostream&) const; + virtual void write(Ostream&) const; }; diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C index 76dd3b76b6..3ac0961c9c 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.C @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "boundaryRadiationProperties.H" +#include "boundaryRadiationPropertiesFvPatchField.H" +#include "fvPatchField.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -49,7 +51,7 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties Foam::GeometricMeshObject, boundaryRadiationProperties >(mesh), - radBoundaryPropertiesPtrList_(mesh.boundary().size()) + radBoundaryProperties_() { IOobject boundaryIO ( @@ -57,28 +59,15 @@ Foam::radiation::boundaryRadiationProperties::boundaryRadiationProperties mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE, - false + IOobject::NO_WRITE ); - if (boundaryIO.typeHeaderOk(true)) + if (boundaryIO.typeHeaderOk(true)) { - const IOdictionary radiationDict(boundaryIO); - - 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) - ); - } - } + radBoundaryProperties_.set + ( + new volScalarField(boundaryIO, mesh) + ); } } @@ -92,15 +81,18 @@ Foam::radiation::boundaryRadiationProperties::emissivity const label bandI ) const { - if (!radBoundaryPropertiesPtrList_[patchI].empty()) + if (!radBoundaryProperties_.empty()) { - return radBoundaryPropertiesPtrList_[patchI]->emissivity(bandI); + return refCast + ( + radBoundaryProperties_->boundaryField()[patchI] + ).emissivity(bandI); } else { FatalErrorInFunction - << "Patch : " << mesh().boundaryMesh()[patchI].name() - << " is not found in the boundaryRadiationProperties. " + << "Field 'boundaryRadiationProperties'" + << "is not found in the constant directory. " << "Please add it" << exit(FatalError); @@ -116,16 +108,19 @@ Foam::radiation::boundaryRadiationProperties::absorptivity const label bandI ) const { - if (!radBoundaryPropertiesPtrList_[patchI].empty()) + if (!radBoundaryProperties_.empty()) { - return radBoundaryPropertiesPtrList_[patchI]->absorptivity(bandI); + return refCast + ( + radBoundaryProperties_->boundaryField()[patchI] + ).absorptivity(bandI); } else { FatalErrorInFunction - << "Patch : " << mesh().boundaryMesh()[patchI].name() - << " is not found in the boundaryRadiationProperties. " - << "Please add it" + << "Field 'boundaryRadiationProperties'" + << "is not found in the constant directory. " + << "Please add it " << exit(FatalError); return tmp(new scalarField()); @@ -140,15 +135,18 @@ Foam::radiation::boundaryRadiationProperties::transmissivity const label bandI ) const { - if (!radBoundaryPropertiesPtrList_[patchI].empty()) + if (!radBoundaryProperties_.empty()) { - return radBoundaryPropertiesPtrList_[patchI]->transmissivity(bandI); + return refCast + ( + radBoundaryProperties_->boundaryField()[patchI] + ).transmissivity(bandI); } else { FatalErrorInFunction - << "Patch : " << mesh().boundaryMesh()[patchI].name() - << " is not found in the boundaryRadiationProperties. " + << "Field 'boundaryRadiationProperties'" + << "is not found in the constant directory. " << "Please add it" << exit(FatalError); @@ -164,15 +162,18 @@ Foam::radiation::boundaryRadiationProperties::reflectivity const label bandI ) const { - if (!radBoundaryPropertiesPtrList_[patchI].empty()) + if (!radBoundaryProperties_.empty()) { - return radBoundaryPropertiesPtrList_[patchI]->reflectivity(bandI); + return refCast + ( + radBoundaryProperties_->boundaryField()[patchI] + ).reflectivity(bandI); } else { FatalErrorInFunction - << "Patch : " << mesh().boundaryMesh()[patchI].name() - << " is not found in the boundaryRadiationProperties. " + << "Field 'boundaryRadiationProperties'" + << "is not found in the constant directory. " << "Please add it" << exit(FatalError); diff --git a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H index e10622f6bb..7fd29d7a17 100644 --- a/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H +++ b/src/thermophysicalModels/radiation/submodels/boundaryRadiationProperties/boundaryRadiationProperties.H @@ -36,7 +36,8 @@ SourceFiles #define boundaryRadiationProperties_H #include "MeshObject.H" -#include "boundaryRadiationPropertiesPatch.H" +#include "GeometricField.H" +#include "volMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -64,9 +65,8 @@ class boundaryRadiationProperties // Private data - //- Ptr list of boundaryRadiationProperties - List > - radBoundaryPropertiesPtrList_; + //- AutoPtr to volSacalarField properties + autoPtr radBoundaryProperties_; public: @@ -115,7 +115,7 @@ public: //- Destructor - ~boundaryRadiationProperties(); + virtual ~boundaryRadiationProperties(); }; diff --git a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties index 8fdbaa838c..aff03571a8 100644 --- a/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties +++ b/tutorials/combustion/fireFoam/les/flameSpreadWaterSuppressionPanel/constant/boundaryRadiationProperties @@ -9,25 +9,36 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +dimensions [0 0 0 0 0 0 0]; -region0_to_pyrolysisRegion_coupledWall +internalField uniform 0; + +boundaryField { - mode solidRadiation; -} + region0_to_pyrolysisRegion_coupledWall + { + type boundaryRadiation; + mode solidRadiation; + } -".*" -{ - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 1.0; - transmissivity uniform 0.0; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 1.0; + transmissivity uniform 0.0; + } + "procBoundary.*" + { + type processor; + value $internalField; + } } - // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties index 1ea3e10732..996bc97139 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/boundaryRadiationProperties @@ -9,27 +9,35 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +dimensions [0 0 0 0 0 0 0]; -".*" +internalField uniform 0; + +boundaryField { - type boundaryRadiation; - mode lookup; - emissivity uniform 1.0; - value uniform 0; + ".*" + { + type boundaryRadiation; + 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; - value uniform 0; -} - - // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties index d265661f5d..800985f978 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire2D/constant/boundaryRadiationProperties @@ -9,37 +9,33 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -base +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField { - mode lookup; - emissivity uniform 1.0; - value uniform 0; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + value uniform 0; + } + frontAndBack + { + type empty; + } + "procBoundary.*" + { + type processor; + value $internalField; + } } -outlet -{ - mode lookup; - emissivity uniform 1.0; - value uniform 0; -} - -sides -{ - mode lookup; - emissivity uniform 1.0; - value uniform 0; -} - -inlet -{ - mode lookup; - emissivity uniform 1.0; - value uniform 0; -} // ************************************************************************* // diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun index 81460ea389..7d2349761d 100755 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/Allrun @@ -9,7 +9,7 @@ application=`getApplication` runApplication blockMesh runApplication topoSet runApplication createPatch -overwrite -runApplication decomposePar -force +runApplication decomposePar -force -constant # Run runParallel $application diff --git a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties index 08eb48ed27..35b6a6ef1a 100644 --- a/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties +++ b/tutorials/combustion/fireFoam/les/smallPoolFire3D/constant/boundaryRadiationProperties @@ -9,18 +9,30 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -".*" +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField { - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 0.0; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 0.0; + value uniform 0.0; + } + "procBoundary.*" + { + type processor; + value $internalField; + } } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/boundaryRadiationProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/boundaryRadiationProperties index 446f19f45a..413800d2eb 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/boundaryRadiationProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoom/constant/boundaryRadiationProperties @@ -9,18 +9,52 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -".*" +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField { - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 1.0; + box + { + type boundaryRadiation; + 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; + } } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/boundaryRadiationProperties b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/boundaryRadiationProperties index 446f19f45a..97ec41d132 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/boundaryRadiationProperties +++ b/tutorials/heatTransfer/buoyantSimpleFoam/hotRadiationRoomFvDOM/constant/boundaryRadiationProperties @@ -9,18 +9,25 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -".*" +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField { - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 1.0; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 1.0; + value uniform 0.0; + } } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/constant/air/boundaryRadiationProperties b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/constant/air/boundaryRadiationProperties index eb8b81dd6f..7146b2a8c8 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/constant/air/boundaryRadiationProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/externalSolarLoad/constant/air/boundaryRadiationProperties @@ -9,30 +9,42 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -".*" -{ - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 0.0; - transmissivity uniform 1.0; -} +dimensions [0 0 0 0 0 0 0]; -air_to_solid -{ - mode solidRadiation; - value uniform 0; -} +internalField uniform 0; -air_to_floor +boundaryField { - mode solidRadiation; - value uniform 0; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 0.0; + transmissivity uniform 1.0; + + value uniform 0.0; + } + + air_to_solid + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; + } + + air_to_floor + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; + } + } // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties index 35e642154a..4648cebcef 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/bottomAir/boundaryRadiationProperties @@ -9,25 +9,32 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +dimensions [0 0 0 0 0 0 0]; -".*" +internalField uniform 0; + +boundaryField { - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 1.0; -} + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 1.0; + value uniform 0; // Dummy value + } -"bottomAir_to_.*" -{ - type boundaryRadiation; - mode solidRadiation; + "bottomAir_to_.*" + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; // Dummy value + } } - // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties index d544aba468..e01fb7a956 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeaterRadiation/constant/topAir/boundaryRadiationProperties @@ -9,21 +9,31 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -".*" -{ - mode lookup; - emissivity uniform 1.0; -} +dimensions [0 0 0 0 0 0 0]; -"topAir_to_.*" +internalField uniform 0; + +boundaryField { - mode solidRadiation; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + value uniform 0; // Dummy value + } + + "topAir_to_.*" + { + type boundaryRadiation; + mode solidRadiation; + value uniform 0; // Dummy value + } } // ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/boundaryRadiationProperties b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/boundaryRadiationProperties index 79e2200921..8edfb36ccd 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/boundaryRadiationProperties +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/constant/boundaryRadiationProperties @@ -9,18 +9,33 @@ FoamFile { version 2.0; format ascii; - class dictionary; - location "constant"; + class volScalarField; object boundaryRadiationProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +dimensions [0 0 0 0 0 0 0]; -".*" +internalField uniform 0; + +boundaryField { - mode lookup; - emissivity uniform 1.0; - absorptivity uniform 0.0; + ".*" + { + type boundaryRadiation; + mode lookup; + emissivity uniform 1.0; + absorptivity uniform 0.0; + value uniform 0.0; + } + symmetry + { + type symmetryPlane; + } + frontAndBack + { + type empty; + } } // ************************************************************************* //