FEMvrml: An interactive virtual environment for visualization of finite element simulation results

FEMvrml: An interactive virtual environment for visualization of finite element simulation results

Available online at www.sciencedirect.com Advances in Engineering Software 39 (2008) 737–742 www.elsevier.com/locate/advengsoft FEMvrml: An interact...

1MB Sizes 159 Downloads 93 Views

Available online at www.sciencedirect.com

Advances in Engineering Software 39 (2008) 737–742 www.elsevier.com/locate/advengsoft

FEMvrml: An interactive virtual environment for visualization of finite element simulation results Eun-Jin Lee, Sherif El-Tawil * Department of Civil and Environmental Engineering, University of Michigan, Ann Arbor, MI 48109-2125, United States Received 9 January 2007; received in revised form 30 October 2007; accepted 30 October 2007 Available online 20 December 2007

Abstract Finite element simulations produce information that is proportional to the size of the numerical model. For large models, the data produced is voluminous and can therefore be challenging to deal with and interpret. This paper discusses the use of virtual reality to manage this information and presents FEMvrml, an interactive virtual environment within which users can interact with and explore the simulation results. The structure and methodology behind FEMvrml and the algorithms employed are described along with application examples that show the effectiveness and capabilities of the system. Ó 2007 Elsevier Ltd. All rights reserved. Keywords: Finite element; Simulation; Virtual reality; Visualization; Java Applet; External authoring interface; Building collapse

1. Introduction The finite element (FE) method is a hugely popular computational simulation technique. Since its emergence in the late 1940s as a method for structural analysis, it has continually developed until it has become a sophisticated generic simulation method with application in many engineering and scientific disciplines. As with any numerical technique, however, FE simulations produce information that is proportional to the size of the numerical model. For time dependent simulations or iterative analyses that involve multiple simulation steps, the amount of information produced can be overwhelming. Visualization techniques have also evolved significantly in the past several decades and have become indispensable for interpreting finite element output data. The earliest FErelated visualization tools channeled FE data files into plotting programs, which plotted meshes along with various other types of spatial information. The next generation of FE visualization tools incorporated command-based graphical user interfaces (GUIs), where a user could type *

Corresponding author. Tel.: +1 734 764 5617; fax: +1 734 764 4292. E-mail address: [email protected] (S. El-Tawil).

0965-9978/$ - see front matter Ó 2007 Elsevier Ltd. All rights reserved. doi:10.1016/j.advengsoft.2007.10.006

in commands to manipulate a graphical representation of their data. Continual refinement of GUIs has lead to present day 3D post-processing tools that rely on menu-driven, point-and-click functionality. However, most currently available FEM post-processors are still cumbersome to operate because of limited capability to navigate and interact with the model. Advances in virtual reality (VR) software and hardware have permitted yet another leap forward in visualization of FE data. The ease of navigation in the VR environment offers faster and more intuitive interpretation of FE data and allows even non-specialized users to appreciate and get a better understanding of the results [1]. A number of VR-based commercial software packages have recently become available, e.g. [2,3] and [4]. These products are, however, proprietary, which eliminates the potential for user innovation and extensions because the source code is not publicly available. For example, users cannot develop new training, research and educational tools that build directly on these platforms. A particularly effective way by which to develop costeffective, open-source training tools is to use readily available open standards and non-proprietary software such as the Virtual Reality Markup Language (VRML) [5]. VRML

738

E.-J. Lee, S. El-Tawil / Advances in Engineering Software 39 (2008) 737–742

is the first international standard of its kind for the description of 3D scene data. Since VRML was developed as an Internet format, VRML viewers are plugins that are freely available for popular internet browsers. This implies that VRML can serve as the basis for a true cross-platform standard. The capabilities of VRML can be enhanced through Java Applets (JA), which control the virtual environment through an External Authoring Interface (EAI). There have been some recent research efforts to develop VRML-based postprocessors to interpret the results of FE structural analysis. Most of these efforts have simply focused on visualization of FEM results for individual simulations. However several researchers have attempted to develop interactive environments, which can perform and display the results of structural simulations in near real time with the goal of providing true user immersion in the virtual environment. In such systems, a user can interact with the model within the virtual environment, for example, poke the structure and immediately see how it responds. These efforts have been successful for cases using simple models that could be analyzed in a short period of time so as not to introduce disruptive time delays in the visualization environment, e.g. [6,7] and [8]. The few VRML-based applications that have been developed for structural analysis are mostly for educational purposes [9]. The objective of this paper is to describe a research effort in which a VRML-based postprocessor (FEMvrml) enhanced with a JA through an EAI was written to aid in the interpretation of FE results for structural analysis applications. The proposed system is suitable for use in training or education and is similar to other existing systems in that VRML is used to create the visualization envi-

