diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C index 2f518036d20873b300bf2ff12109a1d1f5b2ce01..3a7eab446e2edee2900d70e10fcd8d1ccfe552d2 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C +++ b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C @@ -203,7 +203,8 @@ thermoBaffle2D::thermoBaffle2D dimEnergy/dimVolume/dimTime, pTraits<scalar>::zero ) - ) + ), + radiation_(radiation::radiationModel::New(thermo_->T())) { init(); thermo_->correct(); @@ -255,7 +256,8 @@ thermoBaffle2D::thermoBaffle2D dimEnergy/dimVolume/dimTime, pTraits<scalar>::zero ) - ) + ), + radiation_(radiation::radiationModel::New(thermo_->T())) { init(); thermo_->correct(); @@ -341,6 +343,7 @@ const solidThermo& thermoBaffle2D::thermo() const void thermoBaffle2D::info() const { const labelList& coupledPatches = intCoupledPatchIDs(); + forAll(coupledPatches, i) { const label patchI = coupledPatches[i]; diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H index a8949e89df88e16c167c4b6ef7e0190c094e8123..52f648f8d60a010968c95080110654506dd40be7 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H +++ b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.H @@ -100,6 +100,12 @@ protected: volScalarField Q_; + // Sub models + + //- Pointer to radiation model + autoPtr<radiation::radiationModel> radiation_; + + // Protected member functions //- Read control parameters IO dictionary diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C index 3b2c2bcb9c1f6198336f85ce86829d1bfd45ebd0..ff38797a145d4dd9971f1fb12bb4d3c73f1f8ef8 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C +++ b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,11 +107,12 @@ void thermoBaffleModel::init() const label patchI = intCoupledPatchIDs_[i]; const polyPatch& pp = rbm[patchI]; - if ( - !isA<mappedVariableThicknessWallPolyPatch>(pp) - && oneD_ - && !constantThickness_ - ) + if + ( + !isA<mappedVariableThicknessWallPolyPatch>(pp) + && oneD_ + && !constantThickness_ + ) { FatalErrorIn ( @@ -192,9 +193,6 @@ void thermoBaffleModel::init() } } } - - // Create radiation model - radiation_.reset(radiation::radiationModel::New(T()).ptr()); } } @@ -207,8 +205,7 @@ thermoBaffleModel::thermoBaffleModel(const fvMesh& mesh) thickness_(), delta_("delta", dimLength, 0.0), oneD_(false), - constantThickness_(true), - radiation_(NULL) + constantThickness_(true) {} @@ -224,8 +221,7 @@ thermoBaffleModel::thermoBaffleModel thickness_(), delta_("delta", dimLength, 0.0), oneD_(false), - constantThickness_(dict.lookupOrDefault<bool>("constantThickness", true)), - radiation_(NULL) + constantThickness_(dict.lookupOrDefault<bool>("constantThickness", true)) { init(); } @@ -237,8 +233,7 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh) thickness_(), delta_("delta", dimLength, 0.0), oneD_(false), - constantThickness_(lookupOrDefault<bool>("constantThickness", true)), - radiation_(NULL) + constantThickness_(lookupOrDefault<bool>("constantThickness", true)) { init(); } diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H index 917cf452ac50bccfe2988a02b6394db36557322c..d55d6c5ee9c4309c41b81341e3e7562b054d3222 100644 --- a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H +++ b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H @@ -90,9 +90,6 @@ protected: //- Is thickness constant bool constantThickness_; - //- Pointer to radiation model - autoPtr<radiation::radiationModel> radiation_; - // Protected Member Functions