mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: Thermal baffle models - moved radiation model to derived type (needs thermo before it can be created)
This commit is contained in:
@ -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];
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -90,9 +90,6 @@ protected:
|
||||
//- Is thickness constant
|
||||
bool constantThickness_;
|
||||
|
||||
//- Pointer to radiation model
|
||||
autoPtr<radiation::radiationModel> radiation_;
|
||||
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user