Compufers & Structures Printed in Great Britain.
Vol. 21, No. 4. pp. 815-823,
0045-7949185 $3.00 + .OO Q 1985 Pergamon Press Ltd.
1985
PROCESSING THREE-DIMENSIONAL FINITE ELEMENT ASSEMBLIES AND SOLUTIONS Mathematics
DAVID A. FIELD and MARY BETH Department, General Motors Research Laboratories, U.S.A.
Warren, MI 48090,
(Received 18 krly 1984) Abstract-The ideas previously proposed in this journal for preprocessing three-dimensional solid finite element structures and for postprocessing finite element analyses of these structures are extended and given the flexibility required for practical use as an engineering tool.
2. DATA STRUCTURE
1. INTRODUCTION
The inception of SPIFFE was the PLANIT code described in Ref. [l]. From the beginning, the data structure in PLANIT was cumbersome to process information and enormous storage was required. By changing the data structure, SPIFFE became more compatible with common FEM codes and certain computer graphics features became much easier to implement. All of PLANIT’s data was in one block, illustrated in Fig. 1. This structure repeats (x, y, z) coordinates and for large meshes is time consuming to access. SPIFFE’s data format adheres to the common practice of FEM codes with a list of (x, y, z) coordinates followed by a connectivity table, shown in Fig. 2. With this data structure, coordinates are stored only once and it is easier to incorporate different element types by reading strings (1) extends types of elements to include the ISin the connectivity table. We extended our version node pentahedron and the IO-node tetrahedron; of PLANIT to allow tetrahedra and pentahedra. In (2) allows planar cross-sections to be defined Fig. 2, types of elements are distinguished by countgraphically on the displayed mesh: ing local nodes numbers in the second column. (3) automatically defines a plotting grid with no Some FEM codes have data structures which restrictions on the shape of the cross-section; skip node numbers whenever midside nodes are ex(4) eliminates the need to solve systems of noncluded from straight edges. To avoid such special linear polynomial equations and the batch process cases, SPIFFE automatically inserts mid-nodes for in Ref. 121; such edges. The geometric views are not altered nor (5) provides a variety of geometric projections. are FEM results affected, since such nodes become dependent nodes in the FEM formulation. The second section of this article will focus on the A significant benefit from the revised data strucdata structure which reduced significantly the size ture is the ease of creating a file for the outer surface of files required in Ref. [l] and is more compatible of the mesh. Since this surface file is another conwith common FEM codes such as NASTRAN 151. nectivity table, it is easy to construct and is comThis brief section is followed by details on the im- patible with other plotting and data-handling rouplementation and the inclusion of the pentahedron tines. SPIFFE automatically creates a surface file and tetrahedron. The fourth section explains because the time consumed in creating the file is SPIFFE’s ability to graphically choose planar immediately recovered when the user chooses not cross-sections, an indispensable production code to plot the interior faces of the mesh. Interior faces feature. The fifth and most important section out- also tend to significantly clutter visual displays. lines our methodology for automatically creating SPIFFE’s fast response time would have been prothe plotting grid and avoid having to solve systems hibitively slowed by including complete hidden line of polynomial equations. removal.
graphics has become an indispensable tool for three-dimensional finite element analysis applications. Not only are displays of a finite element decomposition used to diagnose the consistency of the mesh, but the enormous output of a three-dimensional analysis often requires graphics to display the results of the analysis. In this journal, two articles [I, 21 addressed the problems of processing meshes for consistency and for plotting finite element analysis output. In this article, we describe our code SPIFFE which overcomes the difficulties of putting the ideas in [l, 21 into a productive code. Through a redefined data structure and exploitation of computer graphics, SPIFFE:
Computer
815
D. A. FIELD and M. B. HAT-TON
816
and on the surface of the parametric domain can be written as (x(0), y(O), z(0) where 0 E [0, l] and where x(0), y(B), and z(e) are at most quadratic polynomials in 8. The image of such a line segment intersects a cross-section defined by the plane, ux + by + c;: + d = 0, if and only if the quadratic equation 2 2
1 2
0 1
0 0
1 1
: 2 2 2 2
43 ; : : 5.5 11 6.5 10 7.5 0 1 8 10.5
ax(e) + by(o) + c:(e)
l 0 l
Fig. 1. Block
data for PLANIT.
3. CROSS-SECTIONS FOR VALIDATING MESHES
The quadratic isoparametric family of finite elements, Fig. 3, allows the calculation and display of points which outline planar cross-sections of the hexahedron. This family of finite elements is parametrized by
where N is the number of nodes of the finite element, {$i}E, are the well-known quadratic Lagrange shape functions, (xi, y;, zi)7 are the coordinates of the N nodes, and the parameters r, s, and t are suitably restricted within the parametric domain 0 5 r I 1. 0 I s 5 1 and 0 I t 5 1. From the quadratic nature of $i in eqn (1). the image of a line segment parallel to a coordinate axis CPENTA
57:
571
::
5%
5;;
5:: 579
3 5;:
5:;
5:: 589
__
CHEXA CHEXA
CHEXA
2
:;; 1120
GRID GP.iD GEID
:z 51
550 1621
452 1488 1544 3.31302-O 3.31559-o 3.29522-O
Fig. 7. Connectivity
+ d = 0
has a root B*c[O. 11. Since line segments on the tetrahedral face (face 1, 5, 2. 9. 4, 8 in Fig. 3(c)) cannot be parallel to any of the coordinate axes, this out-of-plane face is mapped onto one of the other tetrahedron faces and the composite transformation is used to determine [x(0*), y(f)*), z(f3*)lTon the outof-plane face. A similar composition of transformations is used for the out-of-plane face (face 2, 8, 3, 12, 6. 14, 5, I1 in Fig. 3(b)) of the pentrahedron. Figure 4 displays a typical cross-section from a direction perpendicular to the defining plane. The dots in Fig. 4 lie on both the intersection plane and on the surface of a finite element. Since SPIFFE places an element’s label at the average of the screen coordinates of the dots which lie on the surface of that element, unlabeled or multiple labeled regions may occur. In Fig. 5 the cross section of element 103 yielded more than one closed contour. SPIFFE allows the user to relabel such cross-sections as shown in Fig. S(c). Generally. unlabeled regions of a cross-section could indicate a missing element, a gap between elements, overlapping elements or a distorted face of an element, see Figs. 6(a) and (b). A strategy for using cross-sections to validate meshes should focus on areas with a high concentration of elements or an area where anomalies are suspected, such as a plane of reflection used to create the mesh. A cross-section should pass through as many of these elements as possible. On the crosssections, the user should look for elements whose boundaries have high curvature, unlabeled regions, regions with duplicate labels, extremely narrow re-
239 440 1596 1608 1637 1647 31043-0.79060 24084-0.43439 70061-0.43106
table for SPIFFE
523 1572 1625
4 94 1507
486 1540
Processing
three-dimensional
finite element assemblies and solutions
817
(b)
Fig. 3. The quadratic isoparametric elements allowed in SPIFFE. (a) 20-node hexahedron; pentahedron; (c) IO-node tetrahedron.
: :..a**
. . ..i.* . . .
. *.
*.
‘._.
.
:
.
-.
:
. .
.
.*
:
.*.’
“.: -.
(b) M-node
-. . . . ..- . . . .
.
:
..
:*
(a) . . . .
. . . . . f . . . .. .. . . . . . . _ . . . . . . . . . . . . _ . . . . . . . . . . . .
--106:
:
105 104 .:103. . . . . . . . . . . . . . . . . . . . . . . . .. .. . . . . . . _ . . . . . . . . . . . . _ . . .
W . . . . . . . . . . .. .. . . . . . . _ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ‘O? 106 1103 :
105 104 . . . . . . . . . . . . .. . . . ... ..... ... _ ... ..,.. . . . . ..- . . -
(4 Fig. 4. Two views of a typical cross-section.
Fig. 5. Relabeling the two components of the cross-section of element 103.
D. A. FIELDand M. B. HATTON
818
gions, and disconnected regions. Features such as windowing to subset assemblies, cross-sections, and increasing the density of points outlining the cross-section are valuable visual aids. We have noticed high boundary curvature on elements when the coordinates of a node were simply incorrect. Excessive curvature can also occur when pentahedra and tetrahedra are formed by coalescing
.
nodes of hexahedra, see Fig. 7. Coalescing of nodes can lead to nonconforming elements. In Fig. 8 the two tetrahedra share three vertices A, B. C. but their corresponding faces do not coincide. In this example, the unlabeled region was caused by element 901 bulging into element 900. SPIFFE can only indicate the presence of geosolid metric inconsistencies in a three-dimensional
. .
251
. . . . . . . . . . . . . . . . . . . . * * . . . . . * . . . * - . *. 242 . . 184 . l'ei . . . . . . . . . . . . . . . . . . . . . . . . ...*.. . . . . . . .
. . . . .
.
.
.
* . . .
.
. 214 . . . . . . . . . . 213 * . . . . . . . a.* . . . . . . . . . . . . * **. . 208 -. . . . . . . . . . . . . . . . . . . . . . f Missing Element 244
(a)
.
. . . . . . . . . . . . . . . . . . * . . . . .
.
207
* . . . .
.
-
. .
Gaps or Overlaps
225
l
. .
. .
.
. . .’
-.
-
.
.
.. . . . .
* .
234
. .
.
- . . . . . . . . . . . .. .* .
205
.
l
. . . . . . . . . . . . . . . . .
. . . . . . . .
. . .
.. .. . . : : . . .*
(bl Fig. 6. (a) Cross-section
with a missing element: (b) cross-section
with gaps or overlaps.
Processing
three-dimensional
Fig. 7. Schematic description
finite element assemblies and solutions
of identification
finite element mesh. The user must use discretion in correcting the inconsistency. Using SPIFFE to monitor corrections to a mesh, we have found that one correction can easily propagate a series of corrections. 4. DEFINING THE PLANAR CROSS-SECTION
To effectively diagnose meshes for inconsistencies, the user must be given a quick facility to choose cross-sections based upon visual displays. To plot finite element results on planar cross-sections, the user often must define a precise cross-
process for degenerate
819
prisms and tetrahedra.
section. SPIFFE provides capabilities that satisfy both of these requirements. SPIFFE offers three of parallel projections-orthographic, types oblique, and isometric, Figs. 9-l 1. A one-point perspective projection is also available, Fig. 12. The point of perspective and the angles of the oblique projection can be easily changed by the user. The default oblique projection is a cabinet projection. By coupling the capability of graphics hardware with the geometry of perspective transformations, SPIFFE enables the user to interactively display a finite element mesh and visually locate the crosssection. Using the terminal cross-hairs of a Tek-
D. A. FIELD and M. B. HATTON
820
. .,
,.
.
,
.
.
.
.
*
. ‘1.
.
.
.
..
. .
.
. .
901
*. . .
.
. .
900
.
.. .
. . . *.
* : ”
Fig. 8. Two adjacent degenerate
*
surfaces of degenerate tetrahedra.
tronix 4014 terminal,
Fig. 9. Oblique projection (cabinet).
SPIFFE can locate screen coordinates and automatically define horizontal and vertical cross-sections perpendicular to the screen. Two screen locations are required for oblique crosssections perpendicular to the screen. In all geometric projections except isometric views, the .uy-plane is the plane of projection. Therefore, unless the projection is orthographic, planes perpendicular to the screen are not perpendicular to the projection plane. Given a screen location, SPIFFE automatically generates three points which define the unique plane whose projective image is a line on the visual display. Table 1 summarizes SPIFFE’s choice of three coordinates defining cross-sections under the geometric projections provided. In non-orthographic projections, to obtain cross-
Fig. 10. Orthogonal projection.
A Fig. 11. Isometric projection.
:
Fig. 12. Perspective
projection.
YS’ti
XS’
XS’
YS’ti + y-qj-
z+-+10
(
>
>
.O
+ 10, 10
YS’ti
d2
iz+ ti + (YS + lO)w?
( -XS’
YS’ti
+
3
+
7
YSG
XS’
(
+ 7.0
7
+
YS’ti +
’ YS’v3 >
and X, Y, Z are the translations
in the x, y, and Z,directions,
(XS + c + x, YS + D + Y, 0) (XS + 10 + C + X. YS + D + Y, 0) (XS(lOR + 1) + c + x. YS(lOR + 1) + D + Y, 10 + Z)
Oblique plane (XSI, YSl) (XS2, YS2)
>
+
7,
>
10
-XSl’
-XSl’ + 10, T
ti
-XS2’
75--
respectively.
(XSl + C + x, YSI + D + Y, 0) (XS2 + C + X, YS2 + D + Y, 0) (XSl(lOR + 1) + c + x, YSl(lOR + 1) + D + Y, 10 + Z)
plane and the display screen
YSl’v?
YSl’ti XSl’ + 7 v5
(-
YS2’ti XS2’ x+7. YS2’ti + 7.0 >
(
+77--*O
(
YSlti XSl’ ys1+<--3.
(XSl, YSl, 0) (XS2, YS2, 0) (XSl, YSl, 10)
around the r-axis relative to the X-
(XSl, YSl, 0) (XS2, YS2, 0) (XSl + IO(cot a cos p), YSl + lO(cot a sin p), 10)
of the projection
_ (XS + 10)’ v5
10, qg
10, 10 >
>
(XS + 10)’ + YSQ v5’ ,
(x
(
g+~,-~+~,o
YSV5
ws, YS, 0) (XS + 10, YS, 0) (XS, YS, 10)
are rotated to account for the coincidence
>
(XS + c + x, YS + D + Y, 0) (XS + C + X, YS + D + Y + 10, 0) (XS(lOR + 1) + c + x, YS(lOR + 1) + D + Y, 10 + Z)
where (C, D, - t/R) is the center of projection
Perspective
(XS, YS, 0) (XS + 10, YS, 0) XS + lO(cot a cos (3). YS + lO(cot a sin p), 10)
Horizontal plane (XS. YS)
with the xy-plane and B is the rotation anele of the projectors .
-XS’ ‘ti-
>T
-XS’
(YS + lo,?4
( 7z+TT’~+~*O
XS’
(XS, YS, 0) (XS, YS + 10. 0) (XS, YS, 10)
angle of the projectors
where the Primes indicate that the screen coordinates having a vertical y-axis.
Isometric
Orthogonal
Vertical plane (XS, YS)
(XS, YS, 0) (XS, YS + 10, 0) (XS + lO(cot a cos p), YS + lO(cot (I sin p), 10)
where d is the intersection axis.
Global coordinates of 3 points determined by SPIFFE Oblique
Point(s) chosen by user via crosshairs
Table 1.
822
D. A.
FIELD
and M. B. HATTON
sections parallel to the coordinate planes the user can convert to an orthographic projection and rotate the mesh appropriately. If the user wishes to remain in the non-orthographic projection, he can still graphically choose cross-sections parallel to the coordinate planes. Since a screen location is the image of a projection line, SPIFFE provides simple menu-driven aids to quickly choose which element and where on the surface of that element the projection line and the cross-section should interact. A third alternative is to mathematically define a plane. The user mathematically defines planes by supplying a point on the plane and a normal to the plane. three points on the plane or four coefficients in the equation of a plane. Node numbers can be used to define points. These methods of defining cross-sections are useful when the resolution of display devices is not high enough or when specific cross-sections have been predetermined.
5. PLOTTINGCONTOURSON CROSS-SECTIONS The previous sections lay the foundations for SPIFFE’s main purpose. plotting contours of finite element solutions on arbitrary cross-sections of three-dimensional solid finite element meshes. Two aspects of contour plotting remain to be addressed. First. a plotting grid must be established quickly and with minimal user effort. The user is required to specify only a cross-section; SPIFFE automatically creates a plotting grid. This is significant advantage over the manually intensive effort required by STRSIT [2]. SPIFFE also avoids the need for special procedures for cross-sections containing holes and disconnected regions. see Ref. [2]. Secondly, the finite element solutions must be evaluated on the plotting grid in a reasonable amount of time. SPIFFE takes advantage of the plotting grid’s formulation and of the basic principles of the finite element method to avoid solving the systems of nonlinear equations required by STRSIT. Since plotting grids require (.v, ~1,Z) coordinates on the cross-section, SPIFFE capitalizes on the fact that the (x. y, ;) coordinates of the dots outlining the cross-sections are already available. The method of determining these coordinates is extended, see Section 3, to allow parallel segments inside the parametric domain. Whereas many (x. y, Z) coordinates are produced, their corresponding V. s. t) coordinates are known as corners of convenient small blocks, see Fig. 13. By connecting the (r. s, t) coordinates of each small block, a plotting grid of polygons is created in the rst-coordinate space and mapped by the finite element transformations in eqn ( I) onto the cross-sections of each intersected element. We have found that the images of these polygons have always been convex polygons and almost exclusively triangles and rectangles, see Fig. 14. SPIFFE automatically triangulates the
Fig. 13. Decomposition of the rsf domain into small cubes to create a plotting grid.
higher order convex polygons and non-convex polygons. With the nodes of the plotting grid now associated with known elements and Cr. s. t) coordinates, STRSIT’s requirement to solve systems of polynomial equations for each node in the plotting grid has been removed. Given the (x. y. Z) coordinate of a node on the plotting grid and its corresponding (r*. s*. t*) coordinate, along with the displacements (ui, 1’;. I~B~) of its associated finite element, SPIFFE computes the partial derivatives &r/dx, &/a~. du/a:, &J/&Y,&Vay, &V&, &V/&V.&cVny. and hVk required for evaluating stress and strain from the chain rule
Fig. 14. The plotting grid for the cross-section
in Fig. 13
Processing three-dimensional
8
0.0
b
0.719192D+o4 0.14383833*05 0.215758D+OS 0.287677D+Of
c
d
e f * h
0.3595%D*O5
i j
O.S75354D+OS 0.6b7273D+OS
finite element assemblies and solutions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
0.431515D+o5 0.503435D+05
i*
i
. * . . . . . . . . .
i
.
l
-.
/.
.
.
.
.
.
823
.
.
.
\
Fig. 15. Stress contours on cross-section using the averaging method in Ref. [4]
which yields expressions au
al4 dr
such as au as
all at
ax=arz+asax+arax where all the terms in the right-hand rivable from eqn (I) and
side are de-
Since stress and strain are not continuous across finite element boundaries, smooth contours can be plotted in SPIFFE whenever the user supplies consistent stresses at the elemental nodes of the mesh.
An approach similar to Meek and Beer’s method [4] of assigning consistent stresses was used to produce the smooth contours in Fig. 15. REFERENCES
1. A. E. Frey, C. A. Hall and T. A. Porsching, An application of computer graphics to three-dimensional finite element analyses. Compuf. Strucfures 10, 149-154 (1979). C. A. Hall, T. A. Porsching and F. Sledge, STRSIT: contour plotting of stresses on planes of intersection. Comput. Structures 12, 221-224 (1980). 0. C. Zienkiewicz. The FiGre Element Merhod. McGraw-Hill, New York (1971). J. L. Meek and G. Beer, Contour plotting of data using isoparametric element-representation. In?. J. Meth.
5, Engng 10, 954-957 (1976).
MSC/NASTRAN. The MacNeal-Schwindler Corporation, 815 Colorado Boulevard, Los Angeles, CA 90041, U.S.A.