From d4af4d504fddb2fef071d8f4f66a48954ec6e665 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Mon, 2 Nov 2020 10:15:28 +0000 Subject: [PATCH] Usage update: flowRateInletVelocity --- .../flowRateInletVelocityFvPatchVectorField.C | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C index e1b4b2e09..232a75dd2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/flowRateInletVelocity/flowRateInletVelocityFvPatchVectorField.C @@ -117,6 +117,18 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs() return; } + if (!this->db().objectRegistry::found(phiName_)) + { + // Flux not available, do not update + InfoInFunction + << "Flux field " << phiName_ << " not found. " + << "Performing fixed value update" << endl; + + fixedValueFvPatchVectorField::updateCoeffs(); + + return; + } + // if (patch().boundaryMesh().mesh().moving()) // { // WarningIn @@ -159,7 +171,7 @@ void Foam::flowRateInletVelocityFvPatchVectorField::updateCoeffs() << nl << exit(FatalError); } - fixedValueFvPatchField::updateCoeffs(); + fixedValueFvPatchVectorField::updateCoeffs(); }