Commit 8bd869d9 authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

rhoPimpleDyMFoam: Updated transonic formulation for consistency with sonicFoam

parent 13866c28
rho = thermo.rho();
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
......@@ -27,7 +29,8 @@ if (pimple.transonic())
"phid",
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
);
phiHbyA -= fvc::interpolate(p)*phid;
phiHbyA -= fvc::interpolate(psi*p)*phiHbyA/fvc::interpolate(rho);
while (pimple.correctNonOrthogonal())
{
......@@ -86,9 +89,11 @@ U.correctBoundaryConditions();
fvOptions.correct(U);
K = 0.5*magSqr(U);
pressureControl.limit(p);
p.correctBoundaryConditions();
rho = thermo.rho();
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
rho = thermo.rho();
}
if (!pimple.transonic())
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment