uniformInletOutletFvPatchField: Update refValue in updateCoeffs

Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1943
This commit is contained in:
Henry Weller
2015-12-08 14:24:12 +00:00
parent f89d44292e
commit 4aa6052a66

View File

@ -55,8 +55,8 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
phiName_(dict.lookupOrDefault<word>("phi", "phi")), phiName_(dict.lookupOrDefault<word>("phi", "phi")),
uniformInletValue_(DataEntry<Type>::New("uniformInletValue", dict)) uniformInletValue_(DataEntry<Type>::New("uniformInletValue", dict))
{ {
const scalar t = this->db().time().timeOutputValue(); this->refValue() =
this->refValue() = uniformInletValue_->value(t); uniformInletValue_->value(this->db().time().timeOutputValue());
if (dict.found("value")) if (dict.found("value"))
{ {
@ -91,8 +91,8 @@ Foam::uniformInletOutletFvPatchField<Type>::uniformInletOutletFvPatchField
this->patchType() = ptf.patchType(); this->patchType() = ptf.patchType();
// Evaluate refValue since not mapped // Evaluate refValue since not mapped
const scalar t = this->db().time().timeOutputValue(); this->refValue() =
this->refValue() = uniformInletValue_->value(t); uniformInletValue_->value(this->db().time().timeOutputValue());
this->refGrad() = pTraits<Type>::zero; this->refGrad() = pTraits<Type>::zero;
this->valueFraction() = 0.0; this->valueFraction() = 0.0;
@ -139,6 +139,9 @@ void Foam::uniformInletOutletFvPatchField<Type>::updateCoeffs()
return; return;
} }
this->refValue() =
uniformInletValue_->value(this->db().time().timeOutputValue());
const Field<scalar>& phip = const Field<scalar>& phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar> this->patch().template lookupPatchField<surfaceScalarField, scalar>
( (
@ -175,8 +178,8 @@ void Foam::uniformInletOutletFvPatchField<Type>::autoMap
mixedFvPatchField<Type>::autoMap(m); mixedFvPatchField<Type>::autoMap(m);
// Override // Override
const scalar t = this->db().time().timeOutputValue(); this->refValue() =
this->refValue() = uniformInletValue_->value(t); uniformInletValue_->value(this->db().time().timeOutputValue());
} }
@ -190,8 +193,8 @@ void Foam::uniformInletOutletFvPatchField<Type>::rmap
mixedFvPatchField<Type>::rmap(ptf, addr); mixedFvPatchField<Type>::rmap(ptf, addr);
// Override // Override
const scalar t = this->db().time().timeOutputValue(); this->refValue() =
this->refValue() = uniformInletValue_->value(t); uniformInletValue_->value(this->db().time().timeOutputValue());
} }