From 4aa6052a660b320d776e113ad0f10ff141a58a74 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 8 Dec 2015 14:24:12 +0000 Subject: [PATCH] uniformInletOutletFvPatchField: Update refValue in updateCoeffs Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1943 --- .../uniformInletOutletFvPatchField.C | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C index 54217a529a..9e9809c91f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/uniformInletOutlet/uniformInletOutletFvPatchField.C @@ -55,8 +55,8 @@ Foam::uniformInletOutletFvPatchField::uniformInletOutletFvPatchField phiName_(dict.lookupOrDefault("phi", "phi")), uniformInletValue_(DataEntry::New("uniformInletValue", dict)) { - const scalar t = this->db().time().timeOutputValue(); - this->refValue() = uniformInletValue_->value(t); + this->refValue() = + uniformInletValue_->value(this->db().time().timeOutputValue()); if (dict.found("value")) { @@ -91,8 +91,8 @@ Foam::uniformInletOutletFvPatchField::uniformInletOutletFvPatchField this->patchType() = ptf.patchType(); // Evaluate refValue since not mapped - const scalar t = this->db().time().timeOutputValue(); - this->refValue() = uniformInletValue_->value(t); + this->refValue() = + uniformInletValue_->value(this->db().time().timeOutputValue()); this->refGrad() = pTraits::zero; this->valueFraction() = 0.0; @@ -139,6 +139,9 @@ void Foam::uniformInletOutletFvPatchField::updateCoeffs() return; } + this->refValue() = + uniformInletValue_->value(this->db().time().timeOutputValue()); + const Field& phip = this->patch().template lookupPatchField ( @@ -175,8 +178,8 @@ void Foam::uniformInletOutletFvPatchField::autoMap mixedFvPatchField::autoMap(m); // Override - const scalar t = this->db().time().timeOutputValue(); - this->refValue() = uniformInletValue_->value(t); + this->refValue() = + uniformInletValue_->value(this->db().time().timeOutputValue()); } @@ -190,8 +193,8 @@ void Foam::uniformInletOutletFvPatchField::rmap mixedFvPatchField::rmap(ptf, addr); // Override - const scalar t = this->db().time().timeOutputValue(); - this->refValue() = uniformInletValue_->value(t); + this->refValue() = + uniformInletValue_->value(this->db().time().timeOutputValue()); }