You are on page 1of 14

SCHOOL OF MECHANICAL

ENGINEERING
JIMMA INSTITUTE OF
TECHNOLOGY

CAD LABORATORY

By
Johnson
Specialization in Machine design
Ex.No-I
INTRODUCTION

ANSYS is a general purpose finite element modeling package for numerically solving a wide variety of
mechanical problems. These problems include: static/dynamic structural analysis (both linear and non-
linear), heat transfer and fluid problems, as well as acoustic and electro-magnetic problems.

In general, a finite element solution may be broken into the following three stages. This is a general
guideline that can be used for setting up any finite element analysis.

1. Preprocessing: defining the problem; the major steps in preprocessing are given below:
o Define key points/lines/areas/volumes
o Define element type and material/geometric properties
o Mesh lines/areas/volumes as required

The amount of detail required will depend on the dimensionality of the analysis (i.e. 1D, 2D, axi-
symmetric, 3D).

2. Solution: assigning loads, constraints and solving; here we specify the loads (point or pressure),
constraints (translational and rotational) and finally solve the resulting set of equations.
3. Post processing: further processing and viewing of the results; in this stage one may wish to see:
o Lists of nodal displacements
o Element forces and moments
o Deflection plots
o Stress contour diagrams

Starting up ANSYS
Large File Sizes
ANSYS can create rather large files when running and saving; be sure that your local drive has space for it.

Getting The Program Started


In the Mec E 3-3 lab, there are two ways that you can start up ANSYS:

1. Windows NT application
2. Unix X-Windows application

Windows NT Start Up

Starting up ANSYS in Windows NT is simple:

Start Menu
Programs
ANSYS
Run Interactive Now

ANSYS Environment

The ANSYS Environment for ANSYS contains 2 windows: the Main Window and an Output Window. Note
that this is somewhat different from the previous version of ANSYS which made use of 6 different windows.
1. Main Window

Within the Main Window are 5 divisions:

a. Utility Menu

The Utility Menu contains functions that are available throughout the ANSYS session,
such as file controls, selections, graphic controls and parameters.

b. Input window

The Input Line shows program prompt messages and allows you to type in commands
directly.

c. Toolbar

The Toolbar contains push buttons that execute commonly used ANSYS commands. More
push buttons can be added if desired.

d. Main Menu

The Main Menu contains the primary ANSYS functions, organized by preprocessor,
solution, general postprocessor, design optimizer. It is from this menu that the vast majority
of modelling commands are issued. This is where you will note the greatest change
between previous versions of ANSYS and version 7.0. However, while the versions appear
different, the menu structure has not changed.

e. Graphics Window

The Graphic Window is where graphics are shown and graphical picking can be made. It is
here where you will graphically view the model in its various stages of construction and the
ensuing results from the analysis.

2. Output Window

The Output Window shows text output from the program, such as listing of data etc. It is usually
positioned behind the main window and can de put to the front if necessary.

ANSYS Interface
Graphical Interface vs. Command File Coding

There are two methods to use ANSYS. The first is by means of the graphical user interface or GUI. This
method follows the conventions of popular Windows and X-Windows based programs.

The second is by means of command files. The command file approach has a steeper learning curve for
many, but it has the advantage that an entire analysis can be described in a small text file, typically in less
than 50 lines of commands. This approach enables easy model modifications and minimal file space
requirements.

The tutorials in this website are designed to teach both the GUI and the command file approach, however,
many of you will find the command file simple and more efficient to use once you have invested a small
amount of time into learning the code.

For information and details on the full ANSYS command language, consult:

Help > Table of Contents > Commands Manual.

ANSYS Files

