CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Forcing Surface Export with VTK to be triangulated (https://www.cfd-online.com/Forums/openfoam/220612-forcing-surface-export-vtk-triangulated.html)

arohner September 13, 2019 12:41

Forcing Surface Export with VTK to be triangulated
 
1 Attachment(s)
Hi All,


I have updated my openfoam version from of6 to of7 and encountered some issues with vtk surface files. In of6 I had triangulated files, which were very easy to handle in a python-vtk postprocessor. Now with of7 I get tri-, quad- and higher-polygons (see attachement: vtk_of6_of7.png). Is there a way to force openfoam to generate triangles?

I found a keyword "triangulate" (see code snippet) within the surface file and set this to "true" but had no effect.

Any idea how to get vtk's, which are always triangulated?





Code:

type            surfaces;
libs            ("libsampling.so");

writeControl    adjustableRunTime;
writeInterval  surfWriteIntervalVar;
   
/*
null
dx
vtk
raw
stl
*/

surfaceFormat  vtk;
interpolationScheme cellPoint;

x (1 0 0);
y (0 1 0);
z (0 0 1);
origin (0 0 0);

cuttingPlane
{
    type        cuttingPlane;
    planeType    pointAndNormal;
    pointAndNormalDict
    {
        basePoint    $origin;
        normalVector $x;
    }
    interpolate  true;
    triangulate  true;
}



All times are GMT -4. The time now is 13:01.