mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
sampledSet: Consistent renaming, documentation, and code maintenance
The sampled sets have been renamed in a more explicit and consistent
manner, and two new ones have also been added. The available sets are as
follows:
arcUniform: Uniform samples along an arc. Replaces "circle", and
adds the ability to sample along only a part of the circle's
circumference. Example:
{
type arcUniform;
centre (0.95 0 0.25);
normal (1 0 0);
radial (0 0 0.25);
startAngle -1.57079633;
endAngle 0.52359878;
nPoints 200;
axis x;
}
boundaryPoints: Specified point samples associated with a subset of
the boundary. Replaces "patchCloud". Example:
{
type boundaryPoints;
patches (inlet1 inlet2);
points ((0 -0.05 0.05) (0 -0.05 0.1) (0 -0.05 0.15));
maxDistance 0.01;
axis x;
}
boundaryRandom: Random samples within a subset of the boundary.
Replaces "patchSeed", but changes the behaviour to be entirely
random. It does not seed the boundary face centres first. Example:
{
type boundaryRandom;
patches (inlet1 inlet2);
nPoints 1000;
axis x;
}
boxUniform: Uniform grid of samples within a axis-aligned box.
Replaces "array". Example:
{
type boxUniform;
box (0.95 0 0.25) (1.2 0.25 0.5);
nPoints (2 4 6);
axis x;
}
circleRandom: Random samples within a circle. New. Example:
{
type circleRandom;
centre (0.95 0 0.25);
normal (1 0 0);
radius 0.25;
nPoints 200;
axis x;
}
lineFace: Face-intersections along a line. Replaces "face". Example:
{
type lineFace;
start (0.6 0.6 0.5);
end (0.6 -0.3 -0.1);
axis x;
}
lineCell: Cell-samples along a line at the mid-points in-between
face-intersections. Replaces "midPoint". Example:
{
type lineCell;
start (0.5 0.6 0.5);
end (0.5 -0.3 -0.1);
axis x;
}
lineCellFace: Combination of "lineFace" and "lineCell". Replaces
"midPointAndFace". Example:
{
type lineCellFace;
start (0.55 0.6 0.5);
end (0.55 -0.3 -0.1);
axis x;
}
lineUniform: Uniform samples along a line. Replaces "uniform".
Example:
{
type lineUniform;
start (0.65 0.3 0.3);
end (0.65 -0.3 -0.1);
nPoints 200;
axis x;
}
points: Specified points. Replaces "cloud" when the ordered flag is
false, and "polyLine" when the ordered flag is true. Example:
{
type points;
points ((0 -0.05 0.05) (0 -0.05 0.1) (0 -0.05 0.15));
ordered yes;
axis x;
}
sphereRandom: Random samples within a sphere. New. Example:
{
type sphereRandom;
centre (0.95 0 0.25);
radius 0.25;
nPoints 200;
axis x;
}
triSurfaceMesh: Samples from all the points of a triSurfaceMesh.
Replaces "triSurfaceMeshPointSet". Example:
{
type triSurfaceMesh;
surface "surface.stl";
axis x;
}
The headers have also had documentation added. Example usage and a
description of the control parameters now exists for all sets.
In addition, a number of the algorithms which generate the sets have
been refactored or rewritten. This was done either to take advantage of
the recent changes to random number generation, or to remove ad-hoc
fixes that were made unnecessary by the barycentric tracking algorithm.
This commit is contained in:
@ -1,162 +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;
|
||||
location system;
|
||||
object sampleDict;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
// Set output format : choice of
|
||||
// xmgr
|
||||
// jplot
|
||||
// gnuplot
|
||||
// raw
|
||||
setFormat raw;
|
||||
|
||||
// Surface output format. Choice of
|
||||
// null : suppress output
|
||||
// foamFile : separate points, faces and values file
|
||||
// dx : DX scalar or vector format
|
||||
// vtk : VTK ascii format
|
||||
// raw : x y z value format for use with e.g. gnuplot 'splot'.
|
||||
//
|
||||
// Note:
|
||||
// other formats such as obj, stl, etc can also be written (by proxy)
|
||||
// but without any values!
|
||||
surfaceFormat vtk;
|
||||
|
||||
// interpolationScheme. choice of
|
||||
// cell : use cell-centre value only; constant over cells (default)
|
||||
// cellPoint : use cell-centre and vertex values
|
||||
// cellPointFace : use cell-centre, vertex and face values.
|
||||
// 1] vertex values determined from neighbouring cell-centre values
|
||||
// 2] face values determined using the current face interpolation scheme
|
||||
// for the field (linear, gamma, etc.)
|
||||
interpolationScheme cellPoint;
|
||||
|
||||
// Fields to sample.
|
||||
fields
|
||||
(
|
||||
T
|
||||
CO
|
||||
CO2
|
||||
H2
|
||||
H2O
|
||||
N2
|
||||
O2
|
||||
OH
|
||||
CH4
|
||||
);
|
||||
|
||||
|
||||
// Set sampling definition: choice of
|
||||
// uniform evenly distributed points on line
|
||||
// face one point per face intersection
|
||||
// midPoint one point per cell, in between two face intersections
|
||||
// midPointAndFace combination of face and midPoint
|
||||
//
|
||||
// curve specified points, not necessary on line, uses
|
||||
// tracking
|
||||
// cloud specified points, uses findCell
|
||||
//
|
||||
// axis: how to write point coordinate. Choice of
|
||||
// - x/y/z: x/y/z coordinate only
|
||||
// - xyz: three columns
|
||||
// (probably does not make sense for anything but raw)
|
||||
// - distance: distance from start of sampling line (if uses line) or
|
||||
// distance from first specified sampling point
|
||||
//
|
||||
// type specific:
|
||||
// uniform, face, midPoint, midPointAndFace : start and end coordinate
|
||||
// uniform: extra number of sampling points
|
||||
// curve, cloud: list of coordinates
|
||||
sets
|
||||
(
|
||||
Centerline
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0.00001 0. 0. );
|
||||
end (0.00001 0. 0.500);
|
||||
nPoints 500;
|
||||
}
|
||||
|
||||
Radial_075
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0 0 0.054);
|
||||
end (0.020 0 0.054);
|
||||
nPoints 100;
|
||||
}
|
||||
Radial_15
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0 0 0.108);
|
||||
end (0.024 0.108);
|
||||
nPoints 100;
|
||||
}
|
||||
Radial_30
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0 0 0.216);
|
||||
end (0.042 0 0.216);
|
||||
nPoints 100;
|
||||
}
|
||||
Radial_45
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0 0 0.324);
|
||||
end (0.056 0 0.324);
|
||||
nPoints 100;
|
||||
}
|
||||
Radial_60
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0 0 0.432);
|
||||
end (0.070 0 0.432);
|
||||
nPoints 100;
|
||||
}
|
||||
Radial_75
|
||||
{
|
||||
type uniform;
|
||||
axis distance;
|
||||
|
||||
start (0 0 0.54);
|
||||
end (0.080 0 0.54);
|
||||
nPoints 100;
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
// Surface sampling definition: choice of
|
||||
// plane : values on plane defined by point, normal.
|
||||
// patch : values on patch.
|
||||
//
|
||||
// 1] patches are not triangulated by default
|
||||
// 2] planes are always triangulated
|
||||
// 3] iso-surfaces are always triangulated
|
||||
surfaces ();
|
||||
|
||||
// *********************************************************************** //
|
||||
@ -26,7 +26,7 @@ sets
|
||||
(
|
||||
cone25
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (0 0 0);
|
||||
end (0.09208087 0.042939 0);
|
||||
@ -34,7 +34,7 @@ sets
|
||||
}
|
||||
cone55
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (0.09208087 0.042939 0);
|
||||
end (0.153683 0.13092 0);
|
||||
@ -42,7 +42,7 @@ sets
|
||||
}
|
||||
base
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (0.153683 0.13092 0);
|
||||
end (0.193675 0.13092 0);
|
||||
|
||||
@ -26,7 +26,7 @@ sets
|
||||
(
|
||||
line
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-5 0 0);
|
||||
end (5 0 0);
|
||||
|
||||
@ -26,7 +26,7 @@ sets
|
||||
(
|
||||
data
|
||||
{
|
||||
type uniform;
|
||||
type lineUniform;
|
||||
axis x;
|
||||
start (-4.995 0 0);
|
||||
end (4.995 0 0);
|
||||
|
||||
@ -26,7 +26,7 @@ sets
|
||||
(
|
||||
line_centreProfile
|
||||
{
|
||||
type uniform;
|
||||
type lineUniform;
|
||||
axis distance;
|
||||
start (10.001 -1 0.01);
|
||||
end (10.001 1 0.01);
|
||||
|
||||
@ -27,63 +27,63 @@ sets
|
||||
(
|
||||
y0.1
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 0.218 0);
|
||||
end (1 0.218 0);
|
||||
}
|
||||
y0.2
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 0.436 0);
|
||||
end (1 0.436 0);
|
||||
}
|
||||
y0.3
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 0.654 0);
|
||||
end (1 0.654 0);
|
||||
}
|
||||
y0.4
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 0.872 0);
|
||||
end (1 0.872 0);
|
||||
}
|
||||
y0.5
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 1.09 0);
|
||||
end (1 1.09 0);
|
||||
}
|
||||
y0.6
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 1.308 0);
|
||||
end (1 1.308 0);
|
||||
}
|
||||
y0.7
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 1.526 0);
|
||||
end (1 1.526 0);
|
||||
}
|
||||
y0.8
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 1.744 0);
|
||||
end (1 1.744 0);
|
||||
}
|
||||
y0.9
|
||||
{
|
||||
type face;
|
||||
type lineFace;
|
||||
axis x;
|
||||
start (-1 1.962 0);
|
||||
end (1 1.962 0);
|
||||
|
||||
@ -15,9 +15,6 @@ Description
|
||||
// Sampling and I/O settings
|
||||
#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg"
|
||||
|
||||
// Override settings here, e.g.
|
||||
// setConfig { type midPoint; }
|
||||
|
||||
type sets;
|
||||
libs ("libsampling.so");
|
||||
|
||||
@ -29,7 +26,7 @@ setFormat raw;
|
||||
|
||||
setConfig
|
||||
{
|
||||
type midPoint; // midPoint
|
||||
type lineCell;
|
||||
axis distance; // x, y, z, xyz
|
||||
}
|
||||
|
||||
|
||||
@ -15,9 +15,6 @@ Description
|
||||
// Sampling and I/O settings
|
||||
#includeEtc "caseDicts/postProcessing/graphs/sampleDict.cfg"
|
||||
|
||||
// Override settings here, e.g.
|
||||
// setConfig { type midPoint; }
|
||||
|
||||
type sets;
|
||||
libs ("libsampling.so");
|
||||
|
||||
@ -29,7 +26,7 @@ setFormat raw;
|
||||
|
||||
setConfig
|
||||
{
|
||||
type midPoint; // midPoint
|
||||
type lineCell;
|
||||
axis distance; // x, y, z, xyz
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ functions
|
||||
cloudName particleTracks;
|
||||
seedSampleSet
|
||||
{
|
||||
type uniform;
|
||||
type lineUniform;
|
||||
axis x;
|
||||
start (-1.001 1e-07 0.0011);
|
||||
end (-1.001 1e-07 1.0011);
|
||||
|
||||
@ -34,7 +34,7 @@ streamLines
|
||||
// Seeding method.
|
||||
seedSampleSet
|
||||
{
|
||||
type uniform;
|
||||
type lineUniform;
|
||||
axis x; // distance;
|
||||
|
||||
// Note: tracks slightly offset so as not to be on a face
|
||||
|
||||
@ -44,7 +44,7 @@ streamLines
|
||||
// Seeding method.
|
||||
seedSampleSet
|
||||
{
|
||||
type uniform;
|
||||
type lineUniform;
|
||||
axis x; // distance;
|
||||
|
||||
// Note: tracks slightly offset so as not to be on a face
|
||||
|
||||
@ -78,7 +78,7 @@ functions
|
||||
// Seeding method.
|
||||
seedSampleSet
|
||||
{
|
||||
type uniform;
|
||||
type lineUniform;
|
||||
|
||||
axis x; // distance;
|
||||
start (-0.0205 0.001 0.00001);
|
||||
|
||||
Reference in New Issue
Block a user