Introduction
A large number of files are created when you run ANSYS. If you started ANSYS without specifying a
jobname, the name of all the files created will be FILE.* where the * represents various extensions
described below. If you specified a jobname, say Frame, then the created files will all have the file prefix,
Frame again with various extensions:
frame.db
Database file (binary). This file stores the geometry, boundary conditions and any solutions.
frame.dbb
Backup of the database file (binary).
frame.err
Error file (text). Listing of all error and warning messages.
frame.out
Output of all ANSYS operations (text). This is what normally scrolls in the output window during an
ANSYS session.
frame.log
Logfile or listing of ANSYS commands (text). Listing of all equivalent ANSYS command line
commands used during the current session.
etc...
Depending on the operations carried out, other files may have been written. These files may contain
results, etc.

What to save?
When you want to clean up your directory, or move things from the /scratch directory, what files do you
need to save?

If you will always be using the GUI, then you only require the .db file. This file stores the geometry,
boundary conditions and any solutions. Once the ANSYS has started, and the jobname has been
specified, you need only activate the resume command to proceed from where you last left off (see
Saving and Restoring Jobs).
If you plan on using ANSYS command files, then you need only store your command file and/or the
log file. This file contains a complete listing of the ANSYS commands used to get you model to its
current point. That file may be rerun as is, or edited and rerun as desired (Command File Creation
and Execution).

If you plan to use the command mode of operation, starting with an existing log file, rename it first
so that it does not get over-written or added to, from another ANSYS run

Printing and Plotting ANSYS Results to a File


Printing Text Results to a File
ANSYS produces lists and tables of many types of results that are normally displayed on the screen.
However, it is often desired to save the results to a file to be later analyzed or included in a report.

1. Stresses: instead of using 'Plot Results' to plot the stresses, choose 'List Results'. Select 'Elem Table
Data', and choose what you want to list from the menu. You can pick multiple items. When the list
appears on the screen in its own window, Select 'File'/'Save As...' and give a file name to store the
results.
2. Any other solutions can be done in the same way. For example select 'Nodal Solution' from the 'List
Results' menu, to get displacements.
3. Preprocessing and Solution data can be listed and saved from the 'List' menu in the 'Utility Menu
bar'. Save the resulting list in the same way described above.

Plotting of Figures
There are two major routes to get hardcopies from ANSYS. The first is a quick a raster-based screen dump,
while the second is a scalable vector plot.
1.0 Quick Image Save
When you want to quickly save an image of the entire screen or the current 'Graphics window', select:

'Utility menu bar'/'PlotCtrls'/'Hard Copy ...'.


In the window that appears, you will normally want to select 'Graphics window', 'Monochrome',
'Reverse Video', 'Landscape' and 'Save to:'.
Then enter the file name of your choice.
Press 'OK'
This raster image file may now be printed on a PostScript printer or included in a document.
2.0 Better Quality Plots
The second method of saving a plot is much more flexible, but takes a lot more work to set up as you'll see...

Redirection
Normally all ANSYS plots are directed to the plot window on the screen. To save some plots to a file, to be
later printed or included in a document or what have you, you must first 'redirect' the plots to a file by
issuing:
'Utility menu bar'/'PlotCtrls'/'Redirect Plots'/'To File...'.
Type in a filename (e.g.: frame.pic) in the 'Selection' Window.

Now issue whatever plot commands you want within ANSYS, remembering that the plots will not be
displayed to the screen, but rather they will be written to the selected file. You can put as many plots as you
want into the plot file. When you are finished plotting what you want to the file, redirect plots back to the
screen using:

'Utility menu bar'/'PlotCtrls'/'Redirect Plots'/'To Screen'.

Display and Conversion


The plot file that has been saved is stored in a proprietary file format that must be converted into a more
common graphic file format like PostScript, or HPGL for example. This is performed by running a separate
program called display. To do this, you have a couple of options:

1. select display from the ANSYS launcher menu (if you started ANSYS that way)
2. shut down ANSYS or open up a new terminal window and then type display at the Unix prompt.

Either way, a large graphics window will appear. Decrease the size of this window, because it most likely
covers the window in which you will enter the display plotting commands. Load your plot file with the
following command:
file,frame,pic
if your plot file is 'plots.pic'. Note that although the file is 'plots.pic' (with a period), Display wants
'plots,pic'(with a comma). You can display your plots to the graphics window by issuing the command like
plot,n
where n is plot number. If you plotted 5 images to this file in ANSYS, then n could be any number from 1 to
5.

