XiEngineFoam: Updated handling of ddtCorr

This commit is contained in:
Henry Weller
2021-10-18 22:09:55 +01:00
parent 686f7fb21a
commit 0a54efe189
3 changed files with 9 additions and 13 deletions

View File

@ -78,7 +78,7 @@ int main(int argc, char *argv[])
#include "readCombustionProperties.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createRhoUf.H"
#include "createRhoUfIfPresent.H"
#include "initContinuityErrs.H"
#include "createEngineTimeControls.H"
#include "compressibleCourantNo.H"

View File

@ -15,7 +15,8 @@ if (pimple.transonic())
fvc::flux(HbyA)
+ MRF.zeroFilter
(
rhorAUf*fvc::ddtCorr(rho, U, rhoUf)/fvc::interpolate(rho)
rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf)
/fvc::interpolate(rho)
)
)
)
@ -48,10 +49,8 @@ else
surfaceScalarField phiHbyA
(
"phiHbyA",
(
fvc::flux(rho*HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, rhoUf))
)
fvc::interpolate(rho)*fvc::flux(HbyA)
+ MRF.zeroFilter(rhorAUf*fvc::ddtCorr(rho, U, phi, rhoUf))
);
fvc::makeRelative(phiHbyA, rho, U);
@ -88,11 +87,8 @@ U.correctBoundaryConditions();
fvConstraints.constrain(U);
K = 0.5*magSqr(U);
{
rhoUf = fvc::interpolate(rho*U);
surfaceVectorField n(mesh.Sf()/mesh.magSf());
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
}
// Correct rhoUf if the mesh is moving
fvc::correctRhoUf(rhoUf, rho, U, phi);
if (thermo.dpdt())
{