From 09510295139e3efa9a10b5acdbe4fcbba0bb2f78 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 6 Oct 2023 11:21:14 +0100 Subject: [PATCH] modules/twoPhaseSolver: Include divU into MULES corrector This improves convergence in situations with substantial source-based divergence, such as injections and phase changes. --- applications/modules/twoPhaseSolver/alphaPredictor.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/modules/twoPhaseSolver/alphaPredictor.C b/applications/modules/twoPhaseSolver/alphaPredictor.C index 874c111364..96037c1d51 100644 --- a/applications/modules/twoPhaseSolver/alphaPredictor.C +++ b/applications/modules/twoPhaseSolver/alphaPredictor.C @@ -256,8 +256,8 @@ void Foam::solvers::twoPhaseSolver::alphaSolve alpha1, talphaPhi1Un(), talphaPhi1Corr.ref(), - Sp(), - (-Sp()*alpha1)(), + (Sp() + divU())(), + (-(Sp() + divU())*alpha1)(), oneField(), zeroField() );