2.6 THE OPENGL PLOT PROGRAM Z88O

You may illuminate a structure with three different light sources or plot with hidden lines, both the undeflected and the deflected structure. You may plot stresses and X, Y and Z deflections with a color range. You may plot a limited range of nodal or element numbers - a nice feature especially for large structures. A printer or plotter feature is not included into Z88O - and why - just do a screen shot by Shift-Print into the clipboard and proceed with Windows’ program Paint or Corel Paint.

Z88O uses OpenGL so your computer must be able to deal with OpenGL graphics. This is true for all newer Windows machines and a quite cheap graphics card will do well. Anyway, it’s always a good idea to control the system settings - sometimes you may turn on OpenGL hardware acceleration. On LINUX systems you should install the genuine NVIDIA graphics driver from www.nvidia.com if you’ve got a NVIDIA graphics card – the speed will increase heavily in contrast to the standard LIXUX graphics driver.

Of course, you may define your choice of colors, the light features, material properties, the polygon offset in the parameter files Z88O.OGL (for Windows) and Z88.FCD (for LINUX/UNIX). Be careful with changes in Z88O.OGL (Windows) or Z88.FCD (UNIX/LINUX): You should have some proper knowledge about OpenGL if you want to change light effects etc. Otherwise you may pull a long face because nothing will work as you wish. Some hints are included into Z88O.OGL and Z88.FCD, however, i cannot give here an introduction into OpenGL. Consult the two basic books „OpenGL Programming Guide“ and „OpenGL Reference Manual“ from Addison-Wesley.

Start of Rendering: When Z88O was launched the OpenGL subsystem is started and prepared to go. You’ll start rendering with the very first Run pushbutton.

Needed Files: | Super Struktures | undeflected FE Struktures | deflected FE Struktures
Z88NI.TXT | yes | no | no
Z88I1.TXT | no | yes | yes
Z88I2.TXT | no | yes for displaying the boundary conditions | yes for displaying the boundary conditions
Z88I5.TXT | no | yes for displaying the surface and pressure loads | yes for displaying the surface and pressure loads
Z88O2.TXT | no | no | yes
Z88O5.TXT | no | yes for displaying the stresses in the Gauss points | no
Z88O8.TXT | no | yes for displaying the stresses in the corner nodes or the average element stresses | yes for displaying the stresses in the corner nodes or the average element stresses

Z88 deals with these files

Rendering with Z88O: For fastest operation Z88O connects the nodal points - and only the corner points- with straight lines, although for Serendipity elements the edges of the elements are square or cubic curves. However, especially illuminated scenes need a huge amount of computational power. Please keep in mind: If a part renders pretty fast in your CAD system, Pro/ENGINEER for example, and the same part renders quite slowly in Z88O - this is normal business because CAD systems are „drawing“ only some outline curves. In contrast, FEA system have to render every finite element i.e. compute the normal vectors for any element surface, compute light effects for every tetrahedron etc. Hidden line scenes put very heavy load on the CPU, too.

What can i plot with Z88O? Nearly everything if a solver (Z88F or Z88I1 with Z88I2 or Z88I1 with Z88PAR) was run which stored the deflection file Z88O2.TXT along with a run of the stress processor Z88D which stored the three stress files Z88O3.TXT (for you to check the stresses), Z88O5.TXT and Z88O8.TXT (for Z88O). Even for trusses you may plot the „von Mises“ stresses (i.e. tensile stresses) with different colors. Only beams No.2 and No.13 and cams No.5 allow only the plotting of deflections and nothing more. Why? Because you must compute for beams and cams also the stress concentration factor which is impossible for a FEA system which deals with a whole structure of beams. Of couse, you may compute the stresses in a chamfer by putting a FE mesh around it. But this needs either plane stress elements or 3D elements but neither beam elements nor cam elements.

