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