Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Finite Element Analysis Using ANSYS: Appendix

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Appendix C

Finite Element Analysis


Using ANSYS

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.

C.2 GETTING START


ANSYS can be started in different ways. In this tutorial, we will start ANSYS in the
traditional mode. To access ANSYS program on Windows systems, choose Start>
Programs> ANSYS 11.0> ANSYS. This command will open ANSYS window as
shown in Figure C.1. The ANSYS window is composed of different areas. The graphic
area shows geometries and finite elements as well as results of simulation. The main
menu contains primary ANSYS functions. The user can directly type in commands in
the command area. The standard toolbox collects commands that are frequently used.
The utility menu contains utility functions that are available throughout the ANSYS
session.
In order to finish ANSYS, choose File> Exit command. Then, Exit from ANSYS
window will show up as shown in the right-lower corner of Figure C.1. Choose a proper
option and OK to finish the program.
ANSYS has its full documents in help menu. In the utility menu, choose Help> Help
Topics. Then ANSYS 11.0 Documentation windows will show up. In this documentation,
the user can find all manuals and tutorials available in ANSYS.

Figure C.1 Layout of ANSYS main window and exit window


C.3 Static Analysis of a Corner Bracket 365

C.3 STATIC ANALYSIS OF A CORNER BRACKET2


A. Problem Description
This is a simple, single load step, structural static analysis of the corner angle bracket
shown in Figure C.2. The upper left-hand pin hole is constrained (welded) around its
entire circumference, and a tapered pressure load is applied to the bottom of the lower
right-hand pin hole. The objective of the problem is to demonstrate the typical ANSYS
analysis procedure. The US Customary system of units is used.
The dimensions of the corner bracket are shown in the figure. The bracket is made of
A36 steel with a Young’s modulus of 30E6 psi and Poisson’s ratio of 0.27. Since the
bracket is thin in the z-direction (1/2 inch thick) compared to its x and y dimensions, and
since the pressure load acts only in the x-y plane, the problem can be assumed as plane
stress. We will use solid modeling to generate the two-dimensional model and automati-
cally mesh it with nodes and elements. (Another alternative in ANSYS is to create the
nodes and elements directly.)
If your system includes a Flash player (Macromedia, Inc.), one can view demonstra-
tion videos of each step by pointing the web browser to the following URL address: http://
www.ansys.com/techmedia/structural_tutorial_videos.html

B. Building the Geometry


In order to perform the finite element analysis, we need to create the geometry, and ele-
ments, and to apply boundary conditions. This step is called pre-processing.
Step 1: Define rectangles
There are several ways to create the model geometry within ANSYS, some more
convenient than others. The first step is to recognize that you can construct the bracket
easily with combinations of rectangle and circle primitives. Decide where the origin will
be located and then define the rectangle and circle primitives relative to that origin. The
location of the origin is arbitrary. Here, use the center of the upper left-hand hole. ANSYS
does not need to know where the origin is. Simply begin by defining a rectangle relative
to that location. In ANSYS, this origin is called the global origin.

Figure C.2 Corner bracket stress analysis problem

2
By the courtesy of ANSYS, Inc.
366 Appendix C Finite Element Analysis Using ANSYS

1. Choose Main Menu> Preprocessor> Modeling> Create> Areas> Rec-


tangle> By Dimensions
2. Enter the following data to create the first rectangle: X1 ¼ 0; X2 ¼ 6; Y1 ¼
1; Y2 ¼ 1 (Note: Press the Tab key between entries)
3. Apply to create the first rectangle.

4. Enter the following data to create the second rectangle: X1 ¼ 4; X2 ¼ 6; Y1 ¼


1; Y2 ¼ 3
5. OK to create the second rectangle and close the dialog box.
Now the geometry should look like the figure below.
Step 2: Change plot controls and replot
The area plot shows both rectangles,
which are areas, in the same color. To more
clearly distinguish between areas, turn on area
numbers and colors. The ‘‘Plot Numbering
Controls’’ dialog box on the Utility Menu con-
trols how items are displayed in the Graphics
Window. By default, a ‘‘replot’’ is automati-
cally performed upon execution of the dialog
box. The replot operation will repeat the last
plotting operation that occurred (in this case,
an area plot).
1. Choose Utility Menu> Plot Ctrls> Numbering
2. Turn on area numbers.
3. Choose OK to change controls, close the dialog box, and replot.
C.3 Static Analysis of a Corner Bracket 367

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

10. Choose Main Menu> Preprocessor> Modeling> Create> Areas> Circle>


Solid Circle
Be sure to read prompt before picking.
11. Pick center point at: WP X ¼ 0; WP Y ¼ 0; Radius ¼ 1 (in Graphics Window
shown below)

12. Choose OK to close picking menu.


13. Toolbar: SAVE_DB.
Step 4: Move working plane and create second circle
To create the circle at the other end of the bracket in
the same manner, you need to first move the working
plane to the origin of the circle. The simplest way to do this without entering number off-
sets is to move the WP to an average keypoint location by picking the keypoints at the
bottom corners of the lower, right rectangle.
1. Choose Utility Menu> WorkPlane> Offset WP to> Keypoints
2. Pick keypoint at lower left corner of rectangle.
3. Pick keypoint at lower right of rectangle.

4. OK to close picking menu.


5. Choose Main Menu> Preprocessor> Modeling> Create> Areas> Circle>
Solid Circle
6. Pick center point at: WP X ¼ 0; WP Y ¼ 0; Radius ¼ 1
7. OK to close picking menu.
8. Toolbar: SAVE_DB.
C.3 Static Analysis of a Corner Bracket 369

Step 5: Add areas.


Now that the appropriate pieces of the model are defined (rectangles and circles), you
need to add them together so the model becomes one continuous piece. You do this with
the Boolean add operation for areas.
1. Choose Main Menu> Preprocessor> Modeling>
Operate> Booleans> Add> Areas
2. Choose Pick All for all areas to be added.

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

4. Choose Utility Menu>


WorkPlane> Display
Working Plane (toggle
off)
5. Choose Main Menu>
Preprocessor> Model-
ing> Create> Lines>
Line Fillet
6. Pick lines 17 and 8.
7. OK to finish picking lines (in picking menu).
8. Enter 0.4 as the radius.
9. OK to create line fillet and close the dialog
box.
10. Choose Utility Menu> Plot> Lines
Step 7: Create fillet area.
1. Choose Utility Menu> PlotCtrls> Pan,
Zoom, Rotate
2. Click on Zoom button.
3. Move mouse to fillet region, click left button,
move mouse out and click again.
4. Choose Main Menu> Preprocessor> Mod-
eling> Create> Areas> Arbitrary> By
Lines

5. Pick lines 4, 5, and 1.


6. OK to create area and close the picking menu.
7. Click on Fit button in Pan, Zoom, Rotate dialog box.
8. Close the Pan, Zoom, Rotate dialog box.
9. Choose Utility Menu> Plot> Areas
C.3 Static Analysis of a Corner Bracket 371

10. Toolbar: SAVE_DB.


Step 8: Add areas together.
1. Choose Main Menu> Preprocessor> Modeling>
Operate> Booleans> Add> Areas
2. Pick All for all areas to be added.
3. Toolbar: SAVE_DB.
Step 9: Create first pin hole.
1. Choose Utility Menu> WorkPlane> Display Work-
ing Plane (toggle on)
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
4. OK to close picking menu.

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

3. Apply (in picking menu).


4. Pick both pin holes as areas to be
subtracted.
5. OK to subtract holes and close picking
menu.
Step 12: Save the database as model.db.
At this point, you will save the database to
a named file—a name that represents the model
before meshing. If you decide to go back and
remesh, you’ll need to resume this database file.
You will save it as model.db.
1. Choose Utility Menu> File> Save
As
2. Enter model.db for the database file
name.
3. OK to save and close dialog box.

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.

Step 14: Define material properties.


To define material properties for this analysis, there is only one material for the bracket,
A36 Steel, with given values for Young’s modulus of elasticity and Poisson’s ratio.
C.3 Static Analysis of a Corner Bracket 373

1. Choose Main Menu> Preprocessor> Material Props> Material Models


2. Double-click on Structural, Linear, Elastic, Isotropic.
3. Enter 30e6 for EX and 0.27 for PRXY.
4. OK to define material property set and close the dialog box.
5. In the Define Material Model window, choose Material> Exit

Step 15: Define element types and options.


In any analysis, you need to select from a library of element types and define the
appropriate ones for your analysis. For this analysis, you will use only one element type,
PLANE82, which is a 2-D, quadratic, structural, higher-order element. The choice of a
374 Appendix C Finite Element Analysis Using ANSYS

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

Step 16: Define real constants.


