Sunteți pe pagina 1din 12

Developing Customised Applications with ABAQUS

Jon Carter, Stuart Nixon, Alan Prior


Hibbitt, Karlsson & Sorensen (UK) Ltd. Abstract: Over the last 5 years, HKS (UK) has been involved in the development of several customised applications based on ABAQUS products. These have ranged from simple post-processing scripts that take only a few days to produce, to multi-year projects that involve the integration of several ABAQUS products and the development of complex, bespoke, graphical user interfaces. A customised application may take the form of a system to be used by advanced analysts that removes the tedium or complexity of developing a particular type of model. Or it may be a system to be used by nonexperts who wish to be able to harness the power of ABAQUS in a more straightforward manner, without the need for in-depth knowledge of the ABAQUS solvers. In this paper, illustrations from successful projects are used to highlight the technical issues involved in customisation projects. Examples include setting up complex contact conditions for multi part simulations; overcoming excessive element distortion; integrating /Standard and /Explicit for multistage analyses; organising results from large databases; and advanced simulation techniques. Finally, the key aspects of technical development that ensure a successful completion to the project are highlighted.

1. Introduction
Capital investment in analysis software represents a major commitment for any company, and it is important that companies maximise the benefits to be gained from that investment. There are many ways in which an organisation may choose to exploit their analysis capabilities but in this paper we focus on just two: make analysis tools available to a wider range of staff without investing in training programs, and improve the performance of the existing analysts by automating repetitive tasks, such as model building or simple post-processing.

The customisation tools of ABAQUS/CAE allow both of these approaches to be implemented.

2002 ABAQUS Users Conference

2. Customisation Utilities
Customisation of ABAQUS/CAE is achieved through the use of the ABAQUS Scripting Interface (ASI). The ASI is based on the popular Python Scripting language embedded in the ABAQUS products. This high level object orientated language can be used in two ways. The first extends the functionality of /CAE by allowing users to record and then replay their most recent interactions with the interface. By changing the scripts and introducing programming constructs (loops and logic) tasks can be readily automated. Tasks can include setting up default materials in /CAE, model building functions and results post processing. This is termed kernel extension and all the ASI commands required to carry out such work are documented in the on-line documentation. The second use of the ASI is to alter the appearance of the user interface. The existing menus and toolbars can be changed and new dialog boxes can be added. This allows the development of application specific interfaces where the user interface is designed to address a limited range of functionality of specific interest to the user. To date, with ABAQUS Version 6.2, the ASI commands for GUI extensions have not yet been documented, so GUI extensions can only be provided by HKS offices and representatives. The most advanced customisations will therefore involve a combination of a modified user interface to address the specific user requirements, coupled with kernel extensions to enable automation of complex model building or post-processing tasks.

3. Extending Availability
In the past, the ABAQUS analysis products have generally been used by experienced analysts looking to solve complex non-linear problems. In Figure 1 we show the analysis expertise of the user against the complexity of the analysis, where the shaded region illustrates the traditional environment in which ABAQUS products have been used. To enhance the benefit of advanced analysis tools the capabilities must be extended to users outside the shaded region in Figure 1, by allowing the products to be used by designers with little or no analysis experience. This can be achieved by providing a bespoke application where the user interface uses concepts that are familiar to the designer, but the detailed analysis characteristics are hidden. The integrated rolling simulation tool developed in conjunction with Corus (Farrugia, 2001) is one example of providing advanced analysis tools to specialised designers. In this system, the analysis methodology, the database structure and the user interface are all designed to follow the logical flow of stock through the rolling mill. A single simulation typically consists of passing the stock through a number of rolls where the material is deformed. After exiting one set of rolls the stock may be cooled and/or rotated before being fed through the next set of rolls. ABAQUS/CAE is used to build the initial model and a combination of /Standard and /Explicit is employed to complete the analysis. An entire simulation involving all three ABAQUS products is controlled from a single ASI script. The script controls the cycle of rolling and cooling analyses and the intermediate model-building stages until the final deformed shape is achieved.

2002 ABAQUS Users Conference

