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,
|
dimEnergy/dimVolume/dimTime,
|
||||||
pTraits<scalar>::zero
|
pTraits<scalar>::zero
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
|
radiation_(radiation::radiationModel::New(thermo_->T()))
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
thermo_->correct();
|
thermo_->correct();
|
||||||
@ -255,7 +256,8 @@ thermoBaffle2D::thermoBaffle2D
|
|||||||
dimEnergy/dimVolume/dimTime,
|
dimEnergy/dimVolume/dimTime,
|
||||||
pTraits<scalar>::zero
|
pTraits<scalar>::zero
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
|
radiation_(radiation::radiationModel::New(thermo_->T()))
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
thermo_->correct();
|
thermo_->correct();
|
||||||
@ -341,6 +343,7 @@ const solidThermo& thermoBaffle2D::thermo() const
|
|||||||
void thermoBaffle2D::info() const
|
void thermoBaffle2D::info() const
|
||||||
{
|
{
|
||||||
const labelList& coupledPatches = intCoupledPatchIDs();
|
const labelList& coupledPatches = intCoupledPatchIDs();
|
||||||
|
|
||||||
forAll(coupledPatches, i)
|
forAll(coupledPatches, i)
|
||||||
{
|
{
|
||||||
const label patchI = coupledPatches[i];
|
const label patchI = coupledPatches[i];
|
||||||
|
|||||||
@ -100,6 +100,12 @@ protected:
|
|||||||
volScalarField Q_;
|
volScalarField Q_;
|
||||||
|
|
||||||
|
|
||||||
|
// Sub models
|
||||||
|
|
||||||
|
//- Pointer to radiation model
|
||||||
|
autoPtr<radiation::radiationModel> radiation_;
|
||||||
|
|
||||||
|
|
||||||
// Protected member functions
|
// Protected member functions
|
||||||
|
|
||||||
//- Read control parameters IO dictionary
|
//- Read control parameters IO dictionary
|
||||||
|
|||||||
@ -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) 2011 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -107,11 +107,12 @@ void thermoBaffleModel::init()
|
|||||||
const label patchI = intCoupledPatchIDs_[i];
|
const label patchI = intCoupledPatchIDs_[i];
|
||||||
const polyPatch& pp = rbm[patchI];
|
const polyPatch& pp = rbm[patchI];
|
||||||
|
|
||||||
if (
|
if
|
||||||
!isA<mappedVariableThicknessWallPolyPatch>(pp)
|
(
|
||||||
&& oneD_
|
!isA<mappedVariableThicknessWallPolyPatch>(pp)
|
||||||
&& !constantThickness_
|
&& oneD_
|
||||||
)
|
&& !constantThickness_
|
||||||
|
)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
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_(),
|
thickness_(),
|
||||||
delta_("delta", dimLength, 0.0),
|
delta_("delta", dimLength, 0.0),
|
||||||
oneD_(false),
|
oneD_(false),
|
||||||
constantThickness_(true),
|
constantThickness_(true)
|
||||||
radiation_(NULL)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -224,8 +221,7 @@ thermoBaffleModel::thermoBaffleModel
|
|||||||
thickness_(),
|
thickness_(),
|
||||||
delta_("delta", dimLength, 0.0),
|
delta_("delta", dimLength, 0.0),
|
||||||
oneD_(false),
|
oneD_(false),
|
||||||
constantThickness_(dict.lookupOrDefault<bool>("constantThickness", true)),
|
constantThickness_(dict.lookupOrDefault<bool>("constantThickness", true))
|
||||||
radiation_(NULL)
|
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
@ -237,8 +233,7 @@ thermoBaffleModel::thermoBaffleModel(const word& modelType, const fvMesh& mesh)
|
|||||||
thickness_(),
|
thickness_(),
|
||||||
delta_("delta", dimLength, 0.0),
|
delta_("delta", dimLength, 0.0),
|
||||||
oneD_(false),
|
oneD_(false),
|
||||||
constantThickness_(lookupOrDefault<bool>("constantThickness", true)),
|
constantThickness_(lookupOrDefault<bool>("constantThickness", true))
|
||||||
radiation_(NULL)
|
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,9 +90,6 @@ protected:
|
|||||||
//- Is thickness constant
|
//- Is thickness constant
|
||||||
bool constantThickness_;
|
bool constantThickness_;
|
||||||
|
|
||||||
//- Pointer to radiation model
|
|
||||||
autoPtr<radiation::radiationModel> radiation_;
|
|
||||||
|
|
||||||
|
|
||||||
// Protected Member Functions
|
// Protected Member Functions
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user