Finite Element Plot (FE Plot) Version 1.2 1. What does it do? This application allows the visualization of (surface) finite element and finite difference meshes. Finite element meshes may be composed of 3 or 4 sided planar elements (Note that while individual elements must be planar, the model may be three-dimensional). Finite difference meshes must be rectangular arrays (in a logical sense). This application can generate an image of the model along an arbitrary line of sight with hidden lines removed. Additionally, this application can generate flooded contour surface plots of any field defined on the mesh (e.g., displacements, stresses, temperature, pressure, etc.). Requirements: This application requires System 7 or higher. 2. Data file format. To use this application, you must supply a data file which contains the geometry and connectivity of the model, as well as any field values defined on the model. A data file is a text file which contains one or more datasets. A dataset contains the following parts: ¥ dataset line ¥ node lines ¥ element connectivity lines (for finite element datasets) ¥ element value lines (if desired for finite element datasets) Note that if more than one dataset is specified in a data file, they must all have the same number of field values defined per node. 2.1 Dataset line. The first line of the data file (the dataset line) contains model size parameters. This line takes one of two forms, depending on whether the model is a finite element mesh or a finite difference mesh. 2.1.1 Finite element dataset. A finite element dataset line looks like: Dataset type = fe, ngp = 8, ne = 6, ns = 4 The 'ngp' parameter specifies the number of grid points. The number following this token should be the total number of nodes in your finite element model. The 'ne' parameter specifies the number of elements. The number following this token should be the total number of elements in your finite element model. The 'ns' parameter specifies the number of sides each element has. The number following this token should be 3 or 4 for triangular or quadrilateral elements, respectively. If your model contains both 3 and 4 sided elements, you should specify 4 and repeat the third node as a dummy fourth node in the connectivity list for the triangular elements. Additionally, a finite element dataset line may optionally contain an 'edata' parameter to indicate that the data file specifies a value for each element. Specifying an element value allows elements to be colored accordingly. This could be used, for example, to visualize different partitions of the mesh. To use the 'edata' parameter, the dataset line should look like: Dataset type = fe, ngp = 8, ne = 6, ns = 4, edata = yes 2.1.2 Finite difference dataset. A finite difference dataset line looks like: Dataset type = grid, ncp = 5, nrp = 7 The 'ncp' parameter specifies the number of columns in the mesh. The 'nrp' parameter specifies the number of rows in the mesh. 2.2 Nodes lines. After the dataset line, there should be a total of 'ngp' (for finite element datasets) or 'ncp'*'nrp' (for finite difference datasets) lines specifing the values of your variables at each node. There should be exactly one line per node, and all nodes must have the same number of variables. It is recommended that the first three variables be the x, y, and z coordinates of the node. There can be no more than 48 variables defined per node. For finite difference datasets, the node lines must be ordered by row. That is, the first 'ncp' lines will be taken as the first row, the next 'ncp' lines as the next row, etc. Note that the terms "row" and "column" apply only in a logical sense. The actual geometry is specified by the variable values and therefore, rows and columns need not be straight lines. 2.3 Element connectivity lines. For finite element datasets, a total of 'ne' lines specifying the element connectivity must follow the node lines. Each line should list 'ns' values that define which nodes are the vertices of that element. 2.4 Element value lines. If the finite element dataset line specified 'edata = yes', then a total of 'ne' lines must follow the element connectivity lines. Each line should contain one (numeric) value for the corresponding element. 2.5 Example. Following is a sample data file for a (very crude) finite element model of the surface of a cube. Note that lines beginning with a '#', as well as completely blank lines are ignored. Dataset type = fe, ngp = 8, ne = 6, ns = 4 # variables 1=x, 2=y, 3=z, 4=u, 5=v, 6=w, 7=temp 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.2 0.0 10.0 0.0 1.0 0.0 0.0 0.2 0.2 10.0 1.0 1.0 0.0 0.1 0.0 0.3 20.0 0.0 0.0 1.0 0.0 0.0 -0.1 10.0 1.0 0.0 1.0 -0.2 0.0 -0.3 20.0 0.0 1.0 1.0 0.0 0.0 -0.3 20.0 1.0 1.0 1.0 -0.1 0.0 -0.2 30.0 # connectivities 1 2 4 3 1 2 6 5 2 4 8 6 4 3 7 8 3 1 5 7 5 6 8 7 3. A note on hidden surface removal. This application uses the painter's algorithm to produce images with hidden surfaces removed. This algorithm sorts the elements from back to front, and renders the farthest elements first, with closer elements covering them. Because a single depth value is assigned to an entire element, this algorithm can fail for certain element configurations. To fix this, problem elements must be divided into smaller pieces for depth sorting. If you encounter this problem, you must manually break your model into smaller elements if you wish to produce accurate images. Future revisions may automate this task. 4. Distribution info. FE Plot is freeware. However, it is NOT in the public domain. It is copyrighted by Brian C. Watson. Permission is hereby granted to copy and distribute unmodified copies of this software provided NO FEE is charged. Online services and BBSes which charge for general connect time and downloading may distribute this software provided no fee is charged specifically for FE Plot. Any other copying or distribution requires the prior written permission of Brian C. Watson. Any questions or comments regarding this software should be directed to BWatson@aol.com. Brian Watson 5 March 1995