diff --git a/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C b/src/regionModels/thermoBaffleModels/thermoBaffle2D/thermoBaffle2D.C index 2f518036d2..3a7eab446e 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::zero ) - ) + ), + radiation_(radiation::radiationModel::New(thermo_->T())) { init(); thermo_->correct(); @@ -255,7 +256,8 @@ thermoBaffle2D::thermoBaffle2D dimEnergy/dimVolume/dimTime, pTraits::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 a8949e89df..52f648f8d6 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_; + + // 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 3b2c2bcb9c..ff38797a14 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(pp) - && oneD_ - && !constantThickness_ - ) + if + ( + !isA(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("constantThickness", true)), - radiation_(NULL) + constantThickness_(dict.lookupOrDefault("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("constantThickness", true)), - radiation_(NULL) + constantThickness_(lookupOrDefault("constantThickness", true)) { init(); } diff --git a/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H b/src/regionModels/thermoBaffleModels/thermoBaffleModel/thermoBaffleModel.H index 917cf452ac..d55d6c5ee9 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_; - // Protected Member Functions