From b7444b8587cd2b125637be15834312bc5aef4b4d Mon Sep 17 00:00:00 2001 From: sergio Date: Tue, 15 Dec 2015 10:15:15 -0800 Subject: [PATCH 1/2] BUG: Add compressible bool for closed volume domains --- applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); From c076fd8d6721a2651647528a42cff2825c095740 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 15 Dec 2015 20:50:59 +0000 Subject: [PATCH 2/2] BUG: simpleShapes: Allrun adapted for surfaceBooleanFeatures change. Fixes part of #34 --- tutorials/mesh/foamyHexMesh/simpleShapes/Allrun | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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