Skip to content
Snippets Groups Projects
Commit 23b99b5e authored by sergio's avatar sergio
Browse files

ENH: Adding pRef handling in pEqn.H for incompressible eqOfState in buoyantSimpleFoam

parent fb504d89
Branches
Tags
No related merge requests found
......@@ -70,10 +70,22 @@
// For closed-volume cases adjust the pressure level
// to obey overall mass continuity
if (closedVolume && compressible)
if (closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
if(!compressible)
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
else
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
}
p_rgh = p - rho*gh;
}
......
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