Plot of stresses: The kind of plotting the stresses within FEA programs is truly of philosophical character. As a matter of fact, numerous experiments and computer studies at the Institute of Engineering Design and CAD of the University of Bayreuth, Germany, showed, that some very expensive and well-known professional FEA programs produced incorrect stress plots in some situations! The best way is the computation of stresses directly in the Gauss points. However, this is odd for OpenGL in some modes so i decided for the following way after a lot of experiments:

+ von Mises/principla/Tresca stresses in corner nodes.In fact, the stresses are computed not really in the corner nodes which would lead to very wrong results especially for very tapered elements but in Gauss points laying in the near of the current corner nodes. Stresses are computed for just the same number of Gauss points like the number of corner points. Because often a node is linked to more than one element the stresses are computed to a mean value from the „corner node“ stresses of all linked elements. This results in pretty balanced stress shadings which are mostly somewhat lower than the maximum stresses in the Gauss points, however. The value of the order of integration INTORD in the header file Z88I3.TXT has no meaning but INTORD should be greater than 0.
+ von Mises/principla/Tresca stresses as a mean value for each element. The stresses are computed in the Gauss points of the current element, added and then divided by the current number of Gauss points. This results in a mean value for the von Mises/principla/Tresca stress per element. The value of the order of integration INTORD in the header file Z88I3.TXT is important and INTORD must be greater than 0.
+ von Mises/principla/Tresca stresses in Gauss points. This is most accurate but delivers not always very pretty pictures. INTORD must be greater than 0.
Z88O may show these stresses after a run of Z88D – but only one type of stress:
- von Mises stresses
- Rankine or principal stresses
- Tresca stresses

Thus, if you have computed the von Mises stresses with a Z88D run Z88O will show the von Mises stresses. If you want to see now the Tresca stresses you must leave Z88O. Edit Z88I3.TXT, enter the proper parameter (in this case, set the third entry to 3) and re-run Z88D. Then start Z88O again. This looks awkward but don’t you know before starting the FE computations which type of stresses is suitable and correct for your task?

Plot of deflections: You may plot the undeflected or the deflected structure. The enlargement factor is adjustable, with 100 as the default value for X, Y and Z. In addition, you may plot the deflections for X, for Y or for Z with color shading. This is a pretty nice feature for large spatial structures. You may plot the shaded colors for stresses or for the deflections or the hidden line display or the wire frame display with the deflected structure. The display of the stresses in Gauss points in only possible for undeflected structures.

| 3D | 2D | BC | undef. | deflec. | nodes | elem.
Light | + | + | + | + | + | - | -
Hidden Line | + | - | + | + | + | o | -
Wire Frame | + | + | + | + | + | + | +
Stresses in corner nodes | + | + | - | + | + | - | -
Stresses aver. elements | + | + | - | + | + | - | -
Stresses in Gauss points | + | + | - | + | - | - | +
Deflections X | + | + | - | + | + | - | -
Deflections Y | + | + | - | + | + | - | -
Deflections Z | + | + | - | + | + | - | -

combination of the different modes of Z88O

Hints for the user for Zooming, Panning and Rotating:
1. You may work without limitation with the special keys for Windows (see below) or the pushbuttons for UNIX. You should use the special keys or the pushbuttons for precise zooming, panning and rotating. This is the default mode. Mouse navigation is turned off.
2. With Z88O you may use mouse navigation: Under Windows, press the mouse icon. Under UNIX, press the pushbutton Keyboard/ Mouse: Now you can
+ zoom with the left mouse button pressed
+ pan with the middle mouse button pressed
+ rotate with the right mouse button pressed

This option fits well for limited zooming- and panning ranges and for fast but quite unprecise rotating. You may in addition use the special keys or pushbuttons but this mixed mode is not a real feature and may lead to unpredictable results because Z88O uses different calculations for both modes.

Special key strokes for Windows and LINUX:

Prior: increase zoom

Next: decrease zoom

Cursor left: panning X direction

Cursor right: panning X direction

Cursor up: panning Y direction

Cursor down: panning Y direction

Home: panning Z direction

End: panning Z direction

F2: rotate around X axis

F3: rotate around X axis

F4: rotate around Y axis

F5: rotate around Y axis

F6: rotate around Z axis

