diff --git a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H index 926abe2a09..d5a5d20631 100644 --- a/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleTwoPhaseEulerFoam/pEqn.H @@ -178,7 +178,7 @@ rho2 = rho20 + psi2*p; K1 = 0.5*magSqr(U1); - K2 = 0.5*magSqr(U1); + K2 = 0.5*magSqr(U2); dpdt = fvc::ddt(p); } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options index 5799557cc9..7cd8f48ee4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options @@ -20,4 +20,5 @@ EXE_LIBS = \ -lincompressibleTransportModels \ -lcompressibleMultiphaseEulerianInterfacialModels \ -lincompressibleLESModels \ + -lincompressibleRASModels \ -lfiniteVolume diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 443576601d..4eb19041aa 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -273,73 +273,165 @@ bool Foam::checkCoupledPoints const faceList& fcs = mesh.faces(); const polyBoundaryMesh& patches = mesh.boundaryMesh(); - // Zero'th point on coupled faces - pointField nbrZeroPoint(fcs.size()-mesh.nInternalFaces(), vector::max); - - // Exchange zero point - forAll(patches, patchI) + // Check size of faces + label maxSize = 0; { - if (patches[patchI].coupled()) + labelList nbrSize(fcs.size()-mesh.nInternalFaces(), 0); + + // Exchange size + forAll(patches, patchI) { - const coupledPolyPatch& cpp = refCast - ( - patches[patchI] - ); - - forAll(cpp, i) + if (patches[patchI].coupled()) { - label bFaceI = cpp.start()+i-mesh.nInternalFaces(); - const point& p0 = p[cpp[i][0]]; - nbrZeroPoint[bFaceI] = p0; - } - } - } - syncTools::swapBoundaryFacePositions(mesh, nbrZeroPoint); - - // Compare to local ones. Use same tolerance as for matching - label nErrorFaces = 0; - scalar avgMismatch = 0; - label nCoupledFaces = 0; - - forAll(patches, patchI) - { - if (patches[patchI].coupled()) - { - const coupledPolyPatch& cpp = refCast - ( - patches[patchI] - ); - - if (cpp.owner()) - { - scalarField smallDist + const coupledPolyPatch& cpp = refCast ( - cpp.calcFaceTol - ( - //cpp.matchTolerance(), - cpp, - cpp.points(), - cpp.faceCentres() - ) + patches[patchI] ); forAll(cpp, i) { label bFaceI = cpp.start()+i-mesh.nInternalFaces(); - const point& p0 = p[cpp[i][0]]; + nbrSize[bFaceI] = cpp[i].size(); + maxSize = max(maxSize, cpp[i].size()); + } + } + } + syncTools::swapBoundaryFaceList(mesh, nbrSize); - scalar d = mag(p0 - nbrZeroPoint[bFaceI]); - if (d > smallDist[i]) + // Check on owner + label nErrorFaces = 0; + forAll(patches, patchI) + { + if (patches[patchI].coupled()) + { + const coupledPolyPatch& cpp = refCast + ( + patches[patchI] + ); + + if (cpp.owner()) + { + forAll(cpp, i) { - if (setPtr) + label bFaceI = cpp.start()+i-mesh.nInternalFaces(); + + if (cpp[i].size() != nbrSize[bFaceI]) { - setPtr->insert(cpp.start()+i); + if (setPtr) + { + setPtr->insert(cpp.start()+i); + } + nErrorFaces++; + } + } + } + } + } + + reduce(nErrorFaces, sumOp