Now that the plots have been read in, they may be saved to printer files of various formats:

1. Colour PostScript: To save the images to a colour postscript file, enter the following commands in
display:
2. pscr,color,2
3. /show,pscr
4. plot,n

where n is the plot number, as above. You can plot as many images as you want to postscript files in
this manner. For subsequent plots, you only require the plot,n command as the other options have
now been set. Each image is plotted to a postscript file such as pscrxx.grph, where xx is a number,
starting at 00.

Note: when you import a postscript file into a word processor, the postscript image will appear as
blank box. The printer information is still present, but it can only be viewed when it's printed out to a
postscript printer.

Printing it out: Now that you've got your color postscript file, what are you going to do with it?
Take a look here for instructions on colour postscript printing at a couple of sites on campus where
you can have your beautiful stress plot plotted to paper, overheads or even posters!
5. Black & White PostScript: The above mentioned colour postscript files can get very large in size
and may not even print out on the postscript printer in the lab because it takes so long to transfer the
files to the printer and process them. A way around this is to print them out in a black and white
postscript format instead of colour; besides the colour specifications don't do any good for the black
and white lab printer anyways. To do this, you set the postscript color option to '3', i.e. and then issue
the other commands as before
6. pscr,color,3
7. /show,pscr
8. plot,n

Note: when you import a postscript file into a word processor, the postscript image will appear as
blank box. The printer information is still present, but it can only be viewed when it's printed out to a
postscript printer.

9. HPGL: The third commonly used printer format is HPGL, which stands for Hewlett Packard Graphics
Language. This is a compact vector format that has the advantage that when you import a file of this
type into a word processor, you can actually see the image in the word processor! To use the HPGL
format, issue the following commands:
10. /show,hpgl
11. plot,n

Final Steps

It is wise to rename these plot files as soon as you leave display, for display will overwrite the
files the next time it is run. You may want to rename the postscript files with an '.eps' extension to
indicate that they are encapsulated postscript images. In a similar way, the HPGL printer files could
be given an '.hpgl' extension. This renaming is done at the Unix commmand line (the 'mv'
command).

A list of all available display commands and their options may be obtained by typing:

Help
When complete, exit display by entering
Finish
Ex.No-1
STRESS ANALYSIS OF RECTANGULAR L BRACKET

Aim

To perform the stress analysis for the given Rectangular L Bracket using ANSYS software.

Problem Description

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.

Software used
ANSYS

Procedure
I. Preprocessing

1. Main Menu> Preprocessor> Modeling> Create> Areas> Rectangle> By Dimensions


X1 = 0 ,X2 = 6, Y1 = -1, Y2 = 1 >Apply
X1 = 4 ,X2 = 6, Y1 = -1, Y2 = -3 >OK to create the second rectangle and close the dialog
box
2. Utility Menu> Plot Ctrls> Numbering> Turn on area numbers> OK to change controls, close the
dialog box, and replot> Toolbar: SAVE_DB
3. Utility Menu> PlotCtrls> Pan, Zoom, Rotate>Click on small dot once to zoom out>Close dialog box
4. Utility Menu> WorkPlane> Display Working Plane (toggle on)> Click on Polar> Click on Grid and
Triad> Enter .1 for snap increment> OK to define settings and close the dialog box
5. Utility Menu> WorkPlane> Offset WP to> Keypoints>Pick keypoint at lower left corner of
rectangle>Pick keypoint at lower right of rectangle>OK to close picking menu.
6. Main Menu> Preprocessor> Modeling> Create> Areas> Circle> Solid Circle
i. WP X = 0,WP Y = 0
7. Move mouse to radius of 1 and click left button to create circlE >OK to close picking menu>
8. Toolbar: SAVE_DB
9. Main Menu> Preprocessor> Modeling> Operate> Booleans> Add> Areas> Pick All for all areas to
be added
10. Toolbar: SAVE_DB
11. Utility Menu> PlotCtrls> Numbering> Turn on line numbering> OK to change controls, close the
dialog box, and automatically replot
12. Utility Menu> WorkPlane> Display Working Plane (toggle off)>
13. Main Menu> Preprocessor> Modeling> Create> Lines> Line Fillet> Pick lines 17 and 8> OK to
finish picking lines (in picking menu)> Enter .4 as the radius> OK (to create line fillet and close the
dialog box)
14. Utility Menu> Plot> Lines
15. Utility Menu> PlotCtrls> Pan, Zoom, Rotate> Click on Zoom button> Move mouse to fillet region,
click left button, move mouse out and click again
16. Main Menu> Preprocessor> Modeling> Create> Areas> Arbitrary> By Lines> Pick lines 4, 5, and
1> OK (to create area and close the picking menu)> Click on Fit button> Close the Pan, Zoom,
Rotate dialog box
17. Utility Menu> Plot> Areas
18. Toolbar: SAVE_DB
19. Main Menu> Preprocessor> Modeling> Operate> Booleans> Add> Areas> Pick All for all areas to
be added> Toolbar: SAVE_DB

20. Utility Menu> WorkPlane> Display Working Plane (toggle on)


21. Main Menu> Preprocessor> Modeling> Create> Areas> Circle> Solid Circle
22. Pick center point at:
i. WP X = 0 (in Graphics Window)
ii. WP Y = 0
23. Move mouse to radius of .4 (shown in the picking menu) and click left button to create circle.
24. OK to close picking menu.
25. Utility Menu> WorkPlane> Offset WP to> Global Origin
26. Main Menu> Preprocessor> Modeling> Create> Areas> Circle> Solid Circle
27. Pick center point at:
i. WP X = 0 (in Graphics Window)
ii. WP Y = 0
28. Move mouse to radius of .4 (shown in the picking menu) and click left mouse button to create circle.
29. OK to close picking menu.
30. Utility Menu> WorkPlane> Display Working Plane (toggle off)
31. Utility Menu> Plot> Replot

32. Utility Menu> Plot> Lines


33. Toolbar: SAVE_DB.
34. Main Menu> Preprocessor> Modeling> Operate> Booleans> Subtract> Areas
35. Pick bracket as base area from which to subtract.
36. Apply (in picking menu).
37. Pick both pin holes as areas to be subtracted.

38. OK to subtract holes and close picking menu.


39. Utility Menu> File> Save As
40. Enter model.db for the database file name>OK
41. Main Menu> Preferences> structural>OK
42. Main Menu> Preprocessor> Material Props> Material Models
43. Double-click on Structural>Linear>Elastic> Isotropic Enter 30e6 for EX> Enter .27 for
PRXY> OK
44. Material> Exit

45. Main Menu> Preprocessor> Element Type> Add/Edit/Delete


46. Add an element type>Structural solid family of element>Choose the 8-node quad (PLANE82)>OK
to apply the element type and close the dialog bo
47. Main Menu> Preprocessor> Real Constants> Add/Edit/Delete> Add a real constant set> OK for
PLANE82> Enter .5 for THK>OK
48. Main Menu> Preprocessor> Meshing> Mesh Tool> Set Global Size control> Type in 0.5>OK>
Choose Area Meshing> Click on Mesh> Pick All for the area to be meshed (in picking menu). Close
any warning messages that appear>Close
49. Utility Menu> File> Save as> Enter mesh.db for database file name> OK
50. Main Menu> Solution> Define Loads> Apply> Structural> Displacement> On Lines> Pick the four
lines around left-hand hole (Line numbers 10, 9, 11, 12)> OK> Click on All DOF> Enter 0 for zero
displacement> OK
51. Utility Menu> Plot Lines
52. Toolbar: SAVE_DB

