rhoPimpleDyMFoam: Updated to use Uf rather than phiAbs for ddtCorr

This commit is contained in:
Henry
2013-09-12 14:58:27 +01:00
parent d2cefa9b26
commit 0417e181e9
3 changed files with 11 additions and 17 deletions

View File

@ -22,7 +22,7 @@ if (pimple.transonic())
fvc::interpolate(psi)
*(
(fvc::interpolate(rho*HbyA) & mesh.Sf())
+ rhorAUf*fvc::ddtCorr(rho, U, phiAbs)
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
)/fvc::interpolate(rho)
);
@ -55,7 +55,7 @@ else
(
"phiHbyA",
(fvc::interpolate(rho*HbyA) & mesh.Sf())
+ rhorAUf*fvc::ddtCorr(rho, U, phiAbs)
+ rhorAUf*fvc::ddtCorr(rho, U, rhoUf)
);
fvOptions.makeRelative(fvc::interpolate(rho), phiHbyA);

View File

@ -56,13 +56,10 @@ int main(int argc, char *argv[])
#include "createFields.H"
#include "createFvOptions.H"
#include "createPcorrTypes.H"
#include "createRhoUf.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
// Create old-time absolute flux for ddtCorr
surfaceScalarField phiAbs("phiAbs", phi);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
@ -72,12 +69,6 @@ int main(int argc, char *argv[])
#include "readControls.H"
#include "compressibleCourantNo.H"
// Make the fluxes absolute before mesh-motion
fvc::makeAbsolute(phi, rho, U);
// Update absolute flux for ddtCorr
phiAbs = phi;
#include "setDeltaT.H"
runTime++;
@ -86,20 +77,23 @@ int main(int argc, char *argv[])
{
// Store divrhoU from the previous time-step/mesh for the correctPhi
volScalarField divrhoU(fvc::div(phi));
volScalarField divrhoU(fvc::div(fvc::absolute(phi, rho, U)));
// Do any mesh changes
mesh.update();
if (mesh.changing() && correctPhi)
{
// Calculate absolute flux from the mapped surface velocity
phi = mesh.Sf() & rhoUf;
#include "correctPhi.H"
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
}
}
// Make the fluxes relative to the mesh-motion
fvc::makeRelative(phi, rho, U);
if (mesh.changing() && checkMeshCourantNo)
{
#include "meshCourantNo.H"