ronment. The system differs from other systems in its ability to consider part-based geometry and strategies for dealing with elements that have been deleted in inelastic simulations. A JA-based Play Tool Box is introduced to increase interactivity and functionality. This paper describes the algorithms used in the software and discusses key modeling and technical issues. Various examples that demonstrate the capabilities of the developed visualization tool are also introduced. 2. Structure of developed software FEMvrml runs within a container written in Visual C++ and is comprised of two parts. As shown in Fig. 1, the first part is designated ‘‘Data Processing”. Its role is to read in FE simulation results and translate it into a suitable VRML geometric format. A major part of a typical VRML file is a hierarchical 3D description of a scene, called the scene graph. Its elements are nodes, of which more than 50 types are defined. Each node contains a set of fields that describe predefined data. The second part of the FEMvrml container is designated ‘‘Shell Display” in Fig. 1. Its primary role is to load and display the web-compatible environment wherein the VRML browser and JA are embedded. The file generated by the conversion code can also be loaded into any standard Internet browser. Events may be sent and received from the JA to the world and can therefore be used to change node attributes. Additionally, Java callback methods may be registered to run specific code when an event occurs in the VRML model. The EAI provides a flexible approach to link VRML with Java.

Fig. 1. User interface in shell display.

E.-J. Lee, S. El-Tawil / Advances in Engineering Software 39 (2008) 737–742

VRML Structure TimeSensor node

Clock Coordinate node

739

Java Applet Script node

ClockControl

EAI

Play Tool Box

CoordinateInterpolator node

Morph

Coordinate

Script node

BodyVisible

EAI

Switch node

Interactive Display Box

BodySwitch Script node

For each part i Part-based Geometry

TouchSensor node

TouchControl

EAI

Sensor Switch

BodyTouch

Fig. 2. Implementation with VRML nodes.

3. Conversion of simulation results into VRML Input and output data for the general purpose simulation code LS-DYNA [10] are synthesized into the required VRML format. Input information is read from the input file, while output data is obtained from the displacement history file and message files produced by the software.

the TouchSensor node and a corresponding Script node. A Collision node is used to detect collision. For example, if the part is visible, collision detection will prevent the user from passing straight through the part and vice-versa. Fig. 3 shows some of the VRML source code for part controls. The figure shows how the Switch node calls upon a number of other nodes, such as TouchSensor and Collision, to control a part.

3.1. Part-based geometry LS-DYNA uses parts to facilitate the modeling process. Each part is a set of lines, surfaces and/or elements grouped under a unique name. Elements in parts can have common attributes. FEMvrml preserves the parts defined in LS-DYNA, with the exception of parts in which elements are deleted as discussed later. Part geometry for shell elements is represented by an IndexedFaceSet node, which constructs polygonal faces from vertices. For beam elements, an IndexedLineSet node is defined. Since VRML does not allow the representation of solids, solid elements and parts that contain solids are characterized by their exterior surfaces only through the IndexedFaceSet node. Each part can be assigned different colors and textures. 3.2. Part controls Parts can be turned on or off or can provide collision feedback to allow users to interact more efficiently and effectively with the simulation model. For example, individual parts may be enclosed in or located behind one or more other parts and it may be necessary to remove these parts to permit unobstructed viewing of the part of interest. A TouchSensor node is defined for every part. This node provides feedback indicating that the user is hovering over the part with the mouse. It also provides feedback when the user clicks a shape contained within the part. The Switch node is also defined in every part as defined in Fig. 2. This node makes it possible to select the part’s visible/invisible state based on information provided by

3.3. Inter-step interpolation Time stepping simulations produce data that is roughly in proportion to the number of time steps computed. For simulations with many steps, this can result in large data files that can quickly become unmanageable. For such sit-

