Yet more updates to the transonic formulation.

This commit is contained in:
henry
2008-08-26 18:20:20 +01:00
parent 99917f38b5
commit 15bade148d

View File

@ -16,12 +16,13 @@ if (transonic)
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{ {
fvScalarMatrix pEqn0 fvScalarMatrix pEqn
( (
fvm::div(phid, p) fvm::div(phid, p)
- fvm::laplacian(rho*rUA, p) - fvm::laplacian(rho*rUA, p)
); );
fvScalarMatrix pEqn = pEqn0;
// Relax the pressure equation to ensure diagonal-dominance
pEqn.relax(mesh.relaxationFactor("pEqn")); pEqn.relax(mesh.relaxationFactor("pEqn"));
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
@ -39,14 +40,13 @@ if (transonic)
if (nonOrth == nNonOrthCorr) if (nonOrth == nNonOrthCorr)
{ {
phi == pEqn0.flux(); phi == pEqn.flux();
} }
} }
} }
else else
{ {
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
//phi = fvc::interpolate(rho*U) & mesh.Sf();
closedVolume = adjustPhi(phi, U, p); closedVolume = adjustPhi(phi, U, p);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
@ -58,7 +58,7 @@ else
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
// retain the residual from the first iteration // Retain the residual from the first iteration
if (nonOrth == 0) if (nonOrth == 0)
{ {
eqnResidual = pEqn.solve().initialResidual(); eqnResidual = pEqn.solve().initialResidual();