II. Solution

53. Main Menu> Solution> Define Loads> Apply> Structural> Pressure> On Lines> Pick line defining
bottom left part of the circle (line 6)>Apply> Enter 50 for VALUE> Enter 500 for optional
value>Apply> Pick line defining bottom right part of circle (line 7)> Apply> Enter 500 for
VALUE> Enter 50 for optional value>OK
54. Toolbar: SAVE_DB
55. Main Menu> Solution> Solve> Current LS>OK

III. Postprocessing

56. Main Menu> General Postproc> Read Results> First Set


57. Main Menu> General Postproc> Plot Results> Deformed Shape> Choose Def + undeformed>OK
58. Main Menu> General Postproc> Plot Results> Contour Plot> Nodal Solu> Choose Stress item to be
contoured> Scroll down and choose von Mises (SEQV)>OK
59. Utility Menu> Plot Ctrls> Animate> Deformed Results
60. Main Menu> General Postproc> List Results> Reaction Solu>ok> Scroll down and find the total
vertical force, FY
61. File> Close (Windows), or Close (X11/Motif), to close the window
62. Toolbar: Quit>Choose Quit - No Save!>ok

Result

Thus the stress analysis for the given Rectangular L Bracket was completed and the results were
plotted.
Ex.No-2
STRESS ANALYSIS OF BEAM

Aim
Compute the maximum deflection and locate point of maximum deflection using ANSYS software
E = 210000N/mm2
n = 0.3
L = 100mm
a = 10mm
b = 10mm
F = 100N

Procedure
Utility Menu > File > Change Jobname

Preprocessor > Modeling > Create > Areas > Rectangle > By Dimensions
Create an area given by X=(0,100) and Y=(0,10)

Preprocessor > Modeling > Operate > Extrude > Areas > Along Normal
Create a volume by extruding the area 10 along its surface normal vector

Preprocessor > Element Type > Add/Edit/Delete


Solid > 20 Node 185

No Real Constants are necessary for pure 3D solid models

Preprocessor > Material Props > Material Models


Ex> 210000 Poissons Ratio= 0.3

Preprocessor > Meshing > Size Cntrls > ManualSize > Lines > Picked Lines
Number of element Divisions=2

Preprocessor > Meshing > Mesh > Volumes > Mapped > 4 or 6 sided
Pickall

Solution > Define Loads > Apply > Structural > Displacement > On Areas
Select All DOF to fix/clamp the beam

Solution > Define Loads > Apply > Structural > Force/Moment > On Nodes
Change to FY Enter -100

Solution > Solve > Current LS

General Postproc > Plot Results > Deformed Shape

Result

Thus the stress analysis for the given Beam was completed and the results were plotted.
PROBLEM FOR WORKOUT

Analyze a problem where beam type elements will be used. The structure to be analyzed is shown in
figure. The material is aluminum with Youngs modulus 70 GPa and Poissons ratio 0.3. The beam has a
rectangular cross-section with the height 6 cm and the area 24 cm2. It is recommended that you use SI-
units for all quantities in order to obtain a result in SI-units.

Hint:

Element type
The element type to use is called beam188. Add this element from the library:
ANSYS Main menu: Preprocessor Element type Add/Edit/Delete Add

To add beam188 select Beam and 2D node 188 in the dialog box.

Preprocessor Real Constants Add

Choose the element type beam3, OK. Fill in the values of the cross sectional area, height, and area moment of
inertia (IZZ) in the box (Note: use SI-units, i.e. m2 !),
BEAM ANALYSIS-2D

1.

Perform an FEM analysis of a 2D cantilever beam shown in figure and calculate the deflection
of the beam at the loading point and the longitudinal stress distribution in the beam.

Geometry: Length=90mm Height,h=5mm Thickness, b=10mm E=210GPa poissons ratio=0.3

Boundry Condtions: The beam is Clamped to a rigid wall at left and loaded at x=80mm by a
point load of P=100N

PRACTICE

You might also like