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

BUG: Add compressible bool for closed volume domains

parent 1b94025a
Branches
Tags
No related merge requests found
......@@ -34,6 +34,7 @@
)/(mesh.magSf().boundaryField()*rhorAUf.boundaryField())
);
while (simple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
......@@ -64,9 +65,12 @@
p = p_rgh + rho*gh;
dimensionedScalar compressibility = fvc::domainIntegrate(psi);
bool compressible = (compressibility.value() > SMALL);
// For closed-volume cases adjust the pressure level
// to obey overall mass continuity
if (closedVolume)
if (closedVolume && compressible)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
......
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