Modelling, Analysis & Prototyping 
for Rapid Manufacturing

Naci Dai, Lijue Xue and Chris Purcell
Carleton University, National Research Council,
Defence R&D Canada

Finite Element Models in Engineering

The partial differential equations that describe physical phenomena essential for engineering such as elasticity, fluid dynamics, electromagnetism, heat conduction and acoustics to name but a few, can be solved in closed form or series solutions only in special cases where simple geometries prevail.

Once the designs go beyond those covered in the handbooks, there are really only two options - build real models, or build finite element models.

Since virtual prototypes are almost always cheaper to make than physical prototypes, finite element analysis (FEA) has become an essential tool for engineers developing complex structures, vehicles, devices, and processes.

Modelling with the ModelMaker Package

ModelMaker, a prototype Mathematica package for building finite element (FE) models was introduced at the 1997 Developers Conference [1]. The ModelMaker package has matured to the point where it has already been used in product development, of the FSP loudspeaker [2] .

FSP Loudspeaker -  Etrema Products Inc.,  
    Ames Iowa

The ModelMaker package permits building parametric models, where the FE database contains both numeric data and symbolic Mathematica expressions. The following example builds a cube which can be morphed into a variety of shapes. The symbols colored in red control the shape.

Needs["ModelMaker`mm`"]; 
Load["MAVART3D"];

Clear[a, b, c]; Point[Delete]; Node[Delete]; 
Point[New, {{0, 0}, {0.5, a}, {1, 0}}]; 
Curve[New, {1, 2, 3}]; 
Curve[Translate, 1, {0, b, 0}, 1]; 
Surface[New, {1, 2}]; 
Surface[Translate, 1, {0, 0, c}, 1]; Solid[New, {1, 2}]; 
Mesh[1, 1, {3, 2, 2}]; 
Node[Equivalence]; Node[Renumber];

{a,b,c}={0,1,1}; (* these values define a cube *)
Element[Plot,,ElementShrink->5];

{a, b, c}={- .2,  .5, 1};   
Element[Plot, , ElementShrink -> 5];

If we clear the numeric values associated with {a,b,c} and examine the nodes, we see the coordinates contain symbolic entries.

Clear[a, b, c];

