by Pedro V. Marcal and Nobuki Yamagata
In this paper we describe the development of a pre and post processor embedded within an interactive environment which enables a user to extend the program and call upon the total computer resources both software and hardware available to the user. We call this program the Multi physics Adaptive Visual Environment (MPAVE or simply Mpave).
We base our development on the interactive Python language, which interfaces well with the more popular programming languages such as C, C++ and Java. We adopt a client server approach where the interfacing to the operating system resides in the small client. Such a design makes the program easily portable between different Operating systems.
The main window is shown in Fig.1. The user can use the usual file menu control or alternately enter a Python command in the interactive window at the bottom of the file. This window gives complete programmatic access to all the Mpave features and is the simplest way to extend the program and/or its environment. Later on, we will describe the more advanced control via execution of scripts. One of the major benefits of program extensibility through scripts is that we preserve and make readily available all the previous pre and post processing tools that we have previously developed viz. MpaveMesh and MpaveModel. These previously developed programs have also served as research tools to decide which features to include in Mpave.
Reflecting the trend towards CAD centric software, we adopt two strategies to access solid models. The first is a read only strategy that gives access to all the major CAD formats viz. ACIS, ParaSolids, ProE, Catia and OpenCascade. In addition we also give access to the more important discrete geometry exchange formats such as IGES, STL and STEP.
The second is the implementation of a solid modeler that enables the user to generate and edit a solid model. This latter strategy is not an attempt to duplicate the features of any of the excellent available CAD programs but recognition that sometimes it is necessary to edit as well as heal an existing solid model. Our initial strategy is to make use of a commercial healing and translation program such as TransMagic. Even here we have found that some solid models cannot be completely healed to provide a leak-tight volume. In such cases we generate an STL file which we then heal by removing any impediments to completing a leak-tight volume.
In our meshing we make use of the Simmetrics meshing engine. This mesher distinguishes between two types of solid models described above.
The CAD type where geometric entities such as volumes, surfaces, and edges are defined are meshed so that the geometric entities are preserved for subsequent model building. It is noted here that the use of geometric entities in describing the FE data leads to independence between the raw mesh and the rest of the FE data, thereby making it easy to implement adaptive meshing features. In the discrete geometry exchange format type, since there are no geometric entities none are available for model building.
The tetra elements form the basic type in the mesher since the generation of any leak-tight volume is guaranteed by the Delauney triangulation. Linear and quadratic element types may be selected. Control of size is automatic with additional controls made by imposing the curvature constraints on an element. In addition the mesher may also generate hexa elements by subdividing each tetra element into four hexa elements as shown below.
Please note the control of element size due to curvature constraints around the holes as well as the following of the curvature of the solid model. Both features help ensure a good mesh with reasonable mesh size.
The main decision to be made in the design of a GUI for model building is whether to define yet another input format or adopt one of the common commercial formats already in use. Most of the commercial front-ends adopt their own format and which they refer to as a Neutral file format. The model data is subsequently translated into the desired end format. One of the more popular front-ends is FEMAP which has adopted such an approach. Such an approach requires minimal effort in interfacing of the one to the many other formats. Given the ease in which we can develop GUIs and the flexibility of our database, we have chosen to develop separate GUIs for each of the popular user formats while centralizing the FEA model in the database.
This design recognizes the preference of an individual user for the program format that the user is most familiar with. At the same time it provides the user with the ability to export the data in any of the formats that we have catered for. Initially we are developing GUIs for the NASTRAN, FEMAP and MPACT programs.
In the following we show an example of a NASTRAN format PLOAD definition applied to a surface. On placement of the cursor over the surface, the program displays the elements selected by the surface.
Once the surface is chosen by a click of the mouse, the program displays the pressure that is applied to the element surfaces. Again by passing the cursor over an element, the values of the applied pressure is displayed. The user may save this portion of the work by pressing the save button.
Emphasis in the design phase was concerned with accessing multiple result formats.
Combined with this there was the need to build strong post-processing capability that will allow the conversion of the output from one program to become the input to another.
The above feature is a basis for weak coupling between different multi-physics programs. For example in a Fluid Solid Interface problem we may decide to convert stresses and accelerations from the Fluids program to be imposed as nodal loads on a stress program. The result from a subsequent analysis in a stress program will be a velocity to be entered into the Fluids program. The need here is to calculate equivalent masses at the nodes so that the accelerations from the fluid program can be converted to nodal forces for the stress program.
The ability to insert python code at any stage of the use of the Mpave program brings out the benefit of our design. This results in an active programming environment where the program can be extended without limit to access all the computer resources available to the user. This access is made possible by executing python scripts. Every executable instruction carried out by the program is recorded and stored in a python file (mpave.py). This is the Journaling process. Extracts of the journal are then saved as scripts and then executed in one of three ways.
1. By Copying to and reading from the clipboard.
2. By executing a script.
3. By storing and executing a script.
The menu dialog for executing the scripts are shown below. The execution of these scripts are concerned with internal Mpave features. Interface with external programs is arranged through an “add tools” feature where execution commands enable the execution of the external programs. In an example of this script we have implemented an execute and delete capability that executes a script whenever a file is copied into a particular directory. This permits the sequenced execution of multiple programs that only proceed when a previous program has completed.
We exploit the scripting capabilities of our program by giving access to it from the outside world. This is made possible by implementing an XML_RPC server. The XML-RPC uses an Internet Protocol to communicate to the outside world. This popular Protocol can be accessed in most of the common Computer languages. The user of this feature can control the Mpave program remotely and use every function that is available in the program from any convenient Internet access point eg local, global network.
We have described the design and building of an adaptive environment in which we can prepare for the analysis and interpretation of the results from a wide variety of multi-physics programs. The environment that we have created needs to be explored further. For example we might use an optimization program to perform parametric analysis. We might interface expert systems to give us guidance on how our analysis programs may be used by new users without extensive experience in a particular discipline.