F7: rotate around Z axis

F8: reset all rotations to 0

The „coordinate system“: OpenGL works with a Clipping Volume, i.e. with a kind of cube, defined by Xmin and Xmax in horizontal direction, by Ymin and Ymax in vertical direction and Zmin (points towards the user) and Zmax (points away from the user). If you use a too-large zoom factor or if you are panning the structure too near to you then the range of Zmin is exceeded and parts of the structure are laying outside the viewing volume. This offers a nice chance to look into a structure. Otherwise, change the value of Zmin (default entry is –100) to lower values, e.g. -1000: use Factors > Z limit towards you. The following screenshots are showing the situation:

Windows: piston of a BMW engine (motorcycle F650GS) Zlimit: default value –100.

Windows: piston of a BMW engine (motorcycle F650GS) Zlimit is –10, piston has slash cut.

The menu items of Z88O:

Name of Structure File: Windows: the diskette icon. UNIX: the File pushbutton

Choose the structure file here. Enter name, if necessary with path. The new stucture is loaded. You’ll start rendering with the icon Go or with the Run pushbutton. This mode exists only for a first entry control of an undeflected structure. Please keep in mind: To use all display modes, Z88O needs the files Z88I1.TXT (structure data), Z88I2.TXT (boundary conditions), Z88I5.TXT (surface and pressure loads, if given), Z88O2.TXT (the computed deflections), Z88O5.TXT (stresses from Z88D) and Z88O8.TXT (stresses from Z88D).

Deformation Modes of the Structure: the proper icons or pushbuttons

Plots the undeflected structure or the deflected structure. You may do all other rendering operations with the undeflected structure or the deflected structure. Exception: displaying the Gauss stresses in a deflected structure is not possible.

Caution Deflected: The user must have executed a calculation of displacements before using this function. Do a FEA run with Z88F or Z88I1/Z88I2 or Z88I1/Z88PAR before using Z88O. Otherwise, some old files Z88O2.TXT (displacements) from earlier Z88 runs are opened causing totally wrong results!

Choice of the 3D effects: the proper icons or pushbuttons

1. Light on. The structure is illuminated with three light sources. You may modify the features of the light sources by editing the header files Z88O.OGL (Windows) and Z88.FCD (UNIX).
2. Hidden Lines. For spatial structures the finite elements mesh is rendered with hidden lines. For 2D struktures the pure finite elements mesh is drawn (there is nothing to hide). In this mode you cannot see all desired nodal and elements labels because some labels are hidden. The polygon offset can be edited in the header files Z88O.OGL (Windows) and Z88.FCD (UNIX).
3. Wire Frame. All lines are plotted, thus, this is the proper mode for 2D struktures and very simple 3D structures. Only in this mode you can see all desired nodal and elements labels.
4. The von Mises/principla/Tresca stresses of the corner nodes are plotted. In fact, the stresses are computed not really in the corner nodes which would lead to very wrong results especially for very tapered elements but in Gauss points laying in the near of the current corner nodes. Stresses are computed for just the same number of Gauss points like the number of corner points. Because often a node is linked to more than one element the stresses are computed to a mean value from the „corner node“ stresses of all linked elements. This results in pretty balanced stress shadings which are mostly somewhat lower than the maximum stresses in Gauss points, however. The value of the order of integration INTORD in the header file Z88I3.TXT has no meaning but INTORD should be greater than 0.
5. The von Mises/principal/Tresca stresses as a mean value for each element are plotted. The stresses are computed in the Gauss points of the current element, added and then divided by the current number of Gauss points. This results in a mean value for the von Mises/principal/Tresca stress per element. The value of the order of integration INTORD in the header file Z88I3.TXT is important and INTORD must be greater than 0.
6. The von Mises/principal/Tresca stresses in the Gauss points are plotted. This is the most accurate mode but leads not always to very nice pictures. You may change the size of the Gauss points in the menu. The value of the order of integration INTORD in the header file Z88I3.TXT is important and INTORD must be greater than 0.
7. Plot of the displacements for X with color shading
8. Plot of the displacements for Y with color shading
9. Plot of the displacements for Z with color shading

For pos. 4. to 9. the color range may be edited in the header files Z88O.OGL (Windows) and Z88.FCD (UNIX).

Windows: Hidden line plot of the BMW piston.

LINUX: Hidden line plot of the BMW piston.

Drawing Node and Element Numbers: Labels > No Labels, Nodes, Elements, Label all

Plot the element numbers or the node numbers or skip numbering. You can define ranges from-to, e.g. plot the nodal numbers from 11 to 19 or plot the element 3, i.e. from 3 to 3. Z88O recalls your entries even if you change to No Labels. In Label all mode the element and node numbers you have chosen before are plotted. If you want to see all numbers again but you have forgotten how many nodes and elements are in your structure you may enter a very high number e.g. from 1 to 10000000. Z88O computes then the exact number. Please remember that you’ll only get rendered all desired labels on the surfaces if you are in Wire Frame mode. The other modes may hide some labels. And labels inside a structure are usually covered by the tetrahedron and hexahedron surfaces.

Zooming:

Keyboard: PRIOR and NEXT

mouse navigation on: left mouse button pressed

Panning:

Keyboard: X: CURSOR LEFT and CURSOR RIGHT

Y: CURSOR UP and CURSOR DOWN

Z: HOME and END

mouse navigation on: middle mouse button pressed

Rotating:

Keyboard: F2~F7: rotate in 10° steps. F8 resets to 0.

Menu: Faktors > Rotations 3D

mouse navigation on: right mouse button pressed

Enlarging Deflections:

Menu: Factors > Deflections > FUX, FUY, FUZ

Some remarks on stresses:

If you did before a stress calculation with Z88D (this is possible and useful for all element types except for beams No.2, No.13 and cams No.5), then you may plot the von Mises/principal/Tresca stresses either in the corner nodes or as mean values per each element or in the Gauss points. And before running the stress processor Z88D you really had to calculate the displacements by running Z88F or one of the sparse matrix solvers. Thus, the sequence is:

1. Cholesky solver Z88F or sparse solvers Z88I1/Z88I2 or Z88I1/Z88PARE
2. edit the parameter file Z88I3.TXT. Mind the third entry: 1= von Mises stresses, 2= principal stresses, 3=Tresca stresses.
3. run stress processor Z88D
4. run Z88O, if you want to plot stresses

Caution: The operator is responsible for first running a stress calculation by Z88D before using this function. Otherwise some old stress files Z88O5.TXT and Z88O8.TXT from earlier calculations are read in causing totally wrong results!

Automatic Scaling: the appropriate icon or pushbutton

The Autoscale function takes care that structures will completely fit on the screen. Autoscale activates automatically if a new structure is loaded.

Menu item Boundary Conditions:You may choose which boundary conditions to show. Sometimes you may want to hide some BCs for a better overview. You may also change the size of the BCs points.

Menu item Size Gausspts.:You may change the size of the Gauss points to get a nice picture.

Menu item Coordinate System:You may switch on or off the coordinate system. Default is on.

Menu item Mesh over Stresses: For 3D structures you may switch on or off the mesh i.e. the hidden line display over the stresses display. Default is on. For very large structures you should switch off Mesh over Stresses because this means heavy computing load.

Height Ratio FYCOR: Files Z88O.OGL and Z88.FCD

The height ratio can be adjusted to the monitor customization. Therefore, the entry FYCOR exists in Z88O.OGL (Windows) or Z88.FCD (UNIX). Load a perfectly circular or perfectly square structure and modify FYCOR until this structure is plotted perfectly circular or square on your monitor. Please keep in mind that FYCOR is loaded with the start of Z88O, so you must re-launch Z88O after a modification in the files. You need to make this modification only once.

Windows: plot of the von Mises stresses in the corner nodes of the BMW piston. Mesh over Stresses is switched on.
LINUX: plot of the von Mises stresses in the corner nodes of the BMW piston. Mesh over Stresses is switched on.