ENH: Updated Marshak radiation mixed BCs dictionary constructors

This commit is contained in:
andy 2010-10-08 10:48:28 +01:00
parent 81920a03d9
commit d43a0a4602
2 changed files with 17 additions and 31 deletions

View File

@ -77,24 +77,19 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
{
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
refValue() = scalarField("value", dict, p.size());
}
else
{
const scalarField& Tp =
patch().lookupPatchField<volScalarField, scalar>(TName_);
refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Tp);
refGrad() = 0.0;
fvPatchScalarField::operator=(refValue());
refValue() = 0.0;
}
// zero gradient
refGrad() = 0.0;
valueFraction() = 1.0;
fvPatchScalarField::operator=(refValue());
}

View File

@ -78,24 +78,15 @@ MarshakRadiationFixedTMixedFvPatchScalarField
Trad_("Trad", dict, p.size()),
emissivity_(readScalar(dict.lookup("emissivity")))
{
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
refValue() = scalarField("refValue", dict, p.size());
refGrad() = scalarField("refGradient", dict, p.size());
valueFraction() = scalarField("valueFraction", dict, p.size());
}
else
{
refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Trad_);
refGrad() = 0.0;
valueFraction() = 1.0;
// refValue updated on each call to updateCoeffs()
refValue() = 4.0*constant::physicoChemical::sigma.value()*pow4(Trad_);
fvPatchScalarField::operator=(refValue());
}
// zero gradient
refGrad() = 0.0;
valueFraction() = 1.0;
fvPatchScalarField::operator=(refValue());
}