Merge remote-tracking branch 'origin/BUGFIX/radiationBCConstructor'

This commit is contained in:
Dominik Christ 2014-04-03 18:19:54 +01:00
commit 0bcb3c2f4e
3 changed files with 37 additions and 21 deletions

View file

@ -75,21 +75,30 @@ Foam::MarshakRadiationFvPatchScalarField::MarshakRadiationFvPatchScalarField
TName_(dict.lookup("T")),
emissivity_(readScalar(dict.lookup("emissivity")))
{
const scalarField& Tp =
lookupPatchField<volScalarField, scalar>(TName_);
refValue() = 4.0*radiation::sigmaSB.value()*pow4(Tp);
refGrad() = 0.0;
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
refValue() = scalarField("value", dict, p.size());
refGrad() = 0;
valueFraction() = 1;
}
else
{
// No value given. Restart as fixedValue b.c.
// Bugfix: Do not initialize from temperautre because it is unavailable
// when running, e.g. decomposePar and loading radiation as
// shared library. Initialize to zero instead.
// 26 Mar 2014 - DC
refValue() = 0;
refGrad() = 0;
valueFraction() = 0;
fvPatchScalarField::operator=(refValue());
}
}

View file

@ -93,15 +93,15 @@ greyDiffusiveRadiationMixedFvPatchScalarField
{
// No value given. Restart as fixedValue b.c.
const scalarField& Tp =
lookupPatchField<volScalarField, scalar>(TName_);
// Bugfix: Do not initialize from temperautre because it is unavailable
// when running, e.g. decomposePar and loading radiation as
// shared library. Initialize to zero instead.
// 26 Mar 2014 - DC
refValue() =
emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp)
/Foam::mathematicalConstant::pi;
refValue() = 0;
refGrad() = 0.0;
valueFraction() = 1.0;
refGrad() = 0;
valueFraction() = 1;
fvPatchScalarField::operator=(refValue());
}

View file

@ -79,23 +79,30 @@ wideBandDiffusiveRadiationMixedFvPatchScalarField
TName_(dict.lookup("T")),
emissivity_(readScalar(dict.lookup("emissivity")))
{
const scalarField& Tp =
lookupPatchField<volScalarField, scalar>(TName_);
refValue() =
emissivity_*4.0*radiation::sigmaSB.value()*pow4(Tp)
/Foam::mathematicalConstant::pi;
refGrad() = 0.0;
if (dict.found("value"))
{
fvPatchScalarField::operator=
(
scalarField("value", dict, p.size())
);
refValue() = scalarField("value", dict, p.size());
refGrad() = 0;
valueFraction() = 1;
}
else
{
// No value given. Restart as fixedValue b.c.
// Bugfix: Do not initialize from temperautre because it is unavailable
// when running, e.g. decomposePar and loading radiation as
// shared library. Initialize to zero instead.
// 26 Mar 2014 - DC
refValue() = 0;
refGrad() = 0;
valueFraction() = 1;
fvPatchScalarField::operator=(refValue());
}
}