rhoPimpleDyMFoam: Updated transonic formulation for consistency with sonicFoam
This commit is contained in:
parent
3aec2ad4ac
commit
e3dbff06e6
1 changed files with 9 additions and 4 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
rho = thermo.rho();
|
||||||
|
|
||||||
volScalarField rAU(1.0/UEqn.A());
|
volScalarField rAU(1.0/UEqn.A());
|
||||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU));
|
||||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||||
|
|
@ -27,7 +29,8 @@ if (pimple.transonic())
|
||||||
"phid",
|
"phid",
|
||||||
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
(fvc::interpolate(psi)/fvc::interpolate(rho))*phiHbyA
|
||||||
);
|
);
|
||||||
phiHbyA -= fvc::interpolate(p)*phid;
|
|
||||||
|
phiHbyA -= fvc::interpolate(psi*p)*phiHbyA/fvc::interpolate(rho);
|
||||||
|
|
||||||
while (pimple.correctNonOrthogonal())
|
while (pimple.correctNonOrthogonal())
|
||||||
{
|
{
|
||||||
|
|
@ -86,9 +89,11 @@ U.correctBoundaryConditions();
|
||||||
fvOptions.correct(U);
|
fvOptions.correct(U);
|
||||||
K = 0.5*magSqr(U);
|
K = 0.5*magSqr(U);
|
||||||
|
|
||||||
pressureControl.limit(p);
|
if (pressureControl.limit(p))
|
||||||
p.correctBoundaryConditions();
|
{
|
||||||
rho = thermo.rho();
|
p.correctBoundaryConditions();
|
||||||
|
rho = thermo.rho();
|
||||||
|
}
|
||||||
|
|
||||||
if (!pimple.transonic())
|
if (!pimple.transonic())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue