From 873d2c9c23a617432f96ca5cb9ffe6c02661e9c1 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Wed, 6 Jun 2018 15:13:08 +0100 Subject: [PATCH 01/91] seulex: changed monotonicity check to correspond to original implementation Resolves bug-report https://bugs.openfoam.org/view.php?id=2972 --- src/ODE/ODESolvers/seulex/seulex.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ODE/ODESolvers/seulex/seulex.C b/src/ODE/ODESolvers/seulex/seulex.C index 90cd3077a5..4df64c6c17 100644 --- a/src/ODE/ODESolvers/seulex/seulex.C +++ b/src/ODE/ODESolvers/seulex/seulex.C @@ -153,7 +153,7 @@ bool Foam::seulex::seul LUBacksubstitute(a_, pivotIndices_, dy_); - const scalar denom = min(1, dy1 + small); + const scalar denom = max(1, dy1); scalar dy2 = 0; for (label i=0; i Date: Thu, 7 Jun 2018 09:23:01 +0100 Subject: [PATCH 02/91] particle: Improved debugging for tracking on moving meshes --- src/lagrangian/basic/particle/particle.C | 42 +++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index f5919901b8..2f6f2492fa 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -757,6 +757,16 @@ Foam::scalar Foam::particle::trackToMovingTri FixedList T; movingTetReverseTransform(fraction, centre, detA, T); + if (debug) + { + Pair o, b, v1, v2; + movingTetGeometry(fraction, o, b, v1, v2); + Info<< "Tet points o=" << o[0] << ", b=" << b[0] + << ", v1=" << v1[0] << ", v2=" << v2[0] << endl + << "Tet determinant = " << detA[0] << endl + << "Start local coordinates = " << y0[0] << endl; + } + // Get the factor by which the displacement is increased const scalar f = detA[0] >= 0 ? 1 : negativeSpaceDisplacementFactor; @@ -780,6 +790,16 @@ Foam::scalar Foam::particle::trackToMovingTri hitEqn[i] = cubicEqn(hitEqnA[i], hitEqnB[i], hitEqnC[i], hitEqnD[i]); } + if (debug) + { + for (label i = 0; i < 4; ++ i) + { + Info<< (i ? " " : "Hit equation ") << i << " = " + << hitEqn[i] << endl; + } + Info<< " DetA equation = " << detA << endl; + } + // Calculate the hit fraction label iH = -1; scalar muH = std::isnormal(detA[0]) && detA[0] <= 0 ? vGreat : 1/detA[0]; @@ -791,6 +811,22 @@ Foam::scalar Foam::particle::trackToMovingTri { if (mu.type(j) == roots::real && hitEqn[i].derivative(mu[j]) < 0) { + if (debug) + { + const barycentric yH + ( + hitEqn[0].value(mu[j]), + hitEqn[1].value(mu[j]), + hitEqn[2].value(mu[j]), + hitEqn[3].value(mu[j]) + ); + const scalar detAH = detAEqn.value(mu[j]); + + Info<< "Hit on tet face " << i << " at local coordinate " + << yH/detAH << ", " << mu[j]*detA[0]*100 << "% of the " + << "way along the track" << endl; + } + if (0 <= mu[j] && mu[j] < muH) { iH = i; @@ -855,7 +891,11 @@ Foam::scalar Foam::particle::trackToMovingTri Info<< "Track hit no tet faces" << endl; } Info<< "End local coordinates = " << yH << endl - << "End global coordinates = " << position() << endl; + << "End global coordinates = " << position() << endl + << "Tracking displacement = " << position() - x0 << endl + << muH*detA[0]*100 << "% of the step from " << stepFraction_ + << " to " << stepFraction_ + fraction << " completed" << endl + << endl; } return iH != -1 ? 1 - muH*detA[0] : 0; From 1ba5ebef03548ca6c93ba33d8bf089775841a2f4 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Thu, 7 Jun 2018 10:56:01 +0100 Subject: [PATCH 03/91] foamCloneCase: only list copied directories to avoid confusion --- bin/foamCloneCase | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/foamCloneCase b/bin/foamCloneCase index 0a63b87127..f49f75814c 100755 --- a/bin/foamCloneCase +++ b/bin/foamCloneCase @@ -3,7 +3,7 @@ # ========= | # \\ / F ield | OpenFOAM: The Open Source CFD Toolbox # \\ / O peration | -# \\ / A nd | Copyright (C) 2015-2017 OpenFOAM Foundation +# \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation # \\/ M anipulation | #------------------------------------------------------------------------------- # License @@ -62,8 +62,7 @@ error() { } cpIfPresent() { - echo $1 - [ -e "$1" ] && echo "... ${1##*/}" && cp -r "$1" "$2" + [ -e "$1" ] && echo "$1 to ... ${1##*/}" && cp -r "$1" "$2" } ver=$WM_PROJECT_VERSION From 89de53492334abe52356c4c15c4ce28c1ec30f26 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 7 Jun 2018 10:29:21 +0100 Subject: [PATCH 04/91] particle: Improved robustness of locate method --- src/lagrangian/basic/particle/particle.C | 56 +++++++++++++++++++----- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index 2f6f2492fa..5e87f0ffd9 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -409,20 +409,55 @@ void Foam::particle::locate << exit(FatalError); } - // Put the particle at the cell centre and in a random tet + // Track from the centre of the cell to the desired position + const vector displacement = position - mesh_.cellCentres()[celli_]; + + // Loop all cell tets to find the one containing the position. Track + // through each tet from the cell centre. If a tet contains the position + // then the track will end with a single trackToTri. + const class cell& c = mesh_.cells()[celli_]; + label minF = 1, minTetFacei = -1, minTetPti = -1; + forAll(c, cellTetFacei) + { + const class face& f = mesh_.faces()[c[cellTetFacei]]; + for (label tetPti = 1; tetPti < f.size() - 1; ++ tetPti) + { + coordinates_ = barycentric(1, 0, 0, 0); + tetFacei_ = c[cellTetFacei]; + tetPti_ = tetPti; + facei_ = -1; + + label tetTriI = -1; + const scalar f = trackToTri(displacement, 0, tetTriI); + + if (tetTriI == -1) + { + return; + } + + if (f < minF) + { + minF = f; + minTetFacei = tetFacei_; + minTetPti = tetPti_; + } + } + } + + // The particle must be (hopefully only slightly) outside the cell. Track + // into the tet which got the furthest. coordinates_ = barycentric(1, 0, 0, 0); - tetFacei_ = mesh_.cells()[celli_][0]; - tetPti_ = 1; + tetFacei_ = minTetFacei; + tetPti_ = minTetPti; facei_ = -1; - // Track to the injection point - track(position - mesh_.cellCentres()[celli_], 0); + track(displacement, 0); if (!onFace()) { return; } - // We hit a boundary ... + // If we are here then we hit a boundary if (boundaryFail) { FatalErrorInFunction << boundaryMsg << exit(FatalError); @@ -440,13 +475,12 @@ void Foam::particle::locate } const vector n = *direction/mag(*direction); - const vector s = position - mesh_.cellCentres()[celli_]; - const vector sN = (s & n)*n; - const vector sT = s - sN; + const vector sN = (displacement & n)*n; + const vector sT = displacement - sN; coordinates_ = barycentric(1, 0, 0, 0); - tetFacei_ = mesh_.cells()[celli_][0]; - tetPti_ = 1; + tetFacei_ = minTetFacei; + tetPti_ = minTetPti; facei_ = -1; track(sT, 0); From bf1673fb2f5a7c290bc4e9c8bb43c9f6f864a106 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 7 Jun 2018 13:21:28 +0100 Subject: [PATCH 05/91] rhoPimpleFoam: Predict rho at start of first PIMPLE outer loop --- applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 48367ac507..36287119d3 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) } } - if (pimple.nCorrPimple() <= 1) + if (pimple.firstIter()) { #include "rhoEqn.H" } From 675bfc732163f867bb63826e8dd15b2666dc686c Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 8 Jun 2018 14:57:10 +0100 Subject: [PATCH 06/91] chtMultiRegionFoam: Updated description --- .../heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index c58eadb06c..fc5d6a2466 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -25,11 +25,9 @@ Application chtMultiRegionFoam Description - Transient solver for buoyant, turbulent fluid flow and solid heat - conduction with conjugate heat transfer between solid and fluid regions. - - It handles secondary fluid or solid circuits which can be coupled - thermally with the main fluid region. i.e radiators, etc. + Solver for steady or transient fluid flow and solid heat conduction, with + conjugate heat transfer between regions, buoyancy effects, turbulence, + reactions and radiation modelling. \*---------------------------------------------------------------------------*/ From 50a965f8866683a81d79cbc7811af7333baf9d10 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Fri, 8 Jun 2018 15:58:22 +0100 Subject: [PATCH 07/91] particle: Fixed topology error in locate method Fixes problem introduced by commit 89de5349 --- src/lagrangian/basic/particle/particle.C | 12 ++++++------ src/lagrangian/basic/particle/particle.H | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index 5e87f0ffd9..36a70b92bc 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -390,24 +390,23 @@ void Foam::particle::locate ( const vector& position, const vector* direction, - const label celli, + label celli, const bool boundaryFail, const string boundaryMsg ) { - celli_ = celli; - // Find the cell, if it has not been given - if (celli_ < 0) + if (celli < 0) { - celli_ = mesh_.cellTree().findInside(position); + celli = mesh_.cellTree().findInside(position); } - if (celli_ < 0) + if (celli < 0) { FatalErrorInFunction << "Cell not found for particle position " << position << "." << exit(FatalError); } + celli_ = celli; // Track from the centre of the cell to the desired position const vector displacement = position - mesh_.cellCentres()[celli_]; @@ -479,6 +478,7 @@ void Foam::particle::locate const vector sT = displacement - sN; coordinates_ = barycentric(1, 0, 0, 0); + celli_ = celli; tetFacei_ = minTetFacei; tetPti_ = minTetPti; facei_ = -1; diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H index 4ad86711f7..20fa4a211e 100644 --- a/src/lagrangian/basic/particle/particle.H +++ b/src/lagrangian/basic/particle/particle.H @@ -275,7 +275,7 @@ private: ( const vector& position, const vector* direction, - const label celli, + label celli, const bool boundaryFail, const string boundaryMsg ); From a5a551f6652cf98a3d3e859b8b4a12822b72563e Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 8 Jun 2018 23:01:00 +0100 Subject: [PATCH 08/91] compressibleInterFilmFoam: Updated documentation --- .../compressibleInterFilmFoam/compressibleInterFilmFoam.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/compressibleInterFilmFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/compressibleInterFilmFoam.C index 22a675972f..6c0070929f 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/compressibleInterFilmFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFilmFoam/compressibleInterFilmFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,11 +22,12 @@ License along with OpenFOAM. If not, see . Application - compressibleInterFoam + compressibleInterFilmFoam Description Solver for 2 compressible, non-isothermal immiscible fluids using a VOF - (volume of fluid) phase-fraction based interface capturing approach. + (volume of fluid) phase-fraction based interface capturing approach + and surface film modelling. The momentum and other fluid properties are of the "mixture" and a single momentum equation is solved. From 8ab5b6152ef92a67fcaea2ce4a69d76b3a7bace6 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 8 Jun 2018 23:01:24 +0100 Subject: [PATCH 09/91] CSV: Updated writing of componentColumns for consistency with construction for binary IO Resolves bug-report https://bugs.openfoam.org/view.php?id=2950 --- .../primitives/functions/Function1/CSV/CSV.C | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C index f8c547af3d..a5c5fc9d3b 100644 --- a/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C +++ b/src/OpenFOAM/primitives/functions/Function1/CSV/CSV.C @@ -273,21 +273,10 @@ void Foam::Function1Types::CSV::writeData(Ostream& os) const os.writeKeyword("nHeaderLine") << nHeaderLine_ << token::END_STATEMENT << nl; + os.writeKeyword("refColumn") << refColumn_ << token::END_STATEMENT << nl; - // Force writing labelList in ascii - os.writeKeyword("componentColumns"); - if (os.format() == IOstream::BINARY) - { - os.format(IOstream::ASCII); - os << componentColumns_; - os.format(IOstream::BINARY); - } - else - { - os << componentColumns_; - } - os << token::END_STATEMENT << nl; + componentColumns_.writeEntry("componentColumns", os); os.writeKeyword("separator") << string(separator_) << token::END_STATEMENT << nl; From 5aeb17d9e7dae82d98e72cb8270f209514944557 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 13:26:38 +0100 Subject: [PATCH 10/91] heatExchanger tutorial: removed unnecessary creation of empty baffle patch --- .../heatExchanger/{Allrun.pre => Allmesh} | 0 .../chtMultiRegionFoam/heatExchanger/Allrun | 4 ++-- .../heatExchanger/Allrun-parallel | 2 +- .../heatExchanger/system/air/blockMeshDict | 7 ------- .../heatExchanger/system/air/createBafflesDict | 14 ++++---------- 5 files changed, 7 insertions(+), 20 deletions(-) rename tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/{Allrun.pre => Allmesh} (100%) diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun.pre b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allmesh similarity index 100% rename from tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun.pre rename to tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allmesh diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun index c6e1de8678..9f5b8595e1 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun @@ -2,9 +2,9 @@ cd ${0%/*} || exit 1 # Run from this directory -./Allrun.pre - # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions +./Allmesh + runApplication $(getApplication) diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun-parallel b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun-parallel index 9e5b931edc..1946ba401a 100755 --- a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun-parallel +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/Allrun-parallel @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication -s air decomposePar -region air runApplication -s porous decomposePar -region porous diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/blockMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/blockMeshDict index d0439108c7..075be9d04c 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/blockMeshDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/blockMeshDict @@ -133,13 +133,6 @@ boundary (20 21 22 23) ); } - - blades - { - type wall; - faces - (); - } ); mergePatchPairs diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/createBafflesDict b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/createBafflesDict index 818b3b2320..3ee01292ad 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/createBafflesDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/heatExchanger/system/air/createBafflesDict @@ -19,30 +19,24 @@ FoamFile // faces. internalFacesOnly true; - -// Baffles to create. baffles { - baffleFaces + baffles { //- Use predefined faceZone to select faces and orientation. type faceZone; zoneName rotorBlades; - patches { master { - //- Master side patch - name blades; - type patch; + name blades; + type wall; } slave { - //- Slave side patch - name blades; - type patch; + $master; } } } From a8da890c5a8825c66d1e7e9762c70303c76761f0 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 13:35:51 +0100 Subject: [PATCH 11/91] pimpleFoam: Updated documentation --- applications/solvers/incompressible/pimpleFoam/pimpleFoam.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 5e29dc3aa1..be86dd2159 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,8 +25,8 @@ Application pimpleDyMFoam.C Description - Transient solver for incompressible, turbulent flow of Newtonian fluids - on a moving mesh. + Transient solver for incompressible, turbulent flow of Newtonian fluids, + with optional mesh motion and mesh topology changes. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. From 7c3732aa5ade7b71531308a126eca474b0a1b38c Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 14:18:16 +0100 Subject: [PATCH 12/91] meshQualityDict: 'master' dictionary relocated to 'etc/caseDicts/mesh/generation' --- .../utilities/mesh/generation/snappyHexMesh/meshQualityDict | 2 +- etc/caseDicts/{ => mesh/generation}/meshQualityDict | 3 +++ .../reactingFoam/RAS/membrane/system/meshQualityDict | 2 +- .../iglooWithFridges/system/meshQualityDict | 2 +- .../snappyMultiRegionHeater/system/meshQualityDict | 2 +- .../straightDuctImplicit/system/meshQualityDict | 2 +- .../incompressible/simpleFoam/motorBike/system/meshQualityDict | 2 +- .../lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict | 2 +- tutorials/mesh/snappyHexMesh/flange/system/meshQualityDict | 2 +- 9 files changed, 11 insertions(+), 8 deletions(-) rename etc/caseDicts/{ => mesh/generation}/meshQualityDict (98%) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict b/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict index fd0701a01c..47125f2b40 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#include "$WM_PROJECT_DIR/etc/caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" // ************************************************************************* // diff --git a/etc/caseDicts/meshQualityDict b/etc/caseDicts/mesh/generation/meshQualityDict similarity index 98% rename from etc/caseDicts/meshQualityDict rename to etc/caseDicts/mesh/generation/meshQualityDict index b462b9bee4..cd30a6f59b 100644 --- a/etc/caseDicts/meshQualityDict +++ b/etc/caseDicts/mesh/generation/meshQualityDict @@ -67,6 +67,9 @@ minVolRatio 0.01; // compatibility minTriangleTwist -1; +nSmoothScale 4; + +errorReduction 0.75; //- If >0 : preserve cells with all points on the surface if the // resulting volume after snapping (by approximation) is larger than diff --git a/tutorials/combustion/reactingFoam/RAS/membrane/system/meshQualityDict b/tutorials/combustion/reactingFoam/RAS/membrane/system/meshQualityDict index 61a552d4ca..8ccede92f4 100644 --- a/tutorials/combustion/reactingFoam/RAS/membrane/system/meshQualityDict +++ b/tutorials/combustion/reactingFoam/RAS/membrane/system/meshQualityDict @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#includeEtc "caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" // ************************************************************************* // diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/meshQualityDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/meshQualityDict index 4dfba773e3..47125f2b40 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/meshQualityDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/meshQualityDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" // ************************************************************************* // diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/meshQualityDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/meshQualityDict index 61a552d4ca..8ccede92f4 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/meshQualityDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/meshQualityDict @@ -14,7 +14,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#includeEtc "caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" // ************************************************************************* // diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/meshQualityDict b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/meshQualityDict index 4dfba773e3..47125f2b40 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/meshQualityDict +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/meshQualityDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" // ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict b/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict index 5de5b25817..9ad3a92023 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" //- minFaceWeight (0 -> 0.5) minFaceWeight 0.02; diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict b/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict index 0edc67d7c2..d42abbb28d 100644 --- a/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict +++ b/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict @@ -267,7 +267,7 @@ addLayersControls // where to undo. meshQualityControls { - #includeEtc "caseDicts/meshQualityDict" + #includeEtc "caseDicts/mesh/generation/meshQualityDict" // Advanced diff --git a/tutorials/mesh/snappyHexMesh/flange/system/meshQualityDict b/tutorials/mesh/snappyHexMesh/flange/system/meshQualityDict index d06e1d63e2..90a889818f 100644 --- a/tutorials/mesh/snappyHexMesh/flange/system/meshQualityDict +++ b/tutorials/mesh/snappyHexMesh/flange/system/meshQualityDict @@ -16,7 +16,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/meshQualityDict" +#includeEtc "caseDicts/mesh/generation/meshQualityDict" // ************************************************************************* // From 0813f80ebda931192e33a299afaca48b9c7079c4 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 14:26:11 +0100 Subject: [PATCH 13/91] tutorials: removed redundant entries from snappyHexMeshDict files --- .../mesh/generation/snappyHexMesh/snappyHexMeshDict | 8 -------- .../iglooWithFridges/system/snappyHexMeshDict | 7 ------- .../snappyMultiRegionHeater/system/snappyHexMeshDict | 7 ------- .../simpleFoam/motorBike/system/snappyHexMeshDict | 8 -------- .../lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict | 8 -------- .../mesh/snappyHexMesh/flange/system/snappyHexMeshDict | 7 ------- 6 files changed, 45 deletions(-) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 16b14d88e0..9af5d2b05d 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -492,14 +492,6 @@ meshQualityControls // Maximum non-orthogonality allowed. Set to 180 to disable. maxNonOrtho 75; } - - - // Advanced - - // Number of error distribution iterations - nSmoothScale 4; - // amount to scale back displacement at error points - errorReduction 0.75; } // Advanced diff --git a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict index 710ce54571..fe84dae8df 100644 --- a/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/iglooWithFridges/system/snappyHexMeshDict @@ -350,13 +350,6 @@ addLayersControls meshQualityControls { #include "meshQualityDict" - - // Advanced - - //- Number of error distribution iterations - nSmoothScale 4; - //- Amount to scale back displacement at error points - errorReduction 0.75; } diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict index c6ab97ebbe..572a1e5729 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict @@ -341,13 +341,6 @@ addLayersControls meshQualityControls { #include "meshQualityDict" - - // Advanced - - //- Number of error distribution iterations - nSmoothScale 4; - //- Amount to scale back displacement at error points - errorReduction 0.75; } diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict index 6a2b0357a4..c0d6140ffd 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict @@ -296,14 +296,6 @@ addLayersControls meshQualityControls { #include "meshQualityDict" - - - // Advanced - - //- Number of error distribution iterations - nSmoothScale 4; - //- Amount to scale back displacement at error points - errorReduction 0.75; } diff --git a/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict b/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict index d42abbb28d..2baf0b8c02 100644 --- a/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict +++ b/tutorials/lagrangian/MPPICFoam/cyclone/system/snappyHexMeshDict @@ -268,14 +268,6 @@ addLayersControls meshQualityControls { #includeEtc "caseDicts/mesh/generation/meshQualityDict" - - - // Advanced - - //- Number of error distribution iterations - nSmoothScale 4; - //- Amount to scale back displacement at error points - errorReduction 0.75; } diff --git a/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict b/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict index 61b65c8f80..28ebf7f882 100644 --- a/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict +++ b/tutorials/mesh/snappyHexMesh/flange/system/snappyHexMeshDict @@ -290,13 +290,6 @@ meshQualityControls //- Maximum non-orthogonality allowed. Set to 180 to disable. maxNonOrtho 75; } - - // Advanced - - //- Number of error distribution iterations - nSmoothScale 4; - //- Amount to scale back displacement at error points - errorReduction 0.75; } From 04954fbd192468cefdcfc6b7c3f7ea3bffb8c84e Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 14:28:12 +0100 Subject: [PATCH 14/91] meshQualityDict.cfg: disabled minTetQuality since tracking works without it --- .../mesh/generation/meshQualityDict.cfg | 2 +- .../mesh/manipulation/AMI/createBafflesDict | 46 ++++++++++++++++++ .../manipulation/baffles/createBafflesDict | 47 +++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 etc/caseDicts/mesh/manipulation/AMI/createBafflesDict create mode 100644 etc/caseDicts/mesh/manipulation/baffles/createBafflesDict diff --git a/etc/caseDicts/mesh/generation/meshQualityDict.cfg b/etc/caseDicts/mesh/generation/meshQualityDict.cfg index 6efc9be5c2..927f45c749 100644 --- a/etc/caseDicts/mesh/generation/meshQualityDict.cfg +++ b/etc/caseDicts/mesh/generation/meshQualityDict.cfg @@ -27,7 +27,7 @@ minVol 1e-13; // 1e-15 (small positive) to enable tracking // -1e+30 (large negative) for best layer insertion -minTetQuality 1e-15; +minTetQuality -1e30; // if >0 : preserve single cells with all points on the surface if the // resulting volume after snapping (by approximation) is larger than diff --git a/etc/caseDicts/mesh/manipulation/AMI/createBafflesDict b/etc/caseDicts/mesh/manipulation/AMI/createBafflesDict new file mode 100644 index 0000000000..a7b38ff6b8 --- /dev/null +++ b/etc/caseDicts/mesh/manipulation/AMI/createBafflesDict @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createBafflesDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +internalFacesOnly true; + +baffles +{ + baffleFaces + { + type faceZone; + zoneName rotatingZone; + + patches + { + master + { + name AMI1; + type cyclicAMI; + matchTolerance 0.0001; + neighbourPatch AMI2; + transform noOrdering; + } + slave + { + $master; + name AMI2; + neighbourPatch AMI1; + } + } + } +} + +// ************************************************************************* // diff --git a/etc/caseDicts/mesh/manipulation/baffles/createBafflesDict b/etc/caseDicts/mesh/manipulation/baffles/createBafflesDict new file mode 100644 index 0000000000..2afc0bde90 --- /dev/null +++ b/etc/caseDicts/mesh/manipulation/baffles/createBafflesDict @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object createBafflesDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Whether to convert internal faces only (so leave boundary faces intact). +// This is only relevant if your face selection type can pick up boundary +// faces. +internalFacesOnly true; + +// Example using "blades" as name of baffle patch +baffles +{ + baffles // group name + { + //- Use predefined faceZone to select faces and orientation. + type faceZone; + zoneName blades; + + patches + { + master + { + name blades; // patch name + type wall; + } + slave + { + $master; + } + } + } +} + + +// ************************************************************************* // From 76cb7118757050d80015f02a6593b12a8115484d Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 14:32:36 +0100 Subject: [PATCH 15/91] Revert "meshQualityDict.cfg: disabled minTetQuality since tracking works without it" This reverts commit 04954fbd192468cefdcfc6b7c3f7ea3bffb8c84e. --- .../mesh/generation/meshQualityDict.cfg | 2 +- .../mesh/manipulation/AMI/createBafflesDict | 46 ------------------ .../manipulation/baffles/createBafflesDict | 47 ------------------- 3 files changed, 1 insertion(+), 94 deletions(-) delete mode 100644 etc/caseDicts/mesh/manipulation/AMI/createBafflesDict delete mode 100644 etc/caseDicts/mesh/manipulation/baffles/createBafflesDict diff --git a/etc/caseDicts/mesh/generation/meshQualityDict.cfg b/etc/caseDicts/mesh/generation/meshQualityDict.cfg index 927f45c749..6efc9be5c2 100644 --- a/etc/caseDicts/mesh/generation/meshQualityDict.cfg +++ b/etc/caseDicts/mesh/generation/meshQualityDict.cfg @@ -27,7 +27,7 @@ minVol 1e-13; // 1e-15 (small positive) to enable tracking // -1e+30 (large negative) for best layer insertion -minTetQuality -1e30; +minTetQuality 1e-15; // if >0 : preserve single cells with all points on the surface if the // resulting volume after snapping (by approximation) is larger than diff --git a/etc/caseDicts/mesh/manipulation/AMI/createBafflesDict b/etc/caseDicts/mesh/manipulation/AMI/createBafflesDict deleted file mode 100644 index a7b38ff6b8..0000000000 --- a/etc/caseDicts/mesh/manipulation/AMI/createBafflesDict +++ /dev/null @@ -1,46 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object createBafflesDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -internalFacesOnly true; - -baffles -{ - baffleFaces - { - type faceZone; - zoneName rotatingZone; - - patches - { - master - { - name AMI1; - type cyclicAMI; - matchTolerance 0.0001; - neighbourPatch AMI2; - transform noOrdering; - } - slave - { - $master; - name AMI2; - neighbourPatch AMI1; - } - } - } -} - -// ************************************************************************* // diff --git a/etc/caseDicts/mesh/manipulation/baffles/createBafflesDict b/etc/caseDicts/mesh/manipulation/baffles/createBafflesDict deleted file mode 100644 index 2afc0bde90..0000000000 --- a/etc/caseDicts/mesh/manipulation/baffles/createBafflesDict +++ /dev/null @@ -1,47 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object createBafflesDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Whether to convert internal faces only (so leave boundary faces intact). -// This is only relevant if your face selection type can pick up boundary -// faces. -internalFacesOnly true; - -// Example using "blades" as name of baffle patch -baffles -{ - baffles // group name - { - //- Use predefined faceZone to select faces and orientation. - type faceZone; - zoneName blades; - - patches - { - master - { - name blades; // patch name - type wall; - } - slave - { - $master; - } - } - } -} - - -// ************************************************************************* // From 63d066f6dc7cf602019a64893ecfc47f642f14f2 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 14:41:08 +0100 Subject: [PATCH 16/91] meshQualityDict.cfg: disabled minTetQuality since tracking works without it --- .../mesh/generation/meshQualityDict.cfg | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/etc/caseDicts/mesh/generation/meshQualityDict.cfg b/etc/caseDicts/mesh/generation/meshQualityDict.cfg index 6efc9be5c2..7394d6fd6e 100644 --- a/etc/caseDicts/mesh/generation/meshQualityDict.cfg +++ b/etc/caseDicts/mesh/generation/meshQualityDict.cfg @@ -14,20 +14,18 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -maxNonOrtho 65; +maxNonOrtho 65; maxBoundarySkewness 20; maxInternalSkewness 4; -maxConcave 80; +maxConcave 80; // Minimum cell pyramid volume; case dependent -minVol 1e-13; +minVol 1e-13; -// 1e-15 (small positive) to enable tracking -// -1e+30 (large negative) for best layer insertion -minTetQuality 1e-15; +minTetQuality -1e30; // if >0 : preserve single cells with all points on the surface if the // resulting volume after snapping (by approximation) is larger than @@ -47,13 +45,13 @@ minVolRatio 0.01; minTriangleTwist -1; -nSmoothScale 4; +nSmoothScale 4; -errorReduction 0.75; +errorReduction 0.75; relaxed { - maxNonOrtho 75; + maxNonOrtho 75; } // ************************************************************************* // From e38bfba89e65a368e3173706c129fb04ea12f424 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Sat, 9 Jun 2018 15:06:35 +0100 Subject: [PATCH 17/91] Removed redundant minTetQuality entries in template cases --- etc/templates/closedVolume/system/snappyHexMeshDict | 5 ----- etc/templates/closedVolumeRotating/system/snappyHexMeshDict | 5 ----- .../compressibleInflowOutflow/system/snappyHexMeshDict | 5 ----- etc/templates/inflowOutflow/system/snappyHexMeshDict | 5 ----- etc/templates/inflowOutflowRotating/system/snappyHexMeshDict | 5 ----- etc/templates/singleFluidCHT/system/snappyHexMeshDict | 5 ----- .../simpleFoam/rotorDisk/system/snappyHexMeshDict | 5 ----- 7 files changed, 35 deletions(-) diff --git a/etc/templates/closedVolume/system/snappyHexMeshDict b/etc/templates/closedVolume/system/snappyHexMeshDict index 6f0ec44e40..76c3c47cc4 100644 --- a/etc/templates/closedVolume/system/snappyHexMeshDict +++ b/etc/templates/closedVolume/system/snappyHexMeshDict @@ -88,11 +88,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( // scalarLevels diff --git a/etc/templates/closedVolumeRotating/system/snappyHexMeshDict b/etc/templates/closedVolumeRotating/system/snappyHexMeshDict index 79d692cbe9..485f8d7757 100644 --- a/etc/templates/closedVolumeRotating/system/snappyHexMeshDict +++ b/etc/templates/closedVolumeRotating/system/snappyHexMeshDict @@ -111,11 +111,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( // scalarLevels diff --git a/etc/templates/compressibleInflowOutflow/system/snappyHexMeshDict b/etc/templates/compressibleInflowOutflow/system/snappyHexMeshDict index a1e5e5ac55..16e3783035 100644 --- a/etc/templates/compressibleInflowOutflow/system/snappyHexMeshDict +++ b/etc/templates/compressibleInflowOutflow/system/snappyHexMeshDict @@ -112,11 +112,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( // scalarLevels diff --git a/etc/templates/inflowOutflow/system/snappyHexMeshDict b/etc/templates/inflowOutflow/system/snappyHexMeshDict index a1e5e5ac55..16e3783035 100644 --- a/etc/templates/inflowOutflow/system/snappyHexMeshDict +++ b/etc/templates/inflowOutflow/system/snappyHexMeshDict @@ -112,11 +112,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( // scalarLevels diff --git a/etc/templates/inflowOutflowRotating/system/snappyHexMeshDict b/etc/templates/inflowOutflowRotating/system/snappyHexMeshDict index 873f1360ac..64a5330816 100644 --- a/etc/templates/inflowOutflowRotating/system/snappyHexMeshDict +++ b/etc/templates/inflowOutflowRotating/system/snappyHexMeshDict @@ -140,11 +140,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( // scalarLevels diff --git a/etc/templates/singleFluidCHT/system/snappyHexMeshDict b/etc/templates/singleFluidCHT/system/snappyHexMeshDict index 33676a425c..4db63b8ea7 100644 --- a/etc/templates/singleFluidCHT/system/snappyHexMeshDict +++ b/etc/templates/singleFluidCHT/system/snappyHexMeshDict @@ -131,11 +131,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( // scalarLevels diff --git a/tutorials/incompressible/simpleFoam/rotorDisk/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/rotorDisk/system/snappyHexMeshDict index 292391853c..46f78dbee7 100644 --- a/tutorials/incompressible/simpleFoam/rotorDisk/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/rotorDisk/system/snappyHexMeshDict @@ -125,11 +125,6 @@ addLayersControls // maxThicknessToMedialRatio 0.6; } -meshQualityControls -{ -// minTetQuality -1e+30; -} - writeFlags ( scalarLevels From 4e0f49a858ecd08e204b59d2656853d0c0478238 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 16:08:36 +0100 Subject: [PATCH 18/91] tutorials: Rationalized the naming of the meshing script when it is separated from Allrun to Allmesh --- .../externalCoupledCavity/Allrun | 3 +- .../externalCoupledCavity/Allrun-parallel | 3 +- .../externalCoupledCavity/Allrun.pre | 11 --- .../RAS/oscillatingInletACMI2D/Allrun | 2 +- .../oscillatingInletACMI2D/Allrun-parallel | 2 +- .../RAS/oscillatingInletACMI2D/Allrun.pre | 14 --- .../pimpleFoam/RAS/propeller/Allrun | 2 +- .../pimpleFoam/RAS/propeller/Allrun.pre | 26 ----- .../straightDuctImplicit/Allrun | 2 +- .../straightDuctImplicit/Allrun.pre | 30 ------ .../reactingParcelFoam/cylinder/Allrun | 2 +- .../reactingParcelFoam/cylinder/Allrun.pre | 14 --- .../reactingParcelFoam/hotBoxes/Allrun | 2 +- .../hotBoxes/Allrun-parallel | 2 +- .../reactingParcelFoam/hotBoxes/Allrun.pre | 34 ------- .../reactingParcelFoam/rivuletPanel/Allrun | 2 +- .../rivuletPanel/Allrun.pre | 14 --- .../reactingParcelFoam/splashPanel/Allrun | 2 +- .../reactingParcelFoam/splashPanel/Allrun.pre | 31 ------ .../mesh/foamyHexMesh/mixerVessel/Allrun | 27 ++++- .../mesh/foamyHexMesh/mixerVessel/Allrun-pre | 99 ------------------- .../mixerVessel/Allrun-simulation | 31 ------ .../interFoam/RAS/mixerVesselAMI/Allrun | 4 +- .../interFoam/RAS/mixerVesselAMI/Allrun.pre | 20 ---- .../interPhaseChangeDyMFoam/propeller/Allrun | 2 +- .../propeller/Allrun.pre | 25 ----- 26 files changed, 39 insertions(+), 367 deletions(-) delete mode 100755 tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun.pre delete mode 100755 tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun.pre delete mode 100755 tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun.pre delete mode 100755 tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre delete mode 100755 tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre delete mode 100755 tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre delete mode 100755 tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre delete mode 100755 tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre delete mode 100755 tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre delete mode 100755 tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation delete mode 100755 tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre delete mode 100755 tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun index 4327bbbc17..3fdeb02e58 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun @@ -4,11 +4,10 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication $(getApplication) & ./externalSolver - #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun-parallel b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun-parallel index e4ef2fce86..b7c20bd6a8 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun-parallel +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun-parallel @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication decomposePar @@ -12,5 +12,4 @@ runParallel $(getApplication) & ./externalSolver - #------------------------------------------------------------------------------ diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun.pre b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun.pre deleted file mode 100755 index 3a03bb1e87..0000000000 --- a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allrun.pre +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -runApplication blockMesh -runApplication createExternalCoupledPatchGeometry T - - -#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun index 25d83d176d..e6a19278ee 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun +++ b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun @@ -4,6 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication $(getApplication) diff --git a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun-parallel b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun-parallel index 3f7cab5d82..851eaa6c43 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun-parallel +++ b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun-parallel @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication decomposePar diff --git a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun.pre b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun.pre deleted file mode 100755 index 22c5c016de..0000000000 --- a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allrun.pre +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -runApplication blockMesh - -runApplication topoSet -constant - -# Split the mesh to generate the ACMI coupled patches -runApplication createBaffles -overwrite - -#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun index 63ee3a47d8..63e46ba9fa 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun +++ b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication decomposePar runParallel $(getApplication) diff --git a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun.pre b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun.pre deleted file mode 100755 index cd4ebcd8c7..0000000000 --- a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allrun.pre +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Copy propeller surface from resources directory -cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/ - -# Meshing -runApplication blockMesh -runApplication surfaceFeatures -runApplication snappyHexMesh -overwrite - -# Generate face/cell sets and zones -runApplication topoSet -dict system/createInletOutletSets.topoSetDict - -# Create the inlet/outlet and AMI patches -runApplication createPatch -overwrite - -runApplication renumberMesh -noFields -overwrite - -# Test by running moveDynamicMes -#runApplication moveDynamicMesh -checkAMI - -#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun index f2a840a041..543733e495 100755 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory if [ -n "$FOAMY_HEX_MESH" ] then - ./Allrun.pre + ./Allmesh runApplication $(getApplication) fi diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre deleted file mode 100755 index 9a95d04cbd..0000000000 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allrun.pre +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -runApplication surfaceFeatures - -runApplication foamyHexMesh - -# Collapse only patch faces from incomplete conformation -runApplication -s indirectPatchFaces \ - collapseEdges -collapseFaceSet indirectPatchFaces -latestTime -overwrite - -# Collapse small edges and sliver faces -runApplication -s collapseFaces \ - collapseEdges -collapseFaces -latestTime -overwrite - -runApplication checkMesh -allTopology -allGeometry -latestTime - -latestTime=`foamListTimes -latestTime` - -# Move the mesh into polyMesh -rm -rf constant/polyMesh -mv "${latestTime}"/polyMesh constant - -# Clean up intermediate meshes -rm -r [1-9]* - -#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun index 7527fc7de4..def1062b02 100755 --- a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh application=$(getApplication) diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre deleted file mode 100755 index 8df6b2cd61..0000000000 --- a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allrun.pre +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -runApplication blockMesh - -#runApplication setSet -batch wallFilmRegion.setSet -runApplication topoSet - -runApplication extrudeToRegionMesh -overwrite - -paraFoam -touch -paraFoam -touch -region wallFilmRegion - -#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun index 5a14a641d1..65d1db1047 100755 --- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh cp -rf 0.orig 0 diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel index b659d3fee0..0dfd03b836 100755 --- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel +++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh application=$(getApplication) diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre deleted file mode 100755 index c8d4217fcb..0000000000 --- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun.pre +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -rm -rf 0 - -# create the underlying block mesh -runApplication blockMesh - -# create the set for the obstacles -runApplication topoSet - -# create the obstacles - add obstacle patches to wallFilm patch -runApplication subsetMesh c0 -patch wallFilm -overwrite - -# split the obstacle patches into cube[1-6]_patch[1-6] -runApplication ./patchifyObstacles - -# Create the wall film region via extrusion -runApplication extrudeToRegionMesh -overwrite - -# Copy the system settings over to the wall film region -rm -rf system/wallFilmRegion -cp -r system/wallFilmRegion.orig system/wallFilmRegion - -find ./0 -maxdepth 1 -type f -exec \ - sed -i -e "s/wallFilm/\"(region0_to.*)\"/g" {} \; - -paraFoam -touch -paraFoam -touch -region wallFilmRegion - -#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun index 7527fc7de4..def1062b02 100755 --- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh application=$(getApplication) diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre deleted file mode 100755 index 1b494b5aa3..0000000000 --- a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allrun.pre +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -runApplication blockMesh - -#runApplication setSet -batch wallFilmRegion.setSet -runApplication topoSet -dict system/wallFilmRegion.topoSet - -runApplication extrudeToRegionMesh -overwrite - -paraFoam -touch -paraFoam -touch -region wallFilmRegion - -#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun index 7527fc7de4..def1062b02 100755 --- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun +++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh application=$(getApplication) diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre deleted file mode 100755 index 81aad711d5..0000000000 --- a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allrun.pre +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -runApplication blockMesh - -#If using batch mode -#runApplication -s wallFilmRegion \ -# setSet -batch wallFilmRegion.setSet - -#If using dictionary mode -runApplication -s wallFilmRegion \ - topoSet -dict system/wallFilmRegion.topoSet - -runApplication extrudeToRegionMesh -overwrite - -#If using batch mode -#runApplication -s createWallFilmRegionPatches \ -# setSet -region wallFilmRegion \ -# -batch createWallFilmRegionPatches.setSet - -#If using dictionary mode -runApplication -s createWallFilmRegionPatches \ - topoSet -region wallFilmRegion \ - -dict system/createWallFilmRegionPatches.topoSet - -runApplication createPatch -region wallFilmRegion -overwrite - -paraFoam -touch -paraFoam -touch -region wallFilmRegion - -#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun index b66c25a9a4..ef76cac3ba 100755 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun @@ -5,9 +5,30 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions # Generate mesh -./Allrun-pre +./Allmesh -# Run simulation -./Allrun-simulation +cp system/controlDict.flow system/controlDict + +# Set application name +application=$(getApplication) + +runApplication createBaffles -overwrite +runApplication mergeOrSplitBaffles -split -overwrite + +# Get rid of zero faced patches +runApplication createPatch -overwrite + +# Initialize alpha +runApplication setFields + +# Decompose +runApplication -s main \ + decomposePar -force + +# Run +runParallel $application + +# Reconstruct +runApplication reconstructPar -noFunctionObjects #------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre deleted file mode 100755 index d22a716634..0000000000 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-pre +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -intersectSurfaces() -{ - outputName1=$(basename $1) - outputName1=${outputName1%.*} - - outputName2=$(basename $2) - outputName2=${outputName2%.*} - - runApplication -s $outputName1:$outputName2 \ - surfaceBooleanFeatures "$@" intersection -} - -# Set application name -application=$(getApplication) - -# Run the surface preparation script -./constant/triSurface/surfaceProcess.sh > log.surfaceProcess 2>&1 - -# Surface intersections -intersectSurfaces \ - constant/triSurface/vessel.stl \ - constant/triSurface/spargerShaft.stl \ - -perturb - -intersectSurfaces \ - constant/triSurface/vessel.stl \ - constant/triSurface/shaft.stl \ - -perturb - -intersectSurfaces \ - constant/triSurface/spargerShaft.stl \ - constant/triSurface/spargerInlet.stl \ - -perturb - -intersectSurfaces \ - constant/triSurface/stirrer.stl \ - constant/triSurface/shaftRotating.stl \ - -perturb - -intersectSurfaces \ - constant/triSurface/stirrer_baffles.stl \ - constant/triSurface/stirrer.stl \ - -surf1Baffle \ - -perturb - -intersectSurfaces \ - constant/triSurface/rotating.stl \ - constant/triSurface/shaft.stl \ - -surf1Baffle \ - -perturb - -# Intersect blades with the plate -for bladeI in $(seq 1 6); -do - intersectSurfaces \ - constant/triSurface/stirrer_baffles_$bladeI.obj \ - constant/triSurface/stirrer_baffles_plate.obj \ - -surf1Baffle \ - -surf2Baffle -done - -# Meshing -cp system/controlDict.mesh system/controlDict - -runApplication blockMesh -region backgroundMeshDecomposition - -runApplication -s backgroundMeshDecomposition \ - decomposePar -region backgroundMeshDecomposition - -runApplication surfaceFeatures - -runParallel foamyHexMesh - -runParallel -s faces \ - collapseEdges -collapseFaces -latestTime \ - -dict system/collapseDict.collapseFaces - -#runParallel -s faceSet \ -# collapseEdges -collapseFaceSet indirectPatchFaces -latestTime \ -# -dict system/collapseDict.indirectPatchFaces - -runParallel checkMesh -allTopology -allGeometry -latestTime - -runApplication reconstructParMesh -latestTime - -# Copy the mesh from the latest time folder into polyMesh and delete that -# latest time folder -latestTime=$(foamListTimes -latestTime) -cp -r $latestTime/polyMesh constant -rm -rf $latestTime - - -#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation deleted file mode 100755 index 967f8096fc..0000000000 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun-simulation +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -cp system/controlDict.flow system/controlDict - -# Set application name -application=$(getApplication) - -runApplication createBaffles -overwrite -runApplication mergeOrSplitBaffles -split -overwrite - -# Get rid of zero faced patches -runApplication createPatch -overwrite - -# Initialize alpha -runApplication setFields - -# Decompose -runApplication -s main \ - decomposePar -force - -# Run -runParallel $application - -# Reconstruct -runApplication reconstructPar -noFunctionObjects - -#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun index f35012c3e0..03e64e9cd1 100755 --- a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun +++ b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun @@ -6,8 +6,10 @@ cd ${0%/*} || exit 1 # Run from this directory application=$(getApplication) +./Allmesh -./Allrun.pre +# Initialize alpha +runApplication setFields # Decompose runApplication decomposePar -force diff --git a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre deleted file mode 100755 index 163a36e373..0000000000 --- a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allrun.pre +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Set application name -application=$(getApplication) - -# Meshing -runApplication blockMesh -runApplication surfaceFeatures -runApplication snappyHexMesh -overwrite -runApplication createBaffles -overwrite -runApplication mergeOrSplitBaffles -split -overwrite - -# Initialize alpha -runApplication setFields - -#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun index 59aa02e753..ba8edfc64e 100755 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun @@ -4,7 +4,7 @@ cd ${0%/*} || exit 1 # Run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions -./Allrun.pre +./Allmesh runApplication decomposePar diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre deleted file mode 100755 index 493f2ce5b5..0000000000 --- a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allrun.pre +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -cd ${0%/*} || exit 1 # Run from this directory - -# Source tutorial run functions -. $WM_PROJECT_DIR/bin/tools/RunFunctions - -# Copy propeller surface from resources directory -cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/ - -runApplication blockMesh -runApplication surfaceFeatures -runApplication snappyHexMesh -overwrite - -# Generate face/cell sets and zones -runApplication topoSet -dict system/createInletOutletSets.topoSetDict - -# Create the inlet/outlet and AMI patches -runApplication createPatch -overwrite - -runApplication renumberMesh -noFields -overwrite - -# Test by running moveDynamicMesh -#runApplication moveDynamicMesh -checkAMI - -#------------------------------------------------------------------------------ From c55eee0f6652f054c9291e0f87f2cbd6022eef61 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 17:09:43 +0100 Subject: [PATCH 19/91] adiabaticFlameT, equilibriumFlameT, mixtureAdiabaticFlameT: Rationalized the name of the properties dictionary which controls the operation of these utilities --- .../adiabaticFlameT/Make/options | 4 ++- .../adiabaticFlameT/adiabaticFlameT.C | 16 +++++------ .../{controlDict => adiabaticFlameTDict} | 0 .../equilibriumFlameT/Make/options | 4 ++- .../equilibriumFlameT/equilibriumFlameT.C | 16 +++++------ .../{controlDict => equilibriumFlameTDict} | 0 .../mixtureAdiabaticFlameT.C | 28 +++++++++---------- ...controlDict => mixtureAdiabaticFlameTDict} | 0 8 files changed, 36 insertions(+), 32 deletions(-) rename applications/utilities/thermophysical/adiabaticFlameT/{controlDict => adiabaticFlameTDict} (100%) rename applications/utilities/thermophysical/equilibriumFlameT/{controlDict => equilibriumFlameTDict} (100%) rename applications/utilities/thermophysical/mixtureAdiabaticFlameT/{controlDict => mixtureAdiabaticFlameTDict} (100%) diff --git a/applications/utilities/thermophysical/adiabaticFlameT/Make/options b/applications/utilities/thermophysical/adiabaticFlameT/Make/options index 6be7b16bd2..73aefe4bb9 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/Make/options +++ b/applications/utilities/thermophysical/adiabaticFlameT/Make/options @@ -1,2 +1,4 @@ -EXE_INC = -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + EXE_LIBS = -lspecie diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index 811af55bed..21a360e081 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,23 +52,23 @@ typedef species::thermo>, absoluteEnthalpy> int main(int argc, char *argv[]) { - argList::validArgs.append("control file"); + argList::validArgs.append("properties dictionary"); argList args(argc, argv); - const fileName controlFileName = args[1]; + const fileName propertiesDictName = args[1]; // Construct control dictionary - IFstream controlFile(controlFileName); + IFstream propertiesDict(propertiesDictName); - // Check controlFile stream is OK - if (!controlFile.good()) + // Check propertiesDict stream is OK + if (!propertiesDict.good()) { FatalErrorInFunction - << "Cannot read file " << controlFileName + << "Cannot read file " << propertiesDictName << exit(FatalError); } - dictionary control(controlFile); + dictionary control(propertiesDict); scalar P(readScalar(control.lookup("P"))); diff --git a/applications/utilities/thermophysical/adiabaticFlameT/controlDict b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameTDict similarity index 100% rename from applications/utilities/thermophysical/adiabaticFlameT/controlDict rename to applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameTDict diff --git a/applications/utilities/thermophysical/equilibriumFlameT/Make/options b/applications/utilities/thermophysical/equilibriumFlameT/Make/options index 6be7b16bd2..73aefe4bb9 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/Make/options +++ b/applications/utilities/thermophysical/equilibriumFlameT/Make/options @@ -1,2 +1,4 @@ -EXE_INC = -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + EXE_LIBS = -lspecie diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 23bfb8369f..505970a3aa 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,23 +54,23 @@ typedef species::thermo>, absoluteEnthalpy> int main(int argc, char *argv[]) { - argList::validArgs.append("control file"); + argList::validArgs.append("properties dictionary"); argList args(argc, argv); - const fileName controlFileName = args[1]; + const fileName propertiesDictName = args[1]; // Construct control dictionary - IFstream controlFile(controlFileName); + IFstream propertiesDict(propertiesDictName); - // Check controlFile stream is OK - if (!controlFile.good()) + // Check propertiesDict stream is OK + if (!propertiesDict.good()) { FatalErrorInFunction - << "Cannot read file " << controlFileName + << "Cannot read file " << propertiesDictName << abort(FatalError); } - dictionary control(controlFile); + dictionary control(propertiesDict); scalar P(readScalar(control.lookup("P"))); diff --git a/applications/utilities/thermophysical/equilibriumFlameT/controlDict b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameTDict similarity index 100% rename from applications/utilities/thermophysical/equilibriumFlameT/controlDict rename to applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameTDict diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C index 2d6b114ac2..0518db5bf6 100644 --- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C +++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,36 +52,36 @@ typedef species::thermo>, absoluteEnthalpy> int main(int argc, char *argv[]) { - argList::validArgs.append("control file"); + argList::validArgs.append("properties dictionary"); argList args(argc, argv); - const fileName controlFileName(args[1]); + const fileName propertiesFileName(args[1]); - // Construct control dictionary - IFstream controlFile(controlFileName); + // Construct properties dictionary + IFstream propertiesFile(propertiesFileName); - // Check controlFile stream is OK - if (!controlFile.good()) + // Check propertiesFile stream is OK + if (!propertiesFile.good()) { FatalErrorInFunction - << "Cannot read file " << controlFileName + << "Cannot read file " << propertiesFileName << abort(FatalError); } - dictionary control(controlFile); + dictionary properties(propertiesFile); - scalar P(readScalar(control.lookup("P"))); - scalar T0(readScalar(control.lookup("T0"))); - mixture rMix(control.lookup("reactants")); - mixture pMix(control.lookup("products")); + scalar P(readScalar(properties.lookup("P"))); + scalar T0(readScalar(properties.lookup("T0"))); + mixture rMix(properties.lookup("reactants")); + mixture pMix(properties.lookup("products")); Info<< nl << "Reading thermodynamic data dictionary" << endl; fileName thermoDataFileName(findEtcFile("thermoData/thermoData")); - // Construct control dictionary + // Construct properties dictionary IFstream thermoDataFile(thermoDataFileName); // Check thermoData stream is OK diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/controlDict b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameTDict similarity index 100% rename from applications/utilities/thermophysical/mixtureAdiabaticFlameT/controlDict rename to applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameTDict From a6e159ae5fd6d8e559b44426338e392008b83992 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 17:11:22 +0100 Subject: [PATCH 20/91] Make/options: Rationalized the layout of the EXE_INC statements --- applications/test/BinSum/Make/options | 2 -- applications/test/DynamicField/Make/options | 2 -- applications/test/DynamicList/Make/options | 2 -- applications/test/Field/Make/options | 2 -- applications/test/HashSet/Make/options | 2 -- applications/test/HashTable2/Make/options | 2 -- applications/test/HashTable3/Make/options | 2 -- applications/test/IOField/Make/options | 2 -- applications/test/IStringStream/Make/options | 2 -- applications/test/IndirectList/Make/options | 2 -- applications/test/Map/Make/options | 2 -- applications/test/Matrix/Make/options | 2 -- applications/test/NamedEnum/Make/options | 2 -- applications/test/ODE/Make/options | 4 +++- applications/test/OStringStream/Make/options | 2 -- applications/test/POSIX/Make/options | 2 -- applications/test/UniformField/Make/options | 2 -- applications/test/alloc/Make/options | 2 -- applications/test/dimensionedType/Make/options | 2 -- applications/test/dynamicIndexedOctree/Make/options | 3 ++- applications/test/error/Make/options | 2 -- applications/test/findTimes/Make/options | 2 -- applications/test/foamVersion/Make/options | 2 -- applications/test/mkdir/Make/options | 2 -- applications/test/mvBak/Make/options | 2 -- applications/test/pTraits/Make/options | 2 -- applications/test/primitivePatch/Make/options | 2 -- applications/test/simpleMatrix/Make/options | 2 -- applications/test/sizeof/Make/options | 2 -- applications/test/sort/Make/options | 2 -- applications/test/string/Make/options | 2 -- applications/test/stringList/Make/options | 2 -- applications/test/vectorTools/Make/options | 3 ++- applications/utilities/mesh/conversion/mshToFoam/Make/options | 2 -- .../utilities/thermophysical/equilibriumCO/Make/options | 4 +++- src/OpenFOAM/Make/options | 3 ++- 36 files changed, 12 insertions(+), 67 deletions(-) diff --git a/applications/test/BinSum/Make/options b/applications/test/BinSum/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/BinSum/Make/options +++ b/applications/test/BinSum/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/DynamicField/Make/options b/applications/test/DynamicField/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/DynamicField/Make/options +++ b/applications/test/DynamicField/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/DynamicList/Make/options b/applications/test/DynamicList/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/DynamicList/Make/options +++ b/applications/test/DynamicList/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/Field/Make/options b/applications/test/Field/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/Field/Make/options +++ b/applications/test/Field/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/HashSet/Make/options b/applications/test/HashSet/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/HashSet/Make/options +++ b/applications/test/HashSet/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/HashTable2/Make/options b/applications/test/HashTable2/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/HashTable2/Make/options +++ b/applications/test/HashTable2/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/HashTable3/Make/options b/applications/test/HashTable3/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/HashTable3/Make/options +++ b/applications/test/HashTable3/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/IOField/Make/options b/applications/test/IOField/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/IOField/Make/options +++ b/applications/test/IOField/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/IStringStream/Make/options b/applications/test/IStringStream/Make/options index 4e772fdf9d..e69de29bb2 100644 --- a/applications/test/IStringStream/Make/options +++ b/applications/test/IStringStream/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/IndirectList/Make/options b/applications/test/IndirectList/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/IndirectList/Make/options +++ b/applications/test/IndirectList/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/Map/Make/options b/applications/test/Map/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/Map/Make/options +++ b/applications/test/Map/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/Matrix/Make/options b/applications/test/Matrix/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/Matrix/Make/options +++ b/applications/test/Matrix/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/NamedEnum/Make/options b/applications/test/NamedEnum/Make/options index 4e772fdf9d..e69de29bb2 100644 --- a/applications/test/NamedEnum/Make/options +++ b/applications/test/NamedEnum/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/ODE/Make/options b/applications/test/ODE/Make/options index 6a97b686ac..d6b4edef2c 100644 --- a/applications/test/ODE/Make/options +++ b/applications/test/ODE/Make/options @@ -1,2 +1,4 @@ -EXE_INC = -I$(LIB_SRC)/ODE/lnInclude +EXE_INC = \ + -I$(LIB_SRC)/ODE/lnInclude + EXE_LIBS = -lODE diff --git a/applications/test/OStringStream/Make/options b/applications/test/OStringStream/Make/options index 4e772fdf9d..e69de29bb2 100644 --- a/applications/test/OStringStream/Make/options +++ b/applications/test/OStringStream/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/POSIX/Make/options b/applications/test/POSIX/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/POSIX/Make/options +++ b/applications/test/POSIX/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/UniformField/Make/options b/applications/test/UniformField/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/UniformField/Make/options +++ b/applications/test/UniformField/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/alloc/Make/options b/applications/test/alloc/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/alloc/Make/options +++ b/applications/test/alloc/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/dimensionedType/Make/options b/applications/test/dimensionedType/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/dimensionedType/Make/options +++ b/applications/test/dimensionedType/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/dynamicIndexedOctree/Make/options b/applications/test/dynamicIndexedOctree/Make/options index e2c7c2d103..afde706718 100644 --- a/applications/test/dynamicIndexedOctree/Make/options +++ b/applications/test/dynamicIndexedOctree/Make/options @@ -1,3 +1,4 @@ -EXE_INC = -I$(FOAM_SRC)/meshTools/lnInclude +EXE_INC = \ + -I$(FOAM_SRC)/meshTools/lnInclude EXE_LIBS = -lmeshTools diff --git a/applications/test/error/Make/options b/applications/test/error/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/error/Make/options +++ b/applications/test/error/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/findTimes/Make/options b/applications/test/findTimes/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/findTimes/Make/options +++ b/applications/test/findTimes/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/foamVersion/Make/options b/applications/test/foamVersion/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/foamVersion/Make/options +++ b/applications/test/foamVersion/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/mkdir/Make/options b/applications/test/mkdir/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/mkdir/Make/options +++ b/applications/test/mkdir/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/mvBak/Make/options b/applications/test/mvBak/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/mvBak/Make/options +++ b/applications/test/mvBak/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/pTraits/Make/options b/applications/test/pTraits/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/pTraits/Make/options +++ b/applications/test/pTraits/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/primitivePatch/Make/options b/applications/test/primitivePatch/Make/options index 4e772fdf9d..e69de29bb2 100644 --- a/applications/test/primitivePatch/Make/options +++ b/applications/test/primitivePatch/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/simpleMatrix/Make/options b/applications/test/simpleMatrix/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/simpleMatrix/Make/options +++ b/applications/test/simpleMatrix/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/sizeof/Make/options b/applications/test/sizeof/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/sizeof/Make/options +++ b/applications/test/sizeof/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/sort/Make/options b/applications/test/sort/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/sort/Make/options +++ b/applications/test/sort/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/string/Make/options b/applications/test/string/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/string/Make/options +++ b/applications/test/string/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/stringList/Make/options b/applications/test/stringList/Make/options index 6a9e9810b3..e69de29bb2 100644 --- a/applications/test/stringList/Make/options +++ b/applications/test/stringList/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/vectorTools/Make/options b/applications/test/vectorTools/Make/options index f695987c04..4fd76effed 100644 --- a/applications/test/vectorTools/Make/options +++ b/applications/test/vectorTools/Make/options @@ -1 +1,2 @@ -EXE_INC = -I$(FOAM_APP)/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools +EXE_INC = \ + -I$(FOAM_APP)/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/vectorTools diff --git a/applications/utilities/mesh/conversion/mshToFoam/Make/options b/applications/utilities/mesh/conversion/mshToFoam/Make/options index 4e772fdf9d..e69de29bb2 100644 --- a/applications/utilities/mesh/conversion/mshToFoam/Make/options +++ b/applications/utilities/mesh/conversion/mshToFoam/Make/options @@ -1,2 +0,0 @@ -/* EXE_INC = -I$(LIB_SRC)/finiteVolume/lnInclude */ -/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/utilities/thermophysical/equilibriumCO/Make/options b/applications/utilities/thermophysical/equilibriumCO/Make/options index 6be7b16bd2..73aefe4bb9 100644 --- a/applications/utilities/thermophysical/equilibriumCO/Make/options +++ b/applications/utilities/thermophysical/equilibriumCO/Make/options @@ -1,2 +1,4 @@ -EXE_INC = -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude +EXE_INC = \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude + EXE_LIBS = -lspecie diff --git a/src/OpenFOAM/Make/options b/src/OpenFOAM/Make/options index b1cc1a2d10..84591cccba 100644 --- a/src/OpenFOAM/Make/options +++ b/src/OpenFOAM/Make/options @@ -1,4 +1,5 @@ -EXE_INC = -I$(OBJECTS_DIR) +EXE_INC = \ + -I$(OBJECTS_DIR) LIB_LIBS = \ $(FOAM_LIBBIN)/libOSspecific.o \ From b012e13a492a14a8c9b0e002880f1227d4735dbc Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 17:37:43 +0100 Subject: [PATCH 21/91] foamToVTK::writeVTK: Added a standard functionObject configuration file --- .../foamToVTK/foamToVTK/writeVTK/controlDict | 81 ------------------- etc/caseDicts/postProcessing/fields/writeVTK | 21 +++++ 2 files changed, 21 insertions(+), 81 deletions(-) delete mode 100644 applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeVTK/controlDict create mode 100644 etc/caseDicts/postProcessing/fields/writeVTK diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeVTK/controlDict b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeVTK/controlDict deleted file mode 100644 index b269605472..0000000000 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK/writeVTK/controlDict +++ /dev/null @@ -1,81 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object controlDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// So we get a decent warning if we have multiple functionObject entries -// with the same name. -#inputMode error; - -application icoFoam; - -startFrom startTime; - -startTime 0; - -stopAt endTime; - -endTime 0.5; - -deltaT 0.005; - -writeControl timeStep; - -writeInterval 20; - -purgeWrite 0; - -writeFormat ascii; - -writePrecision 6; - -writeCompression uncompressed; - -timeFormat general; - -timePrecision 6; - -runTimeModifiable yes; - -functions -{ - writeVTK - { - type writeVTK; - - // Where to load it from - libs ("libfoamToVTK.so"); - - // When to write: - // timeStep (with optional writeInterval) - // writeTime (with optional writeInterval) - // adjustableTime - // runTime - // clockTime - // cpuTime - writeControl writeTime; - - // Write every writeInterval (only valid for timeStemp, writeTime) - writeInterval 1; - - // Interval of time (valid for adjustableTime, runTime, clockTime, - // cpuTime) - writeInterval 1; - - // Objects to write - objectNames (); - } -} - -// ************************************************************************* // diff --git a/etc/caseDicts/postProcessing/fields/writeVTK b/etc/caseDicts/postProcessing/fields/writeVTK new file mode 100644 index 0000000000..4392186a0a --- /dev/null +++ b/etc/caseDicts/postProcessing/fields/writeVTK @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Web: www.OpenFOAM.org + \\/ M anipulation | +------------------------------------------------------------------------------- +Description + Writes out specified objects in VTK format, + e.g. fields, stored on the case database. + +\*---------------------------------------------------------------------------*/ + +type writeVTK; +libs ("libfoamToVTK.so"); + +objects (); + +writeControl writeTime; + +// ************************************************************************* // From 49f853110b577ecd4e934b9de7c19c0deebb59cd Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 17:39:21 +0100 Subject: [PATCH 22/91] applications/utilities: Removed duplicate dictionaries --- .../advanced/collapseEdges/meshQualityDict | 67 ------------------- .../generation/snappyHexMesh/meshQualityDict | 21 ------ .../preProcessing/mapFieldsPar/mapFieldsDict | 36 ---------- 3 files changed, 124 deletions(-) delete mode 100644 applications/utilities/mesh/advanced/collapseEdges/meshQualityDict delete mode 100644 applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict delete mode 100644 applications/utilities/preProcessing/mapFieldsPar/mapFieldsDict diff --git a/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict b/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict deleted file mode 100644 index 43eb9a5836..0000000000 --- a/applications/utilities/mesh/advanced/collapseEdges/meshQualityDict +++ /dev/null @@ -1,67 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object meshQualityDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -//- Maximum non-orthogonality allowed. Set to 180 to disable. -maxNonOrtho 65; - -//- Max skewness allowed. Set to <0 to disable. -maxBoundarySkewness 50; - -//- Max skewness allowed. Set to <0 to disable. -maxInternalSkewness 10; - -//- Max concaveness allowed. Is angle (in degrees) below which concavity -// is allowed. 0 is straight face, <0 would be convex face. -// Set to 180 to disable. -maxConcave 80; - -//- Minimum pyramid volume. Is absolute volume of cell pyramid. -// Set to a sensible fraction of the smallest cell volume expected. -// Set to very negative number (e.g. -1E30) to disable. -minVol 1e-20; - -//- Minimum quality of the tet formed by the face-centre -// and variable base point minimum decomposition triangles and -// the cell centre. This has to be a positive number for tracking -// to work. Set to very negative number (e.g. -1E30) to -// disable. -// <0 = inside out tet, -// 0 = flat tet -// 1 = regular tet -minTetQuality 1e-30; - -//- Minimum face area. Set to <0 to disable. -minArea -1; - -//- Minimum face twist. Set to <-1 to disable. dot product of face normal -// and face centre triangles normal -minTwist 0.0; - -//- Minimum normalised cell determinant -// 1 = hex, <= 0 = folded or flattened illegal cell -minDeterminant 0.001; - -//- minFaceWeight (0 -> 0.5) -minFaceWeight 0.02; - -//- minVolRatio (0 -> 1) -minVolRatio 0.01; - -//must be >0 for Fluent compatibility -minTriangleTwist -1; - - -// ************************************************************************* // diff --git a/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict b/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict deleted file mode 100644 index 47125f2b40..0000000000 --- a/applications/utilities/mesh/generation/snappyHexMesh/meshQualityDict +++ /dev/null @@ -1,21 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object meshQualityDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Include defaults parameters from master dictionary -#includeEtc "caseDicts/mesh/generation/meshQualityDict" - - -// ************************************************************************* // diff --git a/applications/utilities/preProcessing/mapFieldsPar/mapFieldsDict b/applications/utilities/preProcessing/mapFieldsPar/mapFieldsDict deleted file mode 100644 index 470250179f..0000000000 --- a/applications/utilities/preProcessing/mapFieldsPar/mapFieldsDict +++ /dev/null @@ -1,36 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - object mapFieldsParDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Specify how to map patches. There are three different options: -// - patch exists in the source case: specify mapping (patchMap) -// - patch should be interpolated from internal values in source case -// (cuttingPatches) -// - patch should not be mapped. Default if not in patchMap or cuttingPatches - -// List of pairs of target/source patches for mapping -patchMap -( - lid movingWall -); - -// List of target patches cutting the source domain (these need to be -// handled specially e.g. interpolated from internal values) -cuttingPatches -( - fixedWalls -); - -// ************************************************************************* // From 2bd229df0216b01fa9cb58e9d20b9acbd76d86a5 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 17:40:12 +0100 Subject: [PATCH 23/91] tutorials: Added the new Allmesh scripts --- .../externalCoupledCavity/Allmesh | 10 ++ .../RAS/oscillatingInletACMI2D/Allmesh | 14 +++ .../pimpleFoam/RAS/propeller/Allmesh | 26 +++++ .../straightDuctImplicit/Allmesh | 30 ++++++ .../reactingParcelFoam/cylinder/Allmesh | 14 +++ .../reactingParcelFoam/hotBoxes/Allmesh | 34 +++++++ .../reactingParcelFoam/rivuletPanel/Allmesh | 14 +++ .../reactingParcelFoam/splashPanel/Allmesh | 31 ++++++ .../mesh/foamyHexMesh/mixerVessel/Allmesh | 99 +++++++++++++++++++ .../interFoam/RAS/mixerVesselAMI/Allmesh | 17 ++++ .../interPhaseChangeDyMFoam/propeller/Allmesh | 25 +++++ 11 files changed, 314 insertions(+) create mode 100755 tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allmesh create mode 100755 tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allmesh create mode 100755 tutorials/incompressible/pimpleFoam/RAS/propeller/Allmesh create mode 100755 tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allmesh create mode 100755 tutorials/lagrangian/reactingParcelFoam/cylinder/Allmesh create mode 100755 tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allmesh create mode 100755 tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allmesh create mode 100755 tutorials/lagrangian/reactingParcelFoam/splashPanel/Allmesh create mode 100755 tutorials/mesh/foamyHexMesh/mixerVessel/Allmesh create mode 100755 tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allmesh create mode 100755 tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allmesh b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allmesh new file mode 100755 index 0000000000..c699eef1ae --- /dev/null +++ b/tutorials/heatTransfer/buoyantSimpleFoam/externalCoupledCavity/Allmesh @@ -0,0 +1,10 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh +runApplication createExternalCoupledPatchGeometry T + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allmesh b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allmesh new file mode 100755 index 0000000000..22c5c016de --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/RAS/oscillatingInletACMI2D/Allmesh @@ -0,0 +1,14 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +runApplication topoSet -constant + +# Split the mesh to generate the ACMI coupled patches +runApplication createBaffles -overwrite + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/pimpleFoam/RAS/propeller/Allmesh b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allmesh new file mode 100755 index 0000000000..cd4ebcd8c7 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/RAS/propeller/Allmesh @@ -0,0 +1,26 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Copy propeller surface from resources directory +cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/ + +# Meshing +runApplication blockMesh +runApplication surfaceFeatures +runApplication snappyHexMesh -overwrite + +# Generate face/cell sets and zones +runApplication topoSet -dict system/createInletOutletSets.topoSetDict + +# Create the inlet/outlet and AMI patches +runApplication createPatch -overwrite + +runApplication renumberMesh -noFields -overwrite + +# Test by running moveDynamicMes +#runApplication moveDynamicMesh -checkAMI + +#------------------------------------------------------------------------------ diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allmesh b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allmesh new file mode 100755 index 0000000000..9a95d04cbd --- /dev/null +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/Allmesh @@ -0,0 +1,30 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication surfaceFeatures + +runApplication foamyHexMesh + +# Collapse only patch faces from incomplete conformation +runApplication -s indirectPatchFaces \ + collapseEdges -collapseFaceSet indirectPatchFaces -latestTime -overwrite + +# Collapse small edges and sliver faces +runApplication -s collapseFaces \ + collapseEdges -collapseFaces -latestTime -overwrite + +runApplication checkMesh -allTopology -allGeometry -latestTime + +latestTime=`foamListTimes -latestTime` + +# Move the mesh into polyMesh +rm -rf constant/polyMesh +mv "${latestTime}"/polyMesh constant + +# Clean up intermediate meshes +rm -r [1-9]* + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/cylinder/Allmesh b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allmesh new file mode 100755 index 0000000000..8df6b2cd61 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/cylinder/Allmesh @@ -0,0 +1,14 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +#runApplication setSet -batch wallFilmRegion.setSet +runApplication topoSet + +runApplication extrudeToRegionMesh -overwrite + +paraFoam -touch +paraFoam -touch -region wallFilmRegion + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allmesh b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allmesh new file mode 100755 index 0000000000..c8d4217fcb --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allmesh @@ -0,0 +1,34 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +rm -rf 0 + +# create the underlying block mesh +runApplication blockMesh + +# create the set for the obstacles +runApplication topoSet + +# create the obstacles - add obstacle patches to wallFilm patch +runApplication subsetMesh c0 -patch wallFilm -overwrite + +# split the obstacle patches into cube[1-6]_patch[1-6] +runApplication ./patchifyObstacles + +# Create the wall film region via extrusion +runApplication extrudeToRegionMesh -overwrite + +# Copy the system settings over to the wall film region +rm -rf system/wallFilmRegion +cp -r system/wallFilmRegion.orig system/wallFilmRegion + +find ./0 -maxdepth 1 -type f -exec \ + sed -i -e "s/wallFilm/\"(region0_to.*)\"/g" {} \; + +paraFoam -touch +paraFoam -touch -region wallFilmRegion + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allmesh b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allmesh new file mode 100755 index 0000000000..1b494b5aa3 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/rivuletPanel/Allmesh @@ -0,0 +1,14 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +#runApplication setSet -batch wallFilmRegion.setSet +runApplication topoSet -dict system/wallFilmRegion.topoSet + +runApplication extrudeToRegionMesh -overwrite + +paraFoam -touch +paraFoam -touch -region wallFilmRegion + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allmesh b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allmesh new file mode 100755 index 0000000000..81aad711d5 --- /dev/null +++ b/tutorials/lagrangian/reactingParcelFoam/splashPanel/Allmesh @@ -0,0 +1,31 @@ +#!/bin/sh +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +runApplication blockMesh + +#If using batch mode +#runApplication -s wallFilmRegion \ +# setSet -batch wallFilmRegion.setSet + +#If using dictionary mode +runApplication -s wallFilmRegion \ + topoSet -dict system/wallFilmRegion.topoSet + +runApplication extrudeToRegionMesh -overwrite + +#If using batch mode +#runApplication -s createWallFilmRegionPatches \ +# setSet -region wallFilmRegion \ +# -batch createWallFilmRegionPatches.setSet + +#If using dictionary mode +runApplication -s createWallFilmRegionPatches \ + topoSet -region wallFilmRegion \ + -dict system/createWallFilmRegionPatches.topoSet + +runApplication createPatch -region wallFilmRegion -overwrite + +paraFoam -touch +paraFoam -touch -region wallFilmRegion + +#------------------------------------------------------------------------------ diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allmesh b/tutorials/mesh/foamyHexMesh/mixerVessel/Allmesh new file mode 100755 index 0000000000..d22a716634 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allmesh @@ -0,0 +1,99 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +intersectSurfaces() +{ + outputName1=$(basename $1) + outputName1=${outputName1%.*} + + outputName2=$(basename $2) + outputName2=${outputName2%.*} + + runApplication -s $outputName1:$outputName2 \ + surfaceBooleanFeatures "$@" intersection +} + +# Set application name +application=$(getApplication) + +# Run the surface preparation script +./constant/triSurface/surfaceProcess.sh > log.surfaceProcess 2>&1 + +# Surface intersections +intersectSurfaces \ + constant/triSurface/vessel.stl \ + constant/triSurface/spargerShaft.stl \ + -perturb + +intersectSurfaces \ + constant/triSurface/vessel.stl \ + constant/triSurface/shaft.stl \ + -perturb + +intersectSurfaces \ + constant/triSurface/spargerShaft.stl \ + constant/triSurface/spargerInlet.stl \ + -perturb + +intersectSurfaces \ + constant/triSurface/stirrer.stl \ + constant/triSurface/shaftRotating.stl \ + -perturb + +intersectSurfaces \ + constant/triSurface/stirrer_baffles.stl \ + constant/triSurface/stirrer.stl \ + -surf1Baffle \ + -perturb + +intersectSurfaces \ + constant/triSurface/rotating.stl \ + constant/triSurface/shaft.stl \ + -surf1Baffle \ + -perturb + +# Intersect blades with the plate +for bladeI in $(seq 1 6); +do + intersectSurfaces \ + constant/triSurface/stirrer_baffles_$bladeI.obj \ + constant/triSurface/stirrer_baffles_plate.obj \ + -surf1Baffle \ + -surf2Baffle +done + +# Meshing +cp system/controlDict.mesh system/controlDict + +runApplication blockMesh -region backgroundMeshDecomposition + +runApplication -s backgroundMeshDecomposition \ + decomposePar -region backgroundMeshDecomposition + +runApplication surfaceFeatures + +runParallel foamyHexMesh + +runParallel -s faces \ + collapseEdges -collapseFaces -latestTime \ + -dict system/collapseDict.collapseFaces + +#runParallel -s faceSet \ +# collapseEdges -collapseFaceSet indirectPatchFaces -latestTime \ +# -dict system/collapseDict.indirectPatchFaces + +runParallel checkMesh -allTopology -allGeometry -latestTime + +runApplication reconstructParMesh -latestTime + +# Copy the mesh from the latest time folder into polyMesh and delete that +# latest time folder +latestTime=$(foamListTimes -latestTime) +cp -r $latestTime/polyMesh constant +rm -rf $latestTime + + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allmesh b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allmesh new file mode 100755 index 0000000000..73bdcda6c5 --- /dev/null +++ b/tutorials/multiphase/interFoam/RAS/mixerVesselAMI/Allmesh @@ -0,0 +1,17 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application=$(getApplication) + +# Meshing +runApplication blockMesh +runApplication surfaceFeatures +runApplication snappyHexMesh -overwrite +runApplication createBaffles -overwrite +runApplication mergeOrSplitBaffles -split -overwrite + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh new file mode 100755 index 0000000000..493f2ce5b5 --- /dev/null +++ b/tutorials/multiphase/interPhaseChangeDyMFoam/propeller/Allmesh @@ -0,0 +1,25 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Copy propeller surface from resources directory +cp $FOAM_TUTORIALS/resources/geometry/propellerTip.obj.gz constant/triSurface/ + +runApplication blockMesh +runApplication surfaceFeatures +runApplication snappyHexMesh -overwrite + +# Generate face/cell sets and zones +runApplication topoSet -dict system/createInletOutletSets.topoSetDict + +# Create the inlet/outlet and AMI patches +runApplication createPatch -overwrite + +runApplication renumberMesh -noFields -overwrite + +# Test by running moveDynamicMesh +#runApplication moveDynamicMesh -checkAMI + +#------------------------------------------------------------------------------ From 247378332db1de5a3ec2b7dbfe843450c15c2ba2 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 22:44:58 +0100 Subject: [PATCH 24/91] Relocated etc/caseDicts/foamyHexMeshDict -> etc/caseDicts/mesh/generation/foamyHexMeshDict --- etc/caseDicts/{ => mesh/generation}/foamyHexMeshDict | 0 .../straightDuctImplicit/system/foamyHexMeshDict | 10 +++------- .../mesh/foamyHexMesh/blob/system/foamyHexMeshDict | 8 +------- .../mesh/foamyHexMesh/flange/system/foamyHexMeshDict | 8 +------- .../foamyHexMesh/mixerVessel/system/foamyHexMeshDict | 8 +------- .../foamyHexMesh/simpleShapes/system/foamyHexMeshDict | 8 +------- 6 files changed, 7 insertions(+), 35 deletions(-) rename etc/caseDicts/{ => mesh/generation}/foamyHexMeshDict (100%) diff --git a/etc/caseDicts/foamyHexMeshDict b/etc/caseDicts/mesh/generation/foamyHexMeshDict similarity index 100% rename from etc/caseDicts/foamyHexMeshDict rename to etc/caseDicts/mesh/generation/foamyHexMeshDict diff --git a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/foamyHexMeshDict b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/foamyHexMeshDict index d1b78f3df7..7c0619339a 100644 --- a/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/foamyHexMeshDict +++ b/tutorials/incompressible/porousSimpleFoam/straightDuctImplicit/system/foamyHexMeshDict @@ -14,14 +14,13 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#includeEtc "caseDicts/foamyHexMeshDict" +#includeEtc "caseDicts/mesh/generation/foamyHexMeshDict" geometry { #include "meshDict.geometry" } - surfaceConformation { locationInMesh (-0.078 0.02 0.0); @@ -46,12 +45,12 @@ surfaceConformation boundaryAndFaceZones { featureMethod extendedFeatureEdgeMesh; - extendedFeatureEdgeMesh "boundaryAndFaceZones.extendedFeatureEdgeMesh"; + extendedFeatureEdgeMesh + "boundaryAndFaceZones.extendedFeatureEdgeMesh"; } } } - motionControl { defaultCellSize 0.0035; @@ -74,7 +73,6 @@ motionControl printVertexInfo off; } - polyMeshFiltering { filterEdges false; @@ -84,11 +82,9 @@ polyMeshFiltering writeBackgroundMeshDecomposition false; } - meshQualityControls { #include "meshQualityDict" } - // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/blob/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/blob/system/foamyHexMeshDict index 5f399eb98a..d7ffcbac57 100644 --- a/tutorials/mesh/foamyHexMesh/blob/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/blob/system/foamyHexMeshDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/foamyHexMeshDict" +#includeEtc "caseDicts/mesh/generation/foamyHexMeshDict" geometry { @@ -33,7 +33,6 @@ geometry } } - backgroundMeshDecomposition { minLevels 0; @@ -42,7 +41,6 @@ backgroundMeshDecomposition maxCellWeightCoeff 20; } - initialPoints { initialPointsMethod autoDensity; @@ -62,7 +60,6 @@ initialPoints } } - surfaceConformation { locationInMesh (0.1 0.1 0.2); @@ -85,7 +82,6 @@ surfaceConformation } } - motionControl { defaultCellSize 0.1; @@ -121,11 +117,9 @@ motionControl timeChecks no; } - meshQualityControls { #include "meshQualityDict" } - // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict index 5b3c0ba8a3..7d6bdd6313 100644 --- a/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/foamyHexMeshDict" +#includeEtc "caseDicts/mesh/generation/foamyHexMeshDict" // Any scalar with a name Coeff specifies a value that will be implemented // as a faction of the target cell size @@ -25,7 +25,6 @@ geometry #include "meshDict.geometry" } - initialPoints { initialPointsMethod autoDensity; @@ -39,7 +38,6 @@ initialPoints } } - surfaceConformation { locationInMesh (0 0 0); @@ -93,7 +91,6 @@ surfaceConformation } } - motionControl { defaultCellSize 0.0008; @@ -159,7 +156,6 @@ motionControl timeChecks no; } - backgroundMeshDecomposition { minLevels 1; @@ -168,11 +164,9 @@ backgroundMeshDecomposition maxCellWeightCoeff 10; } - meshQualityControls { #include "meshQualityDict" } - // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict index 4afd37873e..48e6795ff2 100644 --- a/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict @@ -14,14 +14,13 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#includeEtc "caseDicts/foamyHexMeshDict" +#includeEtc "caseDicts/mesh/generation/foamyHexMeshDict" geometry { #include "meshDict.geometry" } - initialPoints { // initialPointsMethod pointFile; @@ -44,7 +43,6 @@ initialPoints } } - surfaceConformation { locationInMesh (0 0.1 1.0); @@ -65,7 +63,6 @@ surfaceConformation } } - motionControl { defaultCellSize 6e-3; @@ -86,7 +83,6 @@ motionControl timeChecks no; } - backgroundMeshDecomposition { minLevels 1; @@ -95,7 +91,6 @@ backgroundMeshDecomposition maxCellWeightCoeff 20; } - polyMeshFiltering { writeBackgroundMeshDecomposition true; @@ -105,5 +100,4 @@ polyMeshFiltering filterFaces off; } - // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict index 4eea925e0a..4f3feae819 100644 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict @@ -15,7 +15,7 @@ FoamFile // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Include defaults parameters from master dictionary -#includeEtc "caseDicts/foamyHexMeshDict" +#includeEtc "caseDicts/mesh/generation/foamyHexMeshDict" geometry { @@ -41,7 +41,6 @@ geometry } - surfaceConformation { locationInMesh (0 -0.5 0); @@ -99,7 +98,6 @@ surfaceConformation } } - initialPoints { initialPointsMethod autoDensity; @@ -114,7 +112,6 @@ initialPoints } } - motionControl { defaultCellSize 0.1; @@ -190,7 +187,6 @@ motionControl timeChecks no; } - // After simulation, when converting to polyMesh, filter out small faces/edges. // Do not change. See cvControls.H polyMeshFiltering @@ -200,11 +196,9 @@ polyMeshFiltering writeTetDualMesh false; } - meshQualityControls { #include "meshQualityDict" } - // ************************************************************************* // From efd555cd2d3e02473b0d3a42c92cf5eadeb5cd92 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 10 Jun 2018 22:45:46 +0100 Subject: [PATCH 25/91] rhoPimpleFoam: Only execute the density predictor if not in simpleRho mode --- applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C index 36287119d3..a296f96e05 100644 --- a/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C +++ b/applications/solvers/compressible/rhoPimpleFoam/rhoPimpleFoam.C @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) } } - if (pimple.firstIter()) + if (pimple.firstIter() && !pimple.simpleRho()) { #include "rhoEqn.H" } From a2d222b3ebbaff8199116eebd0d80b8d048557b6 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 11 Jun 2018 08:24:12 +0100 Subject: [PATCH 26/91] tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel: Added missing cp Resolves bug-report https://bugs.openfoam.org/view.php?id=2976 --- .../lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel index 0dfd03b836..1c0d398357 100755 --- a/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel +++ b/tutorials/lagrangian/reactingParcelFoam/hotBoxes/Allrun-parallel @@ -6,6 +6,8 @@ cd ${0%/*} || exit 1 # Run from this directory ./Allmesh +cp -rf 0.orig 0 + application=$(getApplication) runApplication -s primaryRegion decomposePar From dc2c1e2d6d62717cd05ff6d7d87e1ab25c2daefe Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 11 Jun 2018 10:33:59 +0100 Subject: [PATCH 27/91] foamDictionary: Removed unused -case option Resolves bug-report https://bugs.openfoam.org/view.php?id=2974 --- .../utilities/miscellaneous/foamDictionary/foamDictionary.C | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C index 881be1d847..6af0c78d9c 100644 --- a/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C +++ b/applications/utilities/miscellaneous/foamDictionary/foamDictionary.C @@ -240,6 +240,7 @@ int main(int argc, char *argv[]) { writeInfoHeader = false; + argList::removeOption("case"); argList::addNote("manipulates dictionaries"); argList::validArgs.append("dictionary file"); argList::addBoolOption("keywords", "list keywords"); From 88a218ce842978f845a0215f00cacb1698269f01 Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 7 Jun 2018 14:04:48 +0100 Subject: [PATCH 28/91] treeBoundBox: Removed unecessary randomisation Tree bound boxes are expanded asymmetrically to reduce the liklihood of octree faces aliging with mesh faces and edges. The asymmetry is now generated using hard-coded irrational numbers, rather than using a random generator. The asymmetry was effectively already hard coded. The random numbers are only pseudo random, so the same numbers were being applied to the bound boxes every time. This change simply removes the overhead of creating the generator, and also gets rid of some duplicated code. --- .../backgroundMeshDecomposition.C | 4 +-- .../conformalVoronoiMeshConformToSurface.C | 10 ++----- .../conformationSurfaces.C | 3 -- .../autoDensity/autoDensity.C | 6 +--- .../viewFactorsGen/searchingEngine.H | 2 +- .../surface/surfaceHookUp/surfaceHookUp.C | 5 +--- .../surfaceRedistributePar.C | 7 +---- src/OpenFOAM/meshes/polyMesh/polyMesh.C | 10 +------ .../meshes/treeBoundBox/treeBoundBox.H | 7 ++--- .../meshes/treeBoundBox/treeBoundBoxI.H | 29 +++++++----------- .../polyMeshAdder/faceCoupleInfo.C | 4 +-- .../basic/InteractionLists/InteractionLists.C | 6 ++-- .../meshRefinement/meshRefinement.C | 5 +--- .../refinementFeatures/refinementFeatures.C | 14 ++------- .../snappySnapDriverFeature.C | 11 +------ .../extendedEdgeMesh/extendedEdgeMesh.C | 30 ++----------------- .../mappedPolyPatch/mappedPatchBase.C | 20 ++----------- src/meshTools/meshSearch/meshSearch.C | 12 +++----- .../triSurfaceMesh/triSurfaceMesh.C | 8 +---- .../triSurfaceSearch/triSurfaceRegionSearch.C | 8 +---- .../triSurfaceSearch/triSurfaceSearch.C | 7 +---- src/sampling/probes/patchProbes.C | 5 +--- .../sampledSet/patchCloud/patchCloudSet.C | 11 +------ .../sampledTriSurfaceMesh.C | 5 +--- 24 files changed, 43 insertions(+), 186 deletions(-) diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index 7889a6ea34..c55a003322 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -692,8 +692,6 @@ void Foam::backgroundMeshDecomposition::buildPatchAndTree() // Overall bb treeBoundBox overallBb(boundaryFacesPtr_().localPoints()); - Random& rnd = rndGen_; - bFTreePtr_.reset ( new indexedOctree @@ -704,7 +702,7 @@ void Foam::backgroundMeshDecomposition::buildPatchAndTree() boundaryFacesPtr_(), indexedOctree::perturbTol() ), - overallBb.extend(rnd, 1e-4), + overallBb.extend(1e-4), 10, // maxLevel 10, // leafSize 3.0 // duplicity diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 4036f750a2..ba0f5ed19e 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -1978,12 +1978,9 @@ void Foam::conformalVoronoiMesh::buildEdgeLocationTree { treeBoundBox overallBb ( - geometryToConformTo_.globalBounds().extend(rndGen_, 1e-4) + geometryToConformTo_.globalBounds().extend(1e-4) ); - overallBb.min() -= Foam::point(rootVSmall, rootVSmall, rootVSmall); - overallBb.max() += Foam::point(rootVSmall, rootVSmall, rootVSmall); - edgeLocationTreePtr_.reset ( new dynamicIndexedOctree @@ -2005,12 +2002,9 @@ void Foam::conformalVoronoiMesh::buildSurfacePtLocationTree { treeBoundBox overallBb ( - geometryToConformTo_.globalBounds().extend(rndGen_, 1e-4) + geometryToConformTo_.globalBounds().extend(1e-4) ); - overallBb.min() -= Foam::point(rootVSmall, rootVSmall, rootVSmall); - overallBb.max() += Foam::point(rootVSmall, rootVSmall, rootVSmall); - surfacePtLocationTreePtr_.reset ( new dynamicIndexedOctree diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index 7f5b8e7a06..5de4b45de6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -558,10 +558,7 @@ Foam::conformationSurfaces::conformationSurfaces // Extend the global bounds to stop the bound box sitting on the surfaces // to be conformed to - // globalBounds_ = globalBounds_.extend(rndGen_, 1e-4); - vector newSpan = 1e-4*globalBounds_.span(); - globalBounds_.min() -= newSpan; globalBounds_.max() += newSpan; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C index c41a8568e2..b7e2a03dba 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/autoDensity/autoDensity.C @@ -919,11 +919,7 @@ List autoDensity::initialPoints() const else { // Extend the global box to move it off large plane surfaces - hierBB = geometryToConformTo().globalBounds().extend - ( - rndGen(), - 1e-6 - ); + hierBB = geometryToConformTo().globalBounds().extend(1e-6); } DynamicList initialPoints; diff --git a/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H b/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H index 3711aff9bf..4518cfc327 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H +++ b/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H @@ -7,7 +7,7 @@ List meshBb treeBoundBox ( boundBox(coarseMesh.points(), false) - ).extend(rndGen, 1e-3) + ).extend(1e-3) ); // Dummy bounds dictionary diff --git a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C index a376bf65c8..074faecdad 100644 --- a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C +++ b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C @@ -174,12 +174,9 @@ void createBoundaryEdgeTrees // geometry there are less face/edge aligned items. treeBoundBox bb ( - treeBoundBox(UList(surf.localPoints())).extend(rndGen, 1e-4) + treeBoundBox(UList(surf.localPoints())).extend(1e-4) ); - bb.min() -= point(rootVSmall, rootVSmall, rootVSmall); - bb.max() += point(rootVSmall, rootVSmall, rootVSmall); - bEdgeTrees.set ( surfI, diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C index e825a1397a..ee419d0bcf 100644 --- a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C +++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C @@ -144,18 +144,13 @@ int main(int argc, char *argv[]) #include "createPolyMesh.H" - Random rndGen(653213); - // Determine mesh bounding boxes: List> meshBb(Pstream::nProcs()); { meshBb[Pstream::myProcNo()] = List ( 1, - treeBoundBox - ( - boundBox(mesh.points(), false) - ).extend(rndGen, 1e-3) + treeBoundBox(boundBox(mesh.points(), false)).extend(1e-3) ); Pstream::gatherList(meshBb); Pstream::scatterList(meshBb); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index c9a0011d46..5aca1df365 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -876,14 +876,6 @@ Foam::polyMesh::cellTree() const { if (cellTreePtr_.empty()) { - treeBoundBox overallBb(points()); - - static Random rndGen(261782); - - overallBb = overallBb.extend(rndGen, 1e-4); - overallBb.min() -= point(rootVSmall, rootVSmall, rootVSmall); - overallBb.max() += point(rootVSmall, rootVSmall, rootVSmall); - cellTreePtr_.reset ( new indexedOctree @@ -894,7 +886,7 @@ Foam::polyMesh::cellTree() const *this, CELL_TETS // use tet-decomposition for any inside test ), - overallBb, + treeBoundBox(points()).extend(1e-4), 8, // maxLevel 10, // leafsize 5.0 // duplicity diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H index 8c35577fd8..3dcf163ffb 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBox.H @@ -344,10 +344,9 @@ public: // 0 : none of the above. label distanceCmp(const point&, const treeBoundBox& other) const; - //- Return slightly wider bounding box - // Extends all dimensions with s*span*Random::scalar01() - // and guarantees in any direction s*mag(span) minimum width - inline treeBoundBox extend(Random&, const scalar s) const; + //- Return asymetrically extended bounding box, with guaranteed + // minimum width of s*mag(span) in any direction + inline treeBoundBox extend(const scalar s) const; // Write diff --git a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H index 3480eac00d..a4c24794c7 100644 --- a/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H +++ b/src/OpenFOAM/meshes/treeBoundBox/treeBoundBoxI.H @@ -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-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -312,27 +312,18 @@ inline void Foam::treeBoundBox::searchOrder } -//- Return slightly wider bounding box -inline Foam::treeBoundBox Foam::treeBoundBox::extend -( - Random& rndGen, - const scalar s -) const +inline Foam::treeBoundBox Foam::treeBoundBox::extend(const scalar s) const { + // Numbers that don't approximate rational fractions with which to make the + // box asymmetric. These are between one and two. + static const vector a = vector::uniform(sqrt(1.25) + 0.5); + static const vector b = vector::uniform(sqrt(2.0)); + treeBoundBox bb(*this); - vector newSpan = bb.span(); - - // Make 3D - scalar minSpan = s * Foam::mag(newSpan); - - for (direction dir = 0; dir < vector::nComponents; dir++) - { - newSpan[dir] = Foam::max(newSpan[dir], minSpan); - } - - bb.min() -= cmptMultiply(s * rndGen.vector01(), newSpan); - bb.max() += cmptMultiply(s * rndGen.vector01(), newSpan); + const scalar delta = s*Foam::mag(bb.span()); + bb.min() -= Foam::max(delta*a, vector::uniform(rootVSmall)); + bb.max() += Foam::max(delta*b, vector::uniform(rootVSmall)); return bb; } diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C index 57f7d25f8c..b67eb12971 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C @@ -980,8 +980,6 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster treeBoundBox overallBb(mesh0.points()); - Random rndGen(123456); - indexedOctree tree ( treeDataFace // all information needed to search faces @@ -990,7 +988,7 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster mesh0, bndFaces // boundary faces only ), - overallBb.extend(rndGen, 1e-4), // overall search domain + overallBb.extend(1e-4), // overall search domain 8, // maxLevel 10, // leafsize 3.0 // duplicity diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index b223232bd3..f5bd5fd873 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,8 +39,6 @@ void Foam::InteractionLists::buildInteractionLists() Info<< "Building InteractionLists with interaction distance " << maxDistance_ << endl; - Random rndGen(419715); - const vector interactionVec = maxDistance_*vector::one; treeBoundBox procBb(treeBoundBox(mesh_.points())); @@ -158,7 +156,7 @@ void Foam::InteractionLists::buildInteractionLists() treeBoundBox procBbRndExt ( - treeBoundBox(mesh_.points()).extend(rndGen, 1e-4) + treeBoundBox(mesh_.points()).extend(1e-4) ); indexedOctree coupledPatchRangeTree diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 887ce8dd8b..752da9f25e 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -2402,13 +2402,10 @@ void Foam::meshRefinement::distribute(const mapDistributePolyMesh& map) // Redistribute surface and any fields on it. { - Random rndGen(653213); - // Get local mesh bounding box. Single box for now. List meshBb(1); treeBoundBox& bb = meshBb[0]; - bb = treeBoundBox(mesh_.points()); - bb = bb.extend(rndGen, 1e-4); + bb = treeBoundBox(mesh_.points()).extend(1e-4); // Distribute all geometry (so refinementSurfaces and shellSurfaces) searchableSurfaces& geometry = diff --git a/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C index d8bb33a50c..e9091dc684 100644 --- a/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C +++ b/src/mesh/snappyHexMesh/refinementFeatures/refinementFeatures.C @@ -253,14 +253,9 @@ void Foam::refinementFeatures::buildTrees(const label featI) // Calculate bb of all points treeBoundBox bb(points); - // Random number generator. Bit dodgy since not exactly random ;-) - Random rndGen(65431); - // Slightly extended bb. Slightly off-centred just so on symmetric // geometry there are less face/edge aligned items. - bb = bb.extend(rndGen, 1e-4); - bb.min() -= point(rootVSmall, rootVSmall, rootVSmall); - bb.max() += point(rootVSmall, rootVSmall, rootVSmall); + bb = bb.extend(1e-4); edgeTrees_.set ( @@ -394,14 +389,9 @@ Foam::refinementFeatures::regionEdgeTrees() const // Calculate bb of all points treeBoundBox bb(points); - // Random number generator. Bit dodgy since not exactly random ;-) - Random rndGen(65431); - // Slightly extended bb. Slightly off-centred just so on symmetric // geometry there are less face/edge aligned items. - bb = bb.extend(rndGen, 1e-4); - bb.min() -= point(rootVSmall, rootVSmall, rootVSmall); - bb.max() += point(rootVSmall, rootVSmall, rootVSmall); + bb = bb.extend(1e-4); trees.set ( diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C index 8f7adad32e..648253c86f 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C @@ -2466,16 +2466,7 @@ void Foam::snappySnapDriver::reverseAttractMeshPoints // Get search domain and extend it a bit treeBoundBox bb(pp.localPoints()); - { - // Random number generator. Bit dodgy since not exactly random ;-) - Random rndGen(65431); - - // Slightly extended bb. Slightly off-centred just so on symmetric - // geometry there are less face/edge aligned items. - bb = bb.extend(rndGen, 1e-4); - bb.min() -= point(rootVSmall, rootVSmall, rootVSmall); - bb.max() += point(rootVSmall, rootVSmall, rootVSmall); - } + bb = bb.extend(1e-4); // Collect candidate points for attraction DynamicList