Map[Node[#][[3]] &, NodeList]  // Short

The package was originally developed to support DREA's MAVART finite element codes, but it is open and extensible and can support other analysis codes.  Here for example we load in the definitions associated with the Atila [3] code and list all its element types.

Load["ATILA"];
Map[ElementType[#][[2]] &, ElementTypeList]

ModelMaker is compatible with the full range of Mathematica packages, and the following example, will illustrate using OpenGL graphics as produced by the GLExplorer package.

Double click the above image to play the animation. It shows a cross section of an axisymmetric infinite steel pipe containing water, with a tangentially poled piezoelectric ring transducer around the middle of the pipe. The ring is energized at its resonance frequency and the pressure of the resulting sound waves in the water are shown in color. Blue is zero pressure, red positive, and green negative. The model was generated in Model Maker, the FE analysis done outside Mathematica, with the  MAVART code. The shaded contour plots are made with OpenGL using the GLExplorer package.

The ModelMaker package stores all entities (Points, Curves, Surfaces, Solids, Nodes, Elements, Materials, Fixities, etc...) in lists. Thus the databases are open and accessible with Mathematica's built in list manipulation tools, however it is safer to use the tools provided by ModelMaker to edit the databases.

This choice of database structure was arrived at after many trial designs were tested and rejected.

A more elegant object oriented database based on Maeder's Classes package [4] was tested, but better performance and ease of upgrades was achieved with the held preallocated lists described by Wagner [5]. Here we look at the Nodes database and see the Hold wrapped around the entire list. Deletes are implemented by resetting the status entry False, and only doing garbage collection when requested by the user.

Nodes // Short

The overall look and feel of ModelMaker now behaves much more like a Mathematica package should - with reasonably robust error detection, and Options to fine tune the behaviour of the many functions, which now number into the hundreds.

Options[Point]

Help is available on all tasks, entities and options using the Information command. Here the built-in Point command has been overloaded with ModelMaker's definitions and information.

?Point

Extensive on-line documentation is also available from the Mathematica Help browser.  It covers both introductory and advanced material and includes many examples.

Here is a code fragment that gives a flavor of the minimum amount of code required to build a real working model.

A simple MM example - the cube

This example shows the code needed to build an elastostatic finite element model of a solid aluminum cube, under uniform compressive force loading on the top of the cube, with the X-Y plane nodes held fixed in the Z direction.

Load["MAVART3D"]; 
Point[Delete]; Node[Delete];  Material[Delete];  
      Fixity[Delete];    
Solid[New];    
Mesh[1, 1, {3, 3, 2}];     
Material[New, 
          3, {2700. , 0, 0, 0, 76.0*^9,  .31}, "Aluminum 6061"];      
Node[Equivalence];   
Node[Renumber];    
Fixity[New, 3, 0, Node[Near, {,,0}]];      
Fixity[New, 13, -1, Node[Near, {,,1}]];   
WriteModel["mav.dat", 
        TITLE -> "Isotropic solid cube. ", 
        MACROS -> {"PRNT DISP"}]     
Element[Plot, , ElementShrink -> 10, 
          NonZeroFixity -> True, ZeroFixity -> True];

The data file just produced can be listed:

!! "mav.dat"

On some computer systems (UNIX, Windows) you can run an external finite element analysis on the above file with a command like this:

Run["mavart3d"]

otherwise you can run the analysis outside Mathematica. You can examine the raw results file from the MAVART3D analysis as below:

!! "mav.out"

But it is easier to understand the results, if we import them back into our session, and plot them as deformations.

Here the undeformed cube is shown in wireframe, and the deformed elements are shown as filled.

The deformation is actually very small - it has been magnifed here to make it visible.

ReadResult["mav.out"];
Element[Plot, , ElementShrink -> 0, 
        ElementForm -> "Edge", 
        DeformedElementForm -> "Fill", 
        NonZeroFixity -> False,    Deform -> True, 
        PlotRange -> All, DeformSize -> 10,  
        Boxed -> False];

Although this example is trivial, it illustrates all the basic steps of model generation - building geometry, meshing, equivalencing, defining materials, fixities, exporting the model, performing the analysis and finally importing results.

Interested individuals or organizations who would like to evaluate ModelMaker, and are willing to provide assessments and comments, should contact purcell@drea.dnd.ca.

Analysis with the FEM package

In the examples shown above, the analysis was performed outside Mathematica, by an external FE engine (coded in Fortran).

A recent paper in The Mathematica Journal [6] described the FEM package, an open and extensible Mathematica package for FEA based on Maeder's object oriented programming (OOP) implementation [4].

The FEM package has been extended to allow solution of 3D isotropic elastostatic problems entirely within Mathematica.

Elastostatic analyses are among the most frequently encountered engineering problems.

Because of the OOP approach used in the FEM package, adding the elastostatic capability was easy (low cost).

The FEM package was tested with an analysis of hydrostatic loading on a pressure vessel.

The picture above shows the outward radial deformation of one quarter of a short section of an infinite steel pipe as it expands due to an internal pressure. The entire calculation was done inside Mathematica, with the FEM package.

Performance tests of the elastostatic FEM package showed that on a 750 MHz PC, the time to prepare this problem was approximately 10 minutes, but once passed to the kernel, Mathematica's LinearSolve routine produced the result in 1 second.

This gives us considerable scope for improvements in overall runtimes in the future. The most time consuming routine is one which builds the global stiffness matrix. It requires the evaluation of numerous Jacobians, and reorganizing a large matrix. Future work will focus on optimizing this section of the package.

Our ultimate goal is to use the FEM package to develop multi-physics solvers at low cost.

Rapid Prototyping → Rapid Manufacturing

When time to market for new products is critical, a parametric FE modeller tightly coupled to a FE engine is an essential tool. (And yes, wrapping an optimizer around the whole thing is on the wish list).

Physical prototypes are however, still required, for validating models and eliminating "finger trouble".

One answer to the high cost of physical prototypes lies in new technologies for rapid prototyping [7], which are making remarkable progress. For example, the laser consolidation process developed by the National Research Council's Integrated Manufacturing Technologies Institute (NRC/IMTI) produces net shape functional parts, in a variety of high strength alloys, directly from a 3D CAD model without any moulds or dies.

We have recently completed a demonstration of functional rapid prototyping of a complex thin walled shell, for the underwater folded shell projector [8]. Mathematica played a key role in linking virtual prototyping to physical prototyping through part design and data transfer.

The Mathematica generated part description was transmitted via Internet and rendered in the superalloy IN-625, with no intermediate tooling, by the novel laser consolidation process.

Science fiction fans will enjoy the similarity to the "replicator", but this is not fiction.

Metal powder continuously injected from a feed nozzle of a laser consolidation system is melted by an infra-red laser beam and deposited on a substrate layer by layer to form a metallurgically sound thin wall structure. A numerically controlled multi-axis motion system is used to control the relative movement between the laser beam and the substrate. The finished part grows upwards from the substrate, as the laser follows a tool path derived from sectioning the model.

The Inconel shell in the foreground has been cut in half to show the very complex cross section of the Folded Shell Projector [8]. The complete shells are 13 cm tall. The design was modelled with the ModelMaker package, analyzed with MAVART3D, and exported from Mathematica as a text file that was e-mailed to the laser consolidator team at NRC/IMTI located in London, Ontario.

It is a safe bet that Rapid Prototyping will evolve into Rapid Manufacturing, a few years down the road.

This will be an exciting ride for modellers and designers - since this capability will connect them directly to the tools of production, and they will get to invent structures and devices that would be impossible to make by conventional machining.

Summary

This work shows the utility of Mathematica for building finite element models of modest yet useful size.

More work is needed on efficient assembly of the global stiffness matrix in the FEM package, and assuming this can be done, Mathematica's LinearSolve routine is capable of performing 3D finite element analyses of useful size problems.

When coupled to emerging rapid prototyping technologies like laser consolidation, Mathematica is a powerful tool for design of parts of complex shape.

References

(1) C. J. Purcell, "Building Finite Element Models with Mathematica", Proc 1997 Developers Conference, Wolfram Research (1997).

(2)  Etrema Products Inc. Ames Iowa http://www.etrema-usa.com/news/11202000.asp

(3) Atila, Magsoft Corporation, 1223 Peoples Ave., Troy NY 12180. http://www.magsoft-flux.com

(4) Roman Maeder, "The Mathematica Programmer", AP Professional, (1994).

(5) Wagner, David B., Power Programming with Mathematica, the Kernel, McGraw-Hill, 1996.

(6) Naci M. Dai, "Finite Element Method", TMJ Vol 8, No 1, (2001).

(7) L. Xue, A. Theriault, M.U. Islam and C. J. Purcell, "Laser Consolidation for the Manufacturing of Complex Flextensional Transducer Shells", Proc of ICALEO'01 Jacksonville, FL, (2001).

(8) C. J. Purcell, Folded Shell Projector, US Patent 5,805,529, (1998).

Authors

Naci Dai, The Object People, Ottawa, ON, Canada, nacidai@acm.org
Lijue Xue, NRC/IMTI, 800 Collip Circle, London, ON, Canada, N6G 4X8, Lijue.Xue@nrc.ca
Chris Purcell*, DREA, 9 Grove St., Dartmouth, NS,Canada, B2Y 3Z7, purcell@drea.dnd.ca

* Corresponding Author