diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 85157e8b2f..dafbf707e7 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -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); diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun b/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun index 3b172cb321..a504552e46 100755 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun +++ b/tutorials/mesh/foamyHexMesh/simpleShapes/Allrun @@ -4,26 +4,21 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -runApplication surfaceOrient \ +runApplication -log log.surfaceOrient.cone surfaceOrient \ constant/triSurface/cone.stl \ -inside '(0 -0.5 0)' \ constant/triSurface/cone_orient.stl -mv log.surfaceOrient log.surfaceOrient.cone -runApplication surfaceOrient \ +runApplication -log log.surfaceOrient.sphere surfaceOrient \ constant/triSurface/sphere.stl \ -inside '(0 -0.5 0)' \ constant/triSurface/sphere_orient.stl -mv log.surfaceOrient log.surfaceOrient.sphere -runApplication surfaceBooleanFeatures intersection \ - constant/triSurface/cone_orient.stl \ - constant/triSurface/sphere_orient.stl +runApplication surfaceBooleanFeatures intersection cone_orient.stl sphere_orient.stl runApplication foamyHexMesh -runApplication collapseEdges -latestTime -collapseFaceSet indirectPatchFaces -mv log.collapseEdges log.collapseFaceSet +runApplication -log log.collapseFaceSet collapseEdges -latestTime -collapseFaceSet indirectPatchFaces runApplication collapseEdges -latestTime -collapseFaces