Packaging the complex methodology in this manner allows the designers to investigate novel rolling techniques and explore several "what if" scenarios. This is all done without the user having a detailed knowledge of finite element analysis. The tailored post processing system, shown in Figure 2, allows the designer to assess the performance of a particular roll design. Key results, whether they are presented as contour plots, X-Y graphs or deformed profiles, are accessed through a customised toolbox area. A further example of complex analysis of material deformation is inertia welding (Walloe, 2001). Generally used for welding shafts and tubes, the inertia welding process involves spinning one component at high speed and then forcing it against a stationary component with a high axial force. As the two contacting surfaces meet the friction generates heat, which causes local softening of the material and provides conditions for the two surfaces to bond together when the rotational velocity is reduced to zero. The modelling of such processes is complicated by the extreme deformation of the material near the weld, often resulting in termination of the analysis due to excessive element distortion. The solution to such problems is to remesh and restart the analysis but this is a time consuming and labour intensive task. To overcome this problem it is possible to write an ASI script that submits and monitors an analysis. This script can monitor both element distortion and error estimates and stop the analysis if either parameter exceeds a given threshold. By using the model building tools within /CAE the deformed shape of the parts can then be automatically re-meshed to improve mesh quality before the analysis is restarted. The tool developed in conjunction with Rolls-Royce (Walloe, 2001) can be used by tooling designers and process engineers to model the welding process and refine the manufacturing parameters in an analysis environment. Both these customisation examples are related to forming applications, although the customers operate in the very different market sectors of materials processing and aerospace. Other projects have covered a wide range of market sectors, as illustrated in Figure 1.

4. Specifics
These examples illustrate the kind of multistage manufacturing processes that are now being simulated using finite element analysis, where one model is based on the results of a previous analysis. ABAQUS/CAE provides many model-building commands that can be useful when part geometry is based upon the results of a previous analysis. For example, 1. Parts can be created from the output database. For example, mdb.model['Model1'].PartFromOdb(name='NewPart', odb='OldJob', instance='instanceName', shape=DEFORMED) will extract the deformed shape of a part from the last increment in

an output database and create a new part. This part will be an orphan mesh, i.e. nodes and elements with no associated geometry.

2. A geometrical representation made up of splines can be extracted from a two dimensional orphan mesh part using mdb.model['Model-1'].Part2DGeomFrom2DMesh(name= , part= , featureAngle= ). A new part is created based on geometry, not on nodes and elements. This allows the new part to be manipulated and meshed. The combination of this command and the extraction of the deformed shape of the part allows a re-meshing algorithm to be implemented.

2002 ABAQUS Users Conference

3. Many processes, such as wire drawing and extrusion, form products with constant cross sections. However, the element distortion at the end of a forming analysis can mean that the resulting mesh is not suitable for importing into a new analysis of the product. This problem can be overcome by a combination of scripting commands. Firstly, use the command given in 1. above to create an orphan mesh part. Then, create a new two dimensional meshed part by slicing the deformed orphan mesh (mdb.model['Model-1'].PartFromSection3DMeshByPlane(name= , part= , point1= , point2= , point3= )). This meshed part can then be converted to geometry using the command in 2. above. The conversion will automatically create and save a sketch, which may be used to create another three dimensional extrusion. 4. On many occasions the geometry used within an analysis is simplified by making use of symmetry planes. However, a subsequent analysis on the same product may not contain the same symmetry conditions. In such cases the deformed shape of the part can be imported into /CAE and then mirrored by calling mdb.model['Model-1'].PartFromMirrorMesh(name= , part= , point1= , point2= ) to recreate the full part. Creating new parts from the deformed shape of old parts is very useful for the analysis of multi-stage processes. However, since the remeshing is undertaken automatically, the system must be able to adapt its meshing of the geometry to suit the modelling requirements: the meshing controls cannot be predetermined because the shape is not known in advance. Often, defaults will be sufficient to generate a satisfactory mesh. However, additional ASI commands are available for interrogating the geometry in order to develop more advanced algorithms. A part within ABAQUS/CAE contains cells, faces, edges and vertices. Each of these part attributes is available through ASI commands. Consider the part p = mdb.model['Model1'].part['partName']; a cell (c = p.cell[0:1]); a face (f = p.face[0:1]); and an edge (e = p.edge[0:1]) all on the same part. The part has methods associated with it that will return information about its geometry, for example; 5. the length and curvature of the edge p.getCurvature(e) respectively;
e

on the part can be obtained using p.getLength(e) and

6. the area and perimeter of a face are returned from the functions p.getArea(f) and p.getPerimeter(f) respectively; 7. the volume of a cell can be found by calling p.getVolume(c). These functions can be used in conjunction with a heuristic meshing scheme to ensure that new parts will receive a mesh that is adequate for the subsequent analysis. Indeed, the geometric information obtained from these functions allows the development of mesh refinement schemes that provide detail in the correct locations and ensure acceptable run times. Once parts have been meshed and boundary conditions applied, the analysis will need to be submitted. Facilities are provided that allow the user to interact with any jobs that are submitted automatically. The following shows how such functionality can be used. 8. Often it is necessary to submit a sequence of jobs, where each job depends upon the results found in a previous job, for example a simple shape optimisation routine. When the job, newJob = mdb.model[modelName].job[jobName], is submitted from a script, newJob.submit(), the newJob.waitForCompletion() method associated with the job can be used to pause the sequence 4 2002 ABAQUS Users Conference

