Bugfix: Add MRF rotation

This commit is contained in:
Hrvoje Jasak 2016-06-22 17:04:40 +01:00
parent 6321e2a9de
commit d28de6ad88

View file

@ -4,9 +4,10 @@
surfaceScalarField psisf = fvc::interpolate(psis); surfaceScalarField psisf = fvc::interpolate(psis);
surfaceScalarField rhof = fvc::interpolate(rho); 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); surfaceScalarField rhoReff = rhof - psisf*fvc::interpolate(p);
// --- PISO loop
while (pimple.correct()) while (pimple.correct())
{ {
U = rUA*UEqn.H(); U = rUA*UEqn.H();
@ -18,6 +19,11 @@
surfaceScalarField phid("phid", psisf/rhof*phi); 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(); p.storePrevIter();
while (pimple.correctNonOrthogonal()) while (pimple.correctNonOrthogonal())