mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
- takes a direct approach of determining which cells are cut and walks
the cell faces directly to build the resulting surface.
- better handling of corner cases.
* Avoids redundant points when the cut passes exactly through a
mesh point.
* Supresses generation of duplicates faces when the plane cut
coincides exactly with a mesh face.
- for severely concave cells where the plane cuts a face multiple times
there is currently no remedial action taken, except to note the
failure and unwind the insertion of the corresponding points and
faces.
85 lines
1.6 KiB
C++
85 lines
1.6 KiB
C++
// -*- C++ -*-
|
|
|
|
// ************************************************************************* //
|
|
|
|
debug
|
|
{
|
|
type surfaces;
|
|
libs ("libsampling.so");
|
|
log true;
|
|
writeControl timeStep;
|
|
writeInterval 1;
|
|
|
|
fields (rho U);
|
|
|
|
sampleScheme cellPoint;
|
|
interpolationScheme cellPoint;
|
|
surfaceFormat ensight;
|
|
// surfaceFormat vtk;
|
|
|
|
formatOptions
|
|
{
|
|
ensight
|
|
{
|
|
collateTimes true;
|
|
// collateTimes false;
|
|
}
|
|
}
|
|
|
|
_plane
|
|
{
|
|
type plane;
|
|
source cells;
|
|
triangulate false;
|
|
|
|
planeType pointAndNormal;
|
|
|
|
pointAndNormalDict
|
|
{
|
|
normal (-1 0 0);
|
|
point (-0.042 0 0);
|
|
// point (-0.0425 0 0); // between faces
|
|
}
|
|
}
|
|
|
|
|
|
surfaces
|
|
(
|
|
angledPlane
|
|
{
|
|
type distanceSurface;
|
|
distance 0;
|
|
signed true;
|
|
regularise true;
|
|
surfaceType triSurfaceMesh;
|
|
surfaceName angledPlane.obj;
|
|
}
|
|
|
|
iso
|
|
{
|
|
type isoSurface;
|
|
isoField p;
|
|
isoValue 1e5;
|
|
regularise true;
|
|
interpolate true;
|
|
}
|
|
|
|
// Top channel
|
|
plane1
|
|
{
|
|
${_plane}
|
|
bounds (-1 0 -1) (0 1 1);
|
|
}
|
|
|
|
// Bottom channel
|
|
plane2
|
|
{
|
|
${_plane}
|
|
bounds (-1 -1 -1) (0 0 1);
|
|
}
|
|
);
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|