Corrected the update of pd from p in closed-volume cases.

This commit is contained in:
henry 2008-07-24 12:39:44 +01:00
parent 1bc9eea362
commit 898742e6eb
4 changed files with 5 additions and 1 deletions

View File

@ -55,5 +55,6 @@ if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
pd == p - (rho*gh + pRef);
rho = thermo->rho();
}

View File

@ -1,6 +1,7 @@
volScalarField rUA = 1.0/UEqn().A();
U = rUA*UEqn().H();
UEqn.clear();
phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
bool closedVolume = adjustPhi(phi, U, p);
phi -= fvc::interpolate(rho*gh*rUA)*fvc::snGrad(rho)*mesh.magSf();
@ -46,6 +47,7 @@ if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
pd == p - (rho*gh + pRef);
}
rho = thermo->rho();

View File

@ -46,6 +46,7 @@ if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(thermo->psi()*p))
/fvc::domainIntegrate(thermo->psi());
pd == p - (rho*gh + pRef);
}
rho = thermo->rho();

View File

@ -51,7 +51,7 @@
)
- fvc::domainIntegrate(thermof[i].psi()*thermof[i].p())
)/fvc::domainIntegrate(thermof[i].psi());
pdf[i] == thermof[i].p() - (rhof[i]*ghf[i] + pRef);
rhof[i] = thermof[i].rho();
}