thermoSingleLayer: Corrected handling of non-constant Cp

This commit is contained in:
Henry Weller
2016-04-23 10:03:40 +01:00
parent 6a9101990e
commit c79f06079d

View File

@ -81,7 +81,7 @@ wordList thermoSingleLayer::hsBoundaryTypes()
bool thermoSingleLayer::read() bool thermoSingleLayer::read()
{ {
// no additional properties to read // No additional properties to read
return kinematicSingleLayer::read(); return kinematicSingleLayer::read();
} }
@ -259,11 +259,13 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const
{ {
return return
( (
- fvm::Sp(htcs_->h()/Cp_, hs) // Heat-transfer to the primary region
- htcs_->h()*(constant::standard::Tstd - TPrimary_) - fvm::Sp(alpha_*htcs_->h()/Cp_, hs)
+ alpha_*htcs_->h()*(hs/Cp_ - T_ + TPrimary_)
- fvm::Sp(htcw_->h()/Cp_, hs) // Heat-transfer to the wall
- htcw_->h()*(constant::standard::Tstd - Tw_) - fvm::Sp(alpha_*htcw_->h()/Cp_, hs)
+ alpha_*htcw_->h()*(hs/Cp_ - T_ + Tw_)
); );
} }
@ -283,15 +285,14 @@ void thermoSingleLayer::solveEnergy()
+ fvm::div(phi_, hs_) + fvm::div(phi_, hs_)
== ==
- hsSp_ - hsSp_
- rhoSp_*hs_
+ q(hs_) + q(hs_)
+ radiation_->Shs() + radiation_->Shs()
// - fvm::SuSp(rhoSp_, hs_)
- rhoSp_*hs_
); );
correctThermoFields(); correctThermoFields();
// evaluate viscosity from user-model // Evaluate viscosity from user-model
viscosity_->correct(pPrimary_, T_); viscosity_->correct(pPrimary_, T_);
} }
@ -449,7 +450,7 @@ thermoSingleLayer::thermoSingleLayer
( (
IOobject IOobject
( (
hsSp_.name(), // must have same name as hSp_ to enable mapping hsSp_.name(), // Must have same name as hSp_ to enable mapping
time().timeName(), time().timeName(),
primaryMesh(), primaryMesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -463,7 +464,7 @@ thermoSingleLayer::thermoSingleLayer
( (
IOobject IOobject
( (
"T", // same name as T on primary region to enable mapping "T", // Same name as T on primary region to enable mapping
time().timeName(), time().timeName(),
regionMesh(), regionMesh(),
IOobject::NO_READ, IOobject::NO_READ,
@ -562,7 +563,7 @@ thermoSingleLayer::thermoSingleLayer
phi_ == phi0; phi_ == phi0;
// evaluate viscosity from user-model // Evaluate viscosity from user-model
viscosity_->correct(pPrimary_, T_); viscosity_->correct(pPrimary_, T_);
} }
} }
@ -612,8 +613,6 @@ void thermoSingleLayer::preEvolveRegion()
InfoInFunction << endl; InfoInFunction << endl;
} }
// correctHsForMappedT();
kinematicSingleLayer::preEvolveRegion(); kinematicSingleLayer::preEvolveRegion();
// Update phase change // Update phase change