ANSYS tutorials provide step-by-step instructions for utilizing the ANSYS software, a powerful tool for engineering simulations. These tutorials cover various aspects of finite element analysis (FEA), computational fluid dynamics (CFD), electromagnetics, and other disciplines. Users learn how to create models, apply boundary conditions, define material properties, and analyze results. Tutorials often include sample problems, ranging from simple structural analyses to complex multiphysics simulations, to help users understand and master ANSYS capabilities. They are available through university resources, official ANSYS documentation, online platforms, and community forums, offering invaluable guidance for students, engineers, and researchers looking to apply simulation techniques in their work.
2. ■ Command Line Files
Example problems solved using command line coding only, in addition to several files to help you to
generate your own command line files.
3. UofA ANSYS Tutorial
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Introduction
Starting up ANSYS
ANSYS Environment
ANSYS Interface
Convergence Testing
Saving/Restoring Jobs
ANSYS Files
Printing Results
Working with Pro/E
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
ANSYS Utilities
An introduction to using ANSYS, including a quick explanation of the stages of analysis, how to start ANSYS, and
the use of the windows in ANSYS, and using Pro/ENGINEER with ANSYS.
● Introduction to Finite Element Analysis
A brief introduction of the 3 stages involved in finite element analysis.
● Starting up ANSYS
How to start ANSYS using windows NT and Unix X-Windows.
● ANSYS Environment
An introduction to the windows used in ANSYS
● ANSYS Interface
An explanation of the Graphic User Interface (GUI) in comparison to the command file approach.
● Convergence Testing
This file can help you to determine how small your meshing elements need to be before you can trust the
solution.
● Saving/Restoring Jobs
Description of how to save your work in ANSYS and how to resume a previously saved job.
● ANSYS Files
Definitions of the different files created by ANSYS.
● Printing Results
Saving data and figures generated in ANSYS.
● Working with Pro Engineer
A description of how to export geometry from Pro/E into ANSYS.
7. UofA ANSYS Tutorial
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Effect of Self Weight
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
Intermediate Tutorials
The majority of these examples are simple verification problems to show you how to use the intermediate techniques
in ANSYS. You may be using a different version of ANSYS than what was used to create these tutorials, therefore,
make note of small changes in the menu structure. These tutorials can be completed in any order, however, it is
expected that you have completed the Basic Tutorials before attempting these.
● Effect of Self Weight
Incorporating the weight of an object into the finite element analysis is shown in this simple cantilever beam
example.
● Distributed Loading
The application of distributed loads and the use of element tables to extract data is expalined in this tutorial.
● NonLinear Analysis
A large moment is applied to the end of a cantilever beam to explore Geometric Nonlinear behaviour (large
deformations). There is also an associated tutorial for an explanation of the Graphical Solution Tracking
(GST) plot.
● Buckling
In this tutorial both the Eigenvalue and Nonlinear methods are used to solve a simple buckling problem.
● NonLinear Materials
The purpose of the tutorial is to describe how to include material nonlinearities in an ANSYS model.
● Dynamic Analysis
These tutorial explore the dynamic analyis capabilities of ANSYS. Modal, Harmonic, and Transient
Analyses are shown in detail.
● Thermal Examples
Analysis of a pure conduction, a mixed convection/conduction/insulated boundary condition example, and a
transient heat conduction analysis.
9. UofA ANSYS Tutorial
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Springs and Joints
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Contact Elements
APDL
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Advanced Tutorials
The majority of these examples are simple verification problems to show you how to use the more advanced
techniques in ANSYS. You may be using a different version of ANSYS than what was used to create these tutorials,
therefore, make note of small changes in the menu structure. These tutorials can be completed in any order, however,
it is expected that you have completed the Basic Tutorials.
● Springs and Joints
The creation of models with multiple elements types will be explored in this tutorial. Additionally, elements
COMBIN7 and COMBIN14 will be explained as well as the use of parameters to store data.
● Design Optimization
The use of Design Optimization in ANSYS is used to solve for unknown parameters of a beam.
● Substructuring
The use of Substructuring in ANSYS is used to solve a simple problem.
● Coupled Structural/Thermal Analysis
The use of ANSYS physics environments to solve a simple structural/thermal problem.
● Using P-Elements
The stress distribution of a model is solved using p-elements and compared to h-elements.
● Melting Using Element Death
Using element death to model a volume melting.
● Contact Elements
Model of two beams coming into contact with each other.
● ANSYS Parametric Design Language
Design a truss using parametric variables.
13. UofA ANSYS Tutorial
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Creating Files
Features
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Command Line Files
The following files should help you to generate your own command line files.
● Creating Command Files
Directions on generating and running command files.
● ANSYS Command File Programming Features
This file shows some of the commonly used programming features in the ANSYS command file language
known as ADPL (ANSYS Parametric Design Language). Prompting the user for parameters, performing
calculations with paramaters and control structures are illustrated.
The following files include some example problems that have been created using command line coding.
Basic Tutorials This set of command line codes are from the Basic Tutorial section.
Intermediate Tutorials This set of command line codes are from the Intermediate Tutorial section.
Advanced Tutorials This set of command line codes are from the Advanced Tutorial section.
PostProc Tutorials This set of command line codes are from the PostProc Tutorial section.
Radiation Analysis A simple radiation heat transfer between concentric cylinders.
18. ● once the Xwindows emulator has started, you will see an icon at the bottom of the screen that looks like a paper and pencil; don't
select this icon, but rather, click on the up arrow above it and select Terminal
● a terminal command window will now start up
● in that window, type xansys57
● at the UNIX prompt and a small launcher menu will appear.
● select the Run Interactive Now menu item.
20. b. Input Lindow
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.
25. In general however, it is necessary to conduct convergence tests on your finite element model to confirm that a fine enough element
discretization has been used. In a solid mechanics problem, this would be done by creating several models with different mesh sizes and
comparing the resulting deflections and stresses, for example. In general, the stresses will converge more slowly than the displacement, so
it is not sufficient to examine the displacement convergence.
31. 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:
32. 1. Colour PostScript: To save the images to a colour postscript file, enter the following commands in display:
pscr,color,2
/show,pscr
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!
2. 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
pscr,color,3
/show,pscr
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.
3. 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:
/show,hpgl
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.
33. 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
35. The figure above shows the original model for this demonstration. This is a model of a short cantilevered bracket that bolts to the wall via
the thick plate on the left end. Model units are inches. A load is applied at the hole in the right end. Some cosmetic features are located on
the top surface and the two sides. Several edges are rounded. For this model, the interest is in the stress distribution around the vertical
slot. So, the plate and the loading hole are removed, as are the cosmetic features and rounds resulting in the "de-featured" geometry shown
below. The model will be constrained on the left face and a uniform load will be applied to the right face.
36. Step 2. Create the FEM model
In the pull-down menu at the top of the Pro/E window, select
Applications > Mechanica
An information window opens up to remind you about the units you are using. Press Continue
In the MECHANICA menu at the right, check the box beside FEM Mode and select the command Structure.
A new toolbar appears on the right of the screen that contains icons for creating all the common modeling entities (constraints, loads,
idealizations). All these commands are also available using the command windows that will open on the right side of the screen or in
dialog windows that will open when appropriate.
Notice that a small green coordinate system WCS has appeared. This is how you will specify the directions of constraints and forces.
Other coordinate systems (eg cylindrical) can be created as required and used for the same purpose.
The MEC STRUCT menu appears on the right. Basically, to define the model we proceed down this menu in a top-down manner. Model
is already selected for you which opens the STRC MODEL menu. This is where we specify modeling information. We proceed in a top-
down manner. The Features command allows you to create additional simulation features like datum points, curves, surface regions, and
so on. Idealizations lets you create special modeling entities like shells and beams. The Current CSYS command lets you create or select
an alternate coordinate system for specifying directions of constraints and loads.
37. Defining Constraints
For our simple model, all we need are constraints, loads, and a specified material. Select
Constraints > New
We can specify constraints on four entity types (basically points, edges, and surfaces). Constraints are organized into constraint sets. Each
constraint set has a unique name (default of the first one is ConstraintSet1) and can contain any number of individual constraints of
different types. Each individual constraint also has a unique name (default of the first one is Constraint1). In the final computed model,
only one set can be included, but this can contain numerous individual constraints.
Select Surface. We are going to fully constrain the left face of the cantilever. A dialog window opens as shown above. Here you can give
a name to the constraint and identify which constraint set it belongs to. Since we elected to create a surface constraint, we now select the
surface we want constrained (push the Surface selection button in the window and then click on the desired surface of the model). The
constraints to be applied are selected using the buttons at the bottom of the window. In general we specify constraints on translation and
rotation for any mesh node that will appear on the selected entity. For each direction X, Y, and Z, we can select one of the four buttons
(Free, Fixed, Prescribed, and Function of Coordinates). For our solid model, the rotation constraints are irrelevant (since nodes of solid
elements do not have this degree of freedom anyway). For beams and shells, rotational constraints are active if specified.
38. For our model, leave all the translation constraints as FIXED, and select the OK button. You should now see some orange symbols on the
left face of the model, along with some text labels that summarize the constraint settings.
Defining Loads
In the STRC MODEL menu select
Loads > New > Surface
The FORCE/MOMENT window opens as shown above. Loads are also organized into named load sets. A load set can contain any
number of individual loads of different types. A FEM model can contain any number of different load sets. For example, in the analysis of
a pressurized tank on a support system with a number of nozzle connections to other pipes, one load set might contain only the internal
pressure, another might contain the support forces, another a temperature load, and more might contain the forces applied at each nozzle
location. These can be solved at the same time, and the principle of superposition used to combine them in numerous ways.
Create a load called "end_load" in the default load set (LoadSet1)
Click on the Surfaces button, then select the right face of the model and middle click to return to this dialog. Leave the defaults for the
load distribution. Enter the force components at the bottom. Note these are relative to the WCS. Then select OK. The load should be
39. displayed symbolically as shown in the figure below.
Note that constraint and load sets appear in the model tree. You can select and edit these in the usual way using the right mouse button.
Assigning Materials
Our last job to define the model is to specify the part material. In the STRC MODEL menu, select
Materials > Whole Part
In the library dialog window, select a material and move it to the right pane using the triple arrow button in the center of the window. In an
assembly, you could now assign this material to individual parts. If you select the Edit button, you will see the properties of the chosen
material.
At this point, our model has the necessary information for solution (constraints, loads, material).
Step 3. Define the analysis
Select
Analyses > New
40. Specify a name for the analysis, like "ansystest". Select the type (Structural or Modal). Enter a short description. Now select the Add
buttons beside the Constraints and Loads panes to add ConstraintSet1 and LoadSet1 to the analysis. Now select OK.
Step 4. Creating the mesh
We are going to use defaults for all operations here. The MEC STRUCT window, select
Mesh > Create > Solid > Start
Accept the default for the global minimum. The mesh is created and another dialog window opens (Element Quality Checks).
41. This indicates some aspects of mesh quality that may be specified and then, by selecting the Check button at the bottom, evaluated for the
model. The results are indicated in columns on the right. If the mesh does not pass these quality checks, you may want to go back to
specify mesh controls (discussed below). Select Close. Here is an image of the default mesh, shown in wire frame.
42. Improving the Mesh
In the mesh command, you can select the Controls option. This will allow you to select points, edges, and surfaces where you want to
specify mesh geometry such as hard points, maximum mesh size, and so on. Beware that excessively tight mesh controls can result in
meshes with many elements.
For example, setting a maximum mesh size along the curved ends of the slot results in the following mesh. Notice the better representation
of the curved edges than in the previous figure. This is at the expense of more than double the number of elements. Note that mesh
controls are also added to the model tree.
43. Step 5. Creating the Output file
All necessary aspects of the model are now created (constraints, loads, materials, mesh). In the MEC STRUCT menu, select
Run
44. This opens the Run FEM Analysis dialog window shown here. In the Solver pull-down list at the top, select ANSYS. In the Analysis list,
select Structural. You pick either Linear or Parabolic elements. The analysis we defined (containing constraints, loads, mesh, and
material) is listed. Select the Output to File radio button at the bottom and specify the output file name (default is the analysis name with
extension .ans). Select OK and read the message window.
We are now finished with Pro/E. Go to the top pull-down menus and select
Applications > Standard
Save the model file and leave the program.
Copy the .ans file from your Pro/E working directory to the directory you will use for running ANSYS.
45. Step 6. Importing into ANSYS
Launch ANSYS Interactive and select
File > Read Input From...
Select the .ans file you created previously. This will read in the entire model. You can display the model using (in the pull down menus)
Plot > Elements.
Step 7. Running the ANSYS solver
In the ANSYS Main Menu on the left, select
Solution > Solve > Current LS > OK
After a few seconds, you will be informed that the solution is complete.
Step 8. Viewing the results
There are myriad possibilities for viewing FEM results. A common one is the following:
General Postproc > Plot Results > Contour Plot > Nodal Solu
Pick the Von Mises stress values, and select Apply. You should now have a color fringe plot of the Von Mises stress displayed on the
model.
Updated: 8 November 2002 using Pro/ENGINEER 2001
RWT
Please report errors or omissions to Roger Toogood
47. The following window will appear:
Enter the title and click 'OK'. This title will appear in the bottom left corner of the 'Graphics' Window once you begin. Note: to get
the title to appear immediately, select Utility Menu > Plot > Replot
2. Enter Keypoints
The overall geometry is defined in ANSYS using keypoints which specify various principal coordinates to define the body. For this
example, these keypoints are the ends of each truss.
❍ We are going to define 7 keypoints for the simplified structure as given in the following table
keypoint
coordinate
x y
1 0 0
2 1800 3118
3 3600 0
4 5400 3118
5 7200 0
6 9000 3118
7 10800 0
(these keypoints are depicted by numbers in the above figure)
❍ From the 'ANSYS Main Menu' select:
Preprocessor > Modeling > Create > Keypoints > In Active CS
48. The following window will then appear:
❍ To define the first keypoint which has the coordinates x = 0 and y = 0:
Enter keypoint number 1 in the appropriate box, and enter the x,y coordinates: 0, 0 in their appropriate boxes (as shown
above).
Click 'Apply' to accept what you have typed.
❍ Enter the remaining keypoints using the same method.
Note: When entering the final data point, click on 'OK' to indicate that you are finished entering keypoints. If you first press
49. 'Apply' and then 'OK' for the final keypoint, you will have defined it twice!
If you did press 'Apply' for the final point, simply press 'Cancel' to close this dialog box.
Units
Note the units of measure (ie mm) were not specified. It is the responsibility of the user to ensure that a consistent set of units are
used for the problem; thus making any conversions where necessary.
Correcting Mistakes
When defining keypoints, lines, areas, volumes, elements, constraints and loads you are bound to make mistakes. Fortunately these
are easily corrected so that you don't need to begin from scratch every time an error is made! Every 'Create' menu for generating
these various entities also has a corresponding 'Delete' menu for fixing things up.
3. Form Lines
The keypoints must now be connected
We will use the mouse to select the keypoints to form the lines.
❍ In the main menu select: Preprocessor > Modeling > Create > Lines > Lines > In Active Coord. The following window
will then appear:
50. ❍ Use the mouse to pick keypoint #1 (i.e. click on it). It will now be marked by a small yellow box.
❍ Now move the mouse toward keypoint #2. A line will now show on the screen joining these two points. Left click and a
permanent line will appear.
❍ Connect the remaining keypoints using the same method.
❍ When you're done, click on 'OK' in the 'Lines in Active Coord' window, minimize the 'Lines' menu and the 'Create' menu.
Your ANSYS Graphics window should look similar to the following figure.
51. Disappearing Lines
Please note that any lines you have created may 'disappear' throughout your analysis. However, they have most likely NOT been
deleted. If this occurs at any time from the Utility Menu select:
Plot > Lines
4. Define the Type of Element
It is now necessary to create elements. This is called 'meshing'. ANSYS first needs to know what kind of elements to use for our
problem:
❍ From the Preprocessor Menu, select: Element Type > Add/Edit/Delete. The following window will then appear:
52. ❍ Click on the 'Add...' button. The following window will appear:
❍ For this example, we will use the 2D spar element as selected in the above figure. Select the element shown and click 'OK'.
You should see 'Type 1 LINK1' in the 'Element Types' window.
❍ Click on 'Close' in the 'Element Types' dialog box.
5. Define Geometric Properties
We now need to specify geometric properties for our elements:
53. ❍ In the Preprocessor menu, select Real Constants > Add/Edit/Delete
❍ Click Add... and select 'Type 1 LINK1' (actually it is already selected). Click on 'OK'. The following window will appear:
❍ As shown in the window above, enter the cross-sectional area (3250mm):
❍ Click on 'OK'.
❍ 'Set 1' now appears in the dialog box. Click on 'Close' in the 'Real Constants' window.
54. 6. Element Material Properties
You then need to specify material properties:
❍ In the 'Preprocessor' menu select Material Props > Material Models
❍ Double click on Structural > Linear > Elastic > Isotropic
55. We are going to give the properties of Steel. Enter the following field:
EX 200000
❍ Set these properties and click on 'OK'. Note: You may obtain the note 'PRXY will be set to 0.0'. This is poisson's ratio and is
not required for this element type. Click 'OK' on the window to continue. Close the "Define Material Model Behavior" by
clicking on the 'X' box in the upper right hand corner.
7. Mesh Size
The last step before meshing is to tell ANSYS what size the elements should be. There are a variety of ways to do this but we will
just deal with one method for now.
❍ In the Preprocessor menu select Meshing > Size Cntrls > ManualSize > Lines > All Lines
56. ❍ In the size 'NDIV' field, enter the desired number of divisions per line. For this example we want only 1 division per line,
therefore, enter '1' and then click 'OK'. Note that we have not yet meshed the geometry, we have simply defined the element
sizes.
8. Mesh
Now the frame can be meshed.
❍ In the 'Preprocessor' menu select Meshing > Mesh > Lines and click 'Pick All' in the 'Mesh Lines' Window
Your model should now appear as shown in the following window
57. Plot Numbering
To show the line numbers, keypoint numbers, node numbers...
● From the Utility Menu (top of screen) select PlotCtrls > Numbering...
● Fill in the Window as shown below and click 'OK'
58. Now you can turn numbering on or off at your discretion
Saving Your Work
Save the model at this time, so if you make some mistakes later on, you will at least be able to come back to this point. To do this, on the
Utility Menu select File > Save as.... Select the name and location where you want to save your file.
It is a good idea to save your job at different times throughout the building and analysis of the model to backup your work in case of a
system crash or what have you.
Solution Phase: Assigning Loads and Solving
You have now defined your model. It is now time to apply the load(s) and constraint(s) and solve the the resulting system of equations.
Open up the 'Solution' menu (from the same 'ANSYS Main Menu').
1. Define Analysis Type
59. First you must tell ANSYS how you want it to solve this problem:
❍ From the Solution Menu, select Analysis Type > New Analysis.
❍ Ensure that 'Static' is selected; i.e. you are going to do a static analysis on the truss as opposed to a dynamic analysis, for
example.
❍ Click 'OK'.
2. Apply Constraints
It is necessary to apply constraints to the model otherwise the model is not tied down or grounded and a singular solution will
result. In mechanical structures, these constraints will typically be fixed, pinned and roller-type connections. As shown above, the
left end of the truss bridge is pinned while the right end has a roller connection.
❍ In the Solution menu, select Define Loads > Apply > Structural > Displacement > On Keypoints
60. ❍ Select the left end of the bridge (Keypoint 1) by clicking on it in the Graphics Window and click on 'OK' in the 'Apply U,
ROT on KPs' window.
❍ This location is fixed which means that all translational and rotational degrees of freedom (DOFs) are constrained.
Therefore, select 'All DOF' by clicking on it and enter '0' in the Value field and click 'OK'.
61. You will see some blue triangles in the graphics window indicating the displacement contraints.
❍ Using the same method, apply the roller connection to the right end (UY constrained). Note that more than one DOF
constraint can be selected at a time in the "Apply U,ROT on KPs" window. Therefore, you may need to 'deselect' the 'All
DOF' option to select just the 'UY' option.
3. Apply Loads
As shown in the diagram, there are four downward loads of 280kN, 210kN, 280kN, and 360kN at keypoints 1, 3, 5, and 7
respectively.
❍ Select Define Loads > Apply > Structural > Force/Moment > on Keypoints.
❍ Select the first Keypoint (left end of the truss) and click 'OK' in the 'Apply F/M on KPs' window.
❍ Select FY in the 'Direction of force/mom'. This indicate that we will be applying the load in the 'y' direction
❍ Enter a value of -280000 in the 'Force/moment value' box and click 'OK'. Note that we are using units of N here, this is
consistent with the previous values input.
❍ The force will appear in the graphics window as a red arrow.
❍ Apply the remaining loads in the same manner.
The applied loads and constraints should now appear as shown below.
62. 4. Solving the System
We now tell ANSYS to find the solution:
❍ In the 'Solution' menu select Solve > Current LS. This indicates that we desire the solution under the current Load Step
(LS).
63. ❍ The above windows will appear. Ensure that your solution options are the same as shown above and click 'OK'.
❍ Once the solution is done the following window will pop up. Click 'Close' and close the /STATUS Command Window..
Postprocessing: Viewing the Results
1. Hand Calculations
We will first calculate the forces and stress in element 1 (as labeled in the problem description).
64. 2. Results Using ANSYS
Reaction Forces
A list of the resulting reaction forces can be obtained for this element
❍ from the Main Menu select General Postproc > List Results > Reaction Solu.
❍ Select 'All struc forc F' as shown above and click 'OK'
65. These values agree with the reaction forces claculated by hand above.
Deformation
❍ In the General Postproc menu, select Plot Results > Deformed Shape. The following window will appear.
❍ Select 'Def + undef edge' and click 'OK' to view both the deformed and the undeformed object.
66. ❍ Observe the value of the maximum deflection in the upper left hand corner (DMX=7.409). One should also observe that the
constrained degrees of freedom appear to have a deflection of 0 (as expected!)
Deflection
For a more detailed version of the deflection of the beam,
❍ From the 'General Postproc' menu select Plot results > Contour Plot > Nodal Solution. The following window will
appear.
67. ❍ Select 'DOF solution' and 'USUM' as shown in the above window. Leave the other selections as the default values. Click
'OK'.
68. ❍ Looking at the scale, you may want to use more useful intervals. From the Utility Menu select Plot Controls > Style >
Contours > Uniform Contours...
❍ Fill in the following window as shown and click 'OK'.
70. ❍ The deflection can also be obtained as a list as shown below. General Postproc > List Results > Nodal Solution select
'DOF Solution' and 'ALL DOFs' from the lists in the 'List Nodal Solution' window and click 'OK'. This means that we want
to see a listing of all degrees of freedom from the solution.
71. ❍ Are these results what you expected? Note that all the degrees of freedom were constrained to zero at node 1, while UY was
constrained to zero at node 7.
❍ If you wanted to save these results to a file, select 'File' within the results window (at the upper left-hand corner of this list
window) and select 'Save as'.
Axial Stress
For line elements (ie links, beams, spars, and pipes) you will often need to use the Element Table to gain access to derived data (ie
stresses, strains). For this example we should obtain axial stress to compare with the hand calculations. The Element Table is
different for each element, therefore, we need to look at the help file for LINK1 (Type help link1 into the Input Line). From
Table 1.2 in the Help file, we can see that SAXL can be obtained through the ETABLE, using the item 'LS,1'
❍ From the General Postprocessor menu select Element Table > Define Table
❍ Click on 'Add...'
72. ❍ As shown above, enter 'SAXL' in the 'Lab' box. This specifies the name of the item you are defining. Next, in the 'Item,
Comp' boxes, select 'By sequence number' and 'LS,'. Then enter 1 after LS, in the selection box
❍ Click on 'OK' and close the 'Element Table Data' window.
❍ Plot the Stresses by selecting Element Table > Plot Elem Table
❍ The following window will appear. Ensure that 'SAXL' is selected and click 'OK'
❍ Because you changed the contour intervals for the Displacement plot to "User Specified" - you need to switch this back to
"Auto calculated" to obtain new values for VMIN/VMAX.
Utility Menu > PlotCtrls > Style > Contours > Uniform Contours ...
73. Again, you may wish to select more appropriate intervals for the contour plot
❍ List the Stresses
■ From the 'Element Table' menu, select 'List Elem Table'
■ From the 'List Element Table Data' window which appears ensure 'SAXL' is highlighted
■ Click 'OK'
74. Note that the axial stress in Element 1 is 82.9MPa as predicted analytically.
Command File Mode of Solution
The above example was solved using a mixture of the Graphical User Interface (or GUI) and the command language interface of ANSYS.
This problem has also been solved using the ANSYS command language interface that you may want to browse. Open the .HTML
version, copy and paste the code into Notepad or a similar text editor and save it to your computer. Now go to 'File > Read input from...'
and select the file. A .PDF version is also available for printing.
Quitting ANSYS
To quit ANSYS, select 'QUIT' from the ANSYS Toolbar or select Utility Menu/File/Exit.... In the dialog box that appears, click on 'Save
Everything' (assuming that you want to) and then click on 'OK'.
76. The first step is to simplify the problem. Whenever you are trying out a new analysis type, you need something (ie analytical solution or
experimental data) to compare the results to. This way you can be sure that you've gotten the correct analysis type, units, scale factors, etc.
The simplified version that will be used for this problem is that of a cantilever beam shown in the following figure:
Preprocessing: Defining the Problem
1. Give the Simplified Version a Title (such as 'Verification Model').
Utility Menu > File > Change Title
2. Enter Keypoints
For this simple example, these keypoints are the ends of the beam.
❍ We are going to define 2 keypoints for the simplified structure as given in the following table
keypoint
coordinate
x y z
1 0 0 0
2 500 0 0
❍ From the 'ANSYS Main Menu' select:
77. Preprocessor > Modeling > Create > Keypoints > In Active CS
3. Form Lines
The two keypoints must now be connected to form a bar using a straight line.
❍ Select: Preprocessor > Modeling> Create > Lines > Lines > Straight Line.
❍ Pick keypoint #1 (i.e. click on it). It will now be marked by a small yellow box.
❍ Now pick keypoint #2. A permanent line will appear.
❍ When you're done, click on 'OK' in the 'Create Straight Line' window.
4. Define the Type of Element
It is now necessary to create elements on this line.
❍ From the Preprocessor Menu, select: Element Type > Add/Edit/Delete.
❍ Click on the 'Add...' button. The following window will appear:
❍ For this example, we will use the 3D elastic straight pipe element as selected in the above figure. Select the element shown and
click 'OK'. You should see 'Type 1 PIPE16' in the 'Element Types' window.
❍ Click on the 'Options...' button in the 'Element Types' dialog box. The following window will appear:
78. ❍ Click and hold the K6 button (second from the bottom), and select 'Include Output' and click 'OK'. This gives us extra force and
moment output.
❍ Click on 'Close' in the 'Element Types' dialog box and close the 'Element Type' menu.
5. Define Geometric Properties
We now need to specify geometric properties for our elements:
❍ In the Preprocessor menu, select Real Constants > Add/Edit/Delete
❍ Click Add... and select 'Type 1 PIPE16' (actually it is already selected). Click on 'OK'.
❍ Enter the following geometric properties:
Outside diameter OD: 25
Wall thickness TKWALL: 2
This defines an outside pipe diameter of 25mm and a wall thickness of 2mm.
79. ❍ Click on 'OK'.
❍ 'Set 1' now appears in the dialog box. Click on 'Close' in the 'Real Constants' window.
6. Element Material Properties
You then need to specify material properties:
❍ In the 'Preprocessor' menu select Material Props > Material Models...
❍ Double click Structural > Linear > Elastic and select 'Isotropic' (double click on it)
❍ Close the 'Define Material Model Behavior' Window.
We are going to give the properties of Aluminum. Enter the following field:
EX 70000
PRXY 0.33
❍ Set these properties and click on 'OK'.
7. Mesh Size
❍ In the Preprocessor menu select Meshing > Size Cntrls > ManualSize > Lines > All Lines
❍ In the size 'SIZE' field, enter the desired element length. For this example we want an element length of 2cm, therefore, enter
'20' (i.e 20mm) and then click 'OK'. Note that we have not yet meshed the geometry, we have simply defined the element sizes.
(Alternatively, we could enter the number of divisions we want in the line. For an element length of 2cm, we would enter 25 [ie
25 divisions]).
NOTE
It is not necessary to mesh beam elements to obtain the correct solution. However, meshing is done in this case so that we can obtain
results (ie stress, displacement) at intermediate positions on the beam.
8. Mesh
Now the frame can be meshed.
❍ In the 'Preprocessor' menu select Meshing > Mesh > Lines and click 'Pick All' in the 'Mesh Lines' Window
9. Saving Your Work
80. Utility Menu > File > Save as.... Select the name and location where you want to save your file.
Solution Phase: Assigning Loads and Solving
1. Define Analysis Type
❍ From the Solution Menu, select 'Analysis Type > New Analysis'.
❍ Ensure that 'Static' is selected and click 'OK'.
2. Apply Constraints
❍ In the Solution menu, select Define Loads > Apply > Structural > Displacement > On Keypoints
❍ Select the left end of the rod (Keypoint 1) by clicking on it in the Graphics Window and click on 'OK' in the 'Apply U,ROT on
KPs' window.
❍ This location is fixed which means that all translational and rotational degrees of freedom (DOFs) are constrained. Therefore,
select 'All DOF' by clicking on it and enter '0' in the Value field and click 'OK'.
3. Apply Loads
As shown in the diagram, there is a vertically downward load of 100N at the end of the bar
❍ In the Structural menu, select Force/Moment > on Keypoints.
❍ Select the second Keypoint (right end of bar) and click 'OK' in the 'Apply F/M' window.
❍ Click on the 'Direction of force/mom' at the top and select FY.
❍ Enter a value of -100 in the 'Force/moment value' box and click 'OK'.
❍ The force will appear in the graphics window as a red arrow.
The applied loads and constraints should now appear as shown below.
81. 4. Solving the System
We now tell ANSYS to find the solution:
❍ Solution > Solve > Current LS
Postprocessing: Viewing the Results
1. Hand Calculations
Now, since the purpose of this exercise was to verify the results - we need to calculate what we should find.
Deflection:
The maximum deflection occurs at the end of the rod and was found to be 6.2mm as shown above.
82. Stress:
The maximum stress occurs at the base of the rod and was found to be 64.9MPa as shown above (pure bending stress).
2. Results Using ANSYS
Deformation
❍ from the Main Menu select General Postproc from the 'ANSYS Main Menu'. In this menu you will find a variety of options,
the two which we will deal with now are 'Plot Results' and 'List Results'
❍ Select Plot Results > Deformed Shape.
❍ Select 'Def + undef edge' and click 'OK' to view both the deformed and the undeformed object.
83. ❍ Observe the value of the maximum deflection in the upper left hand corner (shown here surrounded by a blue border for
emphasis). This is identical to that obtained via hand calculations.
Deflection
For a more detailed version of the deflection of the beam,
❍ From the 'General Postproc' menu select Plot results > Contour Plot > Nodal Solution.
❍ Select 'DOF solution' and 'USUM'. Leave the other selections as the default values. Click 'OK'.
84. ❍ You may want to have a more useful scale, which can be accomplished by going to the Utility Menu and selecting Plot
Controls > Style > Contours > Uniform Contours
❍ The deflection can also be obtained as a list as shown below. General Postproc > List Results > Nodal Solution ... select
'DOF Solution' and 'ALL DOFs' from the lists in the 'List Nodal Solution' window and click 'OK'. This means that we want to
see a listing of all translational and rotational degrees of freedom from the solution. If we had only wanted to see the
displacements for example, we would have chosen 'ALL Us' instead of 'ALL DOFs'.
85. ❍ Are these results what you expected? Again, the maximum deflection occurs at node 2, the right end of the rod. Also note that
all the rotational and translational degrees of freedom were constrained to zero at node 1.
❍ If you wanted to save these results to a file, use the mouse to go to the 'File' menu (at the upper left-hand corner of this list
window) and select 'Save as'.
Stresses
For line elements (ie beams, spars, and pipes) you will need to use the Element Table to gain access to derived data (ie stresses,
strains).
❍ From the General Postprocessor menu select Element Table > Define Table...
❍ Click on 'Add...'
86. ❍ As shown above, in the 'Item,Comp' boxes in the above window, select 'Stress' and 'von Mises SEQV'
❍ Click on 'OK' and close the 'Element Table Data' window.
❍ Plot the Stresses by selecting Plot Elem Table in the Element Table Menu
❍ The following window will appear. Ensure that 'SEQV' is selected and click 'OK'
❍ If you changed the contour intervals for the Displacement plot to "User Specified" you may need to switch this back to "Auto
calculated" to obtain new values for VMIN/VMAX.
Utility Menu > PlotCtrls > Style > Contours > Uniform Contours ...
87. Again, select more appropriate intervals for the contour plot
❍ List the Stresses
■ From the 'Element Table' menu, select 'List Elem Table'
■ From the 'List Element Table Data' window which appears ensure 'SEQV' is highlighted
■ Click 'OK'
Note that a maximum stress of 64.914 MPa occurs at the fixed end of the beam as predicted analytically.
Bending Moment Diagrams
To further verify the simplified model, a bending moment diagram can be created. First, let's look at how ANSYS defines each
element. Pipe 16 has 2 nodes; I and J, as shown in the following image.
88. To obtain the bending moment for this element, the Element Table must be used. The Element Table contains most of the data for the
element including the bending moment data for each element at Node I and Node J. First, we need to obtain obtain the bending moment
data.
❍ General Postproc > Element Table > Define Table... . Click 'Add...'.
❍ In the window,
A. Enter IMoment as the 'User label for item' - this will give a name to the data
B. Select 'By sequence num' in the Item box
C. Select 'SMISC' in the first Comp box
D. Enter SMISC,6 in the second Comp box
E. Click 'OK'
This will save all of the bending moment data at the left hand side (I side) of each element. Now we need to find the bending
moment data at the right hand side (J side) of each element.
❍ Again, click 'Add...' in the 'Element Table Data' window.
A. Enter JMoment as the 'User label for item' - again, this will give a name to the data
B. Same as above
89. C. Same as above
D. For step D, enter SMISC,12 in the second Comp box
E. Click 'OK'
❍ Click 'Close' in the 'Element Table Data' window and close the 'Element Table' Menu. Select Plot Results > Contour Plot >
Line Elem Res...
❍ From the 'Plot Line-Element Results' window, select 'IMOMENT' from the pull down menu for LabI, and 'JMOMENT' from the
pull down menu for LabJ. Click 'OK'. Note again that you can modify the intervals for the contour plot.
90. Now, you can double check these solutions analytically. Note that the line between the I and J point is a linear interpolation.
❍ Before the explanation of the above steps, enter help pipe16 in the command line as shown below and then hit enter.
❍ Briefly read the ANSYS documentation which appears, pay particular attention to the Tables near the end of the document
(shown below).
Table 1. PIPE16 Item, Sequence Numbers, and Definitions for the ETABLE Commands
node I
name item e Definition
MFORX SMISC 1
Member forces
MFORY SMISC 2
91. at the node
MFORZ SMISC 3
MMOMX SMISC 4 Member
moments at the
node
MMOMY SMISC 5
MMOMZ SMISC 6
Note that SMISC 6 (which we used to obtain the values at node I) correspond to MMOMZ - the Member moment for node I.
The value of 'e' varies with different Element Types, therefore you must check the ANSYS Documentation files for each
element to determine the appropriate SMISC corresponding to the plot you wish to generate.
Command File Mode of Solution
The above example was solved using the Graphical User Interface (or GUI) of ANSYS. This problem can also been solved using the ANSYS
command language interface. To see the benefits of the command line clear your current file:
● From the Utility menu select: File > Clear and Start New
● Ensure that 'Read File' is selected then click 'OK'
● select 'yes' in the following window.
Copy the following code into the command line, then hit enter. Note that the text following the "!" are comments.
/PREP7 ! Preprocessor
K,1,0,0,0, ! Keypoint, 1, x, y, z
K,2,500,0,0, ! Keypoint, 2, x, y, z
L,1,2 ! Line from keypoint 1 to 2
!*
ET,1,PIPE16 ! Element Type = pipe 16
KEYOPT,1,6,1 ! This is the changed option to give the extra force and moment output
!*
R,1,25,2, ! Real Constant, Material 1, Outside Diameter, Wall thickness
!*
MP,EX,1,70000 ! Material Properties, Young's Modulus, Material 1, 70000 MPa
MP,PRXY,1,0.33 ! Material Properties, Major Poisson's Ratio, Material 1, 0.33
!*
LESIZE,ALL,20 ! Element sizes, all of the lines, 20 mm
LMESH,1 ! Mesh the lines
FINISH ! Exit preprocessor
/SOLU ! Solution
ANTYPE,0 ! The type of analysis (static)
!*
DK,1, ,0, ,0,ALL ! Apply a Displacement to Keypoint 1 to all DOF
FK,2,FY,-100 ! Apply a Force to Keypoint 2 of -100 N in the y direction
92. /STATUS,SOLU
SOLVE ! Solve the problem
FINISH
Note that you have now finished Postprocessing and the Solution Phase with just these few lines of code. There are codes to complete the
Postprocessing but we will review these later.
Bicycle Example
Now we will return to the analysis of the bike frame. The steps which you completed in the verification example will not be explained in great
detail, therefore use the verification example as a reference as required. We will be combining the use of the Graphic User Interface (GUI)
with the use of command lines.
Recall the geometry and dimensions of the bicycle frame:
Preprocessing: Defining the Problem
1. Clear any old ANSYS files and start a new file
Utility Menu > File > Clear and Start New
93. 2. Give the Example a Title
Utility menu > File > Change Title
3. Defining Some Variables
We are going to define the vertices of the frame using variables. These variables represent the various lengths of the bicycle members.
Notice that by using variables like this, it is very easy to set up a parametric description of your model. This will enable us to quickly
redefine the frame should changes be necessary. The quickest way to enter these variables is via the 'ANSYS Input' window which was
used above to input the command line codes for the verification model. Type in each of the following lines followed by Enter.
x1 = 500
x2 = 825
y1 = 325
y2 = 400
z1 = 50
4. Enter Keypoints
For this space frame example, these keypoints are the frame vertices.
❍ We are going to define 6 keypoints for this structure as given in the following table (these keypoints are depicted by the circled
numbers in the above figure):
keypoint
coordinate
x y z
1 0 y1 0
2 0 y2 0
3 x1 y2 0
4 x1 0 0
5 x2 0 z1
6 x2 0 -z1
❍ Now instead of using the GUI window we are going to enter code into the 'command line'. First, open the 'Preprocessor Menu'
from the 'ANSYS Main Menu'. The preprocessor menu has to be open in order for the preprocessor commands to be recognized.
Alternatively, you can type /PREP7 into the command line. The command line format required to enter a keypoint is as
94. follows:
K, NPT, X, Y, Z
where, each Abbreviation is representative of the following:
Keypoint, Reference number for the keypoint, coords x/y/z
For a more detailed explanation, type help k into the command line
For example, to enter the first keypoint type:
K,1,0,y1,0
into the command line followed by Enter.
As with any programming language, you may need to add comments. The exclamation mark indicates that anything following it
is commented out. ie - for the second keypoint you might type:
K,2,0,y2,0 ! keypoint, #, x=0, y=y2, z=0
❍ Enter the 4 remaining keypoints (listed in the table above) using the command line
❍ Now you may want to check to ensure that you entered all of the keypoints correctly:
Utility Menu > List > Keypoints > Coordinates only
(Alternatively, type 'KLIST' into the command line)
❍ If there are any keypoints which need to be re-entered, simply re-enter the code. A previously defined keypoint of the same
number will be redefined. However, if there is one that needs to be deleted simply enter the following code:
KDELE,#
95. where # corresponds to the number of the keypoint.
In this example, we defined the keypoints by making use of previously defined variables like y1 = 325. This was simply used for
convenience. To define keypoint #1, for example, we could have alternatively used the coordinates x = 0, y = 325, z = 0.
5. Changing Orientation of the Plot
❍ To get a better view of our view of our model, we'll view it in an isometric view:
❍ Select Utility menu bar > PlotCtrls > Pan, Zoom, Rotate...'
■ In the window that appears (shown left), you
have many controls. Try experimenting with
them. By turning on the dynamic mode (click
on the checkbox beside 'Dynamic Mode') you
can use the mouse to drag the image,
translating and rotating it on all three axes.
■ To get an isometric view, click on 'Iso' (at the
top right). You can either leave the 'Pan,
Zoom, Rotate' window open and move it to
an empty area on the screen, or close it if
your screen is already cluttered.
6. Create Lines
We will be joining the following keypoints together:
96. line
keypoint
1st 2nd
1 1 2
2 2 3
3 3 4
4 1 4
5 3 5
6 4 5
7 3 6
8 4 6
Again, we will use the command line to create the lines. The command format to create a straight line looks
like:
L, P1, P2
Line, Keypoint at the beginning of the line, Keypoint at the end of line
For example, to obtain the first line, I would write: ' L,1,2 '
Note: unlike 'Keypoints', 'Lines' will automatically assign themselves the next available reference number.
❍ Enter the remaining lines until you get a picture like that shown below.
❍ Again, check to ensure that you entered all of the lines correctly: type ' LLIST ' into the command line
❍ If there are any lines which need to be changed, delete the line by typing the following code: ' LDELE,# ' where #
corresponds to the reference number of the line. (This can be obtained from the list of lines). And then re-enter the line (note: a
new reference number will be assigned)
You should obtain the following:
97. 7. Define the Type of Element
Preprocessor > Element Type > Add/Edit/Delete > Add
As in the verification model, define the type of element (pipe16). As in the verification model, don't forget to change Option K6
'Include Output' to obtain extra force and moment output.
8. Define Geometric Properties
Preprocessor > Real Constants > Add/Edit/Delete
Now specify geometric properties for the elements
Outside diameter OD: 25
Wall thickness TKWALL: 2
9. Element Material Properties
To set Young's Modulus and Poisson's ratio, we will again use the command line. (ensure that the preprocessor menu is still open - if
not open it by clicking Preprocessor in the Main Menu)
MP, LAB, MAT, C0
98. Material Property,Valid material property label, Material Reference Number, value
❍ To enter the Elastic Modulus (LAB = EX) of 70000 MPa, type: ' MP,EX,1,70000 '
❍ To set Poisson's ratio (PRXY), type ' MP,PRXY,1,0.33 '
10. Mesh Size
As in the verification model, set the element length to 20 mm
Preprocessor > Meshing > Size Cntrls > ManualSize > Lines > All Lines
11. Mesh
Now the frame can be meshed.
❍ In the 'Preprocessor' menu select 'Mesh' > 'Lines' and click 'Pick All' in the 'Mesh Lines' Window
Saving Your Job
Utility Menu > File > Save as...
Solution Phase: Assigning Loads and Solving
Close the 'Preprocessor' menu and open up the 'Solution' menu (from the same 'ANSYS Main Menu').
1. Define Analysis Type
Solution > Analysis Type > New Analysis... > Static
2. Apply Constraints
Once again, we will use the command line. We are going to pin (translational DOFs will be fixed) the first keypoint and constrain the
keypoints corresponding to the rear wheel attachment locations in both the y and z directions. The following is the command line
format to apply constraints at keypoints.
DK, KPOI, Lab, VALUE, VALUE2, KEXPND, Lab2, Lab3, Lab4, Lab5, Lab6
Displacement on K, K #, DOF label, value, value2, Expansion key, other DOF labels
Not all of the fields are required for this example, therefore when entering the code certain fields will be empty. For example, to pin the
99. first keypoint enter:
DK,1,UX,0,,,UY,UZ
The DOF labels for translation motion are: UX, UY, UZ. Note that the 5th and 6th fields are empty. These correspond to 'value2' and
'the Expansion key' which are not required for this constraint. Also note that all three of the translational DOFs were constrained to 0.
The DOFs can only be contrained in 1 command line if the value is the same.
To apply the contraints to Keypoint 5, the command line code is:
DK,5,UY,0,,,UZ
Note that only UY and UZ are contrained to 0. UX is not constrained. Again, note that the 5th and 6th fields are empty because they are
not required.
❍ Apply the constraints to the other rear wheel location (Keypoint 6 - UY and UZ).
❍ Now list the constraints ('DKLIST') and verify them against the following:
If you need to delete any of the constraints use the following command: 'DKDELE, K, Lab' (ie 'DKDELE,1,UZ' would delete
the constraint in the 'z' direction for Keypoint 1)
3. Apply Loads
We will apply vertical downward loads of 600N at the seat post location (keypoint 3) and 200N at the pedal crank location (keypoint
4). We will use the command line to define these loading conditions.
FK, KPOI, Lab, value, value2
Force loads at keypoints, K #, Force Label directions (FX, FY, FZ), value1, value2 (if
req'd)
100. To apply a force of 600N downward at keypoint 3, the code should look like this: ' FK,3,FY,-600 '
Apply both the forces and list the forces to ensure they were inputted correctly (FKLIST).
If you need to delete one of the forces, the code looks like this: 'FKDELE, K, Lab' (ie 'FKDELE,3,FY' would delete the force in the 'y'
direction for Keypoint 3)
The applied loads and constraints should now appear as shown below.
4. Solving the System
Solution > Solve > Current LS
Postprocessing: Viewing the Results
To begin Postprocessing, open the 'General Postproc' Menu
1. Deformation
Plot Results > Deformed Shape... 'Def + undef edge'
101. ❍ You may want to try plotting this from different angles to get a better idea what's going on by using the 'Pan-Zoom-Rotate'
menu that was earlier outlined.
❍ Try the 'Front' view button (Note that the views of 'Front', 'Left', 'Back', etc depend on how the object was first defined).
❍ Your screen should look like the plot below:
102. 2. Deflections
Now let's take a look at some actual deflections in the frame. The deflections have been calculated at the nodes of the model, so the
first thing we'll do is plot out the nodes and node numbers, so we know what node(s) we're after.
❍ Go to Utility menu > PlotCtrls > Numbering... and turn on 'Node numbers'. Turn everything else off.
❍ Note the node numbers of interest. Of particular interest are those nodes where the constraints were applied to see if their
displacements/rotations were indeed fixed to zero. Also note the node numbers of the seat and crank locations.
❍ List the Nodal Deflections (Main Menu > General Postproc > List Results > Nodal Solution...'). Are the displacements and
rotations as you expected?
❍ Plot the deflection as well.
General Postproc > Plot Results > (-Contour Plot-) Nodal Solution select 'DOF solution' and 'USUM' in the window
103. ❍ Don't forget to use more useful intervals.
3. Element Forces
We could also take a look at the forces in the elements in much the same way:
❍ Select 'Element Solution...' from the 'List Results' menu.
❍ Select 'Nodal force data' and 'All forces' from the lists displayed.
❍ Click on 'OK'.
❍ For each element in the model, the force/moment values at each of the two nodes per element will be displayed.
❍ Close this list window when you are finished browsing.
❍ Then close the 'List Results' menu.
4. Stresses
As shown in the cantilever beam example, use the Element Table to gain access to derived stresses.
❍ General Postproc > Element Table > Define Table ...
104. ❍ Select 'Add'
❍ Select 'Stress' and 'von Mises'
❍ Element Table > Plot Elem Table
❍ Again, select appropriate intervals for the contour plot
5. Bending Moment Diagrams
As shown previously, the bending moment diagram can be produced.
Select Element Table > Define Table... to define the table (remember SMISC,6 and SMISC,12)
And, Plot Results > Line Elem Res... to plot the data from the Element Table
105. Command File Mode of Solution
The above example was solved using a mixture of the Graphical User Interface (or GUI) and the command language interface of ANSYS.
This problem has also been solved using the ANSYS command language interface that you may want to browse. Open the .HTML version,
copy and paste the code into Notepad or a similar text editor and save it to your computer. Now go to 'File > Read input from...' and select
the file. A .PDF version is also available for printing.
Quitting ANSYS
To quit ANSYS, select 'QUIT' from the ANSYS Toolbar or select 'Utility Menu'/'File'/'Exit...'. In the dialog box that appears, click on 'Save
108. This plate will be fixed at the two small holes on the left and have a load applied to the larger hole on the right.
Verification Example
The first step is to simplify the problem. Whenever you are trying out a new analysis type, you need something (ie analytical solution or
experimental data) to compare the results to. This way you can be sure that you've gotten the correct analysis type, units, scale factors, etc.
The simplified version that will be used for this problem is that of a flat rectangular plate with a hole shown in the following figure:
109. Preprocessing: Defining the Problem
1. Give the Simplified Version a Title
Utility Menu > File > Change Title
2. Form Geometry
Boolean operations provide a means to create complicated solid models. These procedures make it easy to combine simple
geometric entities to create more complex bodies. Subtraction will used to create this model, however, many other Boolean
operations can be used in ANSYS.
a. Create the main rectangular shape
Instead of creating the geometry using keypoints, we will create an area (using GUI)
Preprocessor > Modeling > Create > Areas > Rectangle > By 2 Corners
110. ■ Fill in the window as shown above. This will create a rectangle where the bottom left corner has the coordinates
0,0,0 and the top right corner has the coordinates 200,100,0.
(Alternatively, the command line code for the above command is BLC4,0,0,200,100)
b. Create the circle
Preprocessor > Modeling > Create > Areas > Circle > Solid Circle
111. ■ Fill in the window as shown above. This will create a circle where the center has the coordinates 100,50,0 (the center
of the rectangle) and the radius of the circle is 20 mm.
(Alternatively, the command line code for the above command is CYL4,100,50,20 )
c. Subtraction
Now we want to subtract the circle from the rectangle. Prior to this operation, your image should resemble the
following:
112. ■ To perform the Boolean operation, from the Preprocessor menu select:
Modeling > Operate > Booleans > Subtract > Areas
■ At this point a 'Subtract Areas' window will pop up and the ANSYS Input window will display the following
message: [ASBA] Pick or enter base areas from which to subtract (as shown below)
■ Therefore, select the base area (the rectangle) by clicking on it. Note: The selected area will turn pink once it is
selected.
■ The following window may appear because there are 2 areas at the location you clicked.
113. ■ Ensure that the entire rectangular area is selected (otherwise click 'Next') and then click 'OK'.
■ Click 'OK' on the 'Subtract Areas' window.
■ Now you will be prompted to select the areas to be subtracted, select the circle by clicking on it and then click 'OK'.
You should now have the following model:
(Alternatively, the command line code for the above step is ASBA,1,2)
114. 3. Define the Type of Element
It is now necessary to define the type of element to use for our problem:
Preprocessor Menu > Element Type > Add/Edit/Delete
❍ Add the following type of element: Solid (under the Structural heading) and the Quad 82 element, as shown in the above
figure.
PLANE82 is a higher order version of the two-dimensional, four-node element (PLANE42). PLANE82 is an eight noded
quadrilateral element which is better suited to model curved boundaries.
For this example, we need a plane stress element with thickness, therefore
❍ Click on the 'Options...' button. Click and hold the K3 button, and select 'Plane strs w/thk', as shown below.
115. (Alternatively, the command line code for the above step is ET,1,PLANE82 followed by KEYOPT,1,3,3)
4. Define Geometric Properties
❍ As in previous examples Preprocessor menu > Real Constants > Add/Edit/Delete
❍ Enter a thickness of 20 as shown in the figure below. This defines a plate thickness of 20mm)
(Alternatively, the command line code for the above step is R,1,20)
5. Element Material Properties
❍ As shown in previous examples, select Preprocessor > Material Props > Material models > Structural > Linear >
Elastic > Isotropic
We are going to give the properties of Steel. Enter the following when prompted:
EX 200000
PRXY 0.3
(Alternatively, the command line code for the above step is MP,EX,1,200000 followed by MP,PRXY,1,0.3)
6. Mesh Size
To tell ANSYS how big the elements should be, Preprocessor > Meshing > Size Cntrls > Manual Size > Areas > All Areas
116. ❍ Select an element edge length of 25. We will return later to determine if this was adequate for the problem.
(Alternatively, the command line code for the above step is AESIZE,ALL,25,)
7. Mesh
Now the frame can be meshed.
❍ In the 'Preprocessor' menu select Meshing > Mesh > Areas > Free and select the area when prompted
(Alternatively, the command line code for the above step is AMESH,ALL)
You should now have the following:
117. Saving Your Job
Utility Menu > File > Save as...
Solution Phase: Assigning Loads and Solving
You have now defined your model. It is now time to apply the load(s) and constraint(s) and solve the the resulting system of equations.
1. Define Analysis Type
❍ Ensure that a Static Analysis will be performed (Solution > Analysis Type > New Analysis).
(Alternatively, the command line code for the above step is ANTYPE,0)
2. Apply Constraints
As shown previously, the left end of the plate is fixed.
❍ In the Solution > Define Loads > Apply > Structural > Displacement > On Lines
❍ Select the left end of the plate and click on 'Apply' in the 'Apply U,ROT on Lines' window.
❍ Fill in the window as shown below.
118. ❍ This location is fixed which means that all DOF's are constrained. Therefore, select 'All DOF' by clicking on it and enter '0'
in the Value field as shown above.
You will see some blue triangles in the graphics window indicating the displacement contraints.
(Alternatively, the command line code for the above step is DL,4,,ALL,0)
3. Apply Loads
❍ As shown in the diagram, there is a load of 20N/mm distributed on the right hand side of the plate. To apply this load:
Solution > Define Loads > Apply > Structural > Pressure > On Lines
❍ When the window appears, select the line along the right hand edge of the plate and click 'OK'
❍ Calculate the pressure on the plate end by dividing the distributed load by the thickness of the plate (1 MPa).
❍ Fill in the "Apply PRES on lines" window as shown below. NOTE:
■ The pressure is uniform along the surface of the plate, therefore the last field is left blank.
■ The pressure is acting away from the surface of the plate, and is therefore defined as a negative pressure.
119. The applied loads and constraints should now appear as shown below.
120. 4. Solving the System
Solution > Solve > Current LS
Postprocessing: Viewing the Results
1. Hand Calculations
Now, since the purpose of this exercise was to verify the results - we need to calculate what we should find.
Deflection: The maximum deflection occurs on the right hand side of the plate and was calculated to be 0.001 mm - neglecting the
effects of the hole in the plate (ie - just a flat plate). The actual deflection of the plate is therefore expected to be greater but in the
same range of magnitude.
Stress: The maximum stress occurs at the top and bottom of the hole in the plate and was found to be 3.9 MPa.
2. Convergence using ANSYS
121. At this point we need to find whether or not the final result has converged. We will do this by looking at the deflection and stress at
particular nodes while changing the size of the meshing element.
Since we have an analytical solution for the maximum stress point, we will check the stress at this point. First we need to
find the node corresponding to the top of the hole in the plate. First plot and number the nodes
Utility Menu > Plot > Nodes
Utility Menu > PlotCtrls > Numbering...
❍ The plot should look similar to the one shown below. Make a note of the node closest to the top of the circle (ie. #49)
❍ List the stresses (General Postproc > List Results > Nodal Solution > Stress, Principals SPRIN) and check the SEQV
(Equivalent Stress / von Mises Stress) for the node in question. (as shown below in red)
122. The equivalent stress was found to be 2.9141 MPa at this point. We will use smaller elements to try to get a more
accurate solution.
❍ Resize Elements
a. To change the element size, we need to go back to the Preprocessor Menu
Preprocessor > Meshing > Size Cntrls > Manual Size > Areas > All Areas
now decrease the element edge length (ie 20)
b. Now remesh the model (Preprocessor > Meshing > Mesh > Areas > Free). Once you have selected the area and
clicked 'OK' the following window will appear:
123. c. Click 'OK'. This will remesh the model using the new element edge length.
d. Solve the system again (note that the constraints need not be reapplied). ( Solution Menu > Current LS )
❍ Repeat steps 'a' through 'd' until the model has converged. (note - the number of the node at the top of the hole has most
likely changed. It is essential that you plot the nodes again to select the appropriate node). Plot the stress/deflection at
varying mesh sizes as shown below to confirm that convergence has occured.
Note the shapes of both the deflection and stress curves. As the number of elements in the mesh increases (ie - the element edge
length decreases), the values converge towards a final solution.
The von Mises stress at the top of the hole in the plate was found to be approximatly 3.8 MPa. This is a mere 2.5% difference
between the analytical solution and the solution found using ANSYS.
124. The approximate maximum displacement was found to be 0.0012 mm, this is 20% greater than the analytical solution. However,
the analytical solution does not account for the large hole in the center of the plate which was expected to significantly increase the
deflection at the end of the plate.
Therefore, the results using ANSYS were determined to be appropriate for the verification model.
3. Deformation
❍ General Postproc > Plot Results > Deformed Shape > Def + undeformd to view both the deformed and the undeformed
object.
❍ Observe the locations of deflection.
4. Deflection
❍ General Postproc > Plot Results > Nodal Solution... Then select DOF solution, USUM in the window.
125. ❍ Alternatively, obtain these results as a list. (General Postproc > List Results > Nodal Solution...)
❍ Are these results what you expected? Note that all translational degrees of freedom were constrained to zero at the left end
of the plate.
5. Stresses
❍ General Postproc > Plot Results > Nodal Solution... Then select Stress, von Mises in the window.
126. ❍ You can list the von Mises stresses to verify the results at certain nodes
General Postproc > List Results. Select Stress, Principals SPRIN
Command File Mode of Solution
The above example was solved using a mixture of the Graphical User Interface (or GUI) and the command language interface of ANSYS.
This problem has also been solved using the ANSYS command language interface that you may want to browse. Open the .HTML
version, copy and paste the code into Notepad or a similar text editor and save it to your computer. Now go to 'File > Read input from...'
and select the file. A .PDF version is also available for printing.
Bracket Example
127. Now we will return to the analysis of the bracket. A combination of GUI and the Command line will be used for this example.
The problem to be modeled in this example is a simple bracket shown in the following figure. This bracket is to be built from a 20 mm
thick steel plate. A figure of the plate is shown below.
This plate will be fixed at the two small holes on the left and have a load applied to the larger hole on the right.
Preprocessing: Defining the Problem
1. Give the Bracket example a Title
Utility Menu > File > Change Title
2. Form Geometry
Again, Boolean operations will be used to create the basic geometry of the Bracket.
a. Create the main rectangular shape
128. The main rectangular shape has a width of 80 mm, a height of 100mm and the bottom left corner is located at coordinates
(0,0)
■ Ensure that the Preprocessor menu is open. (Alternatively type /PREP7 into the command line window)
■ Now instead of using the GUI window we are going to enter code into the 'command line'. Now I will explain the
line required to create a rectangle:
BLC4, XCORNER, YCORNER, WIDTH, HEIGHT
BLC4, X coord (bottom left), Y coord (bottom left), width, height
■ Therefore, the command line for this rectangle is BLC4,0,0,80,100
b. Create the circular end on the right hand side
The center of the circle is located at (80,50) and has a radius of 50 mm
The following code is used to create a circular area:
CYL4, XCENTER, YCENTER, RAD1
CYL4, X coord for the center, Y coord for the center, radius
■ Therefore, the command line for this circle is CYL4,80,50,50
c. Now create a second and third circle for the left hand side using the following dimensions:
parameter circle 2 circle 3
XCENTER 0 0
YCENTER 20 80
RADIUS 20 20
d. Create a rectangle on the left hand end to fill the gap between the two small circles.
XCORNER -20
YCORNER 20
129. WIDTH 20
HEIGHT 60
Your screen should now look like the following...
e. Boolean Operations - Addition
We now want to add these five discrete areas together to form one area.
■ To perform the Boolean operation, from the Preprocessor menu select:
Modeling > Operate > Booleans > Add > Areas
■ In the 'Add Areas' window, click on 'Pick All'
(Alternatively, the command line code for the above step is AADD,ALL)