[R] How to 2d cross sections from a 3d finite element mesh

Waichler, Scott R Scott.Waichler at pnnl.gov
Mon Aug 10 21:32:05 CEST 2015


Hi, I have a 3D finite element mesh where each element (cell) is defined by 8 vertices.  Each element is a regular polyhedron.  The overall domain is a block in shape, but its horizontal principal axes are not coincident with x and y (i.e. the domain is rotated about the z-axis).  

I want to plot 2D cross sections of discrete and continuous values assigned to the elements.  I can think of two ways to go about providing the values to plot:  1) Use the cross section plane intersection with the elements to define a 2D polygon for each intersected element, and plot each as a polygon, with the final product being a mosaic of polygons within the plane of intersection; 2) interpolate to a regular grid and then plot that.  

Method 1 seems preferable to plotting discrete variables, while the second would be better for contouring a continuous variable.  I know how to do a 3D interpolation using Delaunay triangulation, but I wonder if there is a package out there to simplify things.  I don't know at all how to go about doing it the first way.  Can anyone suggest or point me to existing methods?

Thanks,
Scott Waichler
Pacific Northwest National Laboratory
Richland, WA  USA



More information about the R-help mailing list