BUG: corrected pressure non-ortho loops when using correction(ddt(p))

This commit is contained in:
andy
2011-03-03 15:26:01 +00:00
parent d7ff7c8381
commit 5504a2a4fc
4 changed files with 33 additions and 13 deletions

View File

@ -24,12 +24,17 @@
fvc::interpolate(thermo.psi())*phiv fvc::interpolate(thermo.psi())*phiv
); );
fvScalarMatrix pDDtEqn
(
fvc::ddt(rho) + fvc::div(phi)
+ correction(fvm::ddt(psi, p) + fvm::div(phid, p))
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvc::ddt(rho) + fvc::div(phi) pDDtEqn
+ correction(fvm::ddt(psi, p) + fvm::div(phid, p))
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
@ -63,12 +68,17 @@
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
fvScalarMatrix pDDtEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) pDDtEqn
+ fvc::div(phi)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );

View File

@ -19,12 +19,17 @@
surfaceScalarField buoyancyPhi(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf()); surfaceScalarField buoyancyPhi(-rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf());
phi += buoyancyPhi; phi += buoyancyPhi;
fvScalarMatrix p_rghDDtEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh))
+ fvc::div(phi)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p_rgh)) p_rghDDtEqn
+ fvc::div(phi)
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
); );

View File

@ -23,7 +23,7 @@
); );
} }
fvScalarMatrix DrhoDtEqn fvScalarMatrix pDDtEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi) + fvc::div(phi)
@ -36,7 +36,7 @@
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
DrhoDtEqn pDDtEqn
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );

View File

@ -23,16 +23,21 @@
); );
} }
fvScalarMatrix pDDtEqn
(
fvc::ddt(rho) + psi*correction(fvm::ddt(p))
+ fvc::div(phi)
==
parcels.Srho()
+ massSource.SuTot()
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
fvc::ddt(rho) + psi*correction(fvm::ddt(p)) pDDtEqn
+ fvc::div(phi)
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
==
parcels.Srho()
+ massSource.SuTot()
); );
if (corr == nCorr-1 && nonOrth == nNonOrthCorr) if (corr == nCorr-1 && nonOrth == nNonOrthCorr)