mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
rhoPimpleDyMFoam: Updated to use Uf rather than phiAbs for ddtCorr
This commit is contained in:
@ -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);
|
||||
|
||||
@ -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"
|
||||
|
||||
Reference in New Issue
Block a user