From d28de6ad882ebeea2cdc615582e458a5059bb957 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Wed, 22 Jun 2016 17:04:40 +0100 Subject: [PATCH] Bugfix: Add MRF rotation --- .../solvers/compressible/steadyUniversalMRFFoam/pEqn.H | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H b/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H index 8eec3318e..1d4b2dc94 100644 --- a/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H +++ b/applications/solvers/compressible/steadyUniversalMRFFoam/pEqn.H @@ -4,9 +4,10 @@ surfaceScalarField psisf = fvc::interpolate(psis); surfaceScalarField rhof = fvc::interpolate(rho); - // Needs to be outside of loop since p is changing, but psi and rho are not + // Needs to be outside of loop since p is changing, but psi and rho are not. surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p); + // --- PISO loop while (pimple.correct()) { U = rUA*UEqn.H(); @@ -18,6 +19,11 @@ surfaceScalarField phid("phid", psisf/rhof*phi); + // Make fluxes relative within the MRF zone + mrfZones.relativeFlux(rhoReff, phi); + mrfZones.relativeFlux(psisf, phid); + mrfZones.relativeFlux(rhoReff, phid2); + p.storePrevIter(); while (pimple.correctNonOrthogonal())