From eaf5030600162e6d22a617c2b1ae08db5caf0ec9 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Wed, 2 Dec 2015 10:16:22 +0000 Subject: [PATCH 1/2] ENH: applyBoundaryLayer - determine compressibility automatically by the presence of a thermophysicalProperties file --- .../applyBoundaryLayer/applyBoundaryLayer.C | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index e00f12b48e..d55085ee33 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -33,6 +33,10 @@ Description the thickness coefficient supplied via the option -Cbl. If both options are provided -ybl is used. + Compressible modes is automatically selected based on the existence of the + "thermophysicalProperties" dictionary required to construct the + thermodynamics package. + \*---------------------------------------------------------------------------*/ #include "fvCFD.H" @@ -331,11 +335,6 @@ int main(int argc, char *argv[]) "scalar", "boundary-layer thickness as Cbl * mean distance to wall" ); - argList::addBoolOption - ( - "compressible", - "apply to compressible case" - ); #include "setRootCase.H" @@ -360,8 +359,6 @@ int main(int argc, char *argv[]) #include "createNamedMesh.H" #include "createFields.H" - const bool compressible = args.optionFound("compressible"); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Modify velocity by applying a 1/7th power law boundary-layer @@ -384,7 +381,15 @@ int main(int argc, char *argv[]) U.write(); - if (compressible) + if + ( + IOobject + ( + basicThermo::dictName, + runTime.constant(), + mesh + ).headerOk() + ) { calcCompressible(mesh, mask, U, y, ybl); } From 73dac8c7ee62090a2d2932e6df05e4976fde7570 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Wed, 2 Dec 2015 10:17:28 +0000 Subject: [PATCH 2/2] ENH: Updating utilities based on internal development line --- .../utilities/mesh/advanced/PDRMesh/PDRMesh.C | 3 +- .../mesh/advanced/PDRMesh/PDRMeshDict | 3 +- .../createBaffles/createBaffles.C | 4 +- .../manipulation/createPatch/createPatch.C | 25 +- .../manipulation/flattenMesh/flattenMesh.C | 2 + .../manipulation/mergeMeshes/mergeMeshes.C | 15 +- .../manipulation/mirrorMesh/mirrorFvMesh.C | 26 +- .../mesh/manipulation/mirrorMesh/mirrorMesh.C | 2 +- .../manipulation/renumberMesh/renumberMesh.C | 204 ++++++-- .../renumberMesh/renumberMeshDict | 2 + .../mesh/manipulation/splitMesh/splitMesh.C | 3 +- .../mesh/manipulation/stitchMesh/stitchMesh.C | 2 +- .../mesh/manipulation/subsetMesh/subsetMesh.C | 229 ++++++++- .../mesh/manipulation/topoSet/topoSetDict | 29 +- .../transformPoints/transformPoints.C | 2 + .../foamDebugSwitches/foamDebugSwitches.C | 6 +- .../dataConversion/foamToVTK/foamToVTK.C | 66 ++- .../dataConversion/foamToVTK/internalWriter.H | 15 + .../foamToVTK/internalWriterTemplates.C | 36 +- .../dataConversion/foamToVTK/writeFuns.H | 16 +- .../foamToVTK/writeFunsTemplates.C | 26 +- .../PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H | 30 +- .../vtkPV4Foam/vtkPV4FoamFields.C | 23 +- .../vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H | 28 ++ .../vtkPV4Foam/vtkPV4FoamVolFields.H | 457 ++++++++++-------- .../particleTracks/particleTracks.C | 4 +- .../steadyParticleTracks.C | 4 +- .../execFlowFunctionObjects.C | 6 +- .../postProcessing/miscellaneous/ptot/ptot.C | 2 + .../postProcessing/miscellaneous/wdot/wdot.C | 6 + .../scalarField/pPrime2/pPrime2.C | 2 + .../postProcessing/velocityField/Mach/Mach.C | 2 +- .../postProcessing/velocityField/Pe/Pe.C | 2 + .../utilities/preProcessing/boxTurb/boxTurb.C | 4 +- .../changeDictionary/changeDictionary.C | 60 ++- .../preProcessing/engineSwirl/engineSwirl.C | 2 +- .../surfaceBooleanFeatures/CGAL3DKernel.H | 2 +- .../CGALIndexedPolyhedron.H | 2 +- .../PolyhedronReader/PolyhedronReader.C | 2 +- .../PolyhedronReader/PolyhedronReader.H | 2 +- .../PolyhedronReaderTemplates.C | 2 +- .../surfaceBooleanFeatures.C | 2 +- .../surface/surfaceCheck/surfaceCheck.C | 2 +- .../surfaceFeatureConvert.C | 4 +- .../surface/surfaceInertia/surfaceInertia.C | 4 +- .../surface/surfaceInflate/surfaceInflate.C | 2 +- .../surfaceLambdaMuSmooth.C | 4 +- .../searchableSurfaceModifier/autoPatch.C | 2 +- .../searchableSurfaceModifier/autoPatch.H | 2 +- .../searchableSurfaceModifier/cut.C | 2 +- .../searchableSurfaceModifier/cut.H | 2 +- .../searchableSurfaceModifier.C | 2 +- .../searchableSurfaceModifier.H | 2 +- .../surface/surfaceSubset/surfaceSubset.C | 4 +- .../equilibriumCO/equilibriumCO.C | 4 +- .../equilibriumFlameT/equilibriumFlameT.C | 4 +- 56 files changed, 1040 insertions(+), 360 deletions(-) diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index 6473bb4d88..b380a2938c 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -34,7 +34,8 @@ Description NOTE: To avoid exposing wrong fields values faceSets should include faces contained in the blockedCells cellset. - - coupledFaces reads coupledFacesSet to introduces mixe-coupled baffles + - coupledFaces reads coupledFacesSet to introduces mixed-coupled + duplicate baffles Subsets out the blocked cells and splits the blockedFaces and updates fields. diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict b/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict index 94fb1d6b8c..62471e0ec6 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMeshDict @@ -17,7 +17,8 @@ FoamFile //- Per faceSet the patch the faces should go into blocked baffles blockedFaces ((blockedFacesSet blockedFaces)); -//- Per faceSet the patch the faces should go into coupled baffles +//- Per faceSet the duplicate baffles to generate (one 'normal', wall baffle, +// one cyclic baffle). For use with active baffle boundary conditions. coupledFaces { coupledFacesSet diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 66bc3bcb11..8fbfdf933d 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -525,7 +525,7 @@ int main(int argc, char *argv[]) Info<< "Created zone " << name << " at index " << zoneID - << " with " << n << " faces" << endl; + << " with " << returnReduce(n, sumOp