For this analysis, since the assumption is plane stress
with thickness, you will enter the thickness as a real con-
stant for PLANE82. To find out more information about
PLANE82, you will use the ANSYS Help System in this
step by clicking on a Help button from within a dialog box.
1. Choose Main Menu> Preprocessor> Real Con-
stants> Add/Edit/Delete
2. Choose Add. . . button for a real constant set.
3. OK for PLANE82.
4. Help to get help on PLANE82.
5. Hold left mouse button down to scroll through ele-
ment description.
6. Close the Help window
7. Enter .5 for THK.
8. OK to define the real constant and close the dialog box.
9. Close the real constant dialog box.

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

ANSYS ED program. Instead you will specify a global element size


to control overall mesh density.
1. Choose Main Menu> Preprocessor> Meshing> Mesh Tool
2. Set Global Size control.
3. Type in 0.5.
4. OK.
5. Choose Area Meshing.
6. Click on Mesh.
7. Pick All for the area to be meshed (in picking menu). Close
any warning messages that appear.
8. Close the Mesh Tool.

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

2. Pick the four lines around left-hand hole


(Line numbers 10, 9, 11, 12).
3. OK (in picking menu).
4. Click on All DOF.
5. Enter 0 for zero displacement.
6. OK to apply constraints and close dialog
box.
7. Choose Utility Menu> Plot> Lines

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

5. Enter 500 for optional value.


6. Apply.
7. Pick line defining bottom right part
of circle (line 7).
8. Apply.
9. Enter 500 for VALUE.
10. Enter 50 for optional value.
11. OK.
12. Toolbar: SAVE_DB.

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

6. Choose Stress item to be contoured.


7. Scroll down and choose von Mises SEQV.
8. OK.
9. Make choices in the Animation Controller, if necessary, then choose Close.

Step 25: List reaction solution.


1. Choose Main Menu> General Postproc> List Results> Reaction Solu
2. OK to list all items and close the dialog box.
3. Scroll down and find the total vertical force, FY.
4. Choose File> Close (Windows), or Close (X11/Motif), to close the window.
C.4 Examples in the Text 381

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.

C.4 EXAMPLES IN THE TEXT


The tutorial in the previous section was performed using graphical user interface
(GUI) in which the user chooses commands using the menu. Then the GUI interprets
these inputs into commands and sends them to ANSYS program. However, it is possi-
ble to type in ANSYS commands directly in the Command area. You can prepare
commands in text editor and copy and paste them to the Command area. Or, you can
save commands as a file and read them using Utility Menu> File> Read Input
From. . . In this section, we present various example problems in the text using the
command mode.

Example 2.4 – Two–bar Truss Structure


The two–bar truss shown in Figure C.3 has circular cross-sections with diameter of
0.25cm and Young’s modulus E ¼ 30  106 N=cm2 . An external force F ¼ 50 N is ap-
plied in the horizontal direction at Node 2. Calculate the displacement of each node and
stress in each element. The commands that can perform the finite element analysis is
listed in Table C.1.
The detailed explanation of each command can be found by typing HELP, COM-
MAND in the command area. In ANSYS command lines, any text after ‘‘!’’ is considered
as a comment; i.e., ignored by the program. The above commands are composed of three
phases: preprocessing (/PREP7), solution (/SOLUTION), and postprocessing (/POST1).
Each phase is ended using FINISH command. In this simple example, we generate nodes

Figure C.3 Two–bar truss


382 Appendix C Finite Element Analysis Using ANSYS

Table C.1 ANSYS Commands for Two–bar Truss Analysis


/PREP7 ! Start preprocessing
ET,1,LINK1 ! Element type 1 = 2D Truss element
MP,EX,1,3E7 ! Elastic modulus of material set 1
R,1,3.1416*0.125**2 ! Cross-sectional area of
! real constant set 1
!
N,1,0,0 ! Define Node 1 (0, 0)
N,2,12,8 ! Define Node 2 (12, 8)
N,3,12,0 ! Define Node 3 (12, 0)
!
TYPE,1 ! Use Element type 1
MAT,1 ! Use material set 1
REAL,1 ! Use real constant set 1
E,1,2 ! Create Element 1 (N1 - N2)
E,2,3 ! Create Element 2 (N2 - N3)
!
D,1,ALL,0 ! Fix all DOFs of Node 1
D,3,ALL,0 ! Fix all DOFs of Node 3
F,2,FX,50 ! Apply Fx = 50N at Node 2
FINISH ! Finish preprocessing
!
!
/SOLUTION ! Start simulation
OUTRES,ALL
OUTPR,ALL
SOLVE ! Solve the matrix equation
FINISH ! Finish simulation
!
/POST1 ! Start postprocessing
SET,FIRST ! Choose the first result set
PLDISP,1 ! Plot the deformed geometry
PRDISP ! Print out the nodal displacement
PRESOL,ELEM ! Print out all element results
FINISH ! Finish postprocessing

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

