Professional Documents
Culture Documents
Purpose
• To be familiar with the traditional ANSYS user interface
• To be familiar with the basic analysis steps in ANSYS through working out a plane stress
problem -- a tensile-loaded thin plate with a central hole
• Understand some basic commands involved in the example
• Begin an input file and run ANSYS programs in batch mode
1. Introduction to ANSYS
ANSYS is a commercial finite-element analysis software with the capability to analyze a
wide range of different problems. ANSYS runs under a variety of environments, including UNIX
and Windows. Like any finite-element software, ANSYS solves governing differential equations
by breaking the problem into small elements. The governing equations of elasticity, fluid flow,
heat transfer, and electro-magnetism can all be solved by the finite-element method in ANSYS.
ANSYS can solve transient problems as well as nonlinear problems. This tutorial will focus on
the basics of ANSYS through working out a plane stress problem – a thin plate with a central
hole under tension. Through this example, we shall grasp some basic techniques in using
ANSYS to solve elastic problems including working in the interactive mode to create the
geometric model, choose an element, give properties, define loads and boundary conditions,
solve the problem and do postprocess work. Besides working interactively with the ANSYS
interface, we will start to be familiar with some common commands and how to use those
commands to create an input file. Once we can create an input file, it can be executed in the
ANSYS graphic window or run it in ANSYS batch mode. An input file is much easier to be
modified and rerun than the direct interactive method. Therefore you are encouraged to use input
files all the time and only use the direct interactive method to assist the generation of your input
files.
1
1.2. General Steps
A typical ANSYS analysis involves using three processors:
1) Preprocessing (PREP7 processor)
• define element types
• create geometry (modeling)
• provide material properties and material constants
2
1.3. Run an ANSYS Input File in Batch Mode
When you have an input file generated, you may run the input file either through the interface by
typing the input file name in the input line or by clicking Utility Menu -> File -> Read input
from. The following shows the batch run interface. Similarly to the traditional interface, you
shall first set up a Working Directory and give a Job Name under File Management. To get
further assist, you may click on Help.
3
The following is based on Lesson 2 from ANSYS Tutorial Release 5.7&6.0.
Problem description
The following figure describes a tensile-loaded thin plate with a central hole. The loading acts on
the two sides of the plate while the top and bottom surfaces of the plate keep free of traction. The
stress concentrations at certain locations around the hole are classical solutions of elasticity. In
this example, we wish to use the ANSYS program interface to solve this elasticity problem and
compare the results of stress concentration at certain locations with the empirical solutions.
The plate considered here is uniform and homogeneous. The symmetric conditions in both
geometry and loading with respect to the horizontal and the vertical axes may simplify the
problem, i.e., only one quadrant needs to be solved as shown in Figure 2-3. We desire to obtain
the solutions of stress component in the x direction at point A, i.e., σxxA = σmax. The stress
concentration factor Kt can then be evaluated based on the finite element solution and then we
desire to compare that with the empirical solution as shown in the following section.
4
Evaluation from Empirical Equation
For a plate with finite width, the stress concentration can be evaluated as follows (source:
Peterson: stress concentration factors)
For our case, H=0.4 and d=0.2, the empirical solutions give:
1) Launching ANSYS:
• Launch the ANSYS program:
For ANSYS in XP WINDOWS:
Start -> Programs -> ANSYS 10.0 -> ANSYS
The ANSYS Launcher menu should appear. Now we need to specify a working directory
such that your ANSYS files can be easily located.
• Change working directory:
Utility Menu -> File -> Change Directory …
Browse the directory you desire to work in, for example “C:\temp” for me, then click on
“OK”
5
Alternative Command Line Entry: /CWD,'C:\temp'
• Change jobname:
Utility Menu -> File -> Change Jobname
Enter “plateHole01”, and click on “OK”.
In fact, you may modify any text file by changing its extension to be mac to prepare your
first macro file.
Preprocessing
To enter the Preprocessor, at the command line, enter: /PREP7.
If you wish to see more information about his element, you may go to the online help.
Utility Menu -> Help then search for PLANE182
6
• Consider the thickness of the plate
Preprocessor -> Element Type -> Options… -> Plane strs w/thk -> OK ->Close
Preprocessor -> Real Constants …-> Add (Type 2 PLANE182) -> OK -> Enter 0.01 -> OK->
Close
• Create the round hole by subtracting the circle from the rectangle
Preprocessor -> Modeling -> Operate -> Booleans -> Subtract -> Area
Pick the rectangle OK, then pick the circle OK
7
Create a mesh of the 4-node rectangle elements over the quadrant are.
Preprocessor -> Meshing -> Mesh -> Area -> Free
Pick the quadrant OK
PAUSE
If you would like to get a better mesh you desire it to be, then you need to use other features
provided by the program. Say that I would like to have 8 elements along the circular boundary.
Then do the following:
Preprocessor -> Meshing -> Size Cntrls -> ManualSize -> Lines -> Picked Lines >> pick up
the circular boundary (the line number shall be 5 for this case) OK >>In the popup window
called “Element Sizes on Picked Lines”, type 8 in NDIV OK
If you would like to mesh the region finer globally, then do the following:
Preprocessor -> Meshing -> Size Cntrls -> ManualSize -> Global -> Size >> in the Global
Element Sizes window, type 0.2/20 (note 0.2 is the plate height, 20 is an arbitrary number you
may provide, the bigger this is, the finer the global mesh will be) OK
Use FINISH, then /CLEAR in the input line to clear off what you have now. Then you may
simply copy what you have in your input file into the input line and get your model back.
8
Preprocessor -> Loads -> Loads –Apply -> Structural –Displacement >> On Lines
Pick the bottom edge of the quadrant >> OK > UY = 0. -> OK
Preprocessor -> Loads -> Loads –Apply -> Structural –Pressure >> On Lines
Pick the right edge of the quadrant >> OK > Pressure = -1.0 -> OK
(A positive pressure would be a compressive load, so we use a negative pressure. )
The model-building step is now complete, and we can proceed to the solution. First to be safe,
save the model.
5) Solution
Main Menu -> Solution -> Solve -> Current LS -> OK
6) Postprocessing
9
Fig. Plot of deformed shape
The deformed shape looks correct. The right end moves to the right in response to the pressure,
the circular hole ovals out, and the top moves down because of Poisson’s effect.
The maximum displacement is shown on the graph legend as 0.320E-11 which seems reasonable.
The units of displacement are meters because we employed meters and N/m2 in the problem
formulation. Now let’s plot stress in the X direction.
10
• Other comments
(1) where to get tabulated reactions?
Main Menu -> General Postproc -> List Results -> Reaction Solu -> OK
(2) how to get the area plot with lines and areas numbered ?
Utility Menu -> PlotCtrls -> Numbering…>>check the LINE, AREA, numbers on -> OK
11
/TITLE,a simple 2-D stress analysis
!***
!***
!!================== PREPROCESSING ===================
/PREP7
!*
ET,1,PLANE182 ! default is plane stress
!*
!*
KEYOPT,1,1,0 !used default value 0, for element technology
KEYOPT,1,3,3 !option for plane with thickness <---
KEYOPT,1,6,0 !used default value 0, for element formulatoin
KEYOPT,1,10,0 !used default value 0, for user-defined initial stress
!*
!*
R,1,0.01, !Real constant, specify the thickness of the plate
!*
!*
MP,EX, 1, 2.07E11 ! define Material property -- Elastic Modulus
MP,PRXY, 1, 0.29 ! define Material property -- Poisson ratio
!*
!*
BLC4, , ,0.5,0.2 ! Rectangle by specifying two corners
CYL4, , ,0.1 ! Circular with r=0.1 at the center of the working plane
ASBA, 1, 2 ! Subtract area#2 from #1 to create the solid rectangle model
!*
!*
ASEL, , , , 3 ! Select the area #3
!*
ESIZE,0.2/20,0, ! define the global mesh size 0.2/#, where is the number you may decide
LESIZE,5, , ,20, , , , ,1 ! 5 is the line number, use # elements along that line
AMESH,all ! Mesh all the selected areas
!*
!*
DL,10, ,UX, ! Specify boundary condition through line #10
DL, 9, ,UY,
!*
!*
SFL,2,PRES, -1., !Specify the load acting on line #2
SAVE
FINISH
!*
!*
!!================== SOLUTION =========================
/SOLU !Select static load solution
ANTYPE, STATIC ! Specify analysis type
SOLVE
SAVE
FINISH
!***
!!================== POSTPROCESSING ===================
/POST1
!* ! Start the post processor
PLDISP,1 ! deformed/undeformed plot
!*
PLNSOL, S,X, 0,1.0 ! contour plot for nodal stress Sxx-- stress in x dir
12