ENH: Adding thin wall thermal resistance to externalWallHeatFluxTemperature

This commit is contained in:
Sergio Ferraris
2013-08-06 10:35:37 +01:00
parent bbc96e2a68
commit 3f712acec8
2 changed files with 34 additions and 9 deletions

View File

@ -68,7 +68,9 @@ externalWallHeatFluxTemperatureFvPatchScalarField
mode_(unknown),
q_(p.size(), 0.0),
h_(p.size(), 0.0),
Ta_(p.size(), 0.0)
Ta_(p.size(), 0.0),
thicknessLayer_(0),
kappaLayer_(0)
{
this->refValue() = 0.0;
this->refGrad() = 0.0;
@ -90,7 +92,9 @@ externalWallHeatFluxTemperatureFvPatchScalarField
mode_(ptf.mode_),
q_(ptf.q_, mapper),
h_(ptf.h_, mapper),
Ta_(ptf.Ta_, mapper)
Ta_(ptf.Ta_, mapper),
thicknessLayer_(ptf.thicknessLayer_),
kappaLayer_(ptf.kappaLayer_)
{}
@ -107,7 +111,9 @@ externalWallHeatFluxTemperatureFvPatchScalarField
mode_(unknown),
q_(p.size(), 0.0),
h_(p.size(), 0.0),
Ta_(p.size(), 0.0)
Ta_(p.size(), 0.0),
thicknessLayer_(dict.lookupOrDefault<scalar>("thicknessLayer", 0.0)),
kappaLayer_(dict.lookupOrDefault<scalar>("kappaLayer", 0.0))
{
if (dict.found("q") && !dict.found("h") && !dict.found("Ta"))
{
@ -169,7 +175,9 @@ externalWallHeatFluxTemperatureFvPatchScalarField
mode_(tppsf.mode_),
q_(tppsf.q_),
h_(tppsf.h_),
Ta_(tppsf.Ta_)
Ta_(tppsf.Ta_),
thicknessLayer_(tppsf.thicknessLayer_),
kappaLayer_(tppsf.kappaLayer_)
{}
@ -185,7 +193,9 @@ externalWallHeatFluxTemperatureFvPatchScalarField
mode_(tppsf.mode_),
q_(tppsf.q_),
h_(tppsf.h_),
Ta_(tppsf.Ta_)
Ta_(tppsf.Ta_),
thicknessLayer_(tppsf.thicknessLayer_),
kappaLayer_(tppsf.kappaLayer_)
{}
@ -242,7 +252,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
}
case fixedHeatTransferCoeff:
{
q = (Ta_ - Tp)*h_;
q = (Ta_ - Tp)*(1.0/h_ + thicknessLayer_/(kappaLayer_ + VSMALL));
break;
}
default:
@ -298,6 +308,10 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
{
mixedFvPatchScalarField::write(os);
temperatureCoupledBase::write(os);
os.writeKeyword("thicknessLayer")<< thicknessLayer_
<< token::END_STATEMENT << nl;
os.writeKeyword("kappaLayer")<< kappaLayer_ << token::END_STATEMENT << nl;
switch (mode_)
{
case fixedHeatFlux:

View File

@ -26,7 +26,8 @@ Class
Description
This boundary condition supplies a heat flux condition for temperature
on an external wall.
on an external wall.Optional thin thermal layer resistance can be
specified through thicknessLayer and kappaLayer entries.
The condition can operate in two modes:
\li fixed heat transfer coefficient: supply h and Ta
@ -45,11 +46,15 @@ Description
\verbatim
myPatch
{
type externalWallHeatFluxTemperature;
kappa solidThermo; // solidThermo or lookup
type externalWallHeatFluxTemperature;
kappa fluidThermo; // fluidThermo, solidThermo or
// lookup
q uniform 1000; // heat flux / [W/m2]
Ta uniform 300.0; // ambient temperature /[K]
h uniform 10.0; // heat transfer coeff /[W/Km2]
thicknessLayer 0.001 // thickness of layer [m]
kappaLayer 0.0 // thermal conductivity of
// layer [W/m/K]
value uniform 300.0; // initial temperature / [K]
kappaName none;
}
@ -113,6 +118,12 @@ private:
//- Ambient temperature / [K]
scalarField Ta_;
//- Thickness of the thin wall
scalar thicknessLayer_;
//- Thermal conductivity of the thin wall
scalar kappaLayer_;
public: