From 2c9245160fd1045772c9d0b50f3677992186785c Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Wed, 7 Mar 2012 19:51:58 +0000 Subject: [PATCH] fanPressureFvPatchScalarField: Corrected flow-rate --- .../fanPressure/fanPressureFvPatchScalarField.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C index 9cf87f4f958..9e0726e6ac2 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/fanPressure/fanPressureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,17 +134,17 @@ void Foam::fanPressureFvPatchScalarField::updateCoeffs() int dir = 2*direction_ - 1; // Average volumetric flow rate - scalar aveFlowRate = 0; + scalar volFlowRate = 0; if (phi.dimensions() == dimVelocity*dimArea) { - aveFlowRate = dir*gSum(phip)/gSum(patch().magSf()); + volFlowRate = dir*gSum(phip); } else if (phi.dimensions() == dimVelocity*dimArea*dimDensity) { const scalarField& rhop = patch().lookupPatchField<volScalarField, scalar>(rhoName()); - aveFlowRate = dir*gSum(phip/rhop)/gSum(patch().magSf()); + volFlowRate = dir*gSum(phip/rhop); } else { @@ -157,7 +157,7 @@ void Foam::fanPressureFvPatchScalarField::updateCoeffs() } // Pressure drop for this flow rate - const scalar pdFan = fanCurve_(max(aveFlowRate, 0.0)); + const scalar pdFan = fanCurve_(max(volFlowRate, 0.0)); totalPressureFvPatchScalarField::updateCoeffs ( -- GitLab