diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C index beca9fea9..861bac7f9 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C @@ -65,7 +65,9 @@ swirlFlowRateInletVelocityFvPatchVectorField dict.lookupOrDefault ( "origin", - gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf()) + patch().size() + ? gSum(patch().Cf()*patch().magSf())/gSum(patch().magSf()) + : Zero ) ), axis_ @@ -73,7 +75,9 @@ swirlFlowRateInletVelocityFvPatchVectorField dict.lookupOrDefault ( "axis", - -gSum(patch().Sf())/gSum(patch().magSf()) + patch().size() + ? -gSum(patch().Sf())/gSum(patch().magSf()) + : Zero ) ), flowRate_(Function1::New("flowRate", dict)),