mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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
This commit is contained in:
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -190,16 +190,10 @@ surfaces
|
|||||||
|
|
||||||
cutting
|
cutting
|
||||||
{
|
{
|
||||||
type plane;
|
type plane;
|
||||||
planeType pointAndNormal;
|
point (100 100 50);
|
||||||
|
normal (1 0 0);
|
||||||
pointAndNormalDict
|
offsets (0 100 200);
|
||||||
{
|
|
||||||
point (100 100 50);
|
|
||||||
normal (1 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
offsets (0 100 200);
|
|
||||||
|
|
||||||
smooth true;
|
smooth true;
|
||||||
colourMap coolToWarm;
|
colourMap coolToWarm;
|
||||||
|
|||||||
@ -151,12 +151,8 @@ sets
|
|||||||
|
|
||||||
|
|
||||||
// Surface sampling definition
|
// Surface sampling definition
|
||||||
//
|
|
||||||
// 1] patches are not triangulated by default
|
|
||||||
// 2] planes are always triangulated
|
|
||||||
// 3] iso-surfaces are always triangulated
|
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
constantPlane
|
constantPlane
|
||||||
{
|
{
|
||||||
type plane; // always triangulated
|
type plane; // always triangulated
|
||||||
@ -262,15 +258,11 @@ surfaces
|
|||||||
|
|
||||||
triangleCut
|
triangleCut
|
||||||
{
|
{
|
||||||
// Cutingplane using iso surface
|
// Cutting plane : using iso surface
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0.4 0 0.4);
|
||||||
pointAndNormalDict
|
normal (1 0.2 0.2);
|
||||||
{
|
interpolate true;
|
||||||
basePoint (0.4 0 0.4);
|
|
||||||
normalVector (1 0.2 0.2);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
|
|
||||||
//zone ABC; // Optional: zone only
|
//zone ABC; // Optional: zone only
|
||||||
//exposedPatchName fixedWalls; // Optional: zone only
|
//exposedPatchName fixedWalls; // Optional: zone only
|
||||||
@ -310,7 +302,7 @@ surfaces
|
|||||||
// boundaryFaces (nearest boundary face)
|
// boundaryFaces (nearest boundary face)
|
||||||
interpolate true;
|
interpolate true;
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
|
|
||||||
|
|
||||||
// *********************************************************************** //
|
// *********************************************************************** //
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2016-2018 OpenCFD Ltd.
|
Copyright (C) 2016-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -26,6 +26,7 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "dictionary.H"
|
||||||
#include "plane.H"
|
#include "plane.H"
|
||||||
#include "tensor.H"
|
#include "tensor.H"
|
||||||
|
|
||||||
@ -141,7 +142,7 @@ Foam::plane::plane
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foam::plane::plane(const scalarList& coeffs)
|
Foam::plane::plane(const UList<scalar>& coeffs)
|
||||||
{
|
{
|
||||||
calcFromCoeffs
|
calcFromCoeffs
|
||||||
(
|
(
|
||||||
@ -178,9 +179,28 @@ Foam::plane::plane(const dictionary& dict)
|
|||||||
normal_(Zero),
|
normal_(Zero),
|
||||||
origin_(Zero)
|
origin_(Zero)
|
||||||
{
|
{
|
||||||
const word planeType(dict.get<word>("planeType"));
|
word planeType;
|
||||||
|
dict.readIfPresent("planeType", planeType);
|
||||||
|
|
||||||
if (planeType == "planeEquation")
|
if (planeType.empty())
|
||||||
|
{
|
||||||
|
const dictionary& coeffs = dict.optionalSubDict("pointAndNormalDict");
|
||||||
|
|
||||||
|
origin_ = coeffs.get<point>("point");
|
||||||
|
normal_ = coeffs.get<point>("normal");
|
||||||
|
|
||||||
|
makeUnitNormal("point/normal");
|
||||||
|
}
|
||||||
|
else if (planeType == "pointAndNormal")
|
||||||
|
{
|
||||||
|
const dictionary& coeffs = dict.subDict("pointAndNormalDict");
|
||||||
|
|
||||||
|
origin_ = coeffs.getCompat<point>("point", {{"basePoint", 1612}});
|
||||||
|
normal_ = coeffs.getCompat<point>("normal", {{"normalVector", 1612}});
|
||||||
|
|
||||||
|
makeUnitNormal("point/normal");
|
||||||
|
}
|
||||||
|
else if (planeType == "planeEquation")
|
||||||
{
|
{
|
||||||
const dictionary& subDict = dict.subDict("planeEquationDict");
|
const dictionary& subDict = dict.subDict("planeEquationDict");
|
||||||
|
|
||||||
@ -190,7 +210,7 @@ Foam::plane::plane(const dictionary& dict)
|
|||||||
subDict.get<scalar>("b"),
|
subDict.get<scalar>("b"),
|
||||||
subDict.get<scalar>("c"),
|
subDict.get<scalar>("c"),
|
||||||
subDict.get<scalar>("d"),
|
subDict.get<scalar>("d"),
|
||||||
"planeEquationDict" // caller name for makeUnitNormal
|
"planeEquation" // caller name for makeUnitNormal
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if (planeType == "embeddedPoints")
|
else if (planeType == "embeddedPoints")
|
||||||
@ -202,18 +222,8 @@ Foam::plane::plane(const dictionary& dict)
|
|||||||
subDict.get<point>("point1"),
|
subDict.get<point>("point1"),
|
||||||
subDict.get<point>("point2"),
|
subDict.get<point>("point2"),
|
||||||
subDict.get<point>("point3"),
|
subDict.get<point>("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>("point", {{"basePoint", 1612}});
|
|
||||||
normal_ = subDict.getCompat<point>("normal", {{"normalVector", 1612}});
|
|
||||||
|
|
||||||
makeUnitNormal("pointAndNormalDict");
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -238,7 +248,7 @@ Foam::plane::plane(Istream& is)
|
|||||||
|
|
||||||
Foam::FixedList<Foam::scalar, 4> Foam::plane::planeCoeffs() const
|
Foam::FixedList<Foam::scalar, 4> Foam::plane::planeCoeffs() const
|
||||||
{
|
{
|
||||||
FixedList<scalar, 4> coeffs(4);
|
FixedList<scalar, 4> coeffs;
|
||||||
|
|
||||||
const scalar magX = mag(normal_.x());
|
const scalar magX = mag(normal_.x());
|
||||||
const scalar magY = mag(normal_.y());
|
const scalar magY = mag(normal_.y());
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -31,14 +31,16 @@ Description
|
|||||||
Geometric class that creates a 3D plane and can return the intersection
|
Geometric class that creates a 3D plane and can return the intersection
|
||||||
point between a line and the plane.
|
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 :
|
For \c planeType as \c pointAndNormal :
|
||||||
\verbatim
|
\verbatim
|
||||||
pointAndNormalDict
|
pointAndNormalDict
|
||||||
{
|
{
|
||||||
point <point>; // or basePoint
|
point <point>; // basePoint (1612 and earlier)
|
||||||
normal <vector>; // or normalVector
|
normal <vector>; // normalVector (1612 and earlier)
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
@ -66,16 +68,16 @@ Description
|
|||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
|
planeI.H
|
||||||
plane.C
|
plane.C
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef plane_H
|
#ifndef Foam_plane_H
|
||||||
#define plane_H
|
#define Foam_plane_H
|
||||||
|
|
||||||
#include "point.H"
|
#include "point.H"
|
||||||
#include "scalarList.H"
|
#include "scalarList.H"
|
||||||
#include "dictionary.H"
|
|
||||||
#include "line.H"
|
#include "line.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
@ -83,6 +85,9 @@ SourceFiles
|
|||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Forward Declarations
|
||||||
|
class dictionary;
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class plane Declaration
|
Class plane Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -115,12 +120,12 @@ public:
|
|||||||
dir_(dir)
|
dir_(dir)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
const point& refPoint() const
|
const point& refPoint() const noexcept
|
||||||
{
|
{
|
||||||
return pt_;
|
return pt_;
|
||||||
}
|
}
|
||||||
|
|
||||||
const vector& dir() const
|
const vector& dir() const noexcept
|
||||||
{
|
{
|
||||||
return dir_;
|
return dir_;
|
||||||
}
|
}
|
||||||
@ -199,7 +204,7 @@ public:
|
|||||||
|
|
||||||
//- Construct from coefficients for the plane equation:
|
//- Construct from coefficients for the plane equation:
|
||||||
//- ax + by + cz + d = 0
|
//- ax + by + cz + d = 0
|
||||||
explicit plane(const scalarList& coeffs);
|
explicit plane(const UList<scalar>& coeffs);
|
||||||
|
|
||||||
//- Construct from coefficients for the plane equation:
|
//- Construct from coefficients for the plane equation:
|
||||||
//- ax + by + cz + d = 0
|
//- ax + by + cz + d = 0
|
||||||
@ -215,16 +220,13 @@ public:
|
|||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
//- The plane unit normal
|
//- The plane unit normal
|
||||||
inline const vector& normal() const;
|
inline const vector& normal() const noexcept;
|
||||||
|
|
||||||
//- The plane base point
|
//- The plane base point
|
||||||
inline const point& origin() const;
|
inline const point& origin() const noexcept;
|
||||||
|
|
||||||
//- The plane base point, for modification
|
//- The plane base point, for modification
|
||||||
inline point& origin();
|
inline point& origin() noexcept;
|
||||||
|
|
||||||
//- The plane base point (same as origin)
|
|
||||||
inline const point& refPoint() const;
|
|
||||||
|
|
||||||
//- Flip the plane by reversing the normal
|
//- Flip the plane by reversing the normal
|
||||||
inline void flip();
|
inline void flip();
|
||||||
@ -292,16 +294,22 @@ public:
|
|||||||
|
|
||||||
//- Write to dictionary
|
//- Write to dictionary
|
||||||
void writeDict(Ostream& os) const;
|
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
|
//- Write plane normal, origin
|
||||||
Ostream& operator<<(Ostream& os, const plane& pln);
|
Ostream& operator<<(Ostream& os, const plane& pln);
|
||||||
|
|
||||||
|
|
||||||
// Global Operators
|
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Test for equality of origin and normal
|
//- Test for equality of origin and normal
|
||||||
inline bool operator==(const plane& a, const plane& b);
|
inline bool operator==(const plane& a, const plane& b);
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
\\ / A nd | www.openfoam.com
|
\\ / A nd | www.openfoam.com
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
Copyright (C) 2018-2022 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -36,25 +36,19 @@ inline Foam::plane::plane()
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline const Foam::vector& Foam::plane::normal() const
|
inline const Foam::vector& Foam::plane::normal() const noexcept
|
||||||
{
|
{
|
||||||
return normal_;
|
return normal_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::point& Foam::plane::origin() const
|
inline const Foam::point& Foam::plane::origin() const noexcept
|
||||||
{
|
{
|
||||||
return origin_;
|
return origin_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Foam::point& Foam::plane::origin()
|
inline Foam::point& Foam::plane::origin() noexcept
|
||||||
{
|
|
||||||
return origin_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline const Foam::point& Foam::plane::refPoint() const
|
|
||||||
{
|
{
|
||||||
return origin_;
|
return origin_;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,12 +40,9 @@ Usage
|
|||||||
{
|
{
|
||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point ...;
|
||||||
pointAndNormalDict
|
normal ...;
|
||||||
{
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
@ -54,7 +51,7 @@ Usage
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
type | cuttingPlane | yes |
|
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)
|
offsets | Offsets of the origin in the normal direction | no | (0)
|
||||||
isoMethod | Iso-algorithm (cell/topo/point) | no | topo
|
isoMethod | Iso-algorithm (cell/topo/point) | no | topo
|
||||||
bounds | limit with bounding box | no |
|
bounds | limit with bounding box | no |
|
||||||
|
|||||||
@ -41,11 +41,8 @@ Usage
|
|||||||
surface1
|
surface1
|
||||||
{
|
{
|
||||||
type plane;
|
type plane;
|
||||||
planeType pointAndNormal;
|
point ...;
|
||||||
pointAndNormalDict
|
normal ...;
|
||||||
{
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
\endverbatim
|
\endverbatim
|
||||||
@ -54,7 +51,7 @@ Usage
|
|||||||
\table
|
\table
|
||||||
Property | Description | Required | Default
|
Property | Description | Required | Default
|
||||||
type | plane | yes |
|
type | plane | yes |
|
||||||
planeType | plane description (pointAndNormal etc) | yes |
|
planeType | Plane description (pointAndNormal etc) | no |
|
||||||
triangulate | triangulate faces | no | true
|
triangulate | triangulate faces | no | true
|
||||||
bounds | limit with bounding box | no |
|
bounds | limit with bounding box | no |
|
||||||
zone | limit to cell zone (name or regex) | no |
|
zone | limit to cell zone (name or regex) | no |
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -22,14 +22,10 @@ cuttingPlane
|
|||||||
{
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
interpolate true;
|
||||||
point (0 0 0);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -100,14 +100,10 @@ plane
|
|||||||
{
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
interpolate false;
|
||||||
point (0 0 0);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -80,13 +80,8 @@ sampled
|
|||||||
source cells;
|
source cells;
|
||||||
store true;
|
store true;
|
||||||
|
|
||||||
planeType pointAndNormal;
|
point (-0.04 0 0);
|
||||||
|
normal (-1 0 0);
|
||||||
pointAndNormalDict
|
|
||||||
{
|
|
||||||
normal (-1 0 0);
|
|
||||||
point (-0.04 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
|
|||||||
@ -43,14 +43,9 @@ debug
|
|||||||
source cells;
|
source cells;
|
||||||
triangulate false;
|
triangulate false;
|
||||||
|
|
||||||
planeType pointAndNormal;
|
normal (-1 0 0);
|
||||||
|
point (-0.042 0 0);
|
||||||
pointAndNormalDict
|
///point (-0.0425 0 0); // between faces
|
||||||
{
|
|
||||||
normal (-1 0 0);
|
|
||||||
point (-0.042 0 0);
|
|
||||||
// point (-0.0425 0 0); // between faces
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_disk1
|
_disk1
|
||||||
|
|||||||
@ -16,14 +16,10 @@ cuttingPlane
|
|||||||
{
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
interpolate true;
|
||||||
point (0 0 0);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -31,14 +31,10 @@ functions
|
|||||||
{
|
{
|
||||||
yNormal
|
yNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0.063);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
interpolate true;
|
||||||
point (0 0 0.063);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -136,14 +136,9 @@ functions
|
|||||||
{
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 -0.01);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
|
||||||
point (0 0 -0.01);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -132,16 +132,10 @@ postPro1
|
|||||||
// Same colours and scaling as surface
|
// Same colours and scaling as surface
|
||||||
${_surface};
|
${_surface};
|
||||||
|
|
||||||
type plane;
|
type plane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
|
normal (1 0 0);
|
||||||
pointAndNormalDict
|
offsets (0.1 0.2 0.3 0.4 0.5);
|
||||||
{
|
|
||||||
point (0 0 0);
|
|
||||||
normal (1 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
offsets (0.1 0.2 0.3 0.4 0.5);
|
|
||||||
|
|
||||||
colourMap coolToWarm;
|
colourMap coolToWarm;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -25,15 +25,9 @@ planes
|
|||||||
|
|
||||||
_plane
|
_plane
|
||||||
{
|
{
|
||||||
type plane; //cuttingPlane;
|
type plane; //cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
interpolate false;
|
normal (1 0 0);
|
||||||
|
|
||||||
pointAndNormalDict
|
|
||||||
{
|
|
||||||
point (0 0 0);
|
|
||||||
normal (1 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
@ -41,19 +35,13 @@ planes
|
|||||||
plane0
|
plane0
|
||||||
{
|
{
|
||||||
${_plane}
|
${_plane}
|
||||||
pointAndNormalDict
|
point (0 0 0);
|
||||||
{
|
|
||||||
point (0 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plane1
|
plane1
|
||||||
{
|
{
|
||||||
${_plane}
|
${_plane}
|
||||||
pointAndNormalDict
|
point (-0.1 0 0);
|
||||||
{
|
|
||||||
point (-0.1 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,14 +21,10 @@ surfaces
|
|||||||
{
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
interpolate true;
|
||||||
point (0 0 0);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isoQ
|
isoQ
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -22,14 +22,10 @@ cuttingPlane
|
|||||||
{
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
interpolate true;
|
||||||
point (0 0 0);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -27,15 +27,11 @@ samples
|
|||||||
{
|
{
|
||||||
yNormal
|
yNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
interpolate true;
|
normal (0 1 0);
|
||||||
store true;
|
interpolate true;
|
||||||
pointAndNormalDict
|
store true;
|
||||||
{
|
|
||||||
point (0 0 0);
|
|
||||||
normal (0 1 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -21,14 +21,10 @@ cuttingPlane
|
|||||||
{
|
{
|
||||||
yNormal
|
yNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0 0);
|
||||||
pointAndNormalDict
|
normal (0 1 0);
|
||||||
{
|
interpolate true;
|
||||||
point (0 0 0);
|
|
||||||
normal (0 1 0);
|
|
||||||
}
|
|
||||||
interpolate true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -80,13 +80,8 @@ sampled
|
|||||||
source cells;
|
source cells;
|
||||||
store true;
|
store true;
|
||||||
|
|
||||||
planeType pointAndNormal;
|
point (-0.04 0 0);
|
||||||
|
normal (-1 0 0);
|
||||||
pointAndNormalDict
|
|
||||||
{
|
|
||||||
normal (-1 0 0);
|
|
||||||
point (-0.04 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
|
|||||||
@ -202,14 +202,9 @@ postPro1
|
|||||||
cutting
|
cutting
|
||||||
{
|
{
|
||||||
type plane;
|
type plane;
|
||||||
planeType pointAndNormal;
|
|
||||||
|
|
||||||
pointAndNormalDict
|
|
||||||
{
|
|
||||||
point (100 100 50);
|
|
||||||
normal (1 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
point (100 100 50);
|
||||||
|
normal (1 0 0);
|
||||||
offsets (0 200);
|
offsets (0 200);
|
||||||
|
|
||||||
smooth true;
|
smooth true;
|
||||||
|
|||||||
@ -20,7 +20,6 @@ planes
|
|||||||
_plane
|
_plane
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
|
||||||
interpolate false;
|
interpolate false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,32 +28,23 @@ planes
|
|||||||
plane0
|
plane0
|
||||||
{
|
{
|
||||||
${_plane}
|
${_plane}
|
||||||
pointAndNormalDict
|
point (100 100 50);
|
||||||
{
|
normal (1 -1 0);
|
||||||
point (100 100 50);
|
|
||||||
normal (1 -1 0);
|
|
||||||
}
|
|
||||||
enabled false;
|
enabled false;
|
||||||
}
|
}
|
||||||
|
|
||||||
plane1
|
plane1
|
||||||
{
|
{
|
||||||
${_plane}
|
${_plane}
|
||||||
pointAndNormalDict
|
point (100 100 50);
|
||||||
{
|
normal (1 1 0);
|
||||||
point (100 100 50);
|
|
||||||
normal (1 1 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
plane2
|
plane2
|
||||||
{
|
{
|
||||||
${_plane}
|
${_plane}
|
||||||
pointAndNormalDict
|
point (200 100 50);
|
||||||
{
|
normal (1 0 0);
|
||||||
point (200 100 50);
|
|
||||||
normal (1 0 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -12,14 +12,10 @@ samplePlanes
|
|||||||
{
|
{
|
||||||
planes
|
planes
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
|
||||||
pointAndNormalDict
|
|
||||||
{
|
|
||||||
point (1e-8 0 0); // slightly inside the domain
|
|
||||||
normal (1 0 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
point (1e-8 0 0); // slightly inside the domain
|
||||||
|
normal (1 0 0);
|
||||||
offsets ( 500 1000 1500 2000 2500 3000 3500 4000 4500 );
|
offsets ( 500 1000 1500 2000 2500 3000 3500 4000 4500 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -61,12 +61,14 @@ functions
|
|||||||
writeControl writeTime;
|
writeControl writeTime;
|
||||||
writeInterval 1;
|
writeInterval 1;
|
||||||
surfaceFormat raw;
|
surfaceFormat raw;
|
||||||
|
|
||||||
fields
|
fields
|
||||||
(
|
(
|
||||||
alpha.water
|
alpha.water
|
||||||
);
|
);
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
freeSurface
|
freeSurface
|
||||||
{
|
{
|
||||||
type isoSurfaceCell;
|
type isoSurfaceCell;
|
||||||
@ -93,7 +95,7 @@ functions
|
|||||||
interpolate false;
|
interpolate false;
|
||||||
regularise false;
|
regularise false;
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*--------------------------------*- C++ -*----------------------------------*\
|
/*--------------------------------*- C++ -*----------------------------------*\
|
||||||
| ========= | |
|
| ========= | |
|
||||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||||
| \\ / O peration | Version: v2112 |
|
| \\ / O peration | Version: v2206 |
|
||||||
| \\ / A nd | Website: www.openfoam.com |
|
| \\ / A nd | Website: www.openfoam.com |
|
||||||
| \\/ M anipulation | |
|
| \\/ M anipulation | |
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -15,19 +15,14 @@ cuttingPlaneError
|
|||||||
interpolationScheme cell;
|
interpolationScheme cell;
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0.05 -0.05);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
|
||||||
point (0 0.05 -0.05);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate no;
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -40,19 +35,14 @@ cuttingPlaneMagError
|
|||||||
interpolationScheme cell;
|
interpolationScheme cell;
|
||||||
|
|
||||||
surfaces
|
surfaces
|
||||||
(
|
{
|
||||||
zNormal
|
zNormal
|
||||||
{
|
{
|
||||||
type cuttingPlane;
|
type cuttingPlane;
|
||||||
planeType pointAndNormal;
|
point (0 0.05 -0.05);
|
||||||
pointAndNormalDict
|
normal (0 0 1);
|
||||||
{
|
|
||||||
point (0 0.05 -0.05);
|
|
||||||
normal (0 0 1);
|
|
||||||
}
|
|
||||||
interpolate no;
|
|
||||||
}
|
}
|
||||||
);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user