EL= 2 NODES= 2 3 MAT= 1 LINK1


MFORX= -33.333
SAXL= -679.06 EPELAXL=-0.000023
C.4 Examples in the Text 383

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.

Example 2.5 – Plane Truss with Three Elements


The plane truss shown in Figure C.4 consists of three members connected to each other
and to the walls by pin joints. The members make equal angles with each other and ele-
ment 2 is vertical. The members are identical to each other with properties: Young’s mod-
ulus E ¼ 206  109 Pa, cross-sectional area A ¼ 1  104 m2 , and length L ¼ 1 m. An
inclined force F ¼ 20; 000 N is applied at node 1. Solve for the displacements at node 1
and stresses in the three elements.
One of powerful capabilities in ANSYS is parametric programming. The user can
assign a value to a variable and use it as an argument in the following commands. For
example, we define a variable val ¼ 1=sqrtð2Þ, and then, use it in the definition of

Figure C.4 Plane structure with three truss elements


384 Appendix C Finite Element Analysis Using ANSYS

Table C.2 ANSYS Commands for Three Truss Elements Analysis

/PREP7 ! Start preprocessing


ET,1,LINK1 ! Element type 1 = 2D Truss element
MP,EX,1,206E9 ! Elastic modulus of material set 1
R,1,0.0001 ! Cross-sectional area of
! real constant set 1
!
ang=3.14159/6
N,1,0,0 ! Define nodal coordinates
N,2,0,1
N,3,cos(ang),-sin(ang)
N,4,-cos(ang),-sin(ang)
!
TYPE,1 ! Use Element type 1
MAT,1 ! Use material set 1
REAL,1 ! Use real constant set 1
E,1,3 ! Create Element 1
E,1,2 ! Create Element 2
E,1,4 ! Create Element 3
!
D,2,ALL,0 ! Fix all DOFs of Node 2
D,3,ALL,0 ! Fix all DOFs of Node 3
D,4,ALL,0 ! Fix all DOFs of Node 4
F,1,FX,20000/sqrt(2) ! Apply force at Node 2
F,1,Fy,20000/sqrt(2) ! Apply force at Node 2
FINISH ! Finish preprocessing
!
/SOLUTION ! Start simulation
OUTRES,ALL
OUTPR,ALL
SOLVE ! Solve the matrix equation
FINISH ! Finish simulation
!
/POST1 ! Start postprocessing
SET,FIRST ! Choose the first result set
PLDISP,1 ! Plot the deformed truss geometry
PRDISP ! Print out the nodal displacement
PRESOL,ELEM ! Print out all element results
FINISH ! Finish postprocessing

nodal coordinates, as N,3,val,val. The variable can be an array or matrix.


Table C.2 shows the list of ANSYS commands for plane truss. The output from the
PRDISP command is shown below:

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

EL= 1 NODES= 1 3 MAT= 1


MFORX= -3450.9
SAXL=-0.34509E+08 EPELAXL=-0.000168

EL= 2 NODES= 1 2 MAT= 1


MFORX= -9428.1
SAXL=-0.94281E+08 EPELAXL=-0.000458

EL= 3 NODES= 1 4 MAT= 1


MFORX= 12879.
SAXL= 0.12879E+09 EPELAXL= 0.000625

The output from PLDISP command is shown in Figure C.5.

Example 2.6 – Space Truss Problem


Use the finite element method to determine the displacements and forces in the space
truss, shown in Figure C.6. The coordinates of the nodes in meter units are given in the

Figure C.5 Deformed shape of the plane structure with three truss elements

Figure C.6 Three–bar space truss structure


386 Appendix C Finite Element Analysis Using ANSYS

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 ANSYS Commands for Space Truss Problem

/PREP7 ! Start preprocessing


