mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
allow read restart
This commit is contained in:
@ -81,23 +81,28 @@ greyDiffusiveRadiationMixedFvPatchScalarField
|
|||||||
TName_(dict.lookup("T")),
|
TName_(dict.lookup("T")),
|
||||||
emissivity_(readScalar(dict.lookup("emissivity")))
|
emissivity_(readScalar(dict.lookup("emissivity")))
|
||||||
{
|
{
|
||||||
const scalarField& Tp =
|
|
||||||
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
|
||||||
|
|
||||||
refValue() =
|
|
||||||
emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/pi;
|
|
||||||
|
|
||||||
refGrad() = 0.0;
|
|
||||||
|
|
||||||
if (dict.found("value"))
|
if (dict.found("value"))
|
||||||
{
|
{
|
||||||
fvPatchScalarField::operator=
|
fvPatchScalarField::operator=
|
||||||
(
|
(
|
||||||
scalarField("value", dict, p.size())
|
scalarField("value", dict, p.size())
|
||||||
);
|
);
|
||||||
|
refValue() = scalarField("refValue", dict, p.size());
|
||||||
|
refGrad() = scalarField("refGradient", dict, p.size());
|
||||||
|
valueFraction() = scalarField("valueFraction", dict, p.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// No value given. Restart as fixedValue b.c.
|
||||||
|
|
||||||
|
const scalarField& Tp =
|
||||||
|
patch().lookupPatchField<volScalarField, scalar>(TName_);
|
||||||
|
|
||||||
|
refValue() =
|
||||||
|
emissivity_*4.0*physicoChemical::sigma.value()*pow4(Tp)/pi;
|
||||||
|
refGrad() = 0.0;
|
||||||
|
valueFraction() = 1.0;
|
||||||
|
|
||||||
fvPatchScalarField::operator=(refValue());
|
fvPatchScalarField::operator=(refValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,10 +225,9 @@ void Foam::radiation::greyDiffusiveRadiationMixedFvPatchScalarField::write
|
|||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
os.writeKeyword("T") << TName_ << token::END_STATEMENT << nl;
|
os.writeKeyword("T") << TName_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
os.writeKeyword("emissivity") << emissivity_ << token::END_STATEMENT << nl;
|
||||||
writeEntry("value", os);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user