ENH: Cp now looked up from transport dict for incompressible turb heat flux BC

This commit is contained in:
andy
2010-09-08 12:14:12 +01:00
parent a93194d80a
commit 21c4bb4b40

View File

@ -27,6 +27,7 @@ License
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
#include "volFields.H" #include "volFields.H"
#include "RASModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -173,20 +174,21 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
const scalarField& alphaEffp = const scalarField& alphaEffp =
patch().lookupPatchField<volScalarField, scalar>(alphaEffName_); patch().lookupPatchField<volScalarField, scalar>(alphaEffName_);
const scalarField& Cpp = // retrieve (constant) specific heat capacity from transport dictionary
patch().lookupPatchField<volScalarField, scalar>(CpName_); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalar Cp0(readScalar(rasModel.transport().lookup("Cp0")));
switch (heatSource_) switch (heatSource_)
{ {
case hsPower: case hsPower:
{ {
const scalar Ap = gSum(patch().magSf()); const scalar Ap = gSum(patch().magSf());
gradient() = q_/(Ap*Cpp*alphaEffp); gradient() = q_/(Ap*Cp0*alphaEffp);
break; break;
} }
case hsFlux: case hsFlux:
{ {
gradient() = q_/(Cpp*alphaEffp); gradient() = q_/(Cp0*alphaEffp);
break; break;
} }
default: default:
@ -215,7 +217,6 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::write(Ostream& os) const
<< token::END_STATEMENT << nl; << token::END_STATEMENT << nl;
q_.writeEntry("q", os); q_.writeEntry("q", os);
os.writeKeyword("alphaEff") << alphaEffName_ << token::END_STATEMENT << nl; os.writeKeyword("alphaEff") << alphaEffName_ << token::END_STATEMENT << nl;
os.writeKeyword("Cp") << CpName_ << token::END_STATEMENT << nl;
writeEntry("value", os); writeEntry("value", os);
} }