From 043b06f1298baba2ad777feda09ee164e77dd96a Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 12 Apr 2022 10:19:46 +0100 Subject: [PATCH] adjustPhi: Include cyclic patches when calculating the total flux through the domain to handle cyclic cases where a body-force is used to drive the mean flow. --- src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C index 8e6e1a4b3a..cf370ad685 100644 --- a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C +++ b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,6 +26,7 @@ License #include "adjustPhi.H" #include "volFields.H" #include "surfaceFields.H" +#include "processorFvPatchFields.H" #include "inletOutletFvPatchFields.H" // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // @@ -51,7 +52,7 @@ bool Foam::adjustPhi const fvPatchVectorField& Up = U.boundaryField()[patchi]; const fvsPatchScalarField& phip = bphi[patchi]; - if (!phip.coupled()) + if (!isA(Up)) { if (Up.fixesValue() && !isA(Up)) {