Finite Element Analysis Using ANSYS: Appendix
Finite Element Analysis Using ANSYS: Appendix
Finite Element Analysis Using ANSYS: Appendix
C.1 INTRODUCTION
ANSYS is the original (and commonly used) name for ANSYS Mechanical or ANSYS
Multiphysics, general-purpose finite element analysis software. ANSYS, Inc actually
develops a complete range of CAE products, but is perhaps best known for ANSYS Me-
chanical & ANSYS Multiphysics. The academic versions of these commercial products
are referred to as ANSYS Academic Research, ANSYS Academic Teaching Advanced,
Introductory etc. All of these products are general purpose finite element self contained
analysis tools incorporating preprocessing (geometry creation, meshing), solver and post
processing modules in a unified graphical user interface (GUI). For the remainder of this
appendix, when we state ‘‘ANSYS’’, we mean the FEA capability of either the commer-
cial or academic ANSYS Inc. products discussed above. Further we are limiting our dis-
cussion to the traditional (or ‘‘classic’’) user interface of ANSYS, not the ANSYS
Workbench environment.
One of the advantages of ‘‘ANSYS’’ is the user-programmable capability. The
ANSYS Command Language contains several thousand commands relating to creating
geometry, mesh, boundary conditions, solver settings & many other features. A subset
of these commands are termed ANSYS Parametric Design Language (APDL), and fo-
cus on managing parameters, macros, if-then-else branching, do-loops, and scalar, vec-
tor and matrix operations. For example, if multiple analyses are required with different
values of parameters, do-loops can be used to change parameters, or the Optimization
module (/OPT) can be used to automatically manage parameters & populate a response
surface.
There are two different modes of performing finite element analysis in ANSYS:
batch and interactive modes. The batch mode requires an input file of commands and
executes it from the command line, while the interactive mode turns on the graphical user
interface and shows the result of each user action (picked from a menu or typed as a
command) in a graphics window. The batch mode is best suited for those experienced
with the ANSYS Command Language. In this tutorial, only the interactive mode will be
explained.
There are two different modes of inputting commands in ANSYS: graphic mode and
text mode. In the graphic mode, the user can pick commands and type in required data
values. Thus, there is no need to memorize all commands. This mode is beneficial in a
sense that the user can see the result of each command in the graphic window. In the text
mode, the user type in commands and data in the command area. In this case, the user
should remember what command should be used to perform a particular action. However,
the text mode has its own advantages. For example, during the design process, the user
363
364 Appendix C Finite Element Analysis Using ANSYS
may want to perform the analysis multiple times with different values of parameters. In
such a case, the user can prepare a text file of all commands and then input the file as an
input command file. In fact, all actions in the graphic mode are stored as commands in a
text file, jobname.log. Thus, it would be a good practice to prepare the initial model using
the graphic mode, and then, modify the input file for the further modification. In this
chapter, we will present two tutorials using the graphic mode, and then will present sever-
al examples in Chapters 2–7 using the text mode.
2
By the courtesy of ANSYS, Inc.
366 Appendix C Finite Element Analysis Using ANSYS
Before going to the next step, save the work you have done so far.
ANSYS stores any input data in memory to the ANSYS database.
To save that database to a file, use the SAVE operation, available
as a tool on the Toolbar. ANSYS names the database file using the
format jobname.db. You can check the current jobname at any time
by choosing Utility Menu> List> Status> Global Status. You can
also save the database at specific milestone points in the analysis
(such as after the model is complete, or after the model is meshed)
by choosing Utility Menu> File> Save As and specifying different
jobnames (model.db, or mesh.db, etc.).
It is important to do an occasional save so that if you make a
mistake, you can restore the model from the last saved state. You
restore the model using the RESUME operation, also available on
the Toolbar. (You can also find SAVE and RESUME on the Utility
Menu, under File.)
Step 3: Change working plane to polar and create first circle
The next step in the model construction is to create the half circle at
each end of the bracket. You will actually create a full circle on each
end and then combine the circles and rectangles. To create the circles,
you will use and display the working plane. You could have shown the
working plane as you created the rectangles but it was not necessary.
Before you begin however, first ‘‘zoom out’’ within the Graphics Window so you can
see more of the circles as you create them. You do this using the ‘‘Pan-Zoom-Rotate’’
dialog box, a convenient graphics control box you’ll use often in any ANSYS session.
1. Choose Utility Menu> PlotCtrls> Pan, Zoom, Rotate
2. Click on small dot once to zoom out.
3. Close dialog box.
4. Choose Utility Menu> WorkPlane> Display Working Plane (toggle on)
Notice the working plane origin is immediately plotted in the
Graphics Window. It is indicated by the WX and WY symbols;
right now coincident with the global origin X and Y symbols.
Next you will change the WP type to polar, change the snap in-
crement, and display the grid.
5. Choose Utility Menu> WorkPlane> WP Settings
6. Click on Polar.
7. Click on Grid and Triad.
8. Enter .1 for snap increment.
9. OK to define settings and close the dialog box.
368 Appendix C Finite Element Analysis Using ANSYS
3. Toolbar: SAVE_DB.
Step 6: Create line fillet.
1. Choose Utility Menu> PlotCtrls> Numbering
2. Turn on line numbering.
3. OK to change controls, close the dialog box, and auto-
matically replot.
370 Appendix C Finite Element Analysis Using ANSYS
Step 10: Move working plane and create second pin hole.
1. Choose Utility Menu> WorkPlane> Offset WP to> Global Origin
2. Choose Main Menu> Preprocessor> Modeling> Create> Areas> Circle>
Solid Circle
3. Pick center point at: WP X ¼ 0; WP Y ¼ 0; Radius ¼ 0:4 (in Graphics Window)
4. OK to close picking menu.
5. Utility Menu> WorkPlane> Display
Working Plane (toggle off)
6. Utility Menu> Plot> Lines
If you plot areas, it appears that one of the
pin hole areas is not there. However, it is
there (as indicated by the presence of its
lines), you just can’t see it in the final dis-
play of the screen. That is because the
bracket area is drawn on top of it. An easy
way to see all areas is to plot the lines
instead.
7. Toolbar: SAVE_DB.
Step 11: Subtract pin holes from bracket.
1. Choose Main Menu> Preprocessor> Modeling> Operate> Booleans>
Subtract> Areas
2. Pick bracket as base area from which to subtract.
372 Appendix C Finite Element Analysis Using ANSYS
C. Define Materials
Step 13: Set preferences.
In preparation for defining materials, you will set preferences so that only materials
that pertain to a structural analysis are available for you to choose.
To set preferences:
1. Choose Main Menu> Preferences
2. Turn on structural filtering. The options may differ from what is shown here since
they depend on the ANSYS product you are using.
3. OK to apply filtering and close the dialog box.
higher-order element here allows you to have a coarser mesh than with lower-order ele-
ments while still maintaining solution accuracy. Also, ANSYS will generate some trian-
gle shaped elements in the mesh that would otherwise be inaccurate if you used lower-
order elements (PLANE42). You will need to specify plane stress with thickness as an
option for PLANE82. (You will define the thickness as a real constant in the next step.)
1. Choose Main Menu> Preprocessor> Element Type> Add/Edit/Delete
2. Choose Add. . . button in Element Types window.
3. In Library of Element Types window, Choose Solid.
4. Choose 8node 82, which is the 8-node quad element type (PLANE82).
5. OK to apply the element type and close the dialog box.
6. Choose Options. . . button in Element Types window.
7. Choose plane stress with thickness option for element behavior.
8. OK to specify options and close the options dialog box.
9. Close the element type dialog box.
C.3 Static Analysis of a Corner Bracket 375
D. Generate Mesh
Step 17: Mesh the area.
One nice feature of the ANSYS program is that you can automatically mesh the mod-
el without specifying any mesh size controls. This is using what is called a default mesh.
If you’re not sure how to determine the mesh density, let ANSYS try it first! Meshing this
model with a default mesh, however, generates more elements than are allowed in the
376 Appendix C Finite Element Analysis Using ANSYS
The mesh you see on your screen may vary slightly from the mesh shown here. As a
result of this, you may see slightly different results during postprocessing.
Step 18: Save the database as mesh.db.
Here again, you will save the database
to a named file, this time mesh.db.
1. Choose Utility Menu> File> Save as
2. Enter mesh.db for database file
name.
3. OK to save file and close dialog box.
E. Apply Loads
Now, we finish preprocessing phase and move on to the solution phase. A new, static
analysis is the default, so you will not need to specify analysis type for this problem. Also,
there are no analysis options for this problem.
Step 19: Apply displacement constraints.
You can apply displacement constraints directly to lines.
1. Choose Main Menu> Solution> Define Loads> Apply> Structural>
Displacement> On Lines
C.3 Static Analysis of a Corner Bracket 377
8. Toolbar: SAVE_DB.
Step 20: Apply pressure load.
Now apply the tapered pressure load to the bottom, right-hand pin hole. (‘‘Tapered’’
here means varying linearly.) Note that when a circle is created in ANSYS, four lines
define the perimeter. Therefore, apply the pressure to two lines making up the lower half
of the circle. Since the pressure tapers from a maximum value (500 psi) at the bottom of
the circle to a minimum value (50 psi) at the sides, apply pressure in two separate steps,
with reverse tapering values for each line. The ANSYS convention for pressure loading is
that a positive load value represents pressure into the surface (compressive).
1. Choose Main Menu> Solution> Define Loads> Apply> Structural> Pres-
sure> On Lines
2. Pick line defining bottom left part of the circle (line 6).
3. Apply.
4. Enter 50 for VALUE.
378 Appendix C Finite Element Analysis Using ANSYS
F. Obtain Solution
Step 21: Solve.
1. Choose Main Menu> Solution>
Solve> Current LS
2. Review the information in the status window, then choose File> Close (Win-
dows), or Close (X11/Motif), to close the window.
3. OK to begin the solution. Choose Yes to any Verify messages that appear.
4. Close the information window when solution is done.
ANSYS stores the results of this one load step problem in the database and in the
results file, Jobname.RST (or Jobname.RTH for thermal, Jobname.RMG for magnet-
ic, and Jobname.RFL for fluid analyses). The database can actually contain only one
set of results at any given time, so in a multiple load step or multiple substep analysis,
ANSYS stores only the final solution in the database. ANSYS stores all solutions in
the results file.
C.3 Static Analysis of a Corner Bracket 379
G. Review Results
Now, we finish the solution phase and move to the postprocessing phase. The results you
see may vary slightly from what is shown here due to variations in the mesh.
Step 22: Enter the general postprocessor and read in the results.
1. Choose Main Menu> General Postproc> Read Results> First Set
Step 23: Plot the deformed shape.
1. Choose Main Menu> General Post-
proc> Plot Results> Deformed Shape
2. Choose Def + undeformed.
3. OK. You can also produce an animated
version of the deformed shape:
4. Choose Utility Menu> Plot Ctrls>
Animate> Deformed Shape
5. Choose Def + undeformed.
6. OK to start animation.
7. Make choices in the Animation Control-
ler, if necessary, then choose Close.
Step 24: Plot the von Mises equivalent stress.
1. Choose Main Menu> General Postproc> Plot Results> Contour Plot> Nodal
Solu
2. Choose Stress item to be contoured.
3. Scroll down and choose von Mises stress.
4. OK.
The colors in the contour plot stand for the level of von Mises stress. The maxi-
mum stress occurs at the fixed pin hole. The value of stress can be read from the
color legend in the bottom of the graphic screen. Note that the color legend can be
shown on the right side of graphic screen. You can also produce an animated ver-
sion of these results:
5. Choose Utility Menu> Plot Ctrls> Animate> Deformed Results
380 Appendix C Finite Element Analysis Using ANSYS
The value of 134.61 is comparable to the total pin load force. Note that the values
shown are representative and may vary from the values you obtain. There are many other
options available for reviewing results in the general postprocessor. You have finished the
analysis. Exit the program in the next step.
Step 26: Exit the ANSYS program.
When exiting the ANSYS program, you can save the geometry and loads portions of
the database (default), save geometry, loads, and solution data (one set of results only),
save geometry, loads, solution data, and postprocessing data (i.e., save everything), or
save nothing. You can save nothing here, but you should be sure to use one of the other
save options if you want to keep the ANSYS data files.
1. Toolbar: Quit.
2. Choose Quit - No Save!
3. OK.
and elements directly (N and E commands). Displacement boundary conditions are im-
posed using D command, and the nodal force is applied using F command. The output
from the PRDISP command is shown below:
NODE UX UY
1 0.0000 0.0000
2 0.82803E-03 -0.18108E-03
3 0.0000 0.000
Note that the nodal displacements are the same with Example 2.4 in Chapter 2. The
output from PRESOL command is shown below:
EL= 1 NODES= 1 2 MAT= 1 LINK1
MFORX= 60.093
SAXL= 1224.2 EPELAXL= 0.000041
MFORX, SAXL, and EPELAXL are, respectively, element force, axial stress, and axial
strain. Note that Element 1 is in tension, while Element 2 is in compression. The output
from PLDISP command is shown below:
In general, the displacements are relatively small. Thus, most graphical postproces-
sors amplify the displacement so that the deformed shape of the truss can be shown in the
figure.
NODE UX UY
1 0.45767E-03 0.45767E-03
2 0.0000 0.0000
3 0.0000 0.0000
4 0.0000 0.0000
Note that the nodal displacements are the same as in Example 2.5 in Chapter 2. The
output from PRESOL command is shown below:
C.4 Examples in the Text 385
Figure C.5 Deformed shape of the plane structure with three truss elements
table. Assume Young’s modulus E ¼ 70 GPa and area of cross section A ¼ 1 cm2 . The
magnitude of the downward force at Node 4 is equal to 10,000 N.
Node x y z
1 0 0 0
2 0 1 1
3 0 1 1
4 1 0 1
Table C.3 shows the list of ANSYS Commands for space truss. Note that different
element type, LINK8, is used for three-dimensional truss. The list of available elements
can be found in ANSYS Help. /VIEW command controls the viewpoint direction.
ANSYS provides various view controls including dynamic view. The output from the
PRDISP command is shown below:
NODE UX UY UZ
1 0.0000 0.0000 0.0000
2 0.0000 0.0000 0.0000
3 0.0000 0.0000 0.0000
4 0.20203E-02 0.0000 -0.60609E-02
Note that the nodal displacements are the same as in Example 2.6 in Chapter 2. The
output from PRESOL command is shown below:
The figure below shows the deformed shape of the space truss.
force and bending moment diagrams using three equal–length beam elements. The fol-
lowing data apply to the beam: Young’s modulus E ¼ 210 GPa, cross-sectional area
A ¼ 4:53 103 m2 , and moment of inertia I ¼ 2:51 105 m4 .
Table C.4 shows the list of ANSYS commands for simply supported beam. For beam
analysis, element type BEAM3 is used, which is 2-D beam element. For the beam analysis,
both cross-sectional area and the moment of inertia are required as real constants. In order
to plot the shear force and bending moment diagram, ETABLE command is used, which
defines a table of values per element (the element table) for use in further processing. The
element table is organized as a ‘‘worksheet,’’ with the rows representing all selected ele-
ments, and the columns consisting of result items which have been moved into the table
with ETABLE. Each column of data is identified by a user-defined label for listings and
displays. PRETAB command prints the element table, and PLLS plots the data in the ele-
ment table. The output from the PRDISP command is shown below:
NODE UX UY ROTZ
The above table shows bending moments at the first node (MZZI) and at the second
node (MZZJ), as well as the shear force at the first node (VYI) and at the second node
(VYJ). The figure below shows the deformed shape of the beam.
390 Appendix C Finite Element Analysis Using ANSYS
The bending moment and shear force diagrams are shown below: