diff --git a/applications/solvers/compressible/rhoSimpleFoam/createFields.H b/applications/solvers/compressible/rhoSimpleFoam/createFields.H index 690b53760d..122280cfac 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/createFields.H +++ b/applications/solvers/compressible/rhoSimpleFoam/createFields.H @@ -44,9 +44,14 @@ scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - dimensionedScalar pMin + dimensionedScalar rhoMax ( - mesh.solutionDict().subDict("SIMPLE").lookup("pMin") + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMax") + ); + + dimensionedScalar rhoMin + ( + mesh.solutionDict().subDict("SIMPLE").lookup("rhoMin") ); Info<< "Creating turbulence model\n" << endl; diff --git a/applications/solvers/compressible/rhoSimpleFoam/hEqn.H b/applications/solvers/compressible/rhoSimpleFoam/hEqn.H index e299d99f83..57395e977e 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/hEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/hEqn.H @@ -5,8 +5,8 @@ - fvm::Sp(fvc::div(phi), h) - fvm::laplacian(turbulence->alphaEff(), h) == - fvc::div(phi/fvc::interpolate(rho), p, "div(U,p)") - - p*fvc::div(phi/fvc::interpolate(rho)) + fvc::div(phi/fvc::interpolate(rho), rho/psi, "div(U,p)") + - (rho/psi)*fvc::div(phi/fvc::interpolate(rho)) ); hEqn.relax(); diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index 38922c99c9..329ebbd27f 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -1,4 +1,7 @@ rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); volScalarField rUA = 1.0/UEqn().A(); U = rUA*UEqn().H(); @@ -82,15 +85,9 @@ else // Explicitly relax pressure for momentum corrector p.relax(); -rho = thermo.rho(); -rho.relax(); -Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; - U -= rUA*fvc::grad(p); U.correctBoundaryConditions(); -bound(p, pMin); - // For closed-volume cases adjust the pressure and density levels // to obey overall mass continuity if (closedVolume) @@ -98,3 +95,9 @@ if (closedVolume) p += (initialMass - fvc::domainIntegrate(psi*p)) /fvc::domainIntegrate(psi); } + +rho = thermo.rho(); +rho = max(rho, rhoMin); +rho = min(rho, rhoMax); +rho.relax(); +Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index e16d90bbbd..50ff6918b0 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -291,6 +291,22 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry) } } + if (allGeometry) + { + cellSet cells(mesh, "concaveCells", mesh.nCells()/100); + if (mesh.checkConcaveCells(true, &cells)) + { + noFailedChecks++; + + label nCells = returnReduce(cells.size(), sumOp