ET,1,LINK8 ! Element type 1 = 3D Truss element
MP,EX,1,70E9 ! Elastic modulus of material set 1
R,1,0.0001 ! Cross-sectional area of
! real constant set 1
!
Val=1/sqrt(2)
N,1,0,0,0 ! Define Node 1
N,2,0,-1,1 ! Define Node 2
N,3,0,1,1 ! Define Node 3
N,4,1,0,1 ! Define Node 4
!
TYPE,1 ! Use Element type 1
MAT,1 ! Use material set 1
REAL,1 ! Use real constant set 1
E,1,4 ! Create Element 1
E,2,4 ! Create Element 2
E,3,4 ! Create Element 3
!
D,1,ALL,0 ! Fix all DOFs of Node 1
D,2,ALL,0 ! Fix all DOFs of Node 2
D,3,ALL,0 ! Fix all DOFs of Node 3
F,4,Fz,-10000 ! Apply Fz = -10000N at Node 4
FINISH ! Finish preprocessing
!
/SOLUTION ! Start simulation
OUTRES,ALL
OUTPR,ALL
SOLVE ! Solve the matrix equation
FINISH ! Finish simulation
!
/POST1 ! Start postprocessing
SET,FIRST ! Choose the first result set
/VIEW,1,1,2,3 ! Set isometric view
PLDISP,1 ! Plot the deformed truss geometry
PRDISP ! Print out the nodal displacement
PRESOL,ELEM ! Print out all element results
FINISH ! Finish postprocessing
C.4 Examples in the Text 387

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:

EL= 1 NODES= 1 4 MAT= 1 LINK8


MFORX= -14142.
SAXL=-0.14142E+09 EPELAXL=-0.002020

EL= 2 NODES= 2 4 MAT= 1 LINK8


MFORX= 7071.1
SAXL= 0.70711E+08 EPELAXL= 0.001010

EL= 3 NODES= 3 4 MAT= 1 LINK8


MFORX= 7071.1
SAXL= 0.70711E+08 EPELAXL= 0.001010

The figure below shows the deformed shape of the space truss.

Simply Supported Beam Problem


Consider a simply supported beam, as shown in Figure C.7, loaded by a single load
F ¼ 10 kN, applied at a point 3.0 m from the left support. Plot the deflection curve, shear
388 Appendix C Finite Element Analysis Using ANSYS

Figure C.7 Simply supported beam

Table C.4 ANSYS Commands for Space Truss Problem

/PREP7 ! Start preprocessing


ET,1,BEAM3 ! Element type = 2D Beam element
MP,EX,1,210E9 ! Elastic modulus
R,1,4.53E-3,2.51E-5,0.1 ! Area and Izz
!
N,1,0,0 ! Define Node 1
N,2,3,0 ! Define Node 2
N,3,6,0 ! Define Node 3
N,4,9,0 ! Define Node 4
!
TYPE,1 ! Use Element type 1
MAT,1 ! Use material set 1
REAL,1 ! Use real constant set 1
E,1,2 ! Create Element 1
E,2,3 ! Create Element 2
E,3,4 ! Create Element 3
!
D,1,UX,0,,,,Uy ! Fix x- & y-displacement of Node 2
D,4,Uy,0 ! Fix y-displacement of Node 4
F,2,Fy,-10000 ! Apply Fy = -10000N at Node 2
FINISH ! Finish preprocessing
!
/SOLUTION ! Start simulation
OUTRES,ALL
OUTPR,ALL
SOLVE ! Solve the matrix equation
FINISH ! Finish simulation
!
/POST1 ! Start postprocessing
SET,FIRST ! Choose the first result set
PLDISP,1 ! Plot the deformed geometry
PRDISP ! Print out the nodal displacement
!
ETABLE,MzzI,SMISC,6 ! Bending moment at Node I
ETABLE,MzzJ,SMISC,12 ! Bending moment at Node J
ETABLE,VyI,SMISC,2 ! Shear force at Node I
ETABLE,VyJ,SMISC,8 ! Shear force at Node J
PRETAB,MzzI,MzzJ,VyI,VyJ ! Print results
PLLS,MzzI,MzzJ ! Plot bending moment diagram
PLLS,VyI,VyJ ! Plot shear force diagram
FINISH ! Finish postprocessing
C.4 Examples in the Text 389

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

1 0.0000 0.0000 -0.94859E-02


2 0.0000 -0.22766E-01 -0.37943E-02
3 0.0000 -0.19920E-01 0.47429E-02
4 0.0000 0.0000 0.75887E-02

The output from PRETAB command is shown below:

ELEM MZZI MZZJ VYI VYJ


1 -0.54570E-11 20000. -6666.7 -6666.7
2 20000. 10000. 3333.3 3333.3
3 10000. -0.14552E-10 3333.3 3333.3

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:

You might also like