of events until the job has completed. Once the job has been completed the ODB can be interrogated to find those elements that are carrying a negligible load. These can be removed from the analysis and the job repeated. Jobs can be monitored and terminated if need be. Callback functions can be used to monitor the progress of a job through the analysis phases. If, for example, the displacement of a node is being monitored the data can be displayed on a new viewport within /CAE. Customisation can also be employed in the environment file that controls ABAQUS execution. The embedded methods onJobCompletion() and onJobStartup() that are available in the environment file are useful for automating analysis processes. The simple example below waits for an analysis to complete, and then extracts the natural frequencies from the .ODB file and writes them to a text file.
def onJobCompletion(): from odbAccess import * import os # savedir, scrdir and id are available in both onJobCompletion() and # onJobStartup() methods and are documented workingDir = savedir jobId = id jobName = os.path.join(workingDir, jobId) + '.odb' outfile = open(os.path.join(workingDir, jobId) + '.rpt','w') outfile.flush() odb = openOdb(jobName) step = odb.step['ModalAnalysis'] frames = step.frame for frame in frames: axialFrequency = frame.frequency outfile.write('Frame: ' + `frame.frameId`+\ ' Frequency: ' + `axialFrequency` + '\n') outfile.close()

User subroutines are frequently used within the analyses generated by customised systems. Often the user subroutine will need to read information from a text file. For example, it may contain the initial state of the model when sigini and hardini are used. The subroutine needs the full path to the text file, unless the text file can be placed in the scratch directory when the subroutine is compiled. The onJobStartup() method allows the file to be copied correctly. This eliminates unneccessary editing of the user subroutine file.

5. Improving Efficiency
Technical specialists can also benefit from the use of customised analysis systems, but the advantages arise from the encapsulation of repetitive tasks rather than the reduction of complexity in the analysis interface. Such systems might enable the automation of repetitive model building operations, or of complex postprocessing of large volumes of analysis data. Other examples include simple optimization schemes and parameter studies. An example of a simple optimization scheme is in the design of forming tools. Creep forming is a particular process used in the aerospace industry to form aluminium structures. One of the complicating factors in creep forming is that the elastic springback at the end of the forming process can be significant. This means that the tool shape is in fact quite different to the net shape of the final formed product and as a consequence it is difficult to design the correct tooling without several prototypes. The objective of an 2002 ABAQUS Users Conference 5

analysis system for creep forming (Levers, 1998) that has been developed in conjunction with Airbus (UK), is to run repeated analyses of the process, iterating the shape of the tooling in order to arrive at a tool shape which provides the desired formed product shape. Although the optimization process is relatively crude, the iterative analysis procedure does indeed reach a tool geometry that will give the desired product shape. Automated model building is the most obvious example of scripting for the advanced analyst. For complex geometry the model building process can be time consuming and expensive for any user. If the analysis is part of a design and development program, each variation in the design may require rebuilding the entire analysis model, even if the changes are relatively minor. As an example, consider the drive chain shown in Figure 3. The analysis of a complete chain would need to include several hundred identical links, with contact between each link and its neighbours, and contact between each link and the drive sprockets. Each design change would require changes to every link before re-analysing the entire model. Such models can be analysed using ABAQUS /Explicit and can be built with /CAE using the parts and instances paradigm, but to construct the model with all the contact surfaces defined would be very time consuming. The solution, as described in (Saito, 2001, a project in conjunction with Honda R & D), is to parameterise the geometry of the repeated component, and to automate the generation of contact surfaces in a customized design system. Such a system can reduce model building time from days to minutes. Advanced post-processing tasks can also be automated through scripting. ABAQUS/Viewer does not currently provide a method of visualising the full cross-section of beam elements, but rather displays the elements as lines. As part of a recent project, a visualization capability has been developed as a customisation to /Viewer. The customisation works by adding shell or continuum elements, with associated nodes, to an existing .ODB file. These new elements were not part of the original analysis and are added to the .ODB after the analysis is complete. The displacements of these additional nodes can be calculated from the displacements of the original beam nodes and from the cross-sectional dimensions. Consider a model constructed of beams, perhaps a cable in a duct, an offshore pipeline, or an I-section frame structure. By default in /Viewer, the results can only be visualized by plotting the stresses for a particular section point on the lines representing the beams, or by plotting the displaced shape viewed as a series of lines. Two examples of the visualization customisation are shown in Figure 4 and Figure 5. The first shows three cables lying in a duct. The original model used B31 elements to represent the cables, rigid elements for the duct surface and connectors to simulate the contact between the cables. The model is very long and thin, which makes it difficult to visualise how the cables have deformed. The customisation script is run on the .ODB file and new shell elements and nodes are created which show the true geometry of the cables in their deformed configuration. By manipulating the original field output data and creating displacement histories for the new nodes it is possible to animate the time history of the deformation on the full model. The second example shows the deformed shape of an I-beam that is built in at one end and subject to a gravitational load. Like the model of the three cables, the beam was originally constructed from B31 elements. By running the customisation script, new nodes and elements are added to the ODB to represent the true section of the beam. In this case the I-beam is constructed from C3D8R elements. The new elements have been carefully constructed to lie at the same locations as the 13 section points of the original

