diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict b/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict index 15e099fb..9ce767ea 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict +++ b/applications/utilities/mesh/manipulation/createBaffles/createBafflesDict @@ -19,7 +19,17 @@ FoamFile // - or converting boundary faces into a boundary face // (internalFacesOnly=false)(though should use really createPatch // to do this) -// - specification in one of two modes: +// +// - selection of faces (and orientation) to 'baffle' through: +// faceZone: +// type faceZone; +// zoneName f0; +// searchableSurface: +// type searchableSurface; +// surface triSurfaceMesh; +// name baffle1D.stl; +// +// - specification of patches for baffle sides in one of two modes: // - patchPairs : create two patches of same type, same input // - patches : create patches separately, full control over what // to create on what side diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index c20baae3..ce71727d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1448,6 +1448,15 @@ Foam::label Foam::polyMesh::findCell const cellRepresentation decompMode ) const { + if (Pstream::parRun() && decompMode == FACEDIAGTETS) + { + // Force construction of face-diagonal decomposition before testing + // for zero cells. If parallel running a local domain might have zero + // cells so never construct the face-diagonal decomposition (which + // uses parallel transfers) + (void)tetBasePtIs(); + } + if (nCells() == 0) { return -1; diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 8736987c..3791ad53 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -532,12 +532,23 @@ Foam::label Foam::ptscotchDecomp::decompose if (maxWeights > minWeights) { - // Convert to integers. - velotab.setSize(cWeights.size()); - - forAll(velotab, i) + if (cWeights.size()) { - velotab[i] = int((cWeights[i]/minWeights - 1)*rangeScale) + 1; + // Convert to integers. + velotab.setSize(cWeights.size()); + + forAll(velotab, i) + { + velotab[i] = int((cWeights[i]/minWeights - 1)*rangeScale) + 1; + } + } + else + { + // Locally zero cells but not globally. Make sure we have + // some size so .begin() does not return null pointer. Data + // itself is never used. + velotab.setSize(1); + velotab[0] = 1; } } diff --git a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C index 4b51db9f..ea273e25 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/turbulenceModel/derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -269,7 +269,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() } } } - q = (Ta_ - Tp)*(1.0/h_ + totalSolidRes); + q = (Ta_ - Tp)/(1.0/h_ + totalSolidRes); break; } default: @@ -287,7 +287,7 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() { if (q[i] > 0) //in { - this->refGrad()[i] = q[i]/KWall[i]; + this->refGrad()[i] = q[i]/KWall[i]; this->refValue()[i] = 0.0; this->valueFraction()[i] = 0.0; } diff --git a/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary b/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary deleted file mode 100644 index 95b2b1c9..00000000 --- a/tutorials/multiphase/interFoam/laminar/damBreak/constant/polyMesh/boundary +++ /dev/null @@ -1,53 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 2.3.0 | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -5 -( - leftWall - { - type wall; - nFaces 50; - startFace 4432; - } - rightWall - { - type wall; - nFaces 50; - startFace 4482; - } - lowerWall - { - type wall; - nFaces 62; - startFace 4532; - } - atmosphere - { - type patch; - nFaces 46; - startFace 4594; - } - defaultFaces - { - type empty; - inGroups 1(empty); - nFaces 4536; - startFace 4640; - } -) - -// ************************************************************************* //