DEF part_BodySwitch Switch { whichChoice 0 choice [ # visible state with choice = 0 DEF part_Detect Collision { collide TRUE children [ DEF part_BodyTouch TouchSensor{} Shape { appearance Appearance {…} geometry IndexedFaceSet { solid FALSE coord DEF part_Coordinate Coordinate { point […] } coordIndex […] } } DEF part_Morph CoordinateInterpolator { key […] keyValue […] } ] } # blank line – invisible state with choice = 1 ] } Fig. 3. VRML source code for part-base geometry.

740

E.-J. Lee, S. El-Tawil / Advances in Engineering Software 39 (2008) 737–742

uations it becomes necessary to selectively discard steps. Linear interpolation between the remaining steps can then be utilized to ensure that enough information is available for smooth animation. This is achieved using the CoordinateInterpolator node. 3.4. Element deletion

5. Applications Two applications are described that demonstrate the capabilities of FEMvrml. The first is a crash simulation that involves a truck colliding with a rigid wall (Fig. 4a). The finite element model consists of 27,559 nodal points, 23,489 elements and 157 parts. Additional details about

Finite element deletion is common in large deformation analyses, such as car crash or building collapse simulations. Element deletion is generally motivated by the need to sever connected pieces or when highly distorted elements threaten successful completion of a simulation. The simulation software keeps track of deleted elements and documents new element deletions as a function of time. Deleted elements are read from the program output and synchronized with the steps selected for the VRML visualization. At each time step, ti, all deleted elements in a part are removed from their original group and grouped into a new part. This part is made visible only for all time steps prior to ti and are removed from the viewing field for ti and all subsequent time steps. 3.5. Predefined viewpoints The default viewpoints in VRML are not consistent with the commonly accepted conventions in finite element analysis. To avoid confusion associated with this issue, FEMvrml allows the user to choose between 6 predefined viewpoints: front, rear, top, bottom, left and right views. Users can flip between viewpoints through the viewpoint option within the VRML plug-in browser. 4. Controlling the animation The overall schematic structure of the nodes employed in FEMvrml and how the EAI transmits JA events back and forth to the appropriate nodes is shown in Fig. 2. The JA controls animation and visualization and is comprised of three parts, Play Tool Box, Interactive Display Box and Sensor Switch. The Play Tool Box controls the animation process and permits users to start, stop, pause, reverse, slow or speed up the animation. The Interactive Display Box controls the visibility of each part. Individual parts can be made visible or invisible to aid in navigation and in understanding the simulation results. Parts of interest can be selected from a menu in the JA or they can clicked on – through the TouchSensor – in the VRML browser. However, parts that house deleted elements cannot be handled in this manner. A reset button is available to make all parts visible again in case the user gets disoriented. Parts sensed by the TouchSensor can create problems when navigating with a 2D mouse. For example, an inadvertent mouse click can remove a part without the user intending to do so. To alleviate this issue, the user can activate the sensor on/off switch box to turn on or off the touch sensors.

Fig. 4. Truck crash example.

E.-J. Lee, S. El-Tawil / Advances in Engineering Software 39 (2008) 737–742

741

this simulation can be found in [11]. Animation is generated by selecting 5 time steps from the simulation results and interpolating as previously described. Data processing time for converting the finite element results into VRML was approximately 5.0 CPU minutes on a machine with a 1.73 GHz Xeon processor and 1 GB of RAM. The VRML file size was 12.6 MB and the loading time for display was less than 5.0 s on the same machine. Fig. 4b shows the truck at the start of the simulation, while Fig. 4c shows an intermediate step. Fig. 4d shows how a number of parts are removed in the Play Tool Box to permit unobstructed navigation through the engine and chassis system. The second example involves a collapse simulation for an 8-story steel frame building [12]. Fig. 5a shows the finite element model which is comprised of 42,425 nodal points, 39,339 elements and 58 parts. As a result of extensive element deletion, an additional 242 parts are created to represent elements that disappear at specific times. Again, 5 time steps are selected to represent the animation. Data processing time for converting the finite element results into VRML as approximately is approximately 8.0 CPU minutes, while loading time for display was also less than 5.0 s. The VRML file size was 32.7 MB. Steps from the collapse simulation are displayed in Fig. 5b–d. Fig. 6 shows a different viewpoint in which the user is positioned at ground level near a corner of the building. Deleted elements are clear in Fig. 6b, while Fig. 6c shows how the slabs are removed to permit closer examination of the deformed and fractured frame system. 6. Computing and programming issues FEMvrml is designed to operate on common computing platforms. It works well with Windows 2000 and Windows XP on an ordinary home PC. The web browser and VRML plug-ins that have been used so far are IE6.0 and Cortona 4.1 respectively. The animation speed depends on the size of model and the performance of the computer, particularly its CPU and video card. Proper selection of the number of time steps can ensure optimization of the VRML product. Testing has shown that good navigation speed is difficult to achieve during animations of large finite element simulations. In such situation, the animation can be paused to permit free navigation. VRML has reasonable capabilities for creating dynamic and interactive virtual environments. However, it offers only a relatively low-level functionality. Moreover, it does not integrate hardware in a convenient manner. These limitations have naturally led to the development of new Web3D formats, e.g. X3D, which are less rigid and more expandable. X3D was not utilized in the development of FEMvrml because it was not considered mature enough at the time FEMvrml was being developed. In the near future, it is expected that X3D will allow easier creation and better control of dynamic virtual environments. Java3D is another good solutions for developing a flexible platform for writing interactive 3D graphics programs.

Fig. 5. Five-story building collapse example.

In its current form, FEMvrml is a non-immersive environment, i.e. the user interacts with the virtual model through a mouse or joystick and views the results on a computer screen. This is in contrast to full immersion in which the user is embedded in the virtual environment such as systems that utilize a head-mounted display or a CAVE. VRML does not support direct communication with

742

E.-J. Lee, S. El-Tawil / Advances in Engineering Software 39 (2008) 737–742

and methodology behind the developed system and the algorithms employed were described along with application examples that show the capabilities of the system. Key computing and programming issues that influence the operation of FEMvrml were also discussed. The authors are currently still developing FEMvrml and improving its capabilities. Acknowledgements The presented work is partially supported by the National Science Foundation (NSF) through Grant CMS0408243 and a fellowship grant from the Korea Research Foundation (KRF) to the lead author. Opinions expressed in this paper are those of the authors and do not necessarily reflect the views of NSF or KRF. References

Fig. 6. Zoom-in near ground of collapsed building.

immersive hardware, although this can be indirectly achieved by using software such as the Java Native Interface to create a link between the JA and supporting hardware. The authors are currently working on making FEMvrml fully immersive in this manner. 7. Summary and conclusions This paper presented FEMvrml, an interactive virtual environment in which users can interact with and explore the results of finite element simulations. The structure

[1] Connell M, Tullberg O. A framework for immersive FEM visualization using transparent object communication in a distributed network environment. Adv Eng Software 2002;33(7–10):453–9. [2] CEETRON home page: ; 2006 [accessed August 2006]. [3] CEI home page: ; 2006 [accessed August 2006]. [4] VISENSO home page: ; 2006 [accessed August 2006]. [5] Wanga P, Kreutzerc IA, Bja¨rnemoa R, Davies RC. A Webbased cost-effective training tool with possible application to brain injury rehabilitation. Comput Meth Program Biomed 2004;74(3):235–43. [6] Ranga K, Gramoll K. 3-D finite element analysis over the Internet using Java and VRML. In: Proceedings of the American society of engineering education (ASEE) 2000 Conference. St. Louis, MO; June 18–21, 2000. [7] Gokhale AS. Sheet metal forming in a virtual reality environment using LS-DYNA and neural netwoks. In: Fourth European LSDYNA users conference 2002; E-III-23. [8] Eynard B. Web-based collaborative engineering support system: applications in mechanical design and structural analysis. Concurr Eng 2005;13(2):145–53. [9] Setareh M, Bowman DA, Kalita A, Gracey M, Lucas J. Application of a Virtual Environment System in Building Sciences Education. J Arch Eng 2005;11(4):165–72. [10] Hallquist J. LS-DYNA, Livermore, CA: Livermore Software Technology Corp.; 2005. [11] El-Tawil S, Severino E, Fonseca P. Vehicle collision with bridge piers. J Bridge Eng, ASCE 2005;10(3):345–53. [12] El-Tawil S, Aguirre B, Poteyeva R, Khandelwal, K. Engineering and social dimensions of victim location and behavior in collapsed structures. In: Proceedings of the 100th anniversary earthquake conference commemorating the 1906 San Francisco Earthquake (8NCEE). San Francisco, CA; April 2006.