altair's student guides - instructor's manual - managing the cae process
DESCRIPTION
Designed for use by Engineering Students, this book provides 4 industry-derived projects for use with Altair's Process Manager. Together with the accompanying Student Guide, they provide a quick, complete and correct introduction to using this software to automate CAE tasks using programming tools like Java and Tcl/Tk.For more learning resources on HyperWorks and CAE, for both students and teachers, see http://www.altair-india.com/edu/studentsTRANSCRIPT
Student Project Summaries Managing the CAE Process
1
Contents
Introduction.............................................................................................2 Installation Instructions: .......................................................................2
Batch Meshing a Vehicle Frame Assembly..................................................3 Description of the Problem ....................................................................3 Programming References ......................................................................4 The Manual Process ..............................................................................4 The Automated Process.........................................................................5 Further Work........................................................................................6 Summary .............................................................................................7
Process Automation – an FRF Wizard ........................................................8 Description of the Problem ....................................................................8 Programming References ......................................................................9 The Manual Process ..............................................................................9 The Automated Process....................................................................... 10 Further Work...................................................................................... 11 Summary ........................................................................................... 12
Automating Post-Processing – H3D Export ............................................... 13 Description of the Problem .................................................................. 13 Programming References .................................................................... 14 The Manual Process ............................................................................ 14 The Automated Process....................................................................... 15 Further Work...................................................................................... 16 Summary ........................................................................................... 17
Creation of a Material Library.................................................................. 18 Description of the Problem .................................................................. 18 Programming References .................................................................... 18 The Manual Process ............................................................................ 19 The Automated Process....................................................................... 20 Further Work...................................................................................... 21 Summary ........................................................................................... 22
Student Project Summaries Managing the CAE Process
2
Introduction This material is best used after reading the book Managing The CAE Process.
Access to HyperWorks software is not essential for you, the instructor. Of course, if you choose to solve the problems yourself before working with
your students, you will need HyperMesh, HyperView, the HyperView Player, the Batch Mesher, the GUI Toolkit and OptiStruct.
This book describes 4 assignment problems that highlight different applications of HyperWorks. Each problem is independent, and is complete
in itself. Students may choose to do more than one, depending on their interest.
To make best use of this material you will need a computer with a sound-
card and speakers. Your computer should have a media-player program
(such as Windows Media Player) and an Internet Browser that supports JavaScript. The material can be copied to a server and accessed by clients.
You can customize the HTML files to suit your
requirements. After opening the file, double-
click on any text to edit it. Use the save changes link on the left of your Browser window when
you are finished.
Installation Instructions: 1. Copy the folders to your computer or to your server. If you are
working on a server, it is a good idea to set the folders to “read only” to prevent inadvertent modifications.
2. The videos are best played in full-screen at a resolution of 1024 x
768. You may need to install the CamStudio Codec to view video on your computer. To do this, right-click on the file camcodec.inf and choose Install from the popup menu. You may need administrator privileges to do this.
3. Ensure that JavaScript is enabled on your browser.
4. Each folder contains one HTML file. Double-click on it to open the instructions.
5. Data files are provided as relevant – IGES files, HM files, etc. 6. In case you need support, contact your distributor or email
Student Project Summaries Managing the CAE Process
3
Batch Meshing a Vehicle Frame Assembly Areas covered:
• Automation of geometry-organization and mesh generation
• Use of multiple meshing-options and quality-criteria • “What-if” meshing – creation of multiple meshes on
the same component • TCL scripts for advanced automation
Software used: • Batch Mesher • HyperMesh
Description of the Problem FEA is time consuming, and unless attention is
paid to details, the results can be horribly misleading. Most large design-projects involve a
repetitive procedure:
• check whether the CAD models of items
in the assembly have changed
• if they have, create new FE meshes or
correct out-of-date meshes • verify that these meshes satisfy pre-
specified quality criteria
• submit these meshes to the analyst for
further processing (analysis and results-
interpretation)
CAD data is managed by designers. Many use folders, while some use PDM or PLM systems
(Product Data management and Product Lifecycle Management, respectively). Going
through the assembly structure, picking
components which have changed, and generating the mesh to satisfy element quality-
specifications is tedious, and error prone.
Our goal is to use the Batch Mesher to automate
the process. Not only does this make it easier for the designer to generate meshes of a specified
quality, it even reduces scope for error by the
Student Project Summaries Managing the CAE Process
4
experienced engineer!
Our starting point is an assembly of the frame of a vehicle, developed using Unigraphics.
HyperMesh supports direct import of Unigraphics data. We see how to access CAD data both
directly and via the IGES-translation route.
Programming References A formal study of programming techniques is not important for the student. Since the goal is
application-customization, what is critical is that the student knows how to look for keyword-
references and examples whenever required.
HyperWorks comes with a TCL interpreter (and
the associated help files), but a separate TCL installation is useful for ready access to help on
TCL keywords and TCL tutorials. ActiveTCL is one option, but pretty much any open-source
package should do.
If your students have ready internet access, they
can search for examples of TCL-command usage that can be modified for the specific context..
The online documentation is the best resource for the Batch Mesher. Your students will
probably prefer to use it as a reference, which is a satisfactory mode of usage. Reading the
documentation from start to end is admirable, but probably unnecessary at the outset.
The Manual Process A process that is not documented cannot be
automated - this is an axiom for most process automation approaches. While we do not want
to get too deep into FE theory or HyperMesh modeling, we cannot ignore the fact that some
familiarity with the process is essential.
The frame assembly consists of several
components that are thin-and-long: that is, shell
Student Project Summaries Managing the CAE Process
5
elements are a natural choice. High-quality
automatic mesh generation for shell elements is
one of the strengths of HyperMesh, so this is ideally suited for Batch meshing.
The choices the student needs to make for each
component are:
• should the mesh be generated at the
mid-surface?
• will meshes be connected using
“connector” elements (to represent welds, etc.) or should the meshes be
continuous across elements?
• what geometric features can be omitted
from the model – fillets, pin-holes, etc.?
Ensure that your students understand exactly why the manual process is error prone,
particularly when working with assemblies. They should appreciate the fact that process
automation is not just to speed up the process,
but to make the process more fool-proof.
The Automated Process Using the Batch Mesher can be deceptively
easy: after seeing a working setup, it's hard to understand where things can go wrong.
A working knowledge of HyperMesh is enough for most components – an in-depth knowledge
is unnecessary for all but the most difficult components.
There are three files that control the behavior of
the Batch Mesher – the configuration file, the
parameter files and the criteria files. The first, configuration files, allows the process-
automation designer to create “bundles” of options that the designer can retries and
deploy. All the designer has to do is choose the
files from which the geometry is to be imported, choose from the bundled “parameter” options,
and the mesh will be generated automatically.
Student Project Summaries Managing the CAE Process
6
The parameter files control the mesh-generation
options, mirroring the strategies the process-automation expert wants to capture and make
available to the designer. If the subsequent analysis imposes quality requirements on the
mesh (such as the minimum element size to
control the time step for transient analysis), these are defined in the criteria files.
Since CPU cycles are getting cheaper each day,
the designer can try several different strategies
on each part without any increase in engineer-time: the Batch Mesher takes care of generating
the meshes using each strategy.
It generates several log and output files that can be used for programmatic inspection for
subsequent processing – for instance a user-
defined procedure can read through the results-logs for each strategy and retain only the model
that has the fewest “failed” elements.
Further Work There are several aspects that can make the
project more complete. You may choose to
assign these to your students based on their level of proficiency on programming, the time
available, etc.
Some of the areas for further work include
• writing a program to mesh only those
components that are out of date - a
program can compare the checksums of the new and old versions of the IGES
files and proceed accordingly • adding support for loads and restraints
too
• integrating with a CAD system for direct
extraction of the data - most CAD
systems have an API of their own for external-programmatic access
Student Project Summaries Managing the CAE Process
7
Summary By the end of this assignment, the student will know how to
• import IGES files
• import CAD geometries in “native” formats
• organize data for CAD assemblies within HyperMesh
• assign TCL scripts for pre-meshing tasks such as data organization
• choose options for geometry abstraction, such as suppression of
features and mid-surfacing • create meshing-options such as the use of “washer” meshes for
shell meshes
• edit and save quality-criteria for various analysis programs
• build and provide multiple meshing strategies as configuration files
• inspect the various output files for downstream decision making
• assign TCL scripts for post-meshing tasks such as export of models
for different analysis packages
Student Project Summaries Managing the CAE Process
8
Process Automation – an FRF Wizard Areas covered:
• How the Process Manager works • Use of the Process Manager to capture best-
practices • Creation of TCL scripts that interact with the
HyperMesh database • Use of the Process Studio to create customized
user-interfaces Software used:
• Process Manager • HyperMesh
Description of the Problem One form of vibration-testing involves strapping
the body to a test-bed, and exciting the bed using a load that varies sinusoidally with time.
The experimenter varies the frequency of the
sinusoidal function, sweeping through the range of interest, to see how the output varies with
frequency. This variation is expressed as a frequency response function or FRF.
The experiment can be simulated using Finite Element analysis. Since the FE method is quite
general, the preprocessor - HyperMesh - offers a wide range of options that are unnecessary for
the vibration analyst. This can be a source of
confusion and possible error.
Further, for the beginner, the sequence of steps can be quite complex, as a review of the project
titled FRF Analysis of a Cross Member shows.
Our goal is to use a wizard to guide the analyst
through the steps involved. Not only does this make it easier for the beginner, it even reduces
scope for error by the experienced analyst!
In this project, we use the HyperWorks Process
Manager, supported by TCL and HWPM code to implement the wizard.
Student Project Summaries Managing the CAE Process
9
Programming References A formal study of programming techniques is not
important for the student. Since the goal is
application-customization, what is critical is that the student knows how to look for keyword-
references and examples whenever required.
HyperWorks comes with a TCL interpreter (and
the associated help files - see tcl.hlp and tcl83.hlp in the help folder of your HyperWorks
installation), but a separate TCL installation is useful for ready access to help on TCL keywords
and TCL tutorials. ActiveTCL is one option, but
pretty much any open-source package should do.
Another source, particularly useful if your
students have ready internet access, is the TCL Scripting page.
The online documentation is the best resource for the Process Manager. Your students will
probably prefer to use it as a reference, which is a satisfactory mode of usage. Reading the
documentation from start to end is admirable,
but probably unnecessary at the outset.
It's a good idea for the student to pay some attention to the basics of User Interface design.
Don Norman's The Design of Everyday Things is a good reference for every engineer.
Task Centered Interface Design by Clayton Lewis and John Rieman is for more experienced
programmers.
The Manual Process A process that is not documented cannot be
automated - this is an axiom for most process
automation approaches. While we do not want to get too deep into FE theory or HyperMesh
modeling, we cannot ignore the fact that some familiarity with the process is essential.
Student Project Summaries Managing the CAE Process
10
One of the limitations of the wizard approach is
that the choice of steps, as well as the sequence of steps, is critical: the wizard reduces
complexity but also restricts the user. Judging the suitability of a sequence is a complicated
aspect, much talked about but rarely agreed
upon.
In our approach, we restrict ourselves to sheet-metal components and break the FRF into 14
distinct steps. This means we are only allowing
shell elements.
The manual process, as per our design, involves
• data from a CAD package
• generation of a mid-surface
• automatic meshing
• creation of a material and component
collectors • organizing the elements into component
collectors
• application of restraints to selected
nodes
• specification of the frequency range and
amplitude using several different “cards”
• creation of a load case using the
Lanczos solver
Each step, of course, can be quite lengthy. This
not only means it can be confusing for a beginner, it is also error-prone.
The Automated Process Developing a HWPM application involves two distinct steps - first design the User Interface
(UI), then create the code for each widget in the UI. As with any programming process, the
time taken depends on the programmer - it is
impossible to predict what can go wrong, so debugging and testing can drag out. Often
testing shows up flaws in logic, which means
Student Project Summaries Managing the CAE Process
11
the program or sections of it need to be re-
written.
UI designers often use a story-board approach,
in which the steps are laid out in as detailed a fashion as possible without any underlying code.
In similar fashion, we use the Process Studio to
construct the sequence we want to follow.
Programming the user-interface is the hardest part of application-customization - the
programmer must both anticipate how the user
will behave, and make interface "appealing".
Within the Process Studio we verify the layout and assign code to the various widgets in the UI.
We then create the code for each control, and test these. This is implemented using Event
Handlers or Callback functions. These can be
written either as TCL scripts or using the HWPM API.
Further Work No program is ever complete - it can always be improved. Software development, in fact, is an
excellent example of Parkinson's law (work
expands so as to fill the time available for its completion).
That apart there are several aspects that can
make the program more complete. You may choose to assign these to your students based
on their level of proficiency on programming, the
time available, etc.
Some of the areas for further work include
• integrating the Material Database project
with this application
• preventing the user from proceeding
unless selected steps are complete • providing support for other constitutive
models
Student Project Summaries Managing the CAE Process
12
Summary By the end of this assignment, the student will know how to
• import CAD geometry
• create component, element and load collectors
• organize elements
• understand the data structure for an FRF analysis using
OptiStruct/Analysis • layout an interface using the Process Studio
• create and manage Wizard-trees to encapsulate a CAE process
• create interface elements like drop-down lists
• use HWPM pages to change the HyperMesh interface
• use TCL to create callback functions
• use the TCL API to access the HyperMesh database
Student Project Summaries Managing the CAE Process
13
Automating Post-Processing – H3D Export Areas covered:
• How to use the HyperView Player to post-process using a Browser
• Post-processing using HyperView • Capabilities of the GUI Toolkit
Software used: • GUI Toolkit • HyperView
Description of the Problem We know that the results-interpretation stage is
critical in any CAE work, since diligence is essential to trap mistakes that may have crept
into the models. Unfortunately, post-processing often gets short shrift since the experts who
need to review the results are often unfamiliar
with the software used.
Further, if post-processing ties up a license of the software, things get worse. There's always
pressure to create more models, which requires
licenses. An engineer who wants to pore over the results, but who is under pressure for the
license, may (perhaps unconsciously!) hurry through this phase.
To address this, HyperWorks provides a results-viewer, the HyperView Player that requires no
license. An engineer who is familiar with the software can use HyperView to create H3D files
that contain various views of the results. These can be embedded in a HTML Browser or in
PowerPoint files for independent review and
evaluation - no HyperWorks licenses are tied up.
In this project we look at ways to automate the process of generation of reports from analysis
results.
Student Project Summaries Managing the CAE Process
14
Programming References A formal study of programming techniques is not
important for the student. Since the goal is
application-customization, what is critical is that the student knows how to look for keyword-
references and examples whenever required.
HyperWorks comes with a TCL interpreter (and
the associated help files - see tcl.hlp and tcl83.hlp in the help folder of your HyperWorks
installation), but a separate TCL installation is useful for ready access to help on TCL keywords
and TCL tutorials. ActiveTCL is one option, but
pretty much any open-source package should do. Another source, particularly useful if your
students have ready internet access, is the TCL Scripting page.
The online documentation for the HyperWorks
GUI Toolkit is useful. Your students should also
read the help file hyperweb.hlp (in the help folder of your HyperWorks installation).
It's a good idea for the student to pay some
attention to the basics of User Interface design.
Don Norman's The Design of Everyday Things is a good reference for every engineer.
Task Centered Interface Design by Clayton Lewis
and John Rieman is for more experienced programmers.
The Manual Process A process that is not documented cannot be
automated - this is an axiom for most process automation approaches. While we do not want
to get too deep into HyperView, we cannot ignore the fact that some familiarity with the
process is essential. As Einstein said, "Make
everything as simple as possible but not simpler."
Student Project Summaries Managing the CAE Process
15
We first review how H3D files can be created
automatically by OptiStruct, provided the
relevant options are chosen. We also see the limitations of these files.
We then see how to use HyperView to first load
a model and its associated results file, then
apply various post-processing options:
• contour plots of stressses
• deformed shapes
• animation options
• section views
• notes
• tracking systems
We then review the manual procedure to create
H3D files – set options that control what is written to the file, assign a meaningful name,
keep track of what has been written, and repeat
this for each item that the model-reviewer may want.
This brings out the limitations of the manual
method:
• it's upto the user to remember all the
items that are required for report-
generation
• as the number of files increases, it
becomes increasingly hard to assign meaningful names that can be used by a
third party
The Automated Process In this program, we make extensive use of the GUI Toolkit - it allows us to build interfaces that
are much more sophisticated than those that use
Student Project Summaries Managing the CAE Process
16
"plain" Tk. This represents an alternate approach
to the Process Studio – since the task is
relatively simple and involves only a few commands and settings, one option is to group
all data into a single dialog box.
To do this, we use the TCL package “hwt”,
which, together with Tk’s intrinsic commands allows us to build a sophisticated UI that permits
access to the HyperView session in a consistent form.
Further Work No program is ever complete - it can always be
improved. Software development, in fact, is an excellent example of Parkinson's law (work
expands so as to fill the time available for its completion).
That apart, there are several aspects that can
make the program more complete. You may
choose to assign these to your students based on their level of proficiency on programming, the
time available, etc.
Some of the areas for further work include
• adding options for HyperWeb
• automatically generating sections by
slicing the bounding-box at user-defined intervals
• creating a HTML file with snapshots of
each H3D file and a link to the
corresponding file
• using an XML or other form of results-
definition - the list of views and results
that are required for the report to be complete
Student Project Summaries Managing the CAE Process
17
Summary By the end of this assignment, the student will know how to
• control output options using OptiStruct/Analysis
• embed results files in a HTML page or a Powerpoint file
• use HyperView to import models and results
• create and export stress contours
• create and export animations of deformation patterns
• create and export cut-sections of the model
• use tracking systems to control animations
• use the GUI Toolkit to design consistent interfaces
• develop TCL scripts using the hwt package
Student Project Summaries Managing the CAE Process
18
Creation of a Material Library Areas covered:
• Material-data specification using HyperMesh, including the units-neutral nature
• Record-and-modify method to create macros • Addition of buttons to the User-page • TCL and TK to create interactive applications
Software used: • HyperMesh
Description of the Problem HyperMesh is units neutral - it relies on the user
to use a consistent set of units. When the FE model is constructed, data comes from three
sources. The first is the geometry which usually comes from a CAD modeler. Next is data that is
created explicitly by the user but is not displayed
graphically - material properties and geometric data such as the thickness of shell elements. The
last is data such as nodes and elements which are created interactively.
Most engineers rely on readily available material data, often paying little attention to the fact that
such data in a production environment must come from verifiable sources, not from
"references". Further, even experienced
engineers can get trapped in the units muddle.
Our aim is to provide an application that addresses both problems: we want to reduce the
tedium of looking up and entering material data, and we also want to avoid the scope for error in
units.
Programming References A formal study of programming techniques is not important for the student. Since the goal is
application-customization, what is critical is that the student knows how to look for keyword-
references and examples whenever required.
Student Project Summaries Managing the CAE Process
19
HyperWorks comes with a TCL interpreter (and
the associated help files - see tcl.hlp and tcl83.hlp in the help folder of your HyperWorks
installation), but a separate TCL installation is useful for ready access to help on TCL keywords
and TCL tutorials. ActiveTCL is one option, but
pretty much any open-source package should do.
Another source, particularly useful if your
students have ready internet access, is the TCL
Scripting page.
It's a good idea for the student to pay some attention to the basics of User Interface design.
Don Norman's The Design of Everyday Things is a good reference for every engineer.
Task Centered Interface Design by Clayton Lewis and John Rieman is for more experienced
programmers.
The Manual Process A process that is not documented cannot be
automated - this is an axiom for most process
automation approaches. While we do not want to get too deep into FE theory or HyperMesh
modeling, we cannot ignore the fact that some familiarity with the process is essential.
As Einstein said, "Make everything as simple as
possible but not simpler."
Material data specification involves two distinct
steps: first, choose the constitutive behavior, then specify appropriate data.
HyperMesh supports several different constitutive models, each of which is identified
by a "Mat" card. For instance, Mat1 identifies a linear isotropic material, Mat8 is for orthotropic
shells (composite materials) etc.
Student Project Summaries Managing the CAE Process
20
Each material is saved as a "Mat Collector".
In this assignment, we will address linear isotropic materials - Mat1.
The tasks involve
• creation of a material collector
• entering the data corresponding to the
chosen constitutive model – such as the
Elasticity Modulus, Poisson’s Ratio and Density for a linear isotropic material
When we execute any task manually, HyperMesh saves all commands in a “command” file.
The Automated Process Now that we have the command file that shows how the steps are executed, we will break our
application into three stages.
First, we'll see how to convert the macro-
commands into TCL. Next, we'll design and create a widget for the user. Finally, we'll assign
the widget to a button on the user page.
Our focus in the first section is to deploy the
need-to-know approach to programming. It is neither feasible nor necessary to understand all
the commands that are available to us in either TCL or the HyperWorks API.
We see how to
• browse the HyperWorks Help
• choose TCL commands that are good
enough, without worrying about whether
they are the best options
• create and test the program skeleton
In the next phase, we create the User-Interface
Student Project Summaries Managing the CAE Process
21
using Tk. Programming the user-interface is the
hardest part of application-customization. Not
only must the programmer anticipate how the user will behave, the appearance of the interface
must also be "appealing". Since appeal or "ease of use" is notoriously subjective, an easier
approach is to follow a style-guide. We see how
to
• interface with the window manager
• create our own dialog and add controls
to it
• use a drop-down list for quick selection
of the material
In the last phase we see how to assign the TCL program to a button on the user-page in
HyperMesh by editing userpage.mac.
Further Work No program is ever complete - it can always be
improved. Software development, in fact, is an
excellent example of Parkinson's law (work expands so as to fill the time available for its
completion).
That apart, there are several aspects that can
make the program more complete. You may choose to assign these to your students based
on their level of proficiency on programming, the time available, etc.
Some of the areas for further work include
• adding support for more constitutive
models
• providing an option to change units
• assigning the application to a menu
Student Project Summaries Managing the CAE Process
22
Summary By the end of this assignment, the student will know how to
• use HyperMesh to create material collectors
• edit and extract data from command files
• create macros that use the TCL API
• use Tk to create a quick and simple interface
• apply debugging techniques