From fbaadf3a9446c79c75b20a2cc4208ee48db1e6a6 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 8 Jun 2022 11:19:08 +0200 Subject: [PATCH] ENH: make 'planeType' optional for dictionary construct of a plane - simpler to write for sampled cutting planes etc. For example, slice { type cuttingPlane; point (0 0 0); normal (0 0 1); interpolate true; } instead of slice { type cuttingPlane; planeType pointAndNormal; pointAndNormalDict { point (0 0 0); normal (0 0 1); } interpolate true; } STYLE: add noexcept to some plane methods --- .../annotated/runTimePostProcessingDict | 16 +++---- etc/caseDicts/annotated/sampleDict | 22 +++------- .../meshes/primitiveShapes/plane/plane.C | 44 ++++++++++++------- .../meshes/primitiveShapes/plane/plane.H | 44 +++++++++++-------- .../meshes/primitiveShapes/plane/planeI.H | 14 ++---- .../sampledCuttingPlane/sampledCuttingPlane.H | 11 ++--- .../sampledPlane/sampledPlane.H | 9 ++-- .../movingCone/system/cuttingPlane | 14 +++--- .../angledDuct/implicit/system/sampling | 14 +++--- .../rhoSimpleFoam/squareBend/system/sampling | 11 ++--- .../squareBend/system/samplingDebug | 11 ++--- .../solidFoam/movingCone/system/cuttingPlane | 12 ++--- .../transient/system/cuttingPlane | 14 +++--- .../LES/vortexShed/system/controlDict | 13 ++---- .../system/runTimePostProcessing | 16 +++---- .../RAS/ellipsekkLOmega/system/sampling | 24 +++------- .../pimpleFoam/RAS/propeller/system/surfaces | 12 ++--- .../laminar/movingCone/system/cuttingPlane | 14 +++--- .../LES/motorBike/motorBike/system/samples | 16 +++---- .../simpleFoam/motorBike/system/cuttingPlane | 14 +++--- .../simpleFoam/squareBend/system/sampling | 11 ++--- .../system/runTimePostProcessing | 9 +--- .../windAroundBuildings/system/sampling | 22 +++------- .../setups.orig/common/system/samplePlanes | 10 ++--- .../porousDamBreak/system/controlDict | 8 ++-- .../setups.orig/common/system/cuttingPlane | 32 +++++--------- 26 files changed, 166 insertions(+), 271 deletions(-) diff --git a/etc/caseDicts/annotated/runTimePostProcessingDict b/etc/caseDicts/annotated/runTimePostProcessingDict index 2d2c0f7bf1..1c1db3361d 100644 --- a/etc/caseDicts/annotated/runTimePostProcessingDict +++ b/etc/caseDicts/annotated/runTimePostProcessingDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -190,16 +190,10 @@ surfaces cutting { - type plane; - planeType pointAndNormal; - - pointAndNormalDict - { - point (100 100 50); - normal (1 0 0); - } - - offsets (0 100 200); + type plane; + point (100 100 50); + normal (1 0 0); + offsets (0 100 200); smooth true; colourMap coolToWarm; diff --git a/etc/caseDicts/annotated/sampleDict b/etc/caseDicts/annotated/sampleDict index baeb60c11b..c8d57e9c02 100644 --- a/etc/caseDicts/annotated/sampleDict +++ b/etc/caseDicts/annotated/sampleDict @@ -151,12 +151,8 @@ sets // Surface sampling definition -// -// 1] patches are not triangulated by default -// 2] planes are always triangulated -// 3] iso-surfaces are always triangulated surfaces -( +{ constantPlane { type plane; // always triangulated @@ -262,15 +258,11 @@ surfaces triangleCut { - // Cutingplane using iso surface - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - basePoint (0.4 0 0.4); - normalVector (1 0.2 0.2); - } - interpolate true; + // Cutting plane : using iso surface + type cuttingPlane; + point (0.4 0 0.4); + normal (1 0.2 0.2); + interpolate true; //zone ABC; // Optional: zone only //exposedPatchName fixedWalls; // Optional: zone only @@ -310,7 +302,7 @@ surfaces // boundaryFaces (nearest boundary face) interpolate true; } -); +} // *********************************************************************** // diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C index a3304c48e1..4e86fdea4e 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2016-2018 OpenCFD Ltd. + Copyright (C) 2016-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -26,6 +26,7 @@ License \*---------------------------------------------------------------------------*/ +#include "dictionary.H" #include "plane.H" #include "tensor.H" @@ -141,7 +142,7 @@ Foam::plane::plane } -Foam::plane::plane(const scalarList& coeffs) +Foam::plane::plane(const UList& coeffs) { calcFromCoeffs ( @@ -178,9 +179,28 @@ Foam::plane::plane(const dictionary& dict) normal_(Zero), origin_(Zero) { - const word planeType(dict.get("planeType")); + word planeType; + dict.readIfPresent("planeType", planeType); - if (planeType == "planeEquation") + if (planeType.empty()) + { + const dictionary& coeffs = dict.optionalSubDict("pointAndNormalDict"); + + origin_ = coeffs.get("point"); + normal_ = coeffs.get("normal"); + + makeUnitNormal("point/normal"); + } + else if (planeType == "pointAndNormal") + { + const dictionary& coeffs = dict.subDict("pointAndNormalDict"); + + origin_ = coeffs.getCompat("point", {{"basePoint", 1612}}); + normal_ = coeffs.getCompat("normal", {{"normalVector", 1612}}); + + makeUnitNormal("point/normal"); + } + else if (planeType == "planeEquation") { const dictionary& subDict = dict.subDict("planeEquationDict"); @@ -190,7 +210,7 @@ Foam::plane::plane(const dictionary& dict) subDict.get("b"), subDict.get("c"), subDict.get("d"), - "planeEquationDict" // caller name for makeUnitNormal + "planeEquation" // caller name for makeUnitNormal ); } else if (planeType == "embeddedPoints") @@ -202,18 +222,8 @@ Foam::plane::plane(const dictionary& dict) subDict.get("point1"), subDict.get("point2"), subDict.get("point3"), - "embeddedPointsDict" // caller name for makeUnitNormal + "embeddedPoints" // caller name for makeUnitNormal ); - - } - else if (planeType == "pointAndNormal") - { - const dictionary& subDict = dict.subDict("pointAndNormalDict"); - - origin_ = subDict.getCompat("point", {{"basePoint", 1612}}); - normal_ = subDict.getCompat("normal", {{"normalVector", 1612}}); - - makeUnitNormal("pointAndNormalDict"); } else { @@ -238,7 +248,7 @@ Foam::plane::plane(Istream& is) Foam::FixedList Foam::plane::planeCoeffs() const { - FixedList coeffs(4); + FixedList coeffs; const scalar magX = mag(normal_.x()); const scalar magY = mag(normal_.y()); diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.H b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.H index e5a76660ff..4373becba3 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.H +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2017-2019 OpenCFD Ltd. + Copyright (C) 2017-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,14 +31,16 @@ Description Geometric class that creates a 3D plane and can return the intersection point between a line and the plane. - Construction from a dictionary is driven by the \c planeType + Construction from a dictionary is driven by the \c planeType. + If \c planeType is missing, \c pointAndNormal is used and the + \c pointAndNormalDict becomes optional. For \c planeType as \c pointAndNormal : \verbatim pointAndNormalDict { - point ; // or basePoint - normal ; // or normalVector + point ; // basePoint (1612 and earlier) + normal ; // normalVector (1612 and earlier) } \endverbatim @@ -66,16 +68,16 @@ Description \endverbatim SourceFiles + planeI.H plane.C \*---------------------------------------------------------------------------*/ -#ifndef plane_H -#define plane_H +#ifndef Foam_plane_H +#define Foam_plane_H #include "point.H" #include "scalarList.H" -#include "dictionary.H" #include "line.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -83,6 +85,9 @@ SourceFiles namespace Foam { +// Forward Declarations +class dictionary; + /*---------------------------------------------------------------------------*\ Class plane Declaration \*---------------------------------------------------------------------------*/ @@ -115,12 +120,12 @@ public: dir_(dir) {} - const point& refPoint() const + const point& refPoint() const noexcept { return pt_; } - const vector& dir() const + const vector& dir() const noexcept { return dir_; } @@ -199,7 +204,7 @@ public: //- Construct from coefficients for the plane equation: //- ax + by + cz + d = 0 - explicit plane(const scalarList& coeffs); + explicit plane(const UList& coeffs); //- Construct from coefficients for the plane equation: //- ax + by + cz + d = 0 @@ -215,16 +220,13 @@ public: // Member Functions //- The plane unit normal - inline const vector& normal() const; + inline const vector& normal() const noexcept; //- The plane base point - inline const point& origin() const; + inline const point& origin() const noexcept; //- The plane base point, for modification - inline point& origin(); - - //- The plane base point (same as origin) - inline const point& refPoint() const; + inline point& origin() noexcept; //- Flip the plane by reversing the normal inline void flip(); @@ -292,16 +294,22 @@ public: //- Write to dictionary void writeDict(Ostream& os) const; + + + // Housekeeping + + //- The plane base point (same as origin) + const point& refPoint() const noexcept { return origin_; } }; -// IOstream Operators +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // //- Write plane normal, origin Ostream& operator<<(Ostream& os, const plane& pln); -// Global Operators +// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // //- Test for equality of origin and normal inline bool operator==(const plane& a, const plane& b); diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/planeI.H b/src/OpenFOAM/meshes/primitiveShapes/plane/planeI.H index 83a190be30..695f191afb 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/planeI.H +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/planeI.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2019 OpenCFD Ltd. + Copyright (C) 2018-2022 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,25 +36,19 @@ inline Foam::plane::plane() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline const Foam::vector& Foam::plane::normal() const +inline const Foam::vector& Foam::plane::normal() const noexcept { return normal_; } -inline const Foam::point& Foam::plane::origin() const +inline const Foam::point& Foam::plane::origin() const noexcept { return origin_; } -inline Foam::point& Foam::plane::origin() -{ - return origin_; -} - - -inline const Foam::point& Foam::plane::refPoint() const +inline Foam::point& Foam::plane::origin() noexcept { return origin_; } diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H index 2705ba850e..68b543611c 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.H @@ -40,12 +40,9 @@ Usage { surface1 { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - ... - } + type cuttingPlane; + point ...; + normal ...; } } \endverbatim @@ -54,7 +51,7 @@ Usage \table Property | Description | Required | Default type | cuttingPlane | yes | - planeType | plane description (pointAndNormal etc) | yes | + planeType | Plane description (pointAndNormal etc) | no | offsets | Offsets of the origin in the normal direction | no | (0) isoMethod | Iso-algorithm (cell/topo/point) | no | topo bounds | limit with bounding box | no | diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H index 3c3f125187..b261f2b56f 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H @@ -41,11 +41,8 @@ Usage surface1 { type plane; - planeType pointAndNormal; - pointAndNormalDict - { - ... - } + point ...; + normal ...; } } \endverbatim @@ -54,7 +51,7 @@ Usage \table Property | Description | Required | Default type | plane | yes | - planeType | plane description (pointAndNormal etc) | yes | + planeType | Plane description (pointAndNormal etc) | no | triangulate | triangulate faces | no | true bounds | limit with bounding box | no | zone | limit to cell zone (name or regex) | no | diff --git a/tutorials/compressible/rhoCentralFoam/movingCone/system/cuttingPlane b/tutorials/compressible/rhoCentralFoam/movingCone/system/cuttingPlane index 0ba1052528..66e476bd89 100644 --- a/tutorials/compressible/rhoCentralFoam/movingCone/system/cuttingPlane +++ b/tutorials/compressible/rhoCentralFoam/movingCone/system/cuttingPlane @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -22,14 +22,10 @@ cuttingPlane { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 0 1); - } - interpolate true; + type cuttingPlane; + point (0 0 0); + normal (0 0 1); + interpolate true; } } } diff --git a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/system/sampling b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/system/sampling index 6e3958f6c4..ed1e407fbc 100644 --- a/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/system/sampling +++ b/tutorials/compressible/rhoPorousSimpleFoam/angledDuct/implicit/system/sampling @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -100,14 +100,10 @@ plane { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 0 1); - } - interpolate false; + type cuttingPlane; + point (0 0 0); + normal (0 0 1); + interpolate false; } } } diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/system/sampling b/tutorials/compressible/rhoSimpleFoam/squareBend/system/sampling index 4a6440aff6..7491c71fd7 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/system/sampling +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/system/sampling @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -80,13 +80,8 @@ sampled source cells; store true; - planeType pointAndNormal; - - pointAndNormalDict - { - normal (-1 0 0); - point (-0.04 0 0); - } + point (-0.04 0 0); + normal (-1 0 0); } surfaces diff --git a/tutorials/compressible/rhoSimpleFoam/squareBend/system/samplingDebug b/tutorials/compressible/rhoSimpleFoam/squareBend/system/samplingDebug index 1859cafece..791fd7568f 100644 --- a/tutorials/compressible/rhoSimpleFoam/squareBend/system/samplingDebug +++ b/tutorials/compressible/rhoSimpleFoam/squareBend/system/samplingDebug @@ -43,14 +43,9 @@ debug source cells; triangulate false; - planeType pointAndNormal; - - pointAndNormalDict - { - normal (-1 0 0); - point (-0.042 0 0); - // point (-0.0425 0 0); // between faces - } + normal (-1 0 0); + point (-0.042 0 0); + ///point (-0.0425 0 0); // between faces } _disk1 diff --git a/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane b/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane index a1580c4fd7..2cd3d6cc53 100644 --- a/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane +++ b/tutorials/heatTransfer/solidFoam/movingCone/system/cuttingPlane @@ -16,14 +16,10 @@ cuttingPlane { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 0 1); - } - interpolate true; + type cuttingPlane; + point (0 0 0); + normal (0 0 1); + interpolate true; } } } diff --git a/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/cuttingPlane b/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/cuttingPlane index a12050cdee..bff4d7892f 100644 --- a/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/cuttingPlane +++ b/tutorials/incompressible/pimpleFoam/LES/periodicHill/transient/system/cuttingPlane @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -31,14 +31,10 @@ functions { yNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0.063); - normal (0 0 1); - } - interpolate true; + type cuttingPlane; + point (0 0 0.063); + normal (0 0 1); + interpolate true; } } } diff --git a/tutorials/incompressible/pimpleFoam/LES/vortexShed/system/controlDict b/tutorials/incompressible/pimpleFoam/LES/vortexShed/system/controlDict index 428d51cc72..79bf3eee2e 100644 --- a/tutorials/incompressible/pimpleFoam/LES/vortexShed/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/LES/vortexShed/system/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -136,14 +136,9 @@ functions { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 -0.01); - normal (0 0 1); - } - interpolate false; + type cuttingPlane; + point (0 0 -0.01); + normal (0 0 1); } } } diff --git a/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/runTimePostProcessing b/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/runTimePostProcessing index a7aa8e6df7..76390ff3bf 100644 --- a/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/runTimePostProcessing +++ b/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/runTimePostProcessing @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -132,16 +132,10 @@ postPro1 // Same colours and scaling as surface ${_surface}; - type plane; - planeType pointAndNormal; - - pointAndNormalDict - { - point (0 0 0); - normal (1 0 0); - } - - offsets (0.1 0.2 0.3 0.4 0.5); + type plane; + point (0 0 0); + normal (1 0 0); + offsets (0.1 0.2 0.3 0.4 0.5); colourMap coolToWarm; } diff --git a/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/sampling b/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/sampling index c11418688a..d210ed5525 100644 --- a/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/sampling +++ b/tutorials/incompressible/pimpleFoam/RAS/ellipsekkLOmega/system/sampling @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -25,15 +25,9 @@ planes _plane { - type plane; //cuttingPlane; - planeType pointAndNormal; - interpolate false; - - pointAndNormalDict - { - point (0 0 0); - normal (1 0 0); - } + type plane; //cuttingPlane; + point (0 0 0); + normal (1 0 0); } surfaces @@ -41,19 +35,13 @@ planes plane0 { ${_plane} - pointAndNormalDict - { - point (0 0 0); - } + point (0 0 0); } plane1 { ${_plane} - pointAndNormalDict - { - point (-0.1 0 0); - } + point (-0.1 0 0); } } diff --git a/tutorials/incompressible/pimpleFoam/RAS/propeller/system/surfaces b/tutorials/incompressible/pimpleFoam/RAS/propeller/system/surfaces index 71a75b0215..0cae75c71d 100644 --- a/tutorials/incompressible/pimpleFoam/RAS/propeller/system/surfaces +++ b/tutorials/incompressible/pimpleFoam/RAS/propeller/system/surfaces @@ -21,14 +21,10 @@ surfaces { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 0 1); - } - interpolate true; + type cuttingPlane; + point (0 0 0); + normal (0 0 1); + interpolate true; } isoQ diff --git a/tutorials/incompressible/pimpleFoam/laminar/movingCone/system/cuttingPlane b/tutorials/incompressible/pimpleFoam/laminar/movingCone/system/cuttingPlane index 0ba1052528..66e476bd89 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/movingCone/system/cuttingPlane +++ b/tutorials/incompressible/pimpleFoam/laminar/movingCone/system/cuttingPlane @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -22,14 +22,10 @@ cuttingPlane { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 0 1); - } - interpolate true; + type cuttingPlane; + point (0 0 0); + normal (0 0 1); + interpolate true; } } } diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/samples b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/samples index 6428cc0221..3613b6dcc4 100644 --- a/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/samples +++ b/tutorials/incompressible/pisoFoam/LES/motorBike/motorBike/system/samples @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -27,15 +27,11 @@ samples { yNormal { - type cuttingPlane; - planeType pointAndNormal; - interpolate true; - store true; - pointAndNormalDict - { - point (0 0 0); - normal (0 1 0); - } + type cuttingPlane; + point (0 0 0); + normal (0 1 0); + interpolate true; + store true; } } } diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/cuttingPlane b/tutorials/incompressible/simpleFoam/motorBike/system/cuttingPlane index fb845ad329..13e8735f09 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/cuttingPlane +++ b/tutorials/incompressible/simpleFoam/motorBike/system/cuttingPlane @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -21,14 +21,10 @@ cuttingPlane { yNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0 0); - normal (0 1 0); - } - interpolate true; + type cuttingPlane; + point (0 0 0); + normal (0 1 0); + interpolate true; } } } diff --git a/tutorials/incompressible/simpleFoam/squareBend/system/sampling b/tutorials/incompressible/simpleFoam/squareBend/system/sampling index 9c052cef89..b83694d121 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/system/sampling +++ b/tutorials/incompressible/simpleFoam/squareBend/system/sampling @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -80,13 +80,8 @@ sampled source cells; store true; - planeType pointAndNormal; - - pointAndNormalDict - { - normal (-1 0 0); - point (-0.04 0 0); - } + point (-0.04 0 0); + normal (-1 0 0); } surfaces diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/runTimePostProcessing b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/runTimePostProcessing index 824dbb0320..b9214d28c4 100644 --- a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/runTimePostProcessing +++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/runTimePostProcessing @@ -202,14 +202,9 @@ postPro1 cutting { type plane; - planeType pointAndNormal; - - pointAndNormalDict - { - point (100 100 50); - normal (1 0 0); - } + point (100 100 50); + normal (1 0 0); offsets (0 200); smooth true; diff --git a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/sampling b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/sampling index 7c93e5a778..3cbb1ea95e 100644 --- a/tutorials/incompressible/simpleFoam/windAroundBuildings/system/sampling +++ b/tutorials/incompressible/simpleFoam/windAroundBuildings/system/sampling @@ -20,7 +20,6 @@ planes _plane { type cuttingPlane; - planeType pointAndNormal; interpolate false; } @@ -29,32 +28,23 @@ planes plane0 { ${_plane} - pointAndNormalDict - { - point (100 100 50); - normal (1 -1 0); - } + point (100 100 50); + normal (1 -1 0); enabled false; } plane1 { ${_plane} - pointAndNormalDict - { - point (100 100 50); - normal (1 1 0); - } + point (100 100 50); + normal (1 1 0); } plane2 { ${_plane} - pointAndNormalDict - { - point (200 100 50); - normal (1 0 0); - } + point (200 100 50); + normal (1 0 0); } }; diff --git a/tutorials/verificationAndValidation/atmosphericModels/atmDownstreamDevelopment/setups.orig/common/system/samplePlanes b/tutorials/verificationAndValidation/atmosphericModels/atmDownstreamDevelopment/setups.orig/common/system/samplePlanes index a1756ba5ab..154f0b8a5e 100644 --- a/tutorials/verificationAndValidation/atmosphericModels/atmDownstreamDevelopment/setups.orig/common/system/samplePlanes +++ b/tutorials/verificationAndValidation/atmosphericModels/atmDownstreamDevelopment/setups.orig/common/system/samplePlanes @@ -12,14 +12,10 @@ samplePlanes { planes { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (1e-8 0 0); // slightly inside the domain - normal (1 0 0); - } + type cuttingPlane; + point (1e-8 0 0); // slightly inside the domain + normal (1 0 0); offsets ( 500 1000 1500 2000 2500 3000 3500 4000 4500 ); } } diff --git a/tutorials/verificationAndValidation/multiphase/interIsoFoam/porousDamBreak/system/controlDict b/tutorials/verificationAndValidation/multiphase/interIsoFoam/porousDamBreak/system/controlDict index 515aaa77aa..4d0733eec0 100644 --- a/tutorials/verificationAndValidation/multiphase/interIsoFoam/porousDamBreak/system/controlDict +++ b/tutorials/verificationAndValidation/multiphase/interIsoFoam/porousDamBreak/system/controlDict @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -61,12 +61,14 @@ functions writeControl writeTime; writeInterval 1; surfaceFormat raw; + fields ( alpha.water ); + surfaces - ( + { freeSurface { type isoSurfaceCell; @@ -93,7 +95,7 @@ functions interpolate false; regularise false; } - ); + } } } diff --git a/tutorials/verificationAndValidation/schemes/skewnessCavity/setups.orig/common/system/cuttingPlane b/tutorials/verificationAndValidation/schemes/skewnessCavity/setups.orig/common/system/cuttingPlane index 0a4c9c24d1..16b1528569 100644 --- a/tutorials/verificationAndValidation/schemes/skewnessCavity/setups.orig/common/system/cuttingPlane +++ b/tutorials/verificationAndValidation/schemes/skewnessCavity/setups.orig/common/system/cuttingPlane @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: v2112 | +| \\ / O peration | Version: v2206 | | \\ / A nd | Website: www.openfoam.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -15,19 +15,14 @@ cuttingPlaneError interpolationScheme cell; surfaces - ( + { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0.05 -0.05); - normal (0 0 1); - } - interpolate no; + type cuttingPlane; + point (0 0.05 -0.05); + normal (0 0 1); } - ); + } } @@ -40,19 +35,14 @@ cuttingPlaneMagError interpolationScheme cell; surfaces - ( + { zNormal { - type cuttingPlane; - planeType pointAndNormal; - pointAndNormalDict - { - point (0 0.05 -0.05); - normal (0 0 1); - } - interpolate no; + type cuttingPlane; + point (0 0.05 -0.05); + normal (0 0 1); } - ); + } }