Professional Documents
Culture Documents
Getting Started With ANSYS:: One of These Physics Fields) It Is Impossible To Cover
Getting Started With ANSYS:: One of These Physics Fields) It Is Impossible To Cover
www.ansys.belcan.com
by Paul Dufour
Introduction:
ANSYS is a sophisticated and comprehensive finite
element program that has capabilities in many different
physics fields such as static structural, nonlinear, thermal,
implicit and explicit dynamics, fluid flow,
electromagnetics, and electric field analysis. It can also
perform coupled field analysis combining one or more of
these different physics. Obviously because ANSYS is such
a huge program with so many capabilities (even within just
one of these physics fields) it is impossible to cover
everything in this short guide. This document will give an introduction as to how the ANSYS program
works and how these basic skills will be applicable to any type of analysis within ANSYS. The most
important concepts in using ANSYS will be addressed here in a compressed format. The key to
becoming productive in any computer aided engineering program is to start to think like the program
thinks, to get the big picture of how it works in general. That is the primary goal of this guideline.
A Couple of Preliminaries:
ANSYS is an integrated program with all operations performed under one GUI. Creating the model,
running it, and postprocessing the results are all done without leaving the ANSYS environment.
There are several different ways of working within ANSYS. This stems from the fact that like every
program, ANSYS is driven by commands. The difference between ANSYS and say, Microsoft Word,
is that when you click on an icon in Word, you have no idea what command was executed behind the
scenes to make the program do what you asked. ANSYS gives you easy access to these commands if
you want to use them. These commands are simple to use; just a keyword followed by several
arguments. By stacking these commands together in a text file the power to automate and script
ANSYS is one key reason why I think it is superior to other FEA codes on the market. More on this
powerful scripting capability in a later section.
New ANSYS users generally dont care much about scripting to start with and just want to figure out
how to do what they want within the GUI environment, and thats where we will start as well. Each
key concept will be explained as succinctly as possible, then at the end we will do a simple problem
using several different approaches to put it all together.
Starting ANSYS:
When you start ANSYS from the Windows Start Menu you
get three basic choices.
ANSYS Workbench: This is a brand new GUI with an emphasis on CAD connectivity, ease of use, and
easy management of assembly contact. This GUI is covered in a separate guideline.
ANSYS: This starts ANSYS in the traditional GUI. The program starts immediately using the settings
last changed under the next item, Configure ANSYS Products. This guideline will cover this GUI.
Configure ANSYS Products: This sounds like something you might use only the first time you fire up
ANSYS, but surprise! Typically this is where you will start the program from every time. This choice
brings up what has been always called the ANSYS Launcher.
backup.
jobname.log Everything you do in a session is written to this file in the form of commands.
jobname.rxx Results file. xx = st for structural, xx = th for thermal, etc.
Preferences Tab:
The 3D graphics driver allows you to rotate a shaded view of
your model. Most newer graphics cards can handle this fine.
Under the Profiles pull down menu you can save settings and easily recall them to quickly start
ANSYS with specific settings that you have defined previously.
The Help System:
ANSYS has excellent documentation available under the help menu in the main GUI window. The
amount and comprehensiveness of information available under the help menu is both a blessing and a
curse. What you want to know is there, but at times its hard to dig out due to the sheer amount of
information. A couple of hints:
Use the tutorials found under Help ANSYS
Tutorials. There are nine different tutorials here that
are step by step, mouse click by mouse click instructions
for various types of analysis.
Under the Analysis Guide for each discipline, there are
also step by step instructions with explanations on how
to do each type of simulation. These are well
donetake advantage of them!
Raise hidden. If a
dialog disappears
behind the main
window, bring it back
with this.
Manipulate
your model
view with
these buttons.
This GUI is fairly easy to use, however there is some ANSYS-speak related to basic operation:
Resume: This is opening a previously saved database. It is important to know that if you simply
resume a database, it doesnt change the jobname. For example: You start ANSYS with a jobname of
file. Then you resume mymodel.db, do some work, then save. That save is done to file.db!
Avoid this issue by always resuming using the
icon on the toolbar. If you open mymodel.db using
this method, it resumes the model and automatically changes the jobname to mymodel.
Plotting: Contrary to the name, this has nothing to do with sending an image to a plotter or printer.
Plotting in ANSYS refers to drawing something in the graphics window. Generally you plot one type
of entity (lines, elements, etc.) to the screen at a time. If you want to plot more than one kind of entity
use, Plot Multiplot, which by default will plot everything in your model at once.
Plot Controls: This refers to how you want your plot to look on the screen (shaded, wireframe,
entity numbers on or off, etc). Other plot control functions include sending an image to a graphics file
or printer.
Mouse Functionality:
Pressing the scroll wheel button is the same as a middle mouse button.
Picking Entities:
Left Button: Picks an entity. Picking is cumulative, so you dont need to press control or shift to
pick more than one entity. Click and hold the button, then move the cursor around until the entity
you want is highlighted. When you release the button the highlighted entity is selected.
Middle Button: Completes a selection. This is like clicking Apply in the picking dialog (also
called the picker).
Right Button: Toggle back and forth between pick and unpick
you know what mode you in.
Manipulating the Model View: (you can change these defaults to different buttons if desired)
CTRL + Left Button: Pan the model side to side and up and down.
CTRL + Middle Button: Move the mouse left and right to rotate about screen Z. Up and down
zooms in and out.
CTRL + Right Button: Rotate the model.
Right Button: Click and drag the right button to zoom in using a window.
Rolling the scroll wheel also zooms in and out.
Right Button Pop-up Menu:
When you click the right button in the graphics area you get this pop-up with some
very common graphics functions.
ANSYS does not always refresh the graphics screen so Replot is very handy.
Fit makes your whole model visible.
Zoom Back will go back to the view the way it was just before you zoomed in.
Importing or Creating Geometry:
Import CAD geometry using File Import. ANSYS comes with IGES support by default but there
are Geometry Interfaces available for Pro/E, CATIA, UG, Solidworks, Parasolid, etc. IGES is the
oldest of these formats and does not work very well for solids, but is OK for wireframe geometry. All
of these geometry interfaces on the ANSYS Traditional side perform a translation of the geometry
into an ANSYS Neutral File (.anf) format, which it then reads in. In Workbench there is no
translation, it works with the native CAD format geometry.
Geometry in ANSYS is created from Main Menu Preprocessor Modeling Create and has
the following terminology,
KEYPOINTS: These are points, locations in 3D space.
LINES: This includes straight lines, curves, circles, spline curves, etc. Lines are typically defined
using existing keypoints.
AREAS: This is a surface. When you create an area, its associated lines and keypoints are
automatically created to border it.
VOLUMES: This is a solid. When you create a volume, its associated areas, lines and keypoints are
automatically created.
SOLID MODEL: In most packages this would refer to the volumes only, but in ANSYS this refers to
your geometry. Any geometry. A line is considered a solid model.
You cant delete a child entity without deleting its parent, in other words you cant delete a line if its
part of an area, cant delete a keypoint if its the end point of a line, etc.
Boolean Operations:
Top Down style modeling can be a very convenient way to work. Instead of first creating keypoints,
then lines from those keypoints, then areas from the lines and so on (bottom up modeling), start with
volumes of basic shapes and use Boolean operations to add them, subtract them, divide them etc. Even
if you are creating a shell model, for example a box, you could create the box as a volume (a single
command) and then delete the volume keeping the existing areas, lines and keypoints.
These kinds of operations are found under Main Menu Preprocessor Modeling Operate
Booleans with some common ones being:
Add: Take two entities that overlap (or are at least touching) and make them one.
Subtract: Subtract one entity from another. To make a hole in a plate, create the plate (area of
volume) then create a circular area or cylinder and subtract it from the plate.
Glue: Take two entities that are touching and make them contiguous or congruent so that when
meshed they will share common nodes. For example, using default mesh parameters,
L7
L8
Area 2
L5
L3
Area 1
L4
L6
L2
L1
L10
L9
L11
L4
Area 2
Area 1
L2
L1
You have many different areas at Z = 0 you want to constrain. You could select
them all one by one when applying the constraint, or select By Location
beforehand, then say Pick All in the picking dialog.
You have a structure with many fastener holes that you want to constrain. Again,
you could select them all one by one when applying the constraint, or select lines
By Length/Radius, type in the radius of the holes to select all of them in one shot, then Pick
All in the picking dialog when applying the constraint.
Copyright 2003 Belcan Engineering Group, Inc.
After working with the selected set, Utility Menu Select Everything to make the whole model
active again.
Select Entities Dialog Box Terminology:
From Full: Select from the entire set of entities in the model.
Reselect: Select a subset from the currently selected entities.
Also Select: Select in addition to (from the whole model) the set you have currently selected.
Unselect: Remove items from the selection set.
Select All: This is not the same as Utility Menu Select Everything. This selects all of
whatever entity you have specified at the top of the dialog.
Invert: Reverses the selected and unselected entities (just the entities specified at the top of the
dialog).
OK: This does the select operation (or brings up a picker dialog so that you can pick with the mouse)
and then dismisses the dialog.
Apply: This does the operation but keeps the dialog box. Typically use this so the dialog stays active.
Replot: Replots whatever is active in the graphics window.
Plot: Plots only the entity specified at the top of the dialog.
Organizing Your Model Using Components:
If you select a group of entities and think that you might want to use that selection set again, create a
component out of it. Components are groups of entities but hold only one kind of entity at a time.
Components can themselves be grouped into Assemblies, so this is how you group different types of
entities together. Use Utility Menu Select Comp/Assembly Create Component to create
a component. The new Component Manager in Release 8.0 makes it very easy to manage and
manipulate groups and select/plot what you want to see to the screen. This is found under Utility
Menu Select Component Manager.
Creating a Material:
Create the material properties for your model in Main Menu Preprocessor Material Props
Material Models. This gives you this dialog box where all materials can be created,
Double click on items in the right hand pane of this window to get to the type of material model you
want to create. All properties can be temperature dependant. Click OK to create the material and it
will appear in the left hand pane. Create as many different materials as you need for your analysis.
Selecting an Element Type:
ANSYS has a large library of element types. Why so many? Elements are organized into groups of
similar characteristics. These group names make up the first part of the element name (BEAM,
SOLID, SHELL, etc). The second part of the element name is a number that is more or less (but not
exactly) chronological. As elements have been created over the past 30 years the element numbers
have simply been incremented. The earliest and simplest elements have the lowest numbers (LINK1,
BEAM3, etc), the more recently developed ones have higher numbers. The 18x series of elements
(SHELL181, SOLID187, etc) are the newest and most modern in the ANSYS element library.
Tell ANSYS what elements you are going to use in your model using Main Menu Element Type
Add/Edit/Delete.
Later, when meshing or creating elements
manually you will need to tell ANSYS
what type of elements you want to create.
See the Belcan ANSYS Tips sheet
called Common Element Types for
Structural Analysis for more information.
Copyright 2003 Belcan Engineering Group, Inc.
Creating Properties:
A solid element (brick or tet) knows its thickness, length, volume, etc by virtue of its geometry, since it
is defined in 3D space. Shell, beam and link (truss) elements do not know this information since they
are a geometric idealization or engineering abstraction. Properties in ANSYS are called Real
Constants. Define real constants using Main Menu Real Constants Add/Edit/Delete.
Later when meshing or creating elements manually ANSYS will need to know what real constant set
you want to use for those elements.
Creating the Finite Elements Model - Meshing:
If you are just starting out in FEA, it is important to realize that your geometry (called the solid model
in ANSYS) is not your finite element model. In the finite element method we take an arbitrarily
complex domain, impossible to describe fully with a classical equation, and break it down into small
pieces that we can describe with an equation. These small pieces are called finite elements. We
essentially sum up the response of all these little pieces into the response of our entire structure. The
solver works with the elements. The geometry we create is simply a vehicle used to tell ANSYS
where we want our nodes and elements to go. While you can create nodes and elements one by one in
a manual fashion (called direct generation in ANSYS) most people mesh geometry because it is much
faster.
Another very good reason we mesh geometry is that we assign materials and properties to that
geometry. Then any element created on or in that geometric entity gets those attributes. If we dont
like the mesh we can clear it and re-mesh, without having to re-assign the attributes.
Steps for Creating the Finite Elements:
1. Assign Attributes to Geometry (materials, real constants, etc).
2. Specify Mesh Controls on the Geometry (element sizes you want).
3. Mesh.
10
Most of the meshing operations can be done within the MeshTool, so that will be examined in some
detail now. Start it from Main Menu Preprocessor Meshing MeshTool.
If you set global attributes, that material,
element type, real constant, beam section,
etc. will be used for all elements in the
model. Its better to use the drop down to
assign different attributes to different
geometric entities in the model. Then mesh
the whole model at one time.
Y
Z
stress
at
some
point
in the
model
you care
about
11
12
Postprocessing:
The General Postprocessor is used to look at the results over the whole model at one point in time.
This is the final objective of everything we have discussed so far; finding the stresses, deflections,
temperature distributions, pressures, etc. These results can then be compared to some criteria to make
an objective evaluation of the performance of your design.
The solution results will be stored in the results file as result sets. For a linear static analysis like we
are talking about, the correlation between Load Step numbers and Results Set numbers will be one to
one as shown below. Only one set of results can be stored in the database at a time, so when you want
to look at a particular set, you have to read it in from the results file. Reading it in clears the previous
results set from active memory.
To read in a results set from the results file (not needed if you have run only a single load step) use
Main Menu General Postproc Read Results First Set, or By Pick. Most results are
displayed as a contour plot as shown below. To generate a plot of stresses use Main Menu General
Postproc Plot Results Contour Plot Nodal Solution, then pick the stresses you want to see.
There are many, many other ways
to look at your results data
including:
Extracting data and storing it an APDL array that you can do further operations with.
Animate any result on the deformed shape with Utility Menu Plot Ctrls Animate. This is very
helpful for understanding if your model is behaving in a reasonable way.
13
To print a hardcopy of the graphics window: Utility Menu Plot Ctrls Hard Copy To Printer
There are several ways of capturing a graphic image for use in Microsoft Word, Powerpoint or some
other software.
Exact screen shot of the graphics window: Utility Menu Plot Ctrls Capture Image will pop up
another window with a screen shot of your graphics window. You can keep it available for later
reference or save the image to a bitmap (.bmp) file. Note that although a windows bitmap file is not
compressed, when it is inserted into Word it does get compressed automatically so you dont end up
with a huge bloated document.
Output a vector image: Utility Menu Plot Ctrls Redirect Plots To PSCR File. A
Postscript file is a vector file, which means that it is a 2D representation of all of the entities in the
graphics window in an editable format. Because it is not a bitmap, it can be scaled to any size without
losing any resolution, and is always very crisp looking. It can also be imported into a technical
illustration program and manipulated very easily: change the colors, add annotations, change or resize
fonts, etc. All this can be done in ANSYS but it can be quicker in an illustration package. One caution
about Postscript files! Since they actually write out every entity in the model, if your model is large
(say a tet mesh of a CAD model) this file can be huge. It is best suited for getting very crisp images of
smallish models or wireframe displays. Microsoft Word will not display the image until it is printed.
A very good free program to look at and manipulate Postscript files with (available on the web) is
called GSView.
Output a bitmap image: Utility Menu Plot Ctrls Redirect Plots To xyz File, where xyz is
JPEG, TIFF, PNG, etc. These file formats produce good images with reasonably small file sizes. The
size of the image file for these formats is not dependant on the size of your model like Postscript.
Note: The GRPH format is the ANSYS native image format. You can only deal with these files using
the ANSYS DISPLAY program that is available from Start Menu Programs ANSYS 8.0
Display. This utility has some neat features like being able to take a group of static images you create
and animating them into an mpeg or avi video.
14
Utility Menu Plot Ctrls Style: Change hidden line, element edges, element shrink, etc.
Utility Menu Plot Ctrls Device Options: Change between solid shaded and wireframe display.
15
[command name]
Define parameter variables to use in your analysis with Utility Menu Scalar Parameters. Or just
type in a variable using the equals sign in the command window. For example:
Now you could refer to this variable in a dialog box and ANSYS will substitute the value of pi.
Use parameters and mathematical
expressions in any entry box that requires
a number. Handy!
16
APDL has much of the functionality of a full-featured programming language including mathematical
functions and branching logic. Macros are APDL commands put into a file with a .mac extension.
ANSYS will use these macros just like a regular ANSYS command. Heres a simple example, called
edges.mac:
C*** Reverses current display of all element edges
C*** (if edges on, turns them off & vice versa)
*GET,KEY,GRAPH,1,EDGE
! obtains current setting using a *get command
*IF,KEY,EQ,0,THEN
/EDGE,1,1
! sets KEY=1
*ELSE
/EDGE,1,0
! sets KEY=0
*ENDIF
/REPLOT
In the command line simply type: edges to execute the macro. (note: press ENTER)
An analysis (building the model, solving, and postprocessing) can be completely defined using APDL
commands and this does have some excellent benefits such as,
Your analysis is completely documented by your input file (you can add user comments as well).
You can use parameter variables to define dimensions or loading and have a parametric input file
that you can run as many times as you want, changing the model each time by changing the
variable values.
As you can see, the possibilities for customization of the toolbar to enhance productivity are limitless.
To customize the location where dialog boxes pop up, arrange them how you want them to be the next
time they appear, use Utility Menu MenuCtrls Save Menu Layout. This saves the locations.
Grab any of the solid bars that divide the main window panes and drag them to resize. The main
graphics window does have a fixed aspect ratio however; you will notice this as you try to change it to
a wide thin window for example.
17
beam section
L
Input data needed for this analysis:
L = 12 in.
E = 10 e 6 psi
W = 2 in.
= 0.33
t = 0.125 in.
p = 1.0 psi
The running load for the beam model will be (1.0 psi)(2 wide) = 2.0 lb/in
Theoretical Solution:
I=
1 3 1
3
b t = (2.0)(0.125) = 0.000326 in 4
12
12
M=
5p b L2
5(1.0 psi )(2.0)(12)
=
= 0.055296 in
384E I 384(30e6 psi ) 0.000326 in 4
3
max =
max =
Mc
=
I
2 = 6912 psi
0.000326 in 4
ANSYS Instructions:
Beam Element Model
Start Programs ANSYS 8.0
Configure ANSYS Products. This
starts the ANSYS Launcher.
18
Shell 4noded181 OK
Close.
Close.
Close.
19
20
21
Beam 1 Example
finish
/clear
/PREP7
finish
/solu
22
SFBEAM,all,1,PRES,2.0
solve
finish
/post1
23
1. Moaveni, S., Finite Element Analysis: Theory and Applications with ANSYS, 2nd Edition,
Prentice Hall, 2003.
2. Lawrence, K.L., ANSYS Tutorial (Release 7.0), Schroff Development Corp. Publications,
2002.
3. Adams, V., and Askenazi, A., Building Better Products with Finite Element Analysis,
Onward Press, Sante Fe, NM, 1999.
4. Cook, R.D., Malkus, D.S., and Plesha, M.E., Concepts and Applications of Finite Element
Analysis, 3rd Edition, John Wiley and Sons, New York, 1989.
5. Segerlind, L.J., Applied Finite Element Analysis, John Wiley and Sons, New York, 1976.
6. Smith, I.M., and Griffiths, D.V., Programming the Finite Element Method, 2nd Edition, John
Wiley and Sons, New York, 1988. (This edition uses FORTRAN77 in its examples.)
7. Smith, I.M., and Griffiths, D.V., Programming the Finite Element Method, 3nd Edition, John
Wiley and Sons, New York, 1997. (This edition uses Fortran 90 in its examples.)
8. Zienkiewicz, O.C., The Finite Element Method, 3rd Edition, McGraw-Hill Book Company
Limited, London, 1977.
9. Bathe, K.J., Finite Element Procedures, Prentice Hall, 1996.
24
ANSYS Information
ANSYS Web Site - ANSYS Inc. Home Page. General information regarding the always growing
ANSYS family of products. (www.ansys.com)
ANSYS.net - More commonly know as "Sheldons Site". ANSYS Macro & Info Repository by
Sheldon Imaoka. The best ANSYS site on the web. Huge collection of ANSYS stuff with
contributions by users all over the world. Great! (www.ansys.net/ansys)
ANSYS Tips Page - Many ANSYS pointers and a ton of FEA links, some related to ANSYS and some
general. By Peter Budgell. Hasn't been updated in a few years but most info is still very applicable to
ANSYS currently. (www3.sympatico.ca/peter_budgell/home.html)
ANSYS Tutorials - From the University of Alberta, Canada. This is a very well done and complete set
of tutorials categorized from basic to advanced. (www.mece.ualberta.ca/tutorials/ansys/index.html)
XANSYS.org - Home of the XANSYS list. This is a mailing list of ANSYS users from around the
world with 2500+ members. (www.xansys.org)
General Finite Element Analysis
Finite Element Modeling Continuous Improvement - Site at NASA Goddard Space Flight Center.
(analyst.gsfc.nasa.gov/FEMCI/femci.html)
NAFEMS - A European Engineering Analysis Organization. The "Analysis Resources" section has a
lot of good info and links. (www.nafems.org)
FEA Links Page - many links to finite element resources. Updated in 2003.
(www.engr.usask.ca/%7Emacphed/finite/fe_resources/fe_resources.html)
FEMur - Finite Element Method Universal Resource at WPI (Worcester Polytechnic Institute)
(femur.wpi.edu)
Introduction to FEA by Dermot Monaghan - Although a couple parts are under construction, this guy
has put together a really nice FEA site here. (www.dermotmonaghan.com)
25