From d0579252a073cf8978fe97e568f85b0725bc785e Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 25 Jul 2019 08:39:39 +0100 Subject: [PATCH] reactingEulerFoam: phaseForces: Corrected calculation of accumulated force Patch contributed by Institute of Fluid Dynamics, Helmholtz-Zentrum Dresden - Rossendorf (HZDR) --- .../functionObjects/phaseForces/phaseForces.C | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C index fab5f1bc49..58b995a4a8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C +++ b/applications/solvers/multiphase/reactingEulerFoam/functionObjects/phaseForces/phaseForces.C @@ -225,7 +225,7 @@ bool Foam::functionObjects::phaseForces::read(const dictionary& dict) bool Foam::functionObjects::phaseForces::execute() { - forAllIter + forAllConstIter ( HashPtrTable, forceFields_, @@ -267,17 +267,17 @@ bool Foam::functionObjects::phaseForces::execute() if (type == "liftModel") { - force = nonDragForce(pair); + force += nonDragForce(pair); } if (type == "wallLubricationModel") { - force = nonDragForce(pair); + force += nonDragForce(pair); } if (type == "turbulentDispersionModel") { - force = nonDragForce(pair); + force += nonDragForce(pair); } } } @@ -289,7 +289,7 @@ bool Foam::functionObjects::phaseForces::execute() bool Foam::functionObjects::phaseForces::write() { - forAllIter + forAllConstIter ( HashPtrTable, forceFields_,