From a91e7ea6d35a73e6b44db87294c1d707d225e6a6 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 30 Aug 2023 13:32:20 +0100 Subject: [PATCH] multiphaseEuler::MomentumTransferPhaseSystem::alphaDByAf: Only consider pPrime for moving phases --- .../MomentumTransferPhaseSystem.C | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index 2d1df14ea6..b95b33f30e 100644 --- a/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -1094,17 +1094,16 @@ Foam::MomentumTransferPhaseSystem::alphaDByAf tmp alphaDByAf; // Add the phase pressure - forAll(this->phaseModels_, phasei) + forAll(this->movingPhases(), movingPhasei) { - const phaseModel& phase = this->phaseModels_[phasei]; - + const phaseModel& phase = this->movingPhases()[movingPhasei]; const tmp pPrime(phase.pPrime()); addTmpField ( alphaDByAf, fvc::interpolate(max(phase, scalar(0))) - *fvc::interpolate(rAs[phasei]*pPrime(), pPrime().name()) + *fvc::interpolate(rAs[phase.index()]*pPrime(), pPrime().name()) ); }