2002 ABAQUS Users Conference

beam element. This means not only that the displacements of the beam can be visualized on the solid mesh, but that integration point variables can be mapped onto the continuum elements, and contours can be displayed on the solid mesh.

6. Customisation Projects
A customisation project has the objective of delivering a tool to a customer, and in most cases the user of the tool will be intimately involved in the design and ultimate testing of the delivered system. Careful interaction between the developers and the users will ensure that the system is developed to meet the full requirements of the user, on time and within budget. A simple list of tasks to be undertaken is as follows; Assessment of the customer requirements, budgets, project scope, timescales, etc. Development of a proposal, followed by acceptance of proposal and order by customer Development of specification in conjunction with customer. The specification describes everything that is to be included in the system. Clearly this must be in line with the original proposal. Design and development of customisation tools Delivery Testing Acceptance Training

In reality, there are several areas where extra care must be taken to ensure success. In particular, the scope of the system, the user requirements, and the detailed specification must be agreed early in the project. There is no reason why the project can not include other activities, such as the development of advanced analysis methods, user subroutines, or associated tools, provided that these tasks are included in the proposal and specification.

7. Conclusions
Customisation of the ABAQUS suite of products is achieved through the use of scripting and modifications to the graphical user interface of ABAQUS/CAE. Typical customisation projects focus on extending the advanced functionality to the less experienced user, or removing time-consuming tasks from model-building and post-processing activities for advanced analysts.

2002 ABAQUS Users Conference

A wide range of commands is available in the ABAQUS Scripting Interface, which can be used as standalone scripts, modifications inside /CAE and in the ABAQUS environment file. Successful customisation projects require careful attention to specification and customer requirements.

2002 ABAQUS Users Conference

8. References
1. Farrugia D., B. Engelmann, M. Schrank, and W. Grimes, "Simulation of Multi-pass Rolling Processes", Numiform 2001 The 7th International Conference on Numerical Methods in Industrial Forming Processes, Toyohashi, 2001 2. Levers A., "Finite Element Analysis of Creep Age Forming", ABAQUS Users' Conference, pp 461474, 1998. 3. Saito T. and Okano T., "Development of Metal Pushing V-Belt Stress Simulation for Continuously Variable Transmission", ABAQUS Users' Conference, Page 447-458, 2001 4. Walloe S.J., "Inertia Welding Process Analysis Environment", ABAQUS Users' Conference, pp 539553, 2001.

2002 ABAQUS Users Conference

Figures
Analyst C H F D A Traditional ABAQUS environment

Analysis expertise B C A A Designer Increasing analysis complexity Key A B E F E G

Customer in automotive Customer in manufacturing See Farrugia, 2001 See Levers, 1998

C D G H

Customer in offshore Customer in technology See Saito, 2001 See Walloe, 2001

Figure 1. The scope of project work HKS (UK) has been involved with.

10

2002 ABAQUS Users Conference

Figure 2. The customised post processing facility that is available within the Roll Pass Design System.

Figure 3. A number of links from a chain that would be time consuming to create without the aid of a script.

2002 ABAQUS Users Conference

11

Figure 4. The displaced shape of a beam that was originally modelled with beam elements. The results have been extracted from a beam model and added to the display geometry that is shown.

Figure 5. The deformed shape of three cables within a duct. The cables were modelled with beam elements before display geometry was added.

12

2002 ABAQUS Users Conference

S-ar putea să vă placă și