From ab6aac74e20531556e8d7a2a0f3a637ecfd5a960 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 9 Sep 2013 17:34:37 +0100 Subject: [PATCH 01/13] ENH: curvatureSeparation film model - check that gravity is set/valid --- .../curvatureSeparation/curvatureSeparation.C | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index 27376b14d5..0d8011404c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -229,8 +229,24 @@ curvatureSeparation::curvatureSeparation deltaByR1Min_(coeffs().lookupOrDefault("deltaByR1Min", 0.0)), definedPatchRadii_(), magG_(mag(owner.g().value())), - gHat_(owner.g().value()/magG_) + gHat_(vector::zero) { + if (magG_ < ROOTVSMALL) + { + FatalErrorIn + ( + "curvatureSeparation::curvatureSeparation" + "(" + "const surfaceFilmModel&, " + "const dictionary&" + ")" + ) + << "Acceleration due to gravity must be non-zero" + << exit(FatalError); + } + + gHat_ = owner.g().value()/magG_; + List > prIn(coeffs().lookup("definedPatchRadii")); const wordList& allPatchNames = owner.regionMesh().boundaryMesh().names(); From a4909c94bc9b509ba2961bb95c3366ecc3884715 Mon Sep 17 00:00:00 2001 From: mattijs Date: Mon, 9 Sep 2013 17:37:01 +0100 Subject: [PATCH 02/13] BUG: extrude2DMesh: upper-triangular reordering --- .../patchToPoly2DMesh/patchToPoly2DMesh.C | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C index a63a88035b..f2b78137ed 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C @@ -97,34 +97,35 @@ void Foam::patchToPoly2DMesh::createNeighbours() Foam::labelList Foam::patchToPoly2DMesh::internalFaceOrder() { - const labelListList& cellFaces = patch_.faceEdges(); + const labelListList& faceEdges = patch_.faceEdges(); labelList oldToNew(owner_.size(), -1); label newFaceI = 0; - forAll(cellFaces, cellI) + forAll(faceEdges, faceI) { - const labelList& cFaces = cellFaces[cellI]; - // Neighbouring cells - SortableList