Professional Documents
Culture Documents
University of Alberta - Ansys Tutorials
University of Alberta - Ansys Tutorials
ANSYS
UTILITIES
BASIC
TUTORIALS
Index
Contributions
Comments
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
MecE 563
Mechanical Engineering
This web site has been organized into the following six sections.
University of Alberta
ANSYS Utilities
An introduction to using ANSYS. This includes a quick explanation of the stages of analysis, how to start
ANSYS, the use of the windows in ANSYS, convergence testing, saving/restoring jobs, and working with
Pro/E.
ANSYS Inc.
Basic Tutorials
Detailed tutorials outlining basic structural analysis using ANSYS. It is recommended that you complete
these tutorials in order as each tutorial builds upon skills taught in previous examples.
Copyright 2001
University of Alberta
Intermediate Tutorials
Complex skills such as dynamic analysis and nonlinearities are explored in this section. It is recommended
that you have completed the Basic Tutorials prior to attempting these tutorials.
Advanced Tutorials
Advanced skills such as substructuring and optimization are explored in this section. It is recommended that
you have completed the Basic Tutorials prior to attempting these tutorials.
Postprocessing Tutorials
Postprocessing tools available in ANSYS such as X-sectional views of the geometry are shown in this
section. It is recommended that you have completed the Basic Tutorials prior to attempting these tutorials.
ANSYS
UTILITIES
Introduction
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
ANSYS Utilities
Starting up ANSYS
ANSYS Environment
ANSYS Interface
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.
Convergence Testing
Saving/Restoring Jobs
ANSYS Files
Printing Results
ANSYS Interface
An explanation of the Graphic User Interface (GUI) in comparison to the command file approach.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
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.
University of Alberta
Printing Results
Saving data and figures generated in ANSYS.
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Basic Tutorials
The following documents will lead you through several example problems using ANSYS. ANSYS 7.0 was used to
create some of these tutorials while ANSYS 5.7.1 was used to create others, therefore, if you are using a different
version of ANSYS make note of changes in the menu structure. Complete these tutorials in order as each tutorial will
build on skills taught in the previous example.
Solid Modeling
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
Solid Modeling
This tutorial will introduce techniques such as filleting, extrusion, copying and working plane orienation to
create 3-Dimensional objects.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Intermediate Tutorials
Distributed Loading
NonLinear Analysis
Solution Tracking
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.
Buckling
NonLinear Materials
Dynamic - Modal
Dynamic - Harmonic
Distributed Loading
The application of distributed loads and the use of element tables to extract data is expalined in this tutorial.
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
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.
Transient Heat
Axisymmetric
Index
Contributions
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.
Comments
MecE 563
Mechanical Engineering
Thermal Examples
Analysis of a pure conduction, a mixed convection/conduction/insulated boundary condition example, and a
transient heat conduction analysis.
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Advanced Tutorials
Design Optimization
Substructuring
Coupled Field
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.
p-Element
Element Death
Contact Elements
APDL
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
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.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
X-Sectional Results
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Postprocessing Tutorials
These tutorials were created to show some of the tools available in ANSYS for postprocessing. 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.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
Creating Files
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
Features
The following files should help you to generate your own command line files.
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
The following files include some example problems that have been created using command line coding.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
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
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
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.
Copyright 2001
University of Alberta
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:
Define keypoints/lines/areas/volumes
Define element type and material/geometric properties
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), contraints (translational and
rotational) and finally solve the resulting set of equations.
3. Postprocessing: further processing and viewing of the results; in this stage one may wish to see:
Lists of nodal displacements
Element forces and moments
Deflection plots
Stress contour diagrams
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
Introduction
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Starting up ANSYS
Starting up ANSYS
ANSYS Environment
ANSYS Interface
Convergence Testing
Starting up ANSYS
Large File Sizes
Saving/Restoring Jobs
ANSYS Files
Printing Results
Working with Pro/E
Index
ANSYS can create rather large files when running and saving; be sure that your local drive has space for it.
Windows NT Start Up
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
Start Menu
Programs
ANSYS 5.7
Run Interactive Now
Copyright 2001
University of Alberta
in the task bar at the bottom of the screen, you should see something labeled X-Win32. If you don't see this minimized program,
you can may want to reboot the computer, as it automatically starts this application when booting.
right click on this menu and selection Sessions and then select Mece.
you will now be prompted to login to GPU... do this.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
Introduction
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
ANSYS 5.7.1
PRINTABLE
VERSION
Starting up ANSYS
ANSYS Environment
ANSYS Interface
The ANSYS Environment for ANSYS 7.0 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
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.
Copyright 2001
University of Alberta
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
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.
ANSYS Files
Printing Results
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:
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
Introduction
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
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
Introduction
A fundamental premise of using the finite element procedure is that the body is sub-divided up into small discrete regions known as finite
elements. These elements defined by nodes and interpolation functions. Governing equations are written for each element and these
elements are assembled into a global matrix. Loads and constraints are applied and the solution is then determined.
The Problem
The question that always arises is: How small do I need to make the elements before I can trust the solution?
The Consequences
Mechanical Engineering
University of Alberta
Finer meshes come with a cost however: more calculational time and large memory requirements (both disk and RAM)! It is desired to
find the minimum number of elements that give you a converged solution.
Beam Models
ANSYS Inc.
Copyright 2001
University of Alberta
For beam models, we actually only need to define a single element per line unless we are applying a distributed load on a given frame
member. When point loads are used, specifying more that one element per line will not change the solution, it will only slow the
calculations down. For simple models it is of no concern, but for a larger model, it is desired to minimize the number of elements, and thus
calculation time and still obtain the desired accuracy.
General Models
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
Introduction
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Starting up ANSYS
ANSYS Environment
ANSYS Interface
Convergence Testing
Saving/Restoring Jobs
ANSYS Files
Printing Results
It is a good idea to save your job at different times throughout the building and analysis of the model to backup your work incase of a
system crash or other unforseen problems.
Index
ANSYS Inc.
Copyright 2001
University of Alberta
Frequently you want to start up ANSYS and recall and continue a previous job. There are two methods to do this:
1. Using the Launcher...
In the ANSYS Launcher, select Interactive... and specify the previously defined jobname.
Then when you get ANSYS started, select Utility Menu -> File -> Resume Jobname.db .
This will restore as much of your database (geometry, loads, solution, etc) that you previously saved.
2. Or, start ANSYS and select Utitily Menu -> File -> Resume from... and select your job from the list that appears.
ANSYS
UTILITIES
BASIC
TUTORIALS
Introduction
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
ANSYS Files
Starting up ANSYS
ANSYS Environment
ANSYS Interface
Convergence Testing
Saving/Restoring Jobs
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:
ANSYS Files
Printing Results
Working with Pro/E
Index
Contributions
Comments
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.
MecE 563
Mechanical Engineering
University of Alberta
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?
ANSYS Inc.
Copyright 2001
University of Alberta
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 overwritten or added to, from another ANSYS run.
ANSYS
UTILITIES
Introduction
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Starting up ANSYS
ANSYS Environment
ANSYS Interface
Convergence Testing
Saving/Restoring Jobs
ANSYS Files
Printing Results
Working with Pro/E
Index
Plotting of Figures
Contributions
Comments
MecE 563
Mechanical Engineering
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.
University of Alberta
ANSYS Inc.
This raster image file may now be printed on a PostScript printer or included in a document.
Copyright 2001
University of Alberta
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:
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.
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
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Starting up ANSYS
ANSYS Environment
ANSYS Interface
Convergence Testing
Saving/Restoring Jobs
The transfer of a model from Pro/ENGINEER to ANSYS will be demonstrated here for a simple solid model. Model idealizations such as
shells and beams will not be treated. Also, many modeling options for constraints, loads, mesh control, analysis types will not be covered.
These are fairly easy to figure out once you know the general procedures presented here.
ANSYS Files
Printing Results
Working with Pro/E
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
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.
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.
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
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).
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.
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.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Index
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple 2D Truss problem. This is the first of four introductory ANSYS tutorials.
Problem Description
Determine the nodal deflections, reaction forces, and stress for the truss system shown below (E = 200GPa, A = 3250mm2).
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
(Modified from Chandrupatla & Belegunda, Introduction to Finite Elements in Engineering, p.123)
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
coordinate
keypoint
x
y
1
1800
3118
3600
5400
3118
7200
9000
3118
10800
'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:
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.
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:
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.
Click Add... and select 'Type 1 LINK1' (actually it is already selected). Click on 'OK'. The following window will appear:
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
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
Plot Numbering
To show the line numbers, keypoint numbers, node numbers...
From the Utility Menu (top of screen) select PlotCtrls > Numbering...
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
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'.
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 applied loads and constraints should now appear as shown below.
In the 'Solution' menu select Solve > Current LS. This indicates that we desire the solution under the current Load Step
(LS).
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..
from the Main Menu select General Postproc > List Results > Reaction Solu.
Select 'All struc forc F' as shown above and click 'OK'
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.
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.
Select 'DOF solution' and 'USUM' as shown in the above window. Leave the other selections as the default values. Click
'OK'.
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'.
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.
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...'
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
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 ...
Again, you may wish to select more appropriate intervals for the contour plot
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'.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Modeling Tools
Solid Modeling
Introduction
Index
This tutorial was created using ANSYS 7.0 to solve a simple 3D space frame problem.
Problem Description
Contributions
Comments
The problem to be solved in this example is the analysis of a bicycle frame. The problem to be modeled in this example is a simple bicycle
frame shown in the following figure. The frame is to be built of hollow aluminum tubing having an outside diameter of 25mm and a wall
thickness of 2mm.
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
Verification
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:
We are going to define 2 keypoints for the simplified structure as given in the following table
coordinate
keypoint
x
y
z
500
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.
When you're done, click on 'OK' in the 'Create Straight Line' window.
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:
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.
Click Add... and select 'Type 1 PIPE16' (actually it is already selected). Click on 'OK'.
25
2
This defines an outside pipe diameter of 25mm and a wall thickness of 2mm.
Click on 'OK'.
'Set 1' now appears in the dialog box. Click on 'Close' in the 'Real Constants' window.
Double click Structural > Linear > Elastic and select 'Isotropic' (double click on it)
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
Utility Menu > File > Save as.... Select the name and location where you want to save your file.
From the Solution Menu, select 'Analysis Type > New Analysis'.
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
Select the second Keypoint (right end of bar) and click 'OK' in the 'Apply F/M' window.
Enter a value of -100 in the 'Force/moment value' box and click 'OK'.
The applied loads and constraints should now appear as shown below.
The maximum deflection occurs at the end of the rod and was found to be 6.2mm as shown above.
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 'Def + undef edge' and click 'OK' to view both the deformed and the undeformed object.
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'.
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'.
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...'
As shown above, in the 'Item,Comp' boxes in the above window, select 'Stress' and 'von Mises SEQV'
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 ...
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.
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.
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
MFORX
SMISC
MFORY
SMISC
Definition
Member forces
MFORZ
SMISC
at the node
MMOMX
SMISC
MMOMY
SMISC
MMOMZ
SMISC
Member
moments at the
node
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.
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
K,1,0,0,0,
K,2,500,0,0,
L,1,2
!*
ET,1,PIPE16
KEYOPT,1,6,1
!*
R,1,25,2,
!*
MP,EX,1,70000
MP,PRXY,1,0.33
!*
LESIZE,ALL,20
LMESH,1
FINISH
/SOLU
ANTYPE,0
!*
DK,1, ,0, ,0,ALL
FK,2,FY,-100
!
!
!
!
Preprocessor
Keypoint, 1, x, y, z
Keypoint, 2, x, y, z
Line from keypoint 1 to 2
/STATUS,SOLU
SOLVE
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:
=
=
=
=
=
500
825
325
400
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):
coordinate
keypoint
y1
y2
x1
y2
x1
x2
z1
x2
-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
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
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,#
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...'
6. Create Lines
We will be joining the following keypoints together:
keypoint
line
1st
2nd
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:
25
2
To enter the Elastic Modulus (LAB = EX) of 70000 MPa, type: ' MP,EX,1,70000 '
In the 'Preprocessor' menu select 'Mesh' > 'Lines' and click 'Pick All' in the 'Mesh Lines' Window
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
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)
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.
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:
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
3. Element Forces
We could also take a look at the forces in the elements in much the same way:
4. Stresses
As shown in the cantilever beam example, use the Element Table to gain access to derived stresses.
Select 'Add'
Select 'Stress' and 'von Mises'
Element Table > Plot Elem Table
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'.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Modeling Tools
Solid Modeling
Introduction
Index
Contributions
This tutorial is the second of three basic tutorials created to illustrate commom features in ANSYS. The plane stress bracket tutorial builds
upon techniques covered in the first tutorial (3D Bicycle Space Frame), it is therefore essential that you have completed that tutorial prior
to beginning this one.
The 2D Plane Stress Bracket will introduce boolean operations, plane stress, and uniform pressure loading.
Comments
Problem Description
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
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.
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:
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)
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:
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.
Ensure that the entire rectangular area is selected (otherwise click 'Next') and then click 'OK'.
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)
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.
(Alternatively, the command line code for the above step is ET,1,PLANE82 followed by KEYOPT,1,3,3)
4. Define Geometric Properties
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
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)
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.
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).
The applied loads and constraints should now appear as shown below.
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)
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:
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.
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.
4. Deflection
General Postproc > Plot Results > Nodal Solution... Then select DOF solution, USUM in the window.
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.
You can list the von Mises stresses to verify the results at certain nodes
General Postproc > List Results. Select Stress, Principals SPRIN
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
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.
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
c. Now create a second and third circle for the left hand side using the following dimensions:
parameter
circle 2
circle 3
XCENTER 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
WIDTH
20
HEIGHT
60
f. Create the Bolt Holes We now want to remove the bolt holes from this plate.
parameter
circle 1
circle 2
circle 3
WP X
80
WP Y
50
20
80
radius
30
10
10
Now select
Preprocessor > Modeling > Operate > Booleans > Subtract > Areas
Select the base areas from which to subract (the large plate that was created)
Next select the three circles that we just created. Click on the three circles that you just created and click 'OK'.
(Alternatively, the command line code for the above step is ASBA,6,ALL)
Now you should have the following:
Use the 'Options...' button to get a plane stress element with thickness
(Alternatively, the command line code for the above step is ET,1,PLANE82 followed by KEYOPT,1,3,3)
Preprocessor > Material Props > Material Library > Structural > Linear > Elastic > Isotropic
We are going to give the properties of Steel. Enter the following when prompted:
EX 200000
PRXY 0.3
(The command line code for the above step is MP,EX,1,200000 followed by MP,PRXY,1,0.3)
6. Mesh Size
Preprocessor > Meshing > Size Cntrls > Manual Size > Areas > All Areas
Select an element edge length of 5. Again, we will need to make sure the model has converged.
(Alternatively, the command line code for the above step is AESIZE,ALL,5,)
7. Mesh
Preprocessor > Meshing > Mesh > Areas > Free and select the area when prompted
(Alternatively, the command line code for the above step is AMESH,ALL)
2. Apply Constraints
As illustrated, the plate is fixed at both of the smaller holes on the left hand side.
Solution > Define Loads > Apply > Structural > Displacement > On Nodes
Instead of selecting one node at a time, you have the option of creating a box, polygon, or circle of which all the nodes in
that area will be selected. For this case, select 'circle' as shown in the window below. (You may want to zoom in to select
the points Utilty Menu / PlotCtrls / Pan, Zoom, Rotate...) Click at the center of the bolt hole and drag the circle out so that
it touches all of the nodes on the border of the hole.
Click on 'Apply' in the 'Apply U,ROT on Lines' window and constrain all DOF's in the 'Apply U,ROT on Nodes' window.
3. Apply Loads
As shown in the diagram, there is a single vertical load of 1000N, at the bottom of the large bolt hole. Apply this force to the
respective keypoint ( Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints Select a force in the y
direction of -1000)
The applied loads and constraints should now appear as shown below.
General Postproc > Plot Results > Def + undeformed to view both the deformed and the undeformed object.
The graphic should be similar to the following
Observe the locations of deflection. Ensure that the deflection at the bolt hole is indeed 0.
3. Deflection
To plot the nodal deflections use General Postproc > Plot Results > Contour Plot > Nodal Solution then select DOF
Solution - USUM in the window.
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 bolt
holes.
4. Stresses
General Postproc > Plot Results > Nodal Solution... Then select von Mises Stress in the window.
You can list the von Mises stresses to verify the results at certain nodes
General Postproc > List Results. Select Stress, Principals SPRIN
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, click 'QUIT' on the ANSYS Toolbar or select Utility Menu > File > Exit... In the window that appears, select 'Save
Everything' (assuming that you want to) and then click 'OK'.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Index
Contributions
Introduction
This tutorial is the last of three basic tutorials devised to illustrate commom features in ANSYS. Each tutorial builds upon techniques
covered in previous tutorials, it is therefore essential that you complete the tutorials in order.
The Solid Modelling Tutorial will introduce various techniques which can be used in ANSYS to create solid models. Filleting, extrusion/
sweeping, copying, and working plane orientation will be covered in detail.
Two Solid Models will be created within this tutorial.
Comments
MecE 563
Problem Description A
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
We will be creating a solid model of the pulley shown in the following figure.
Geometry Generation
We will create this model by first tracing out the cross section of the pulley and then sweeping this area about the y axis.
Rectangle 1
Rectangle 2
Rectangle 3
WP X (XCORNER)
WP Y (YCORNER)
WIDTH
0.5
HEIGHT
5.5
Circle 2
WP X (XCENTER)
8.5
WP Y (YCENTER)
5.5
0.2
RADIUS
0.5
0.2
The following window will appear prompting for the fillet radius. Enter 0.1
Follow the same procedure and create a fillet with the same radius between the following lines
As shown below, zoom into the fillet radius and plot and number the lines.
You will first be prompted to select the areas to be swept so click on the area.
Then you will be asked to enter or pick two keypoints defining the axis.
Plot the Keypoints (Utility Menu > Plot > Keypoints. Then select the following two keypoints
The following window will appear prompting for sweeping angles. Click on OK.
#2001
#2002
#2003
Select Keypoints 2001 then 2002 then 2003 IN THAT ORDER. The first keypoint (2001) defines the origin of the working
plane coordinate system, the second keypoint (2002) defines the x-axis orientation, while the third (2003) defines the
orientation of the working plane. The following warning will appear when selecting the keypoint at the origin as there are
more than one in this location.
Once you have selected the 3 keypoints and clicked 'OK' the WP symbol (green) should appear in the Graphics window.
Another way to make sure the active WP has moves is:
Utility Menu > WorkPlane > Show WP Status
note the origin of the working plane. By default those values would be 0,0,0.
3. Create a Cylinder (solid cylinder) with x=5.5 y=0 r=0.5 depth=1 You should see the following in the graphics screen
We will now copy this volume so that we repeat it every 45 degrees. Note that you must copy the cylinder before you use boolean
operations to subtract it because you cannot copy an empty space.
4. We need to change active CS to cylindrical Y
Utility Menu > WorkPlane > Change Active CS to > Global Cylindrical Y
This will allow us to copy radially about the Y axis
5. Create 8 bolt Holes
Preprocessor > Copy > Volumes
Select the cylinder volume and click on OK. The following window will appear; fill in the blanks as shown,
Subtract the cylinders from the pulley hub (Boolean operations) to create the boltholes. This will result in the following
completed structure:
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.
Problem Description B
We will be creating a solid model of the Spindle Base shown in the following figure.
Geometry Generation
We will create this model by creating the base and the back and then the rib.
WP Y (YCORNER)
WIDTH
HEIGHT
109
102
2. Create the curved edge (using keypoints and lines to create an area)
Keypoint 5
-20
82
Keypoint 6
-20
20
Keypoint 7
82
Keypoint 8
20
Select keypoints 4 and 5 (either click on them or type 4,5 into the command line) when prompted.
Enter the radius of the arc (20) in the 'Arc by End KPs & Radius' window
Main Menu > Preprocessor > (-Modeling-) Create > (-Areas-) Arbitrary > By Lines
AL,4,5,6,7
Fill in the window as shown (length of extrusion = 26mm). Note, to extrude the area in the negative z direction you would
simply enter -26.
#100
#101
#102
X
109
109
159
Y
102
2
102
Z
0
0
sqrt(3)/0.02
Note that the planar areas between the two volumes were not added together.
Add the planar areas together (don't forget the other side!)
Preprocessor > (-Modeling-) Operate > (-Booleans-) Add > Areas
AADD, Area 1, Area 2, Area 3
First change the active coordinate system back to the global coordinate system (this will make it easier to align to the new
coordinate system)
Utility Menu > WorkPlane > Align WP with > Global Cartesian
(Alternatively, type WPCSYS,-1,0 into the command line)
#200
#201
#202
X
-20
0
-20
Y
61
61
61
Z
26
26
30
#203
129-(0.57735*26)
#204
129-(0.57735*26) + 38
sqrt(3)/2*76
Preprocessor > (-Modeling-) Create > (-Areas-) Arbitrary > Through KPs
A,200,203,204
4. Extrude the area (length of extrusion = 20mm)
5. Add the volumes together
You should obtain the following:
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'.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Dynamic - Modal
Dynamic - Harmonic
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to show the required steps to account for the weight of an
object in ANSYS.
Loads will not be applied to the beam shown below in order to observe the deflection caused by the weight of the beam itself. The beam is
to be made of steel with a modulus of elasticity of 200 GPa.
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
3. Define Keypoints
Preprocessor > Modeling > Create > Keypoints > In Active CS...
K,#,x,y,z
We are going to define 2 keypoints for this beam as given in the following table:
Copyright 2001
University of Alberta
(0,0)
(1000,0)
4. Create Lines
Preprocessor > Modeling > Create > Lines > Lines > In Active Coord
L,1,2
Create a line joining Keypoints 1 and 2
5. Define the Type of Element
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation
along the X and Y axes, and rotation about the Z axis).
6. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 500
ii. Area moment of inertia IZZ: 4166.67
iii. Total beam height: 10
This defines a beam with a height of 10 mm and a width of 50 mm.
7. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200000
Select Solution > Define Loads > Apply > Structural > Inertia > Gravity...
The following window will appear. Fill it in as shown to define an acceleration of 9.81m/s2 in the y direction.
Note: Acceleration is defined in terms of meters (not 'mm' as used throughout the problem). This is because the units of
acceleration and mass must be consistent to give the product of force units (Newtons in this case). Also note that a positive
acceleration in the y direction stimulates gravity in the negative Y direction.
There should now be a red arrow pointing in the positive y direction. This indicates that an acceleration has been defined in
the y direction.
DK,1,ALL,0,
ACEL,,9.8
The applied loads and constraints should now appear as shown in the figure below.
As observed in the upper left hand corner, the maximum displacement was found to be 5.777mm. This is in agreement with the
theortical value.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
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
University of Alberta
Introduction
This tutorial was completed using ANSYS 7.0. The purpose of this tutorial is to explain how to apply distributed loads and use element
tables to extract data. Please note that this material was also covered in the 'Bicycle Space Frame' tutorial under 'Basic Tutorials'.
A distributed load of 1000 N/m (1 N/mm) will be applied to a solid steel beam with a rectangular cross section as shown in the figure
below. The cross-section of the beam is 10mm x 10mm while the modulus of elasticity of the steel is 200GPa.
ANSYS Inc.
(0,0)
(1000,0)
4. Define Lines
Preprocessor > Modeling > Create > Lines > Lines > Straight Line
L,K#,K#
Create a line between Keypoint 1 and Keypoint 2.
5. Define Element Types
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 element. This element has 3 degrees of freedom (translation along the X and Y
axis's, and rotation about the Z axis). With only 3 degrees of freedom, the BEAM3 element can only be used in 2D analysis.
6. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 100
Select Solution > Define Loads > Apply > Structural > Pressure > On Beams
Click 'Pick All' in the 'Apply F/M' window.
As shown in the following figure, enter a value of 1 in the field 'VALI Pressure value at node I' then click 'OK'.
The applied loads and constraints should now appear as shown in the figure below.
Note:
To have the constraints and loads appear each time you select 'Replot' you must change some settings. Select Utility Menu
> PlotCtrls > Symbols.... In the window that appears, select 'Pressures' in the pull down menu of the 'Surface Load
Symbols' section.
4. Solve the System
Solution > Solve > Current LS
SOLVE
ANSYS can only calculate the stress at a single location on the element. For this example, we decided to extract the stresses
from the I and J nodes of each element. These are the nodes that are at the ends of each element.
For this problem, we wanted the principal stresses for the elements. For the BEAM3 element this is categorized as NMISC,
1 for the 'I' nodes and NMISC, 3 for the 'J' nodes. A list of available codes for each element can be found in the ANSYS
help files. (ie. type help BEAM3 in the ANSYS Input window).
As shown in the plot below, the maximum stress occurs in the middle of the beam with a value of 750 MPa.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to do a simple nonlinear analysis of
the beam shown below.
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
There are several causes for nonlinear behaviour such as Changing Status (ex. contact elements), Material Nonlinearities and
Geometric Nonlinearities (change in response due to large deformations). This tutorial will deal specifically with Geometric
Nonlinearities .
Contributions
Comments
MecE 563
To solve this problem, the load will added incrementally. After each increment, the stiffness matrix will be adjusted before increasing the
load.
The solution will be compared to the equivalent solution using a linear response.
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
We are going to define 2 keypoints (the beam vertices) for this structure to create a beam with a length of 5 inches:
Keypoint Coordinates (x,y)
1
(0,0)
(5,0)
3. Define Lines
Preprocessor > Modeling > Create > Lines > Lines > Straight Line
Create a line between Keypoint 1 and Keypoint 2.
4. Define Element Types
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation
along the X and Y axis's, and rotation about the Z axis). With only 3 degrees of freedom, the BEAM3 element can only be
used in 2D analysis.
5. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 0.03125
ii. Area Moment of Inertia IZZ: 4.069e-5
iii. Total beam height HEIGHT: 0.125
This defines an element with a solid rectangular cross section 0.25 x 0.125 inches.
6. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
20 lb*in
40 lb*in
60 lb*in
80 lb*in
100 lb*in
Now, with the Automatic Time Stepping is on, the first step size will still be 20 lb*in. However, the remaining
substeps will be determined based on the response of the material due to the previous load increment.
D. Enter a maximum number of substeps of 1000. This stops the program if the solution does not converge after 1000
steps.
E. Enter a minimum number of substeps of 1.
F. Ensure all solution items are writen to a results file.
NOTE
There are several options which have not been changed from their default values. For more information about these
commands, type help followed by the command into the command line.
Function
Command Comments
Load Step
KBC
Loads are either linearly interpolated (ramped) from the one substep to another (ie the load will increase from 10 lbs to 20 lbs in a linear fashion) or they are step
functions (ie. the load steps directly from 10 lbs to 20 lbs). By default, the load is
ramped. You may wish to use the stepped loading for rate-dependent behaviour or
transient load steps.
Output
OUTRES
This command controls the solution data written to the database. By default, all of
the solution items are written at the end of each load step. You may select only a
specific iten (ie Nodal DOF solution) to decrease processing time.
Stress Stiffness
SSTIF
This command activates stress stiffness effects in nonlinear analyses. When large
static deformations are permitted (as they are in this case), stress stiffening is
automatically included. For some special nonlinear cases, this can cause divergence
because some elements do not provide a complete consistent tangent.
Newton Raphson
NROPT
Convergence
Values
CNVTOL
By default, the program checks the out-of-balance load for any active DOF.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Keypoints
Select: TimeHist Postpro > Define Variables > Add... > Nodal DOF results
Complete the following window as shown to define the translational displacement in the y direction.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Introduction
Buckling
NonLinear Materials
This tutorial was completed using ANSYS 7.0 This will act as an explanation of what the Graphical Solution Tracking plot is acutally
describing. An example of such a plot is shown below and will be used throughout the explanation.
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
The x-axis is labelled Cumulative Iteration Number. As ANSYS steps through non-linear analysis, it uses a
solver (Newton-Raphson, etc) that iterates to find a solution. If the problem is relatively linear, very few iterations will be
required and thus the length of the graph will be small. However, if the solution is highly non-linear, or is not converging,
many iterations will be required. The length of the graph in these cases can be quite long. Again, for more information about
changing iteration settings, you can see Chapter 8.5 in the help file.
The y-axis is labelled Absolute Convergence Norm. In the case of a structural analysis, which this graph is taken
from, this absolute convergence norm refers to non-normalized values (ie there are units associated with these values).
Some analyses use normalized values. In reality it doesn't really matter because it is only a comparison that is going on. This
is what will be explained next.
2. Curves and Legend
As can be guessed from the legend labels, this graph relates to forces and moments. These values are graphed because they
are the corresponding values in the solution vector for the DOF's that are active in the elements being used. If this graph
were from a thermal analysis, the curves may be for temperature.
For each parameter, there are two curves plotted. For ease of explanation, we will look at the force curves.
The F CRIT curve refers to the convergence criteria force value. This value is equal to the product of VALUE x
TOLER. The default value of VALUE is the square root of the sum of the squares (SRSS) of the applied loads, or
MINREF (which defaults to 0.001), which ever is greater. This value can be changed using the CNVTOL command,
which is discussed in the help file. The value of TOLER defaults to 0.5% for loads.
One may inquire why the F CRIT value increases as the number of iterations increases. This is because the analysis
is made up of a number of substeps. In the case of a structural example, such as this, these substeps are basically
portions of the total load being applied over time. For instance, a 100N load broken up with 20 substeps means 20,
5N loads will be applied consequtively until the entire 100N is applied. Thus, the F CRIT value at the start will be
1/20th of the final F CRIT value.
The F L2 curve refers to the L2 Vector Norm of the forces. The L2 norm is the SRSS of the force imbalances for all
DOF's. In simpler terms, this is the SRSS of the difference between the calculated internal force at a particular DOF
and the external force in that direction.
For each substep, ANSYS iterates until the F L2 value is below the F CRIT value. Once this occurs, it is deemed the
solution is within tolerance of the correct solution and it moves on to the next substep. Generally, when the curves peak this
is the start of a new substep. As can be seen in the graph above, a peak follow everytime the L2 value drops below the CRIT
value, as expected.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Buckling
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple buckling problem.
NonLinear Materials
It is recommended that you complete the NonLinear Tutorial prior to beginning this tutorial
Dynamic - Modal
Dynamic - Harmonic
Buckling loads are critical loads where certain types of structures become unstable. Each load has an associated buckled mode shape; this
is the shape that the structure assumes in a buckled condition. There are two primary means to perform a buckling analysis:
Dynamic - Transient
1. Eigenvalue
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Eigenvalue buckling analysis predicts the theoretical buckling strength of an ideal elastic structure. It computes the structural
eigenvalues for the given system loading and constraints. This is known as classical Euler buckling analysis. Buckling loads for
several configurations are readily available from tabulated solutions. However, in real-life, structural imperfections and
nonlinearities prevent most real-world structures from reaching their eigenvalue predicted buckling strength; ie. it over-predicts the
expected buckling loads. This method is not recommended for accurate, real-world buckling prediction analysis.
2. Nonlinear
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
Nonlinear buckling analysis is more accurate than eigenvalue analysis because it employs non-linear, large-deflection, static
analysis to predict buckling loads. Its mode of operation is very simple: it gradually increases the applied load until a load level is
found whereby the structure becomes unstable (ie. suddenly a very small increase in the load will cause very large deflections). The
true non-linear nature of this analysis thus permits the modeling of geometric imperfections, load perterbations, material
nonlinearities and gaps. For this type of analysis, note that small off-axis loads are necessary to initiate the desired buckling mode.
ANSYS Inc.
Copyright 2001
University of Alberta
This tutorial will use a steel beam with a 10 mm X 10 mm cross section, rigidly constrained at the bottom. The required load to cause
buckling, applied at the top-center of the beam, will be calculated.
Preprocessor > Modeling > Create > Keypoints > In Active CS ...
K,#,X,Y
We are going to define 2 Keypoints for this beam as given in the following table:
Keypoints Coordinates (x,y)
1
(0,0)
(0,100)
4. Create Lines
Preprocessor > Modeling > Create > Lines > Lines > In Active Coord
L,1,2
Create a line joining Keypoints 1 and 2
5. Define the Type of Element
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation
along the X and Y axes, and rotation about the Z axis).
6. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 100
ii. Area moment of inertia IZZ: 833.333
iii. Total Beam Height HEIGHT: 10
This defines a beam with a height of 10 mm and a width of 10 mm.
7. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200000
ii. Poisson's Ratio PRXY: 0.3
You must first ensure that you are looking at the unabridged solution menu so that you can select Analysis Options in the
Analysis Type submenu. The last option in the solution menu will either be 'Unabridged menu' (which means you are
currently looking at the abridged version) or 'Abriged Menu' (which means you are looking at the unabridged menu). If you
are looking at the abridged menu, select the unabridged version.
Select Solution > Analysis Type > Analysis Options
In the following window, change the [SSTIF][PSTRES] item to 'Prestress ON', which ensures the stress stiffness matrix is
calculated. This is required in eigenvalue buckling analysis.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Keypoints
Fix Keypoint 1 (ie all DOF constrained).
4. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
The eignenvalue solver uses a unit force to determine the necessary buckling load. Applying a load other than 1 will scale
the answer by a factor of the load.
Apply a vertical (FY) point load of -1 N to the top of the beam (keypoint 2).
The applied loads and constraints should now appear as shown in the figure below.
Complete the window which appears, as shown below. Select 'Block Lanczos' as an extraction method and extract 1 mode.
The 'Block Lanczos' method is used for large symmetric eigenvalue problems and uses the sparse matrix solver. The
'Subspace' method could also be used, however it tends to converge slower as it is a more robust solver. In more complex
analyses the Block Lanczos method may not be adequate and the Subspace method would have to be used.
Select Solution > Analysis Type > Expansion Pass... and ensure that it is on. You may have to select the 'Unabridged
Menu' again to make this option visible.
Select Solution > Load Step Opts > ExpansionPass > Single Expand > Expand Modes ...
Select General Postproc > Read Results > Last Set to bring up the data for the last mode calculated.
We are going to define 2 keypoints (the beam vertices) for this structure to create a beam with a length of 100 millimeters:
Keypoint Coordinates (x,y)
1
(0,0)
(0,100)
4. Define Lines
Preprocessor > Modeling > Create > Lines > Lines > Straight Line
Create a line between Keypoint 1 and Keypoint 2.
L,1,2
5. Define Element Types
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation
along the X and Y axis's, and rotation about the Z axis). With only 3 degrees of freedom, the BEAM3 element can only be
used in 2D analysis.
6. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 100
ii. Area Moment of Inertia IZZ: 833.333
iii. Total beam height HEIGHT: 10
This defines an element with a solid rectangular cross section 10 x 10 millimeters.
7. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200e3
ii. Poisson's Ratio PRXY: 0.3
8. Define Mesh Size
Preprocessor > Meshing > Size Cntrls > Lines > All Lines...
For this example we will specify an element edge length of 1 mm (100 element divisions along the line).
ESIZE,1
9. Mesh the frame
Preprocessor > Meshing > Mesh > Lines > click 'Pick All'
LMESH,ALL
Ensure the following selections are made under the 'Basic' tab (as shown above)
A. Ensure Large Static Displacements are permitted (this will include the effects of large deflection in the results)
B. Ensure Automatic time stepping is on. Automatic time stepping allows ANSYS to determine appropriate sizes to
break the load steps into. Decreasing the step size usually ensures better accuracy, however, this takes time. The
Automatic Time Step feature will determine an appropriate balance. This feature also activates the ANSYS bisection
feature which will allow recovery if convergence fails.
C. Enter 20 as the number of substeps. This will set the initial substep to 1/20 th of the total load.
D. Enter a maximum number of substeps of 1000. This stops the program if the solution does not converge after 1000
steps.
E. Enter a minimum number of substeps of 1.
F. Ensure all solution items are writen to a results file.
Ensure the following selection is made under the 'Nonlinear' tab (as shown below)
A. Ensure Line Search is 'On'. This option is used to help the Newton-Raphson solver converge.
B. Ensure Maximum Number of Iterations is set to 1000
NOTE
There are several options which have not been changed from their default values. For more information about these
commands, type help followed by the command into the command line.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Keypoints
Fix Keypoint 1 (ie all DOFs constrained).
4. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
Place a -50,000 N load in the FY direction on the top of the beam (Keypoint 2). Also apply a -250 N load in the FX
direction on Keypoint 2. This horizontal load will persuade the beam to buckle at the minimum buckling load.
The model should now look like the window shown below.
To view the element in 2D rather than a line: Utility Menu > PlotCtrls > Style > Size and Shape and turn 'Display of
element' ON (as shown below).
General Postproc > Plot Results > Deformed Shape... > Def + undeformed
PLDISP,1
Select: Main Menu > TimeHist Postpro. The following window should open automatically.
If it does not open automatically, select Main Menu > TimeHist Postpro > Variable Viewer
Double-click Nodal Solution > DOF Solution > Y-Component of displacement (as shown below) and click OK. Pick the
uppermost node on the beam and click OK in the 'Node for Data' window.
To add another variable, click the add button again. This time select Reaction Forces > Structural Forces > YComponent of Force. Pick the lowermost node on the beam and click OK.
On the Time History Variable window, click the circle in the 'X-Axis' column for FY_3. This will make the reaction force
the x-variable. The Time History Variables window should now look like this:
The labels on the plot are not updated by ANSYS, so you must change them manually. Select Utility Menu > Plot Ctrls >
Style > Graphs > Modify Axes and re-label the X and Y-axis appropriately.
The plot shows how the beam became unstable and buckled with a load of approximately 40,000 N, the point where a large
deflection occured due to a small increase in force. This is slightly less than the eigen-value solution of 41,123 N, which
was expected due to non-linear geometry issues discussed above.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
NonLinear Materials
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Dynamic - Modal
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to include material nonlinearities in an ANSYS model. For
instance, the case when a large force is applied resulting in a stresses greater than yield strength. In such a case, a multilinear stress-strain relationship can
be included which follows the stress-strain curve of the material being used. This will allow ANSYS to more accurately model the plastic deformation of
the material.
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
For this analysis, a simple tension speciment 100 mm X 5 mm X 5 mm is constrained at the bottom and has a load pulling on the top. This specimen is
made out of a experimental substance called "WhoKilledKenium". The stress-strain curve for the substance is shown above. Note the linear section up to
approximately 225 MPa where the Young's Modulus is constant (75 GPa). The material then begins to yield and the relationship becomes plastic and
nonlinear.
ANSYS Inc.
Copyright 2001
University of Alberta
(0,0)
(0,100)
3. Define Lines
Preprocessor > Modeling > Create > Lines > Lines > Straight Line
Create a line between Keypoint 1 and Keypoint 2.
L,1,2
4. Define Element Types
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the LINK1 (2D spar) element. This element has 2 degrees of freedom (translation along the X and Y axis's)
and can only be used in 2D analysis.
5. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for LINK1' window, enter the following geometric properties:
i. Cross-sectional area AREA: 25
ii. Initial Strain: 0
This defines an element with a solid rectangular cross section 5 x 5 millimeters.
6. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
Fill in the STRAIN and STRESS boxes with the following data. These are points from the stress-strain curve shown above,
approximating the curve with linear interpolation between the points. When the data for the first point is input, click Add Point to
add another. When all the points have been inputed, click Graph to see the curve. It should look like the one shown above. Then
click OK.
Curve Points Strain Stress
1
0.001
75
0.002
150
0.003
225
0.004
240
0.005
250
0.025
300
0.060
355
0.100
390
10
0.150
420
11
0.200
435
12
0.250
449
13
0.275
450
To get the problem geometry back, select Utility Menu > Plot > Replot.
/REPLOT
7. Define Mesh Size
Preprocessor > Meshing > Manual Size > Size Cntrls > Lines > All Lines...
For this example we will specify an element edge length of 5 mm (20 element divisions along the line).
8. Mesh the frame
Preprocessor > Meshing > Mesh > Lines > click 'Pick All'
LMESH,ALL
Ensure the following selections are made under the 'Basic' tab (as shown above)
A. Ensure Large Static Displacements are permitted (this will include the effects of large deflection in the results)
B. Ensure Automatic time stepping is on. Automatic time stepping allows ANSYS to determine appropriate sizes to break the load steps
into. Decreasing the step size usually ensures better accuracy, however, this takes time. The Automatic Time Step feature will
determine an appropriate balance. This feature also activates the ANSYS bisection feature which will allow recovery if convergence
fails.
C. Enter 20 as the number of substeps. This will set the initial substep to 1/20 th of the total load.
D. Enter a maximum number of substeps of 1000. This stops the program if the solution does not converge after 1000 steps.
E. Enter a minimum number of substeps of 1.
F. Ensure all solution items are writen to a results file. This means rather than just recording the data for the last load step, data for
every load step is written to the database. Therefore, you can plot certain parameters over time.
Ensure the following selection is made under the 'Nonlinear' tab (as shown below)
A. Ensure Line Search is 'On'. This option is used to help the Newton-Raphson solver converge.
NOTE
There are several options which have not been changed from their default values. For more information about these commands, type help
followed by the command into the command line.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Keypoints
Fix Keypoint 1 (ie all DOFs constrained).
4. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
Place a 10,000 N load in the FY direction on the top of the beam (Keypoint 2).
5. Solve the System
Solution > Solve > Current LS
SOLVE
The following will appear on your screen for NonLinear Analyses
Select: Main Menu > TimeHist Postpro. The following window should open automatically.
If it does not open automatically, select Main Menu > TimeHist Postpro > Variable Viewer
Select Nodal Solution > DOF Solution > Y-Component of displacement (as shown below) and click OK. Pick the uppermost node on the
beam and click OK in the 'Node for Data' window.
To add another variable, click the add button again. This time select Reaction Forces > Structural Forces > Y-Component of Force. Pick
the lowermost node on the beam and click OK.
On the Time History Variable window, click the circle in the 'X-Axis' column for FY_3. This will make the reaction force the x-variable.
The Time History Variables window should now look like this:
The labels on the plot are not updated by ANSYS, so you must change them manually. Select Utility Menu > Plot Ctrls > Style > Graphs
> Modify Axes and re-label the X and Y-axis appropriately.
This plot shows how the beam deflected linearly when the force, and subsequently the stress, was low (in the linear range). However, as the
force increased, the deflection (proportional to strain) began to increase at a greater rate. This is because the stress in the beam is in the
plastic range and thus no longer relates to strain linearly. When you verify this example analytically, you will see the solutions are very
similar. The difference can be attributed to the ANSYS solver including large deflection calculations.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to do a simple modal analysis of the
cantilever beam shown below.
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
The simple cantilever beam is used in all of the Dynamic Analysis Tutorials. If you haven't created the model in ANSYS, please use the
links below. Both the command line codes and the GUI commands are shown in the respective links.
ANSYS Inc.
Copyright 2001
University of Alberta
As shown, select the Subspace method and enter 5 in the 'No. of modes to extract'
Check the box beside 'Expand mode shapes' and enter 5 in the 'No. of modes to expand'
Click 'OK'
Note that the default mode extraction method chosen is the Reduced Method. This is the fastest method as it reduces the
system matrices to only consider the Master Degrees of Freedom (see below). The Subspace Method extracts modes for all
DOF's. It is therefore more exact but, it also takes longer to compute (especially when the complex geometries).
For this problem, we will use the default options so click on OK.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Keypoints
Fix Keypoint 1 (ie all DOFs constrained).
4. Solve the System
Solution > Solve > Current LS
SOLVE
The following table compares the mode frequencies in Hz predicted by theory and ANSYS.
Mode
Theory
ANSYS
Percent Error
8.311
8.300
0.1
51.94
52.01
0.2
145.68
145.64
0.0
285.69
285.51
0.0
472.22
472.54
0.1
Note: To obtain accurate higher mode frequencies, this mesh would have to be refined even more (i.e. instead of 10
elements, we would have to model the cantilever using 15 or more elements depending upon the highest mode frequency of
interest).
2. View Mode Shapes
Select General Postproc > Plot Results > Deformed shape . Select 'Def + undef edge'
The first mode shape will now appear in the graphics window.
To view the next mode shape, select General Postproc > Read Results > Next Set . As above choose General Postproc >
Plot Results > Deformed shape . Select 'Def + undef edge'.
The first four mode shapes should look like the following:
Select Utility Menu (Menu at the top) > Plot Ctrls > Animate > Mode Shape
The following window will appear
Mode 1
Mode 2
Mode 3
Mode 4
For this option, a detailed understanding of the dynamic behavior of a structure is required. However, going this route means a smaller
Instead of specifying the Subspace method, select the Reduced method and specify 5 modes for extraction.
Note:For this example both the number of modes and frequency range was specified. ANSYS then extracts the minimum number
of modes between the two.
Select Solution > Master DOF > User Selected > Define
When prompted, select all nodes except the left most node (fixed).
The following window will appear:
The following table compares the mode frequencies in Hz predicted by theory and ANSYS (Reduced).
Mode
Theory
ANSYS
Percent Error
8.311
8.300
0.1
51.94
52.01
0.1
145.68
145.66
0.0
285.69
285.71
0.0
472.22
473.66
0.3
As you can see, the error does not change significantly. However, for more complex structures, larger errors would be expected using the
reduced method.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to explain the steps required to perform Harmonic analysis the
cantilever beam shown below.
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
We will now conduct a harmonic forced response test by applying a cyclic load (harmonic) at the end of the beam. The frequency of the
load will be varied from 1 - 100 Hz. The figure below depicts the beam with the application of the load.
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS provides 3 methods for conducting a harmonic analysis. These 3 methods are the Full , Reduced and Modal Superposition
methods.
This example demonstrates the Full method because it is simple and easy to use as compared to the other two methods. However, this
method makes use of the full stiffness and mass matrices and thus is the slower and costlier option.
As shown, select the Full Solution method, the Real + imaginary DOF printout format and do not use lumped mass approx.
Click 'OK'
The following window will appear. Use the default settings (shown below).
3. Apply Constraints
Select Solution > Define Loads > Apply > Structural > Displacement > On Nodes
The following window will appear once you select the node at x=0 (Note small changes in the window compared to the
static examples):
4. Apply Loads:
Select Solution > Define Loads > Apply > Structural > Force/Moment > On Nodes
The following window will appear. Fill it in as shown to apply a load with a real value of 100 and an imaginary value of 0
in the positive 'y' direction
Note: By specifying a real and imaginary value of the load we are providing information on magnitude and phase of the
load. In this case the magnitude of the load is 100 N and its phase is 0. Phase information is important when you have two
or more cyclic loads being applied to the structure as these loads could be in or out of phase. For harmonic analysis, all
loads applied to a structure must have the SAME FREQUENCY.
5. Set the frequency range
Select Solution > Load Step Opts > Time/Frequency > Freq and Substps...
As shown in the window below, specify a frequency range of 0 - 100Hz, 100 substeps and stepped b.c..
By doing this we will be subjecting the beam to loads at 1 Hz, 2 Hz, 3 Hz, ..... 100 Hz. We will specify a stepped boundary
condition (KBC) as this will ensure that the same amplitude (100 N) will be applyed for each of the frequencies. The
ramped option, on the other hand, would ramp up the amplitude where at 1 Hz the amplitude would be 1 N and at 100 Hz
the amplitude would be 100 N.
You should now have the following in the ANSYS Graphics window
In here we have to define variables that we want to see plotted. By default, Variable 1 is assigned either Time or Frequency. In
our case it is assigned Frequency. We want to see the displacement UY at the node at x=1, which is node #2. (To get a list of
nodes and their attributes, select Utility Menu > List > nodes).
Select TimeHist Postpro > Variable Viewer... and the following window should pop up.
Select Add (the green '+' sign in the upper left corner) from this window and the following window should appear
We are interested in the Nodal Solution > DOF Solution > Y-Component of displacement. Click OK.
Graphically select node 2 when prompted and click OK. The 'Time History Variables' window should now look as follows
In the 'Time History Variables' window click the 'List' button, 3 buttons to the left of 'Add'
The following window will appear listing the data:
In the 'Time History Variables' window click the 'Plot' button, 2 buttons to the left of 'Add'
The following graph should be plotted in the main ANSYS window.
Note that we get peaks at frequencies of approximately 8.3 and 51 Hz. This corresponds with the predicted frequencies of
8.311 and 51.94Hz.
To get a better view of the response, view the log scale of UY.
Select Utility Menu > PlotCtrls > Style > Graphs > Modify Axis
The following window will appear
As marked by an 'A' in the above window, change the Y-axis scale to 'Logarithmic'
This is the response at node 2 for the cyclic load applied at this node from 0 - 100 Hz.
For ANSYS version lower than 7.0, the 'Variable Viewer' window is not available. Use the 'Define Variables' and 'Store
Data' functions under TimeHist Postpro. See the help file for instructions.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to show the steps involved to perform a simple transient
analysis.
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
Transient dynamic analysis is a technique used to determine the dynamic response of a structure under a time-varying load.
The time frame for this type of analysis is such that inertia or damping effects of the structure are considered to be important. Cases where
such effects play a major role are under step or impulse loading conditions, for example, where there is a sharp load change in a fraction
of time.
University of Alberta
If inertia effects are negligible for the loading conditions being considered, a static analysis may be used instead.
For our case, we will impact the end of the beam with an impulse force and view the response at the location of impact.
ANSYS Inc.
Copyright 2001
University of Alberta
Since an ideal impulse force excites all modes of a structure, the response of the beam should contain all mode frequencies. However, we
cannot produce an ideal impulse force numerically. We have to apply a load over a discrete amount of time dt.
After the application of the load, we track the response of the beam at discrete time points for as long as we like (depending on what it is
that we are looking for in the response).
The size of the time step is governed by the maximum mode frequency of the structure we wish to capture. The smaller the time step, the
higher the mode frequency we will capture. The rule of thumb in ANSYS is
time_step = 1 / 20f
where f is the highest mode frequency we wish to capture. In other words, we must resolve our step size such that we will have 20
discrete points per period of the highest mode frequency.
It should be noted that a transient analysis is more involved than a static or harmonic analysis. It requires a good understanding
of the dynamic behavior of a structure. Therefore, a modal analysis of the structure should be initially performed to provide
information about the structure's dynamic behavior.
In ANSYS, transient dynamic analysis can be carried out using 3 methods.
The Full Method: This is the easiest method to use. All types of non-linearities are allowed. It is however very CPU intensive to
go this route as full system matrices are used.
The Reduced Method: This method reduces the system matrices to only consider the Master Degrees of Freedom (MDOFs).
Because of the reduced size of the matrices, the calculations are much quicker. However, this method handles only linear problems
(such as our cantilever case).
The Mode Superposition Method: This method requires a preliminary modal analysis, as factored mode shapes are summed to
calculate the structure's response. It is the quickest of the three methods, but it requires a good deal of understanding of the problem
at hand.
We will use the Reduced Method for conducting our transient analysis. Usually one need not go further than Reviewing the Reduced
Results. However, if stresses and forces are of interest than, we would have to Expand the Reduced Solution.
Select Solution > Analysis Type > New Analysis > Transient
Select Solution > Master DOFs > User Selected > Define
Select all nodes except the left most node (at x=0).
The following window will open, choose UY as the first dof in this window
For an explanation on Master DOFs, see the section on Using the Reduced Method for modal analysis.
3. Constrain the Beam
Solution Menu > Define Loads > Apply > Structural > Displacement > On nodes
Fix the left most node (constrain all DOFs).
4. Apply Loads
We will define our impulse load using Load Steps. The following time history curve shows our load steps and time steps. Note that
for the reduced method, a constant time step is required throughout the time range.
We can define each load step (load and time at the end of load segment) and save them in a file for future solution purposes. This is
highly recommended especially when we have many load steps and we wish to re-run our solution.
We can also solve for each load step after we define it. We will go ahead and save each load step in a file for later use, at the same
time solve for each load step after we are done defining it.
a. Load Step 1 - Initial Conditions
i. Define Load Step
We need to establish initial conditions (the condition at Time = 0). Since the equations for a transient dynamic
analysis are of second order, two sets of initial conditions are required; initial displacement and initial velocity.
However, both default to zero. Therefore, for this example we can skip this step.
ii. Specify Time and Time Step Options
Select Solution > Load Step Opts > Time/Frequenc > Time - Time Step ..
set a time of 0 for the end of the load step (as shown below).
set [DELTIM] to 0.001. This will specify a time step size of 0.001 seconds to be used for this load
step.
b. Load Step 2
i. Define Load Step
Select Solution > Define Loads > Apply > Structural > Force/Moment > On Nodes and select the right
most node (at x=1). Enter a force in the FY direction of value -100 N.
Select Solution > Load Step Opts > Time/Frequenc > Time - Time Step .. and set a time of 0.001 for the
end of the load step
Select Solution > Define Loads > Delete > Structural > Force/Moment > On Nodes and delete the load at
x=1.
Select Solution > Load Step Opts > Time/Frequenc > Time - Time Step .. and set a time of 1 for the end of
the load step
Select TimeHist Postpro > Variable Viewer... and the following window should pop up.
Select Add (the green '+' sign in the upper left corner) from this window and the following window should appear
We are interested in the Nodal Solution > DOF Solution > Y-Component of displacement. Click OK.
Graphically select node 2 when prompted and click OK. The 'Time History Variables' window should now look as follows
In the 'Time History Variables' window click the 'List' button, 3 buttons to the left of 'Add'
The following window will appear listing the data:
In the 'Time History Variables' window click the 'Plot' button, 2 buttons to the left of 'Add'
The following graph should be plotted in the main ANSYS window.
There are approximately 8 cycles in one second. This is the first mode of the cantilever beam and we have been able
to capture it.
We also see another response at a higher frequency. We may have captured some response at the second mode at 52
Hz of the beam.
Note that the response does not decay as it should not. We did not specify damping for our system.
Let's say we are interested in the beam's behaviour at peak responses. We should then expand a few or all solutions around one
peak (or dip). We will expand 10 solutions within the range of 0.08 and 0.11 seconds.
1. Expand the solution
Select Solution > Analysis Type > ExpansionPass... and switch it to ON in the window that pops open.
Select Solution > Load Step Opts > ExpansionPass > Single Expand > Range of Solu's
Complete the window as shown below. This will expand 10 solutions withing the range of 0.08 and 0.11 seconds
We did not specify damping in our transient analysis of the beam. We specify damping at the same time we specify our time & time steps
for each load step.
We will now re-run our transient analysis, but now we will consider damping. Here is where the use of load step files comes in handy. We
can easily change a few values in these files and re-run our whole solution from these load case files.
Open up the first load step file (Dynamic.s01) for editing Utility Menu > File > List > Other > Dynamic.s01. The file should look
like the following..
/COM,ANSYS RELEASE 5.7.1 UP20010418
14:44:02
08/20/2001
/NOPR
/TITLE, Dynamic Analysis
_LSNUM=
1
ANTYPE, 4
TRNOPT,REDU,,DAMP
BFUNIF,TEMP,_TINY
DELTIM, 1.000000000E-03
TIME, 0.00000000
TREF, 0.00000000
ALPHAD, 0.00000000
BETAD, 0.00000000
DMPRAT, 0.00000000
TINTP,R5.0, 5.000000000E-03,,,
TINTP,R5.0, -1.00000000
, 0.500000000
, -1.00000000
NCNV,
1, 0.00000000
,
0, 0.00000000
, 0.00000000
ERESX,DEFA
ACEL, 0.00000000
, 0.00000000
, 0.00000000
OMEGA, 0.00000000
, 0.00000000
, 0.00000000
,
0
DOMEGA, 0.00000000
, 0.00000000
, 0.00000000
CGLOC, 0.00000000
, 0.00000000
, 0.00000000
CGOMEGA, 0.00000000
, 0.00000000
, 0.00000000
DCGOMG, 0.00000000
, 0.00000000
, 0.00000000
D,
D,
D,
/GOPR
1,UX ,
1,UY ,
1,ROTZ,
0.00000000
0.00000000
0.00000000
,
,
,
0.00000000
0.00000000
0.00000000
Change the damping value BETAD from 0 to 0.01 in all three load step files.
We will have to re-run the job for the new load step files. Select Utility Menu > file > Clear and Start New.
Repeat the steps shown above up to the point where we select MDOFs. After selecting MDOFs, simply go to Solution > (-Solve-)
From LS files ... and in the window that opens up select files from 1 to 3 in steps of 1.
After the results have been calculated, plot up the response at node 2 in POST26. The damped response should look like the
following
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple conduction problem.
NonLinear Materials
Dynamic - Modal
The Simple Conduction Example is constrained as shown in the following figure. Thermal conductivity (k) of the material is 10 W/m*C
and the block is assumed to be infinitely long.
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
For thermal problems, constraints can be in the form of Temperature, Heat Flow, Convection, Heat Flux, Heat Generation, or
Radiation. In this example, all 4 sides of the block have fixed temperatures.
Click the Box option (shown below) and draw a box around the nodes on the top line.
Fill the window in as shown to constrain the side to a constant temperature of 500
Using the same method, constrain the remaining 3 sides to a constant value of 100
Orange triangles in the graphics window indicate the temperature contraints.
Note that due to the manner in which the boundary contitions were applied, the top corners are held at a temperature of 100. Recall
that the nodes on the top of the plate were constrained first, followed by the side and bottom constraints. The top corner nodes were
therefore first constrained at 500C, then 'overwritten' when the side constraints were applied. Decreasing the mesh size can
minimize this effect, however, one must be aware of the limitations in the results at the corners.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
NonLinear Analysis
Solution Tracking
Buckling
NonLinear Materials
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Introduction
This tutorial was created using ANSYS 7.0 to solve simple thermal examples. Analysis of a simple conduction as well a mixed conduction/
convection/insulation problem will be demonstrated.
The Mixed Convection/Conduction/Insulated Boundary Conditions Example is constrained as shown in the following figure (Note that the
section is assumed to be infinitely long):
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
3. Create geometry
Preprocessor > Modeling > Create > Areas > Rectangle > By 2 Corners > X=0, Y=0, Width=1, Height=1
BLC4,0,0,1,1
4. Define the Type of Element
Preprocessor > Element Type > Add/Edit/Delete... > click 'Add' > Select Thermal Mass Solid, Quad 4Node 55
ET,1,PLANE55
As in the conduction example, we will use PLANE55 (Thermal Solid, Quad 4node 55). This element has 4 nodes and a single DOF
(temperature) at each node. PLANE55 can only be used for 2 dimensional steady-state or transient thermal analysis.
5. Element Material Properties
Preprocessor > Material Props > Material Models > Thermal > Conductivity > Isotropic > KXX = 10
MP,KXX,1,10
This will specify a thermal conductivity of 10 W/m*C.
6. Mesh Size
Preprocessor > Meshing > Size Cntrls > ManualSize > Areas > All Areas > 0.05
AESIZE,ALL,0.05
7. Mesh
Preprocessor > Meshing > Mesh > Areas > Free > Pick All
AMESH,ALL
In this example, all 2 sides of the block have fixed temperatures, while convection occurs on the other 2 sides.
Solution > Define Loads > Apply > Thermal > Temperature > On Lines
Select the top line of the block and constrain it to a constant value of 500 C
Using the same method, constrain the left side of the block to a constant value of 100 C
Solution > Define Loads > Apply > Thermal > Convection > On Lines
Fill in the window as shown. This will specify a convection of 10 W/m2*C and an ambient temperature of 100 degrees
Celcius. Note that VALJ and VAL2J have been left blank. This is because we have uniform convection across the line.
Solution > Define Loads > Apply > Thermal > Convection > On Lines
Enter a constant Film coefficient (VALI) of 0. This will eliminate convection through the side, thereby modeling an
insulated wall. Note: you do not need to enter a Bulk (or ambient) temperature
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
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
University of Alberta
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple transient conduction problem. Special thanks to Jesse Arnold for the
analytical solution shown at the end of the tutorial.
The example is constrained as shown in the following figure. Thermal conductivity (k) of the material is 5 W/m*K and the block is
assumed to be infinitely long. Also, the density of the material is 920 kg/m^3 and the specific heat capacity (c) is 2.040 kJ/kg*K.
It is beneficial if the Thermal-Conduction tutorial is completed first to compare with this solution.
ANSYS Inc.
Copyright 2001
University of Alberta
A) Set Time at end of loadstep to 300 and Automatic time stepping to ON.
B) Set Number of substeps to 20, Max no. of substeps to 100, Min no. of substeps to 20.
C) Set the Frequency to Write every substep.
Click on the NonLinear tab at the top and fill it in as shown
Click the Box option (shown below) and draw a box around the nodes on the top line and then click OK.
Fill the window in as shown to constrain the top to a constant temperature of 500 K
Using the same method, constrain the bottom line to a constant value of 100 K
Orange triangles in the graphics window indicate the temperature contraints.
You can see how the temperature rises over the area over time. The heat flows from the higher temperature to the lower
temperature constraints as expected. Also, you can see how it reaches equilibrium when the time reaches approximately 200
seconds. Shown below are analytical and ANSYS generated temperature vs time curves for the center of the block. As can be seen,
the curves are practically identical, thus the validity of the ANSYS simulation has been proven.
Analytical Solution
Select: Main Menu > TimeHist Postpro. The following window should open automatically.
If it does not open automatically, select Main Menu > TimeHist Postpro > Variable Viewer
Select Nodal Solution > DOF Solution > Temperature (as shown below) and click OK. Pick the center node on the mesh,
node 261, and click OK in the 'Node for Data' window.
The Time History Variables window should now look like this:
The labels on the plot are not updated by ANSYS, so you must change them manually. Select Utility Menu > Plot Ctrls >
Style > Graphs > Modify Axes and re-label the X and Y-axis appropriately.
Note how this plot does not exactly match the plot shown above. This is because the solution has not completely converged.
To cause the solution to converge, one of two things can be done: decrease the mesh size or increase the number of substeps
used in the transient analysis. From experience, reducing the mesh size will do little in this case, as the mesh is adequate to
capture the response. Instead, increasing the number of substeps from say 20 to 300, will cause the solution to converge.
This will greatly increase the computational time required though, which is why only 20 substeps are used in this tutorial.
Twenty substeps gives an adequate and quick approximation of the 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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Distributed Loading
NonLinear Analysis
Solution Tracking
Buckling
Introduction
This tutorial was completed using ANSYS 7.0 This tutorial is intended to outline the steps required to create an axisymmetric model.
NonLinear Materials
Dynamic - Modal
Dynamic - Harmonic
Dynamic - Transient
Thermal-Conduction
Thermal-Mixed Bndry
Transient Heat
Axisymmetric
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
The model will be that of a closed tube made from steel. Point loads will be applied at the center of the top and bottom plate to make an
analytical verification simple to calculate. A 3/4 cross section view of the tube is shown below.
As a warning, point loads will create discontinuities in the your model near the point of application. If you chose to use these types of
loads in your own modelling, be very careful and be sure to understand the theory of how the FEA package is appling the load and the
assumption it is making. In this case, we will only be concerned about the stress distribution far from the point of application, so the
discontinuities will have a negligable effect.
ANSYS Inc.
Copyright 2001
University of Alberta
For an axisymmetric problem, ANSYS will rotate the area around the y-axis at x=0. Therefore, to create the geometry
mentioned above, we must define a U-shape.
We are going to define 3 overlapping rectangles as defined in the following table:
Rectangle X1 X2 Y1 Y2
1
20
15 20
0 100
20 95 100
Solution > Define Loads > Apply > Structural > Displacement > On Nodes > Pick All
Constrain the nodes in the y-direction (UY). This is required to constrain the model in space, otherwise it would be free to
float up or down. The location to constrain the model in the y-direction (y=50) was chosen because it is along a symmetry
plane. Therefore, these nodes won't move in the y-direction according to theory.
3. Utility Menu > Select > Entities
In the select entities window, click Sele All to reselect all nodes. It is important to always reselect all entities once you've finished
to ensure future commands are applied to the whole model and not just a few entities. Once you've clicked Sele All, click on
Cancel to close the window.
4. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
Pick the top left corner of the area and click OK. Apply a load of 100 in the FY direction.
Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
Pick the bottom left corner of the area and click OK. Apply a load of -100 in the FY direction.
The applied loads and constraints should now appear as shown in the figure below.
General Postproc > List Results > Nodal Solution > Stress > Components SCOMP
The following list should pop up.
If you take the average of the stress in the y-direction over the thickness of the tube, (0.18552 + 0.17866)/2, the stress in the
tube is 0.182 MPa, matching the analytical solution. The average is used because in the analytical case, it is assumed the
stress is evenly distributed across the thickness. This is only true when the location is far from any stress concentrators, such
as corners. Thus, to approximate the analytical solution, we must average the stress over the thickness.
4. Extra Exercise
It is educational to repeat this tutorial, but leave out the key option which enables axisymmetric modelling. The rest of the
commands remain the same. If this is done, the model is a flat, rectangular plate, with a rectangular hole in the middle. Both the
stress distribution and deformed shape change drastically, as expected due to the change in geometry. Thus, when using
axisymmetry be sure to verify the solutions you get are reasonable to ensure the model is infact axisymmetric.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Design Optimization
Substructuring
Coupled Field
p-Element
Introduction
This tutorial was created using ANSYS 5.7.1. This tutorial will introduce:
Element Death
Contact Elements
APDL
A 1000N vertical load will be applied to a catapult as shown in the figure below. The catapult is built from steel tubing with an outer
diameter of 40 mm, a wall thickness of 10, and a modulus of elasticity of 200GPa. The springs have a stiffness of 5 N/mm.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
a. Define PIPE16
With 6 degrees of freedom, the PIPE16 element can be used to create the 3D structure.
Preprocessor > Element Type > Add/Edit/Delete... > click 'Add'
Select 'Pipe', 'Elast straight 16'
Click on 'Apply' You should see 'Type 1 PIPE16' in the 'Element Types' window.
b. Define COMBIN7
COMBIN7 (Revolute Joint) will allow the catapult to rotate about nodes 1 and 2.
Select 'Combination', 'Revolute Joint 7'
Click 'Apply'.
c. Define COMBIN14
Now we will define the spring elements.
Select 'Combination', 'Spring damper 14'
Click on 'OK'
In the 'Element Types' window, there should now be three types of elements defined.
4. Define Real Constants
Real Constants must be defined for each of the 3 element types.
a. PIPE16
Preprocessor > Real Constants > Add/Edit/Delete... > click 'Add'
Select Type 1 PIPE16 and click 'OK'
Enter the following properties, then click 'OK'
OD = 40
TKWALL = 10
'Set 1' will now appear in the dialog box
b. COMBIN7 (Joint)
Five of the degrees of freedom (UX, UY, UZ, ROTX, and ROTY) can be constrained with different levels of flexibility.
These can be defined by the 3 real constants: K1 (UX, UY), K2 (UZ) and K3 (ROTX, ROTY). For this example, we will
use high values for K1 through K3 since we only expect the model to rotate about the Z axis.
Click 'Add'
Select 'Type 2 COMBIN7'. Click 'OK'.
In the 'Real Constants for COMBIN7' window, enter the following geometric properties (then click 'OK'):
X-Y transnational stiffness K1: 1e9
c. COMBIN14 (Spring)
Click 'Add'
Select 'Type 3 COMBIN14'. Click 'OK'.
Enter the following geometric properties:
Spring constant K: 5
In the 'Element Types' window, there should now be three types of elements defined.
5. Define Element Material Properties
1. Preprocessor > Material Props > Material Models
2. In the 'Define Material Model Behavior' Window, ensure that Material Model Number 1 is selected
3. Select Structural > Linear > Elastic > Isotropic
4. In the window that appears, enter the give the properties of Steel then click 'OK'.
Young's modulus EX: 200000
Poisson's Ratio PRXY: 0.33
6. Define Nodes
Preprocessor > (-Modeling-) Create > Nodes > In Active CS...
N,#,x,y,z
We are going to define 13 Nodes for this structure as given in the following table (as depicted by the circled numbers in the figure
above):
Node
Coordinates (x,y,z)
(0,0,0)
(0,0,1000)
(1000,0,1000)
(1000,0,0)
(0,1000,1000)
(0,1000,0)
(700,700,500)
(400,400,500)
(0,0,0)
10
(0,0,1000)
11
(0,0,500)
12
(0,0,1500)
13
(0,0,-500)
b. Create elements
Preprocessor > (-Modeling-) Create > Elements > (-Auto Numbered-) Thru Nodes
E, node a, node b
Create the following elements joining Nodes 'a' and Nodes 'b'.
Note: because it is difficult to graphically select the nodes you may wish to use the command line (for example, the first
entry would be: E,1,6).
Node a Node b
1
10
12
13
12
13
11
10
11
NOTE: To ensure that the correct nodes were used to make the correct element in the above table, you can list all the elements
defined in the model. To do this, select Utilities Menu > List > Elements > Nodes + Attributes.
10. Meshing
Because we have defined our model using nodes and elements, we do not need to mesh our model. If we initially defined our
model using keypoints and lines, we would have had to create elements in our model by meshing the lines. It is the elements that
ANSYS uses to solve the model.
11. Plot Elements
Utility Menu > Plot > Elements
You may also wish to turn on element numbering and turn off keypoint numbering
Utility Menu > PlotCtrls > Numbering ...
Fix Nodes 3, 4, 12, and 13. (ie - all degrees of freedom are constrained).
4. Apply Loads
Solution > (-Loads-) Apply > (-Structural-) > Force/Moment > On Nodes
The applied loads and constraints should now appear as shown in the figure below.
Note: To have the constraints and loads appear each time you select 'Replot' in ANSYS, you must change some settings under
Utility Menu > Plot Ctrls > Symbols.... In the window that appears check the box beside 'All Applied BC's' in the 'Boundary
Condition Symbol' section.
d. To view the defined parameter select Utility Menu > Parameters > Scalar Parameters...
Therefore the vertical displacement of Node 7 is 323.78 mm. This can be repeated for any of the other nodes you are
interested in.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Design Optimization
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Contact Elements
APDL
Index
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to introduce a method of solving design optimization
problems using ANSYS. This will involve creating the geometry utilizing parameters for all the variables, deciding which variables to use
as design, state and objective variables and setting the correct tolerances for the problem to obtain an accurately converged solution in a
minimal amount of time. The use of hardpoints to apply forces/constraints in the middle of lines will also be covered in this tutorial.
A beam has a force of 1000N applied as shown below. The purpose of this optimization problem is to minimize the weight of the beam
without exceeding the allowable stress. It is necessary to find the cross sectional dimensions of the beam in order to minimize the weight
of the beam. However, the width and height of the beam cannot be smaller than 10mm. The maximum stress anywhere in the beam cannot
exceed 200 MPa. The beam is to be made of steel with a modulus of elasticity of 200 GPa.
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
NOTE: None of the variables defined in ANSYS are allowed to have negative values.
3. Define Keypoints
Preprocessor > Modeling > Create > Keypoints > In Active CS...
K,#,x,y
We are going to define 2 Keypoints for this beam as given in the following table:
(0,0)
(1000,0)
4. Create Lines
Preprocessor > Modeling > Create > Lines > Lines > In Active Coord
L,1,2
Create a line joining Keypoints 1 and 2
5. Create Hard Keypoints
Hardpoints are often used when you need to apply a constraint or load at a location where a keypoint does not exist. For this case,
we want to apply a force 3/4 of the way down the beam. Since there are not any keypoints here and we can't be certain that one of
the nodes will be here we will need to specify a hardpoint
Select Preprocessor > Modeling > Create > Keypoints > Hard PT on line > Hard PT by ratio. This will allow us to
create a hardpoint on the line by defining the ratio of the location of the point to the size of the line
Enter a ratio of 0.75 in the 'Create HardPT by Ratio window which appears.
You have now created a keypoint labelled 'Keypoint 3' 3/4 of the way down the beam.
6. Define Element Types
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation
along the X and Y axes, and rotation about the Z axis).
7. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties: (Note that '**' is used instead '^' for
exponents)
i. Cross-sectional area AREA: W*H
ii. Area moment of inertia IZZ: (W*H**3)/12
The applied loads and constraints should now appear as shown in the figure below.
Select General Postproc > Element Table > Define Table... > Add...
The following window will appear. Fill it in as shown to obtain the volume of the beam.
Note that this is the volume of each element. If you were to list the element table you would get a volume for each element.
Therefore, you have to sum the element values together to obtain the total volume of the beam. Follow the instructions
below to do this.
Select General Postproc > Element Table > Sum of Each Item...
A little window will appear notifying you that the tabular sum of each element table will be calculated. Click 'OK'
You will obtain a window notifying you that the EVolume is now 400000 mm2
In the window which appears select 'Results Data' and 'Elem table sums'
the following window will appear. Select the items shown to store the Volume as a parameter.
Now if you view the parameters (Utility Menu > Parameters > Scalar Parameters...) you will see that Volume has been
added.
3. Define the maximum stress at the i node of each element in the beam
Select General Postproc > Element Table > Define Table... > Add...
The following window will appear. Fill it in as shown to obtain the maximum stress at the i node of each element and store
it as 'SMAX_I'.
Note that nmisc,1 is the maximum stress. For further information type Help beam3 into the command line
Now we will need to sort the stresses in descending order to find the maximum stress
Select General Postproc > List Results > Sorted Listing > Sort Elems
Complete the window as shown below to sort the data from 'SMAX_I' in descending order
In the window which appears select 'Results Data' and 'Other operations'
5. Define maximum stress at the j node of each element for the beam
Select General Postproc > Element Table > Define Table... > Add...
Fill this table as done previously, however make the following changes:
save the data as 'SMAX_J' (instead of 'SMAX_I')
The element table data enter NMISC,3 (instead of NMISC,1). This will give you the max stress at the j node.
Select General Postproc > List Results > Sorted Listing > Sort Elems to sort the stresses in descending order.
In the window which appears select 'Results Data' and 'Other operations'
In the that appears, fill it in as shown previously , however, name the parameter 'SMaxJ'.
Design Optimization
Now that we have parametrically set up our problem in ANSYS based on our initial width and height dimensions, we can now solve the
optimization problem.
1. Write the command file
It is necessary to write the outline of our problem to an ANSYS command file. This is so that ANSYS can iteratively run solutions
to our problem based on different values for the variables that we will define.
In the window that appears type a name for the command file such as optimize.txt
Click OK.
If you open the command file in a text editor such as Notepad, it should similar to this:
/BATCH
! /COM,ANSYS RELEASE 7.0
UP20021010
16:10:03
05/26/2003
/input,start70,ans,'C:\Program Files\Ansys Inc\v70\ANSYS\apdl\',,,,,,,,,,,,,,,,1
/title, Design Optimization
*SET,W , 20
*SET,H , 20
/PREP7
K,1,0,0,,
K,2,1000,0,,
L,
1,
2
!*
HPTCREATE,LINE,1,0,RATI,0.75,
!*
ET,1,BEAM3
!*
!*
R,1,W*H,(W*H**3)/12,H, , , ,
!*
!*
MPTEMP,,,,,,,,
MPTEMP,1,0
MPDATA,EX,1,,200000
MPDATA,PRXY,1,,.3
!*
LESIZE,ALL,100, , , ,1, , ,1,
LMESH,
1
FINISH
/SOL
!*
ANTYPE,0
FLST,2,1,3,ORDE,1
FITEM,2,1
!*
/GO
DK,P51X, , , ,0,UX,UY, , , , ,
FLST,2,1,3,ORDE,1
FITEM,2,2
!*
/GO
DK,P51X, , , ,0,UY, , , , , ,
FLST,2,1,3,ORDE,1
FITEM,2,3
!*
/GO
FK,P51X,FY,-2000
! /STATUS,SOLU
SOLVE
FINISH
/POST1
AVPRIN,0,0,
ETABLE,EVolume,VOLU,
!*
SSUM
!*
*GET,Volume,SSUM, ,ITEM,EVOLUME
AVPRIN,0,0,
ETABLE,SMax_I,NMISC, 1
!*
ESORT,ETAB,SMAX_I,0,1, ,
!*
*GET,SMaxI,SORT,,MAX
AVPRIN,0,0,
ETABLE,SMax_J,NMISC, 3
!*
ESORT,ETAB,SMAX_J,0,1, ,
!*
*GET,SMaxJ,SORT,,MAX
*SET,SMAX,SMAXI>SMAXJ
! LGWRITE,optimization,,C:\Temp\,COMMENT
Several small changes need to be made to this file prior to commencing the optimization. If you created the geometry etc. using
command line code, most of these changes will already be made. However, if you used GUI to create this file there are several
occasions where you used the graphical picking device. Therefore, the actual items that were chosen need to be entered. The code
'P51X' symbolizes the graphical selection. To modify the file simply open it using notepad and make the required changes. Save
and close the file once you have made all of the required changes. The following is a list of the changes which need to be made to
this file (which was created using the GUI method)
There are also several lines which can be removed from this file. If you are comfortable with command line coding, you should
remove the lines which you are certain are not required.
2. Assign the Command File to the Optimization
Select Main Menu > Design Opt > Analysis File > Assign
In the file list that appears, select the filename that you created when you wrote the command file.
Click OK.
3. Define Variables and Tolerances
ANSYS needs to know which variables are critical to the optimization. To define variables, we need to know which variables have
an effect on the variable to be minimized. In this example our objective is to minimize the volume of a beam which is directly
related to the weight of the beam.
ANSYS categorizes three types of variables for design optimization:
Design Variables (DVs)
Independent variables that directly effect the design objective. In this example, the width and height of the beam are the
DVs. Changing either variable has a direct effect on the solution of the problem.
State Variables (SVs)
Dependent variables that change as a result of changing the DVs. These variables are necessary to constrain the design. In
this example, the SV is the maximum stress in the beam. Without this SV, our optimization will continue until both the width and
height are zero. This would minimize the weight to zero which is not a useful result.
Objective Variable (OV)
The objective variable is the one variable in the optimization that needs to be minimized. In our problem, we will be
minimizing the volume of the beam.
NOTE: As previously stated, none of the variables defined in ANSYS are allowed to have negative values.
Now that we have decided our design variables, we need to define ranges and tolerances for each variable. For the width and
height, we will select a range of 10 to 50 mm for each. Because a small change in either the width or height has a profound effect
on the volume of the beam, we will select a tolerance of 0.01mm. Tolerances are necessary in that they tell ANSYS the largest
amount of change that a variable can experience before convergence of the problem.
For the stress variable, we will select a range of 195 to 200 MPa with a tolerance of 0.01MPa.
Because the volume variable is the objective variable, we do not need to define an allowable range. We will set the tolerance to
200mm3. This tolerance was chosen because it is significantly smaller than the initial magnitude of the volume of 400000mm3
(20mm x 20mm x 1000mm).
a. Define the Design Variables (width and height of beam)
Select Main Menu > Design Opt > Design Variables... > Add...
Complete the window as shown below to specify the variable limits and tolerances for the height of the beam.
Repeat the above steps to specify the variable limits for the width of the beam (identical to specifications for height)
Select Main Menu > Design Opt > State Variables... > Add...
The solution of an optimization problem can take awhile before convergence. This problem will take about 15 minutes and run
through 19 iterations.
Select Main Menu > Design Opt > Design Sets > Graphs / Tables...
Complete the window as shown to obtain a graph of the height and width of the beam changing with each iteration
A. For the X-variable parameter select Set number.
B. For the Y-variable parameter select H and W.
C. Ensure that 'Graph' is selected (as opposed to 'List')
Now you may wish to specify titles for the X and Y axes
Select Utility Menu > Plot Ctrls > Style > Graphs > Modify Axes...
In the window, enter Number of Iterations for the X-axis label section.
Enter Width and Height (mm) for the Y-axis label.
Click 'OK'
Select Utility Menu > PlotCtrls
In the graphics window, you will see a graph of width and height throughout the optimization. You can print the plot by selecting
Utility Menu > PlotCtrls > Hard Copy...
You can plot graphs of the other variables in the design by following the above steps. Instead of using width and height for the y-axis label
and variables, use whichever variable is necessary to plot. Alternatively, you could list the data by selecting Main Menu > Design Opt >
Design Sets > List... . In addition, all of the results data (ie stress, displacement, bending moments) are available from the General
Postproc menu.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Substructuring
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to show the how to use substructuring in ANSYS.
Substructuring is a procedure that condenses a group of finite elements into one super-element. This reduces the required computation
time and also allows the solution of very large problems.
Contact Elements
APDL
A simple example will be demonstrated to explain the steps required, however, please note that this model is not one which requires the
use of substructuring. The example involves a block of wood (E =10 GPa v =0.29) connected to a block of silicone (E = 2.5 MPa, v =
0.41) which is rigidly attached to the ground. A force will be applied to the structure as shown in the following figure. For this example,
substructuring will be used for the wood block.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
1. Generation Pass
Generate the super-element by condensing several elements together. Select the degrees of freedom to save (master DOFs) and to
discard (slave DOFs). Apply loads to the super-element
2. Use Pass
Create the full model including the super-element created in the generation pass. Apply remaining loads to the model. The solution
will consist of the reduced solution tor the super-element and the complete solution for the non-superelements.
3. Expansion Pass
Expand the reduced solution to obtain the solution at all DOFs for the super-element.
Note that a this method is a bottom-up substructuring (each super-element is created separately and then assembled in the Use Pass). Topdown substructuring is also possible in ANSYS (the entire model is built, then super-element are created by selecting the appropriate
elements). This method is suitable for smaller models and has the advantage that the results for multiple super-elements can be assembled
in postprocessing.
For this problem we will use PLANE42 (2D structural solid). This element has 4 nodes, each with 2 degrees of freedom
(translation along the X and Y axes).
5. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for wood:
i. Young's modulus EX: 10000 (MPa)
ii. Poisson's Ratio PRXY: 0.29
6. Define Mesh Size
Preprocessor > Meshing > Size Cntrls > Manual Size > Areas > All Areas ...
For this example we will use an element edge length of 10mm.
7. Mesh the block
Preprocessor > Meshing > Mesh > Areas > Free > click 'Pick All'
AMESH,1
The following window will appear. Ensure that the options are filled in as shown.
Sename (the name of the super-element matrix file) will default to the jobname.
In this case, the stiffness matrix is to be generated.
With the option SEPR, the stiffness matrix or load matrix can be printed to the output window if desired.
Select Solution > Master DOFs > User Selected > Define
In the window that appears, set the 1st degree of freedom to All DOF
4. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Nodes
Place a load of 5N in the x direction on the top left hand node
The model should now appear as shown in the figure below.
Select Utility Menu > Parameters > Get Scalar Data ...
The following window will appear. Select Model Data, For Selected set as shown.
Fill in the following window as shown to set MaxNode = the highest node number
Determine the element number of the super-element (Select Utility Menu > PlotCtrls > Numbering...)
You should find that the super-element is element 41
Select Solution > Define Loads > Apply > Load Vector > For Super-element
The following window will appear. Fill it in as shown to apply the super-element load vector.
Note that only the deformation for the non-superelements is plotted. This results agree with what was found without using
substructuring (see figure below).
Enter the Solution mode by selecting Main Menu > Solution or by typing /SOLU into the command line.
Type 'EXPASS,ON' into the command line to initiate the expansion pass.
Select Solution > Load STEP OPTS > ExpansionPass > Single Expand >Expand Superelem ...
The following window will appear. Fill it in as shown to select the super-element.
Select Solution > Load Step Opts > ExpansionPass > Single Expand > By Load Step...
The following window will appear. Fill it in as shown to expand the solution.
Note that only the deformation for the super-elements is plotted (and that the contour intervals have been modified to begin at 0).
This results agree with what was found without using substructuring (see figure below).
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Contact Elements
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to outline a simple coupled thermal/structural analysis. A
steel link, with no internal stresses, is pinned between two solid structures at a reference temperature of 0 C (273 K). One of the solid
structures is heated to a temperature of 75 C (348 K). As heat is transferred from the solid structure into the link, the link will attemp to
expand. However, since it is pinned this cannot occur and as such, stress is created in the link. A steady-state solution of the resulting
stress will be found to simplify the analysis.
APDL
Loads will not be applied to the link, only a temperature change of 75 degrees Celsius. The link is steel with a modulus of elasticity of 200
GPa, a thermal conductivity of 60.5 W/m*K and a thermal expansion coefficient of 12e-6 /K.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
procedures associated with a particular engineering discipline [will be referred to as] a physics analysis. When the input of one physics
analysis depends on the results from another analysis, the analyses are coupled."
Thus, each different physics environment must be constructed seperately so they can be used to determine the coupled physics solution.
However, it is important to note that a single set of nodes will exist for the entire model. By creating the geometry in the first physical
environment, and using it with any following coupled environments, the geometry is kept constant. For our case, we will create the
geometry in the Thermal Environment, where the thermal effects will be applied.
Although the geometry must remain constant, the element types can change. For instance, thermal elements are required for a thermal
analysis while structural elements are required to deterime the stress in the link. It is important to note, however that only certain
combinations of elements can be used for a coupled physics analysis. For a listing, see Chapter 2 of the ANSYS Coupled-Field Guide
located in the help file.
The process requires the user to create all the necessary environments, which are basically the preprocessing portions for each
environment, and write them to memory. Then in the solution phase they can be combined to solve the coupled analysis.
Thermal Environment - Create Geometry and Define Thermal Properties
1. Give example a Title
Utility Menu > File > Change Title ...
/title, Thermal Stress Example
2. Open preprocessor menu
ANSYS Main Menu > Preprocessor
/PREP7
3. Define Keypoints
Preprocessor > Modeling > Create > Keypoints > In Active CS...
K,#,x,y,z
We are going to define 2 keypoints for this link as given in the following table:
Keypoint Coordinates (x,y,z)
1
(0,0)
(1,0)
4. Create Lines
Preprocessor > Modeling > Create > Lines > Lines > In Active Coord
L,1,2
Preprocessor > Material Props > Material Models > Structural > Thermal Expansion Coef > Isotropic
i. ALPX: 12e-6
3. Write Environment
The structural environment is now fully described.
Preprocessor > Physics > Environment > Write
In the window that appears, enter the TITLE Struct
If the Physics option is not available under Solution, click Unabridged Menu at the bottom of the Solution menu. This should
make it visible.
3. Apply Constraints
Solution > Define Loads > Apply > Thermal > Temperature > On Keypoints
Set the temperature of Keypoint 1, the left-most point, to 348 Kelvin.
4. Solve the System
Solution > Solve > Current LS
SOLVE
5. Close the Solution Menu
Main Menu > Finish
It is very important to click Finish as it closes that environment and allows a new one to be opened without contamination.
If this is not done, you will get error messages.
The thermal solution has now been obtained. If you plot the steady-state temperature on the link, you will see it is a uniform 348 K,
as expected. This information is saved in a file labelled Jobname.rth, were .rth is the thermal results file. Since the jobname
wasn't changed at the beginning of the analysis, this data can be found as file.rth. We will use these results in determing the
structural effects.
6. Read in the Structural Environment
Solution > Physics > Environment > Read
Choose struct and click OK.
7. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Keypoints
Fix Keypoint 1 for all DOF's and Keypoint 2 in the UX direction.
8. Include Thermal Effects
Solution > Define Loads > Apply > Structural > Temperature > From Therm Analy
As shown below, enter the file name File.rth. This couples the results from the solution of the thermal environment to
the information prescribed in the structural environment and uses it during the analysis.
As shown, the stress in the link should be a uniform 180 MPa in compression.
2. Get Stress Data
Since the element is only a line, the stress can't be listed in the normal way. Instead, an element table must be created first.
General Postproc > Element Table > Define Table > Add
Fill in the window as shown below. [CompStr > By Sequence Num > LS > LS,1
ETABLE,CompStress,LS,1
General Postproc > Element Table > List Elem Table > COMPSTR > OK
PRETAB,CompStr
The following list should appear. Note the stress in each element: -0.180e9 Pa, or 180 MPa in compression as expected.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Using P-Elements
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Contact Elements
APDL
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
Introduction
This tutorial was completed using ANSYS 7.0. This tutorial outlines the steps necessary for solving a model meshed with p-elements. The
p-method manipulates the polynomial level (p-level) of the finite element shape functions which are used to approximate the real solution.
Thus, rather than increasing mesh density, the p-level can be increased to give a similar result. By keeping mesh density rather coarse,
computational time can be kept to a minimum. This is the greatest advantage of using p-elements over h-elements.
A uniform load will be applied to the right hand side of the geometry shown below. The specimen was modeled as steel with a modulus of
elasticity of 200 GPa.
(0,0)
(0,100)
(20,100)
(45,52)
(55,52)
(80,100)
(100,100)
(100,0)
(80,0)
10
(55,48)
11
(45,48)
12
(20,0)
5. Create Area
Preprocessor > Modeling > Create > Areas > Arbitrary > Through KPs
A,1,2,3,4,5,6,7,8,9,10,11,12
Click each of the keypoints in numerical order to create the area shown below.
For this problem we will use the PLANE145 (p-Elements 2D Quad) element. This element has eight nodes with 2 degrees
of freedom each (translation along the X and Y axes). It can support a polynomial with maximum order of eight.
After clicking OK to select the element, click Options... to open the keyoptions window, shown below. Choose Plane
stress + TK for Analysis Type.
Keyopts 1 and 2 can be used to set the starting and maximum p-level for this element type. For now we will leave them as
default.
Other types of p-elements exist in the ANSYS library. These include Solid127 and Solid128 which have electrostatic
DOF's, and Plane145, Plane146, Solid147, Solid148 and Shell150 which have structural DOF's. For more information on
these elements, go to the Element Library in the help file.
7. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for PLANE145' window, enter the following geometric properties:
i. Thickness THK: 10
This defines an element with a thickness of 10 mm.
8. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200000
3. Plot p-Levels
General Postproc > Plot Results > p-Method > p-Levels
The following distribution should appear.
Note how the order of the polynomial increased in the area with the greatest range in stress. This allowed the elements to
more accurately model the stress distribution through that area. For more complex geometries, these orders may go as high
as 8. As a comparison, a plot of the stress distribution for a normal h-element (PLANE2) model using the same mesh, and
one with a mesh 5 times finer are shown below.
As one can see from the two plots, the mesh density had to be increased by 5 times to get the accuracy that the p-elements
delivered. This is the benefit of using p-elements. You can use a mesh that is relatively coarse, thus computational time will
be low, and still get reasonable results. However, care should be taken using p-elements as they can sometimes give poor
results or take a long time to converge.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to outline the steps required to use element death to model
melting of a material. Element death is the "turning off" of elements according to some desired criterion. The elements are still technically
there, they just have zero stiffness and thus have no affect on the model.
Contact Elements
APDL
This tutorial doesn't take into account heat of fusion or changes in thermal properties over temperature ranges, rather it is concerned with
the element death procedure. More accurate models using element death can then be created as required. Element birth is also possible, but
will not be discussed here. For further information, see Chapter 10 of the Advanced Guide in the ANSYS help file regarding element birth
and death.
Index
The model will be an infinitely long rectangular block of material 3cm X 3cm as shown below. It will be subject to convection heating
which will cause the block to "melt".
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANTYPE,4
2. Turn on Newton-Raphson solver
Due to a glitch in the ANSYS software, there is no apparent way to do this with the graphical user interface. Therefore, you
must type NROPT,FULL into the commmand line. This step is necessary as element killing can only be done when the NR solver has been used.
3. Set Solution Controls
Solution > Analysis Type > Sol'n Controls
The following window will pop up.
From the General Postprocessor menu select Element Table > Define Table...
Click on 'Add...'
Fill the window in as shown below, with a title Melty and select DOF solution > Temperature TEMP and click OK.
We can now select elements from this table in the temperature range we desire.
3. Select Elements to Kill
Assume that the melting temperature is 273 K, thus any element with a temperature of 273 or greater must be killed to simulate
melting.
Utility Menu > Select > Entities
Use the scroll down menus to select Elements > By Results > From Full and click OK.
Ensure the element table Melty is selected and enter a VMIN value of 273 as shown.
With the window still open, select Elements > Live Elem's > From Full and click OK.
2. View Results
General Postproc > Plot Results > Contour Plot > Nodal Solu > DOF solution > Temperature TEMP
The final melted shape should look as follows:
This procedure can be programmed in a loop, using command line code, to more accurately model element death over time. Rather
than running the analysis for a time of 60 and killing any elements above melting temperature at the end, a check can be done after
each substep to see if any elements are above the specified temperature and be killed at that point. That way, the prescribed
convection can then act on the elements below those killed, more accurately modelling the heating process.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Contact Elements
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Contact Elements
APDL
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to utilize contact elements to simulate how
two beams react when they come into contact with each other.
The beams, as shown below, are 100mm long, 10mm x 10mm in cross-section, have a Young's modulus of 200 GPa, and are rigidly
constrained at the outer ends. A 10KN load is applied to the center of the upper, causing it to bend and contact the lower.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
/PREP7
3. Define Areas
Preprocessor > Modeling > Create > Area > Rectangle > By 2 Corners
BLC4,WP X, WP Y, Width, Height
We are going to define 2 rectangles as described in the following table:
Rectangle Variables (WP X,WP Y,Width,Height)
1
While the Element Types window is still open, click Options.... Change Element behavior K3 to Plane strs w/
thk as shown below. This allows a thickness to be input for the elements.
In the 'Real Constants for PLANE42' window, enter the following geometric properties:
i. Thickness THK: 10
This defines a beam with a thickness of 10 mm.
6. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200000
ii. Poisson's Ratio PRXY: 0.3
7. Define Mesh Size
Preprocessor > Meshing > Size Cntrls > ManualSize > Areas > All Lines...
For this example we will use an element edge length of 2mm.
8. Mesh the frame
Preprocessor > Meshing > Mesh > Areas > Free > click 'Pick All'
9. Define the Type of Contact Element
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the CONTAC48 (Contact, pt-to-surf 48) element. CONTAC48 may be used to represent
contact and sliding between two surfaces (or between a node and a surface) in 2-D. The element has two degrees of freedom
at each node: translations in the nodal x and y directions. Contact occurs when the contact node penetrates the target line.
While the Element Types window is still open, click Options.... Change Contact time/load prediction K7 to
Reasonabl T/L inc. This is an important step. It initiates a process during the solution calculations where the time
step or load step, depending on what the user has specified in the solution controls, incremements slowly when contact is
immenent. This way, one surface won't penetrate too far into the other and cause the solution to fail.
It is important to note, CONTAC48 elements are created in the space between two surfaces prescribed by the user. This will be
covered below. As the surfaces approach each other, the contact element is slowly "crushed" until it's upper node(s) lie along the
same line as the lower node(s). Thus, ANSYS can calculate when the two prescribed surfaces have made contact. Other contact
elements, such as CONTA175, require a target element, such as TARGE169, to function. When using contact elements in your
own analyses, be sure to understand how the elements work. The ANSYS help file has plenty of useful information regarding
contact elements and is worth reading.
10. Define Real Constants for the Contact Elements
Preprocessor > Real Constants... > Add...
In the 'Real Constants for CONTAC48' window, enter the following properties:
i. Normal contact stiffness KN: 200000
CONTAC48 elements basically use a penalty approach to model contact. When one surface comes into "contact"
with the other, ANSYS numerically puts a spring of stiffness KN between the two. ANSYS recommends a value
between 0.01 and 100 times Young's modulus for the material. Since this "spring" is so stiff, the behaviour of the
model is like the two surfaces have made contact. This KN value can greatly affect your solution, so be sure to read
the help file on contact so you can recognize when your solution is not converging and why. A good rule of thumb is
to start with a low value of KN and see how the solution converges (start watching the ANSYS Output Window). If
there is too much penetration, you should increase KN. If it takes a lot of iterations to converge for a single substep,
you should decrease KN.
ii. Target length tolerance TOLS: 10
Real constant TOLS is used to add a small tolerance that will internally increase the length of the target. This is
useful for problems when node to node contact is likely to occur, rather than node to element edge. In this situation,
the contact node may repeatedly "slip" off one of the target nodes, resulting in convergence difficulties. A small
value of TOLS, given in %, is usually enough to prevent such difficulties.
The other real constants can be used to model sliding friction, tolerances, etc. Information about these other constants can be
found in the help file.
11. Define Nodes for Creating Contact Elements
Unlike the normal meshing sequence used for most elements, contact elements must be defined in a slightly different
manner. Sets of nodes that are likely to come into contact must be defined and used to generate the necessary elements.
ANSYS has many recommendations about which nodes to select and whether they should act as target nodes or source
nodes. In this simple case, source nodes are those that will move into contact with the other surface, where as target nodes
are those that are contacted. These terms are important when using the automatic contact element mesher to ensure the
elements will correctly model contact between the surfaces. A strong understanding of how the elements work is important
when using contact elements for your own analysis.
First, the source nodes will be selected.
Select Nodes and By Location from the pull down menus, Y coordinates and Reselect from the radio buttons and
enter a value of 15 and click OK. This will select all nodes along the bottom of the upper beam.
Now if you list the selected nodes, Utility Menu > List > Nodes... you should only have the following nodes
remaining.
It is important to try and limit the number of nodes you use to create contact elements. If you have a lot of contact
elements, it takes a great deal of computational time to reach a solution. In this case, the only nodes that could make
contact with the lower beam are those directly above it, thus those are the only nodes we will use to create the
contact elements.
When creating the component this time, enter the name Target.
IMPORTANT: Be sure to reselect all the nodes before continuing. This is done by opening the entity select menu, Utility
Menu > Select > Entities..., clicking the Also Select radio button, and click the Sele All button.
12. Generate Contact Elements
Main Menu > Preprocessor > Modeling > Create > Elements > Elem Attributes
Fill the window in as shown below. This ensures ANSYS knows that you are dealing with the contact elements and the
associated real constants.
Main Menu > Preprocessor > Modeling> Create > Elements > Surf / Contact > Node to Surf
The following window will pop up. Select the node set SOURCE from the first drop down menu (Ccomp) and TARGET
from the second drop down menu (Tcomp). The rest of the selections remain unchanged.
Unfortunately, the contact elements don't get plotted on the screen so it is sometimes difficult to tell they are there. If you wish, you
can plot the elements (Utility Menu > Plot > Elements) and turn on element numbering (Utility Menu > PlotCtrls > Numbering >
Elem/Attrib numbering > Element Type Numbers). If you zoom in on the contact areas, you can see little purple stars (Contact
Nodes) and thin purple lines (Target Elements) numbered "2" which correspond to the contact elements, shown below.
Ensure the following selections are made under the 'Basic' tab (as shown above)
A. Ensure Automatic time stepping is on. Automatic time stepping allows ANSYS to determine appropriate sizes to
break the load steps into. Decreasing the step size usually ensures better accuracy, however, this takes time. The
Automatic Time Step feature will determine an appropriate balance. This feature also activates the ANSYS bisection
feature which will allow recovery if convergence fails.
B. Enter 100 as the number of substeps. This will set the initial substep to 1/100 th of the total load.
C. Enter a maximum number of substeps of 1000. This stops the program if the solution does not converge after 1000
steps.
D. Enter a minimum number of substeps of 20.
E. Ensure all solution items are writen to a results file.
Ensure the following selection is made under the 'Nonlinear' tab (as shown below)
A. Ensure Maximum Number of Iterations is set to 100
NOTE
There are several options which have not been changed from their default values. For more information about these
commands, type help followed by the command into the command line.
These solution control values are extremely important in determining if your analysis will succeed or fail. If you have too few
substeps, the contact nodes may be driven through the target elements before ANSYS "realizes" it has happened. In this case the
solution will resemble that of an analysis that didn't have contact elements defined at all. Therefore it is important to choose a
relatively large number of substeps initially to ensure the model is defined properly. Once everything is working, you can reduce
the number of substeps to optimize the computational time. Also, if the maximum number of substeps or iterations is left too low,
ANSYS may stop the analysis before it has a chance to converge to a solution. Again, leave these relatively high at first.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Lines
Fix the left end of the upper beam and the right end of the lower beam (ie all DOF constrained)
4. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Nodes
Apply a load of -10000 in the FY direction to the center of the top surface of the upper beam. Note, this is a point load on a
2D surface. This type of loading should be avoided since it will cause a singularity. However, the displacement or stress
near the load is not of interest in this analyis, thus we will use a point load for simplicity.
The applied loads and constraints should now appear as shown in the figure below.
As seen in the figure, the load on the upper beam caused it to deflect and come in contact with the lower beam, producing a
stress distribution in both.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Design Optimization
Substructuring
Coupled Field
p-Element
Element Death
Contact Elements
APDL
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to familiarize the user with the ANSYS Parametric Design
Language (APDL). This will be a very basic introduction to APDL, covering things like variable definition and simple looping. Users
familiar with basic programming languages will probably find the APDL very easy to use. To learn more about APDL and see more
complex examples, please see the APDL Programmer's Guide located in the help file.
This tutorial will cover the preprocessing stage of constructing a truss geometry. Variables including length, height and number of
divisions of the truss will be requested and the APDL code will construct the geometry.
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Shown below is the APDL code used to construct the truss shown above, using a length of 200 m, a height of 10 m and 20 divisions. The
following discussion will attempt to explain the commands used in the code. It is assumed the user has been exposed to basic coding and
can follow the logic.
finish
/clear
Copyright 2001
University of Alberta
/prep7
*ask,LENGTH,How long is the truss,100
*ask,HEIGHT,How tall is the truss,20
*ask,DIVISION,How many cross supports even number,2
DELTA_L
NUM_K =
COUNT =
X_COORD
= (LENGTH/(DIVISION/2))/2
DIVISION + 1
-1
= 0
*do,i,1,NUM_K,1
COUNT = COUNT + 1
OSCILATE = (-1)**COUNT
X_COORD = X_COORD + DELTA_L
*if,OSCILATE,GT,0,THEN
k,i,X_COORD,0
*else
k,i,X_COORD,HEIGHT
*endif
*enddo
KEYP = 0
*do,j,1,DIVISION,1
KEYP = KEYP + 1
L,KEYP,(KEYP+1)
*if,KEYP,LE,(DIVISION-1),THEN
L,KEYP,(KEYP+2)
*endif
*enddo
et,1,link1
r,1,100
mp,ex,1,200000
mp,prxy,1,0.3
esize,,1
lmesh,all
finish
1. *ASK Command
The *ASK command prompts the user to input data for a variable. In this case, *ask,LENGTH,How long is the
truss,100 prompts the user for a value describing the length of the truss. This value is stored under the variable
LENGTH. Thus in later parts of the code, LENGTH can be used in other commands rather than typing in 200 m. The 100
value at the end of the string is the default value if the user were to enter no value and just hit the enter key.
2. Variable Definition Using the "=" Command
ANSYS allows the user to define a variable in a few ways. As seen above, the *ASK command can be used define a
variable, but this is usually only used for data that will change from run to run. The *SET command can also be used to
define variables. For more information on this command, see the help file. However, the most intutitive method is to use
"=". It is used in the following manner: 'the variable you wish to define' = 'some arguement'. This argument can be a single
value, or a mathematical expression, as seen in the line defining DELTA_L
3. *DO Loops
Do-loops are useful when you want to repeat a command a known number of times. The syntax for the expression is *DO,
Par, IVAL, FVAL, INC, where Par is the parameter that will be incremented by the loop, IVAL is the initial value the
parameter starts as, FVAL is the final value the parameter will reach, and INC is the increment value that the parameter will
be increased by during each iteration of the loop. For example, *do,i,1,10_K,1 is a do-loop which increases the
parameter "i" from 1 to 10 in steps of 1, (ie 1,2,3...8,9,10). It is necessary to use a *ENDDO command at the end of the loop
to locate where ANSYS should look for the next command once the loop has finished. In between the *DO and *ENDDO,
the user can place code that will utilize the repetative characteristics of the loop.
4. *IF Statement
If-statements can be used as decision makers, determining if a certain case has occured. For example, in the code above
there is a statement: *if,OSCILATE,GT,0,THEN. This translates to "if the variable, OSCILATE, is greater than zero,
then...". Any code directly following the *if command will be carried out if the statement is true. If it is not true it will skip
to the *else command. This command is only used in conjunction with the *if command. Any code directly following the
*else command will be carried out when the original statement is false. An *endif command is necessary after all code in
the *if and *else sections to define an ending.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
X-Sectional Results
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Index
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to view cross sectional results
(Deformation, Stress, etc.) of the following example.
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
3. Create Block
Preprocessor > Modeling > Create > Volumes > Block > By 2 Corners & Z
BLC4,0,0,Width,Height,Length
Where:
Width:
40mm
Height:
60mm
Length:
400mm
ANTYPE,0
2. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement > On Areas
Fix the left hand side (should be labeled Area 1).
3. Apply Loads
Solution > Define Loads > Apply > Structural > Force/Moment > On Keypoints
Apply a load of 2500N downward on the back right hand keypoint (Keypoint #7).
4. Solve the System
Solution > (-Solve-) Current LS
SOLVE
Type
Description
SECT
or (1)
Section display. Only the selected section is shown without any remaining
faces or edges shown
Visual Representation
CAP
or (5)
Capped hidden diplay. This is as though you have cut off a portion of the
model and the remaining model can be seen
ZQSL
or (8)
QSLICE Z-buffered display. This is the same as SECT but the outline of
the entire model is shown.
1. Deflection
Before we begin selecting cross sections, let's view deflection of the entire model.
Select: General Postproc > Plot Results > Contour Plot > Nodal Solu
From this one may wish to view several cross sections through the YZ plane.
To illustrate how to take a cross section, let's take one halfway through the beam in the YZ plane
First, offset the working plane to the desired position, halfway through the beam
Select: Utility Menu > WorkPlane > Offset WP by Increments
In the window that appears, increase Global X to 30 (Width/2) and rotate Y by +90 degrees
Select the type of plot and align the cutting plane with the working plane (Note that in GUI, these two steps are combined)
Select: Utility Menu > PlotCtrls > Style > Hidden-Line Options
Fill in the window that appears as shown below to select /TYPE=ZQSL and /CPLANE=Working Plane
This can be repeated for any slice, however, note that the command lines required to do the same are as follows:
WPOFFS,Width/2,0,0
WPROTA,0,0,90
/CPLANE,1
/TYPE,1,8
PLNSOL,U,SUM,0,1
Also note that to realign the working plane with the active coordinate system, simply use: WPCSYS,-1,0
2. Equivalent Stress
Again, let's view stresses within the entire model.
First we need to realign the working plane with the active coordinate system. Select: Utility Menu > WorkPlane > Align
WP with > Active Coord Sys (NOTE: To check the position of the WP, select Utility Menu > WorkPlane > Show WP
Status)
Next we need to change /TYPE to the default setting(no hidden or section operations). Select: Utility Menu > PlotCtrls >
Style > Hidden Line Options... And change the 'Type of Plot' to 'Non-hidden'
Select: General Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von Mises
Let's say that we want to take a closer look at the base of the beam through the XY plane. Because it is much easier, we are
going to use command line:
WPOFFS,0,0,1/16*Length
/CPLANE,1
/TYPE,1,5
PLNSOL,S,EQV,0,1
Note that we did not need to rotate the WP because we want to look at the XY plane which is the default). Also note that we
are using the capped hidden display this time.
You should now see the following:
3. Animation
Now, for something a little more impressive, let's show an animation of the Von Mises stress through the beam. Unfortunately, the
ANSYS commands are not as user friendly as they could be... but please bear with me.
Select: Utility Menu > PlotCtrls > Animate > Q-Slice Contours
In the window that appears, just change the Item to be contoured to 'Stress' 'von Mises'
You will then be asked to select 3 nodes; the origin, the sweep direction, and the Y axis. In the graphics window, select the
node at the origin of the coordinate system as the origin of the sweep (the sweep will start there). Next, the sweep direction
is in the Z direction, so select any node in the z direction (parallel to the first node). Finally, select the node in the back,
bottom left hand side corner as the Y axis.
You should now see an animated version of the contour slices through the beam. For more information on how to modify
the animation, type help ancut into the command line.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Data Plotting
Graphical Properties
Introduction
Index
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to create and use 'paths' to provide extra detail during post
processing. For example, one may want to determine the effects of stress concentrators along a certain path. Rather than plotting the entire
contour plot, a plot of the stress along that path can be made.
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
In this tutorial, a steel plate measuring 100 mm X 200 mm X 10 mm will be used. Three holes are drilled through the vertical centerline of
the plate. The plate is constrained in the y-direction at the bottom and a uniform, distributed load is pulling on the top of the plate.
Create a rectangle where the bottom left corner has the coordinates 0,0 and the width and height are 200 and 100
respectively.
4. Create Circles
Preprocessor > Modeling > Create > Areas > Circle > Solid Circle
cyl4,WP X,WP Y,Radius
Circle
Parameters
WP X WP Y Radius
50
50
10
100
50
10
150
50
10
First, select the area to remain (ie. the rectangle) and click OK. Then, select the areas to be subtracted (ie. the circles) and
click OK.
The remaining area should look as shown below.
For this problem we will use the PLANE2 (Solid Triangle 6node) element. This element has 2 degrees of freedom
(translation along the X and Y axes).
In the 'Element Types' window, click 'Options...' and set 'Element behavior' to Plane strs w/thk
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200000
ii. Poisson's Ratio PRXY: 0.3
3. Apply Loads
Solution > Define Loads > Apply > Structural > Pressure > On Lines
Utility Menu > PlotCtrls > Window Controls > Window Layout
General Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von Mises
The display should now look like this.
To ensure the top plot is not erased when the second plot is created, you must make a couple of changes.
Utility Menu > PlotCtrls > Window Controls > Window On or Off. Turn window 1 'off'.
To keep window 1 visible during replots, select Utility Menu > PlotCtrls > Erase Option > Erase Between Plots and
ensure there is no check-mark, meaning this function off.
To have the next graph plot in the bottom half of the screen, select Utility Menu > PlotCtrls > Window Controls >
Window Layout and select 'Window 2 > Bottom Half > Do not replot'.
2. Create Path
General PostProc > Path Operations > Define Path > By Location
In the window, shown below, name the path Cutline and set the 'Number of divisions' to 1000
50
200
50
When the third window pops up, click 'Cancle' because we only enabled two points on the path in the previous step.
3. Map the Stress onto the Path
Now the path is defined, you must choose what to map to the path, or in other words, what results should be available to the
path. For this example, equivalent stress is desired.
Fill the next window in as shown below [Stress > von Mises] and click OK.
The warning shown below will probably pop up. This is just saying that some of the 1000 points you defined earlier are not
on interpolation points (special points on the elements) therefore there is no data to map. This is of little concern though,
since there are plenty of points that do lie on interpolation points to produce the necessary plot, so disregard the warning.
General Postproc > Path Operations > Plot Path Item > On Geometry
The display should look like the following. Note, there will be dots on the plot showing node locations. Due to resolution
restrictions, these dots are not shown here.
This plot makes it easy to see how the stress is concentrated around the holes.
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Index
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to plot Vertical Deflection vs.
Length of the following beam using tables, a special type of array. By plotting this data on a curve, rather than using a contour plot, finer
resolution can be achieved.
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
This tutorial will use a steel beam 400 mm long, with a 40 mm X 60 mm cross section as shown above. It will be rigidly constrained at
one end and a -2500 N load will be applied to the other.
(0,0)
(400,0)
4. Create Lines
Preprocessor > Modeling > Create > Lines > Lines > In Active Coord
L,1,2
Create a line joining Keypoints 1 and 2
5. Define the Type of Element
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees of freedom (translation
along the X and Y axes, and rotation about the Z axis).
6. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 2400
ii. Area moment of inertia IZZ: 320e3
iii. Total beam height: 40
This defines a beam with a height of 40 mm and a width of 60 mm.
7. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 200000
ii. Poisson's Ratio PRXY: 0.3
8. Define Mesh Size
Preprocessor > Meshing > Size Cntrls > ManualSize > Lines > All Lines...
For this example we will use an element edge length of 20mm.
9. Mesh the frame
Preprocessor > Meshing > Mesh > Lines > click 'Pick All'
Utility Menu > Parameters > Array Parameters > Define/Edit > Add
The window seen above will pop up. Fill it out as shown [Graph > Table > 22,2,1]. Note there are 22 rows, one more than
the number of nodes. The reason for this will be explained below. Click OK and then close the 'Define/Edit' window.
Fill the next window in as shown below and click OK [Graph(1,1) > All > Location > X]. Naming the array parameter
'Graph(1,1)' fills in the table starting in row 1, column 1, and continues down the column.
Utility Menu > Parameters > Get Array Data ... > Results data > Nodal results
Fill the next window in as shown below and click OK [Graph(1,2) > All > DOF solution > UY]. Naming the array
parameter 'Graph(1,2)' fills in the table starting in row 1, column 2, and continues down the column.
Utility Menu > Parameters > Array Parameters > Define/Edit > Edit
The data for the end of the beam (X-location = 400, UY = -0.833) is in row two. Cut one of the cells to be moved (right
click > Copy or Ctrl+X), press the down arrow to get to the bottom of the table, and paste it into the appropriate column
(right click > Paste or Ctrl+V). When both values have been moved check to ensure the two entries in row 2 are zero. Select
File > Apply/Quit
To change the axis labels select Utility Menu > Plot Ctrls > Style > Graphs > Modify Axes ...
To see the changes to the labels, select Utility Menu > Replot
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.
ANSYS
UTILITIES
BASIC
TUTORIALS
X-Sectional Results
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Index
Contributions
Comments
MecE 563
Mechanical Engineering
Introduction
This tutorial was created using ANSYS 7.0 This tutorial covers some of the methods that can be employed to change how the output to the
screen looks. For instance, changing the background colour, numbering the nodes, etc.
Since the purpose of this tutorial is not to build or analysis a model, please copy the following code and paste it into the input line below
the utility menu.
finish
/clear
/title, Changing Graphical Properties
/prep7
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
K,1,0,0
K,2,100,0
L,1,2
et,1,beam3
r,1,100,833.333,10
mp,ex,1,200000
mp,prxy,1,0.3
esize,5
lmesh,all
finish
/solu
antype,0
dk,1,all,all
fk,2,fy,-100
solve
finish
You should obtain the following screen:
Graphical Options
1. Number the Nodes
Utility Menu > PlotCtrls > Numbering...
The following window will appear:
From this window you can select which items you wish to number. When you click OK, the window will disappear and
your model should be numbered appropriately. However, sometimes the numbers won't show up. This could be because you
had previously selected a plot of a different item. To remedy this problem, select the same item you just numbered from the
Utility > Plot menu and the numbering will show up.
For instance, select the node numbering and plot the nodes. You should get the following:
As shown, the nodes have been numbered. You can also see some other information that ANSYS is providing. The arrows
on the left and the right are the force that was applied and the resulting external reactive forces and moments. The triangles
on the left are the constraints and the coordinate triad is also visible. These extra symbols may not be necessary, so the next
section will show how to turn these symbols off.
2. Symbol Toggles
Utility Menu > PlotCtrls > Symbols
This window allows the user to toggle many symbols on or off. In our case, there are no Surface or Body Loads, or Initial
Conditions, so those sections won't be used. Under the Boundary conditions section, click on None to turn off all the force
and reaction symbols.
3. Triad Toggle
Utility Menu > PlotCtrls > Window Controls > Window Options
This window also allows the user to toggle many things on and off. In this case, it is things associated with the window
background. As shown in the window, the legend or title can be turned off, etc. To turn off the triad, select Not Shown from
the Location of triad drop down menu. The following output should be the result. Notice how it is much easier to
see the node numbers near the origin now.
4. Element Shape
Utility Menu > PlotCtrls > Style > Size and Shape...
When using line elements, such as BEAM3, it is sometime difficult to visualize what the elements really look like. To aid in
this process, ANSYS can display the elements shapes based on the real constant description. Click on the toggle box beside
[/ESHAPE] to turn on element shapes and click OK to close the window.
If there is no change in output, don't be alarmed. Recall we selected a plot of just the nodes, thus elements are not going to
show up. Select Utility Menu > Plot > Elements. The following should appear.
As shown, the elements are no longer just a line, but they have volume according to the real constants. To get a better 3-D
view of the model, you can change the view orientation.
5. View Orientation
Utility Menu > PlotCtrls > Pan Zoom Rotate...
This window allows the user to rotate the view, translate the view and zoom. You can also select predefined views, such as
isometric or oblique. Basic rotating, translating and zooming can also be done using the mouse. This is very handy when
you just want to quickly change the orientation of the model. By holding the Control button on the keyboard and holding
the Left mouse button the model will translate. By holding the Control button on the keyboard and holding the Middle
mouse button the model will zoom or rotate on the plane of the screen. By holding the Control button on the keyboard and
holding the Right mouse button the model will rotate about all axis. Using these options, it's easy to see the elements in 3D.
6. Changing Contours
First, plot the deformation contour for the beam.
General Postproc > Plot Results > Contour Plot > Nodal Solution > DOF Solution > USUM
If the contour divisions are not appropriate, they can be changed.
Utility Meny > PlotCtrls > Style > Contours
Either Uniform or Non-uniform Contours can be selected. Under uniform contours, be sure to click on User specified if
you are inputing your own contour divisions. Under non-uniform contours, you can create a logarithmic contour division or
some similiar contour where uniform divisions don't capture the information you desire.
If you don't like the colours of the contour, those can also be changed.
Utility Menu > PlotCtrls > Style > Colours > Contour Colours...
The colours for each division can be selected from the drop down menus.
The resulting display is shown below. Notice how all the text disappeared. This is because the text colour is also white. If
there is information that needs to be added, such as contour values, this can be done in other graphic editors. To save the
display, select Utility Menu > PlotCtrls > Capture Image. Under the File heading, select Save As...
There are lots of other option that can be used to change the presentation of data in ANSYS, these are just a few. If you are looking for a
specific option, the PlotCtrls menu is a good place to start, as is the help file.
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
1. Directly type in the commands into a text file from scratch. This assumes a good knowledge of the ANSYS command language and
the associated options.
If you know what some of the commands and are unsure of others, execute the desired operation from the GUI and then go to
File -> List -> Log File. This will then open up a new window showing the command line equivialent of all commands
entered to this point. You may directly cut and paste from here to a text editor, or if you'd like to save the whole file, see the next
item in this list.
2. Setup and solve the problem as you normally would using the ANSYS graphic user interface (GUI). Then before you are finished,
enter the command File -> Save DB Log File This saves the equivalent ANSYS commands that you entered in the GUI
mode, to a text file. You can now edit this file with a text editor to clean it up, delete errors from your GUI use and make changes
as desired.
Mechanical Engineering
University of Alberta
ANSYS Inc.
From the File menu, select Read Input from.... Change to the appropriate directory where the file (frame.cmd) is
stored and select it.
Now ANSYS will execute the commands from that file. The output window shows the progress of this procedure. Any errors and
warnings will be listed in this window.
When it is complete, you may not have a full view of your structure in the graphic window. You may need to select Plot ->
Solid Modeling
(Primitives)
Command
Description
Syntax
keypoint definition
k,kp#,xcoord,ycoord,zcoord
l,kp1,kp2
larc
larc,kp1,kp2,kp3,rad
(kp3 defines plane)
circle
spline
al
va
vext
vdrag
rectng
rectangle creation
rectng,x1,x2,y1,y2
block
block,x1,x2,y1,y2,z1,z2
cylind
cylind,rad1,rad2,z1,z2,theta1,theta2
sphere
sphere,rad1,rad2,theta1,theta2
prism
cone
torus
Elements &
Meshing
aadd,a1,a2, ... a9
aglue
aglue,a1,a2, ... a9
asba
asba,a1,a2
aina
aina,a1,a2, ... a9
vadd
vlgue
vsbv
vinv
et
et,number,type
may define as many as required; current type is set by
type
type
type,number
r,number,r1,r2, ... r6
may define as many as required; current type is set by
real
real
real,number
mp
mp,label,number,c0,c1, ... c4
may define as many as required; current type is set by
mat
mat
mat,number
esize
esize,size,ndivs
use either size or ndivs
eshape
lmesh
mesh line(s)
lmesh,line1,line2,inc
or lmesh,all
amesh
mesh area(s)
amesh,area1,area2,inc
or amesh,all
Sets &
Selection
Constraints
Loads
vmesh
mesh volume(s)
vmesh,vol1,vol2,inc
or vmesh,all
ksel
nsel
lsel
asel
nsla
allsel
select everything
i.e. reset selection
allsel
dk
dk,kp#,label,value
labels: UX,UY,UZ,ROTX,ROTY,ROTZ,ALL
d,node#,label,value
labels: UX,UY,UZ,ROTX,ROTY,ROTZ,ALL
dl
dl,line#,area#,label
labels: SYMM (symmetry); ASYM (antisymmetry)
fk
defines a
fk,kp#,label,value
labels: FX,FY,FZ,MX,MY,MZ
f,node#,label,value
labels: FX,FY,FZ,MX,MY,MZ
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
Basic Tutorials
The following ANSYS command listing, shows some of the commonly used programming features in the ANSYS command file language
known as ADPL (ANSYS Parametric Design Language). It illustrates:
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
This example file does not do anything really useful in itself besides generate keypoints along a line, but it does illustrate some of the
"programming features" of the ANSYS command language.
!
/PREP7
! preprocessor phase
!
x1 = 5
! define some parameters
x2 = 10
*ask,ndivs,Enter number of divisions (default 5),5
!
! the above command prompts the user for input to be entered into the
! variable "ndivs"; if only is entered, a default of "5" is used
!
*IF,ndivs,GT,1,THEN
! if "ndivs" is greater than "1"
dx = (x2-x1)/ndivs
*DO,i,1,ndivs+1,1
! do i = 1, ndivs + 1 (in steps of one)
x = x1 + dx*(i-1)
k,i,x,0,0
*ENDDO
*ELSE
k,1,x1,0,0
k,2,x2,0,0
*ENDIF
!
/pnum,kp,1
kplot
klist,all,,,coord
ANSYS
UTILITIES
BASIC
TUTORIALS
Creating Files
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
The following documents contain the command line code for the Basic Tutorials. ANSYS 7.0 was used to create all of these tutorials
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
Solid Modeling
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
Creating Files
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
Basic Tutorials
The following documents contain the command line code for the Intermediate Tutorials. ANSYS 7.0 was used to create all of these
tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Distributed Loading
NonLinear Analysis
Buckling
NonLinear Materials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
Creating Files
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
The following documents contain the command line code for the Advanced Tutorials. ANSYS 7.0 was used to create all of these tutorials
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
Design Opimization
Substructuring
Coupled Structural/Thermal
Analysis
Using P-Elements
Contact Elements
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
The following documents contain the command line code for the Postproc Tutorials. ANSYS 7.0 was used to create all of these tutorials
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
Creating Files
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Radiation Example
Features
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
Problem Description
Radiation heat transfer between concentric cylinders will be modeled in this example. This is a general version of one of the verification
examples converted to metric units.
! inches to metres
k,1,0,0
k,5,0,0
! center of tube 1
! center of retort
k,6,0,0,-1
k,7,1
k,8,0,0,1
! degrees C
! to convert to degrees K
! metric version
circle,1,rin,6,7,arc,ndiv
CIRCLE,5,rout,8,7,arc,ndiv
ET,1,LINK32,,,,,,,1
R,1,1
MP,KXX,1,1
MAT,1
ESIZE,,1
csys,1
lsel,s,loc,x,rin
LMESH,ALL
lsel,all
MP,KXX,2,1
MAT,2
lsel,s,loc,x,rout
LMESH,all
lsel,all
csys,0
FINISH
/AUX12
EMIS,1,emis1
EMIS,2,emis2
VTYPE,0
GEOM,1
STEF,stefbolt
WRITE,VM125
FINISH
/PREP7
DOF,TEMP
ET,2,MATRIX50,1,,,,,1
TYPE,2
SE,VM125
TOFFST,offset
!
!
!
!
csys,1
nsel,s,loc,x,rout
D,ALL,TEMP,T1
nsel,all
nsel,s,loc,x,rin
D,ALL,TEMP,T2
nsel,all
csys,0
FINISH
/SOLU
SOLVE
FINISH
/POST1
csys,1
nsel,s,loc,x,rin
! SELECT INNER CYLINDER NODES
/com
/COM,:) :) heat flow from inner to outer :) :)
/com
PRRSOL
! PRINT HEAT FLOW FROM INNER TO OUTER CYLINDER
nsel,all
nsel,s,loc,x,rout
! select outer cylinder nodes
/com
/COM,:) :) heat flow from outer to inner :) :)
/com
PRRSOL
! PRINT HEAT FLOW FROM OUTER TO INNER CYLINDER
FSUM,HEAT
! only from selected nodes !!!
nsel,all
*GET,Q,FSUM,0,ITEM,HEAT
*DIM,LABEL,CHAR,1,2
*DIM,VALUE,,1,3
LABEL(1,1) = 'Q(W/m) ' ! the 1 below is for unit length
numer=stefbolt*2*pi*rin*1*((offset+T1)**4-(offset+T2)**4)
exact=numer/(1/emis1+(rin/rout)*(1/emis2-1))
*VFILL,VALUE(1,1),DATA,exact
*VFILL,VALUE(1,2),DATA,Q
*VFILL,VALUE(1,3),DATA,ABS(Q/exact)
/COM
/COM,--------------- VM125 RESULTS COMPARISON -------------/COM,
/COM,
|
TARGET
|
ANSYS
|
RATIO
/COM,
*VWRITE,LABEL(1,1),VALUE(1,1),VALUE(1,2),VALUE(1,3)
(1X,A8,'
',F10.1,' ',F10.1,'
',1F5.3)
/COM,------------------------------------------------------/COM,
FINISH
UNIX Applications
Editors
The are several editors available on the system. The first three mentioned below are text based, while
the remaining have a graphical user interface.
vi & emacs
The vi and emacs editors are very powerful, but have a steep learning curve. You will probably
require a tutorial/reference book to help you get started with either of these editors. The bookstore
and CNS carry such manuals. These editors have the advantage that most every UNIX system that
you'll come across will have them, so they are always available.
pico
A very simple editor that is sufficient for most work is pico. It is the same editor that is used in the
Pine mail package that you may have tried out with your Unix GPU account. To use pico to edit the
file test.dat, for example, one simply types pico test.dat at the UNIX prompt. In pico, the
commonly used editing commands are listed at the bottom of its screen. The ^ character represents
the control (Crtl) key. Some commonly used commands are:
Ctrl x
save and exit
Ctrl o
save, don't exit
Ctrl r
read an external file into the present file
Ctrl 6
mark text; press this key, then use the cursor keys to mark text
Ctrl k
cut text to a buffer or just delete it
Ctrl u
uncut text; puts the contents of the buffer at the cursor location
Note that the mouse and the delete and insert keys do not have any effect in pico, but the
backspace key does work normally.
nedit
nedit is a very simple to use, yet powerful X Windows editor. It features pull-down menus, multiple
file editing, undo, and block delimiting with the mouse. Very nice... check it out!
Windows Editors
Two other editors are available by starting up the Microsoft Windows emulator. From a UNIX
command window, type wabi or win.
NotePad: The first of these editors is called notepad and it is available in the Windows Accessories
folder. It uses a very small font and is only useful for editing small text files.
PFE: Another option is a powerful text editor called Programmer's File Editor. It is located in /usr/
local/winapps/pfe directory and it is called pfe.exe (look under the r: drive). Create an
icon for this program by using the New menu item in the Program Manager. This editor features undo
and allows you to edit multiple text files of any size and save them in a DOS or UNIX format.
Note that UNIX and DOS have different conventions for storing carriage returns in text files. Files
must be saved in a UNIX format if they are to be used by compilers and Matlab. Therefore, when
saving files in PFE, ensure that the UNIX option is selected: select Save As from the File menu,
and look at the option in the dialog box.
The appendix describes several customizations that you may want to consider for the PFE editor.
This editor is available as freeware for Windows on the winsite (also know as CICA) archive (see
FTP) so that you can obtain a copy for your computer at home.
Problems with File Names: Note that Windows editors cannot access files which do not comply to
the 8.3 file format used by DOS. For this reason, it is not possible to use the Windows editors to
directly edit some UNIX files. An easy work-around is to rename the file to a DOS-legal name. It
could then be edited, saved, and then renamed back to its original name.
Applications
ANSYS
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.
ANSYS can be run as a text mode program (the default startup mode) or as a true X-Windows
application. The text mode is useful for people who wish to simply submit batch command files to
perform an analysis or if they wish to work on projects at home, over a modem.
To start ANSYS, two methods are avialable:
1. Type xansys52 at the UNIX prompt and a small launcher menu will appear. Select the
Run Interactive Now menu item. Some scrolling of text will go by and then stop. Press
Enter to continue. A multi-windowed environment now appears from which to enter your
commands.
If the text used in ANSYS is a little too small for your taste, it can be changed in the little startup launcher menu that first appeared. From this menu, it is necessary to select the
Interactive ... item. Then choose GUI configuration. From the next dialog box
that appears, select your desired font size.
2. An alternate method to start ANSYS is to type ansys at the UNIX prompt. Some scrolling
text will go by and then stop. Press Enter to continue. Once this is done, you may enter
ANSYS commands. To start the X-Windows portion of the program, issue the following two
commands at the ANSYS prompt:
/show,x11c
/menu,on
A multi-windowed environment now appears from which to enter your commands.
ANSYS can create rather large files when running and saving, therefore it is advisable to start up
ANSYS in the /scratch directory, and then save/delete the appropriate files when you are done.
You many want to check out some detailed online ANSYS tutorials. If you've got some time, check
Pro/Engineer
Pro/Engineer is a parametric 3D solid modeling and drafting software tool. Tutorials for Release 20
are available in the bookstore. A companion program, Pro/Mechanica, performs finite element
analysis, including static analysis, sensitivity studies, and design optimization. Pro/Mechanica can be
run integrated with Pro/E or in stand-alone mode.
If you've got some time, check out the Parametric Technology Corporation Web page. For more
information about this program, see Dr. Toogood.
Rampant
Rampant is a general purpose inviscid, laminar and turbulent flow modeling package.
To see a detailed enlargement of the ribbon flow on the car, click on the car figure.
If you've got some time and want to see some more beautiful pictures, like that shown above, check
out the Fluent Web page. For further information on this program, see Dr. Yokota.
FORTRAN
will be sent. If the program normally prompts the user for input, the prompt will not appear on the
screen, because it too is being sent to the output file. The keyboard will still accept the input,
however. So, if you know when to enter data, and what data to enter, you can still run your program
this way.
MATLAB
Matlab is a general purpose programming and analysis package with a wealth of built-in numerical,
symbolic and plotting functions.
You will normally want to start Matlab from the X Windows screen to take advantage of the
graphical environment. Matlab is started from a terminal window by entering:
matlab
When started, Matlab displays its start-up logo and the usual Matlab prompt (>>) appears. Matlab
commands may then be issued from this prompt.
Normally you will want to be editing and running Matlab .m files. The most convenient method to do
this is to open up a second window (see X Windows) and run a text editor from this window. In this
way you will have one window to edit your .m files and the second window to run them from
Matlab. Be sure to save any edited files to disk before trying to run them from Matlab, as Matlab only
has the copy on disk available to it. Note that it is only necessary to save the file, and not actually exit
the editor. In that way it is quick to toggle back and forth between the Matlab and editor windows.
Note that the text .m files created on under DOS/Windows and UNIX environments have different
formats and will cause errors in Matlab if you try to run them in the other environment unless you
make the necessary conversions when copying them to/from your floppy disk (see Floppy Disks).
It is often necessary to save text output from a Matlab session for documentation purposes. This is
accomplished by means of the diary command. From the Matlab prompt, type:
diary filename
where filename is the name of the file where Matlab will echo all keyboard commands and all
ensuing text output from the program. Note that only the output from those commands that you issue
after the diary command will be written to this file. After you are finished writing all that you want to
this file, turn off the diary function with the diary off command. The resulting text file may then be
edited, printed and even imported into a word processor.
To obtain a PostScript printer file of a currently displayed graph in Matlab, you simply type:
Remote Access
You may gain access to this lab from other computers on campus or even at home by starting up a
telnet session (or via a remote login) to connect to one of the lab's workstations. The workstations are
named mec01.labs through to mec30.labs. Depending from where you are trying to access
these computers, you may need to enter the full address of these workstations which has the form
mecxx.labs.ualberta.ca (where xx is any workstation number from 01 to 30).
For example, if you were in another lab on campus with telnet capabilities, such as the labs in
Cameron and CAB, you could access workstation mec08 by entering the command:
telnet mec08.labs
You may also need to access another mecxx workstation from within the MecE 3-3 lab for such
purposes as printing and resetting a hung workstation. The rlogin command is useful for this purpose.
For example, you may login onto workstation 18 from any other workstation in the lab, by issuing the
command,
rlogin mec18
Avoid rlogins and telnets into mec12 unless you are having a PostScript file printed. Once the job is
completed, logout immediately as there are only 2 remote logins open to that workstation. Also avoid
rlogins to mec24 as it is a major file server for the network.
Note that if you are going to be remotely running an X Windows application, you must have an X
server running on your local machine. If you have logged in remotely from another X Windows
machine, you simply need enter the xhost hostname command to set this up. However if you have
logged in from a PC or MAC from another place on campus or at home, you will need to acquire and
run an X server program. One such program is available from CNS and is called Micro X-Win (it is
available in GSB room 240 for $20). It is a Windows based program and its emulation speed is good
when running locally on the fast network backbone on campus, but is very slow when running it over
a modem.
The other thing that you must do when running an X Windows application remotely is to tell the
remote workstation where the X output is to be sent. This is specified with the following command:
setenv DISPLAY location:0
where location is your current workstation name (hostname) or your local IP address. In this
command, note the upper case DISPLAY and the trailing :0 (zero).
Printing
Printing is not performed by directly sending printing commands from a particular application. You
must first create ASCII text files or PostScript files and then use one of the procedures listed below.
lprps filename
where filename is the name of a PostScript file. Within one minute you must insert your copycard
(a library PhotoCard) in the machine beside the printer. If you fail to do so, your job (but not your
file) will be deleted. Prints are $0.20 per page.
To print from Windows applications in Wabi, you must print to a PostScript file and print it using this
procedure (see Wabi Printing).
Large PostScript Files: note that very large PostScript files will probably not print on this printer
due to the large transfer times required to copy the file to the printer. If you have problems with this
you will have to print the file elsewhere. One option is to consider the possibilities listed in the
section below on color printing.
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple 2D Truss problem. This is the first of four
introductory ANSYS tutorials.
Problem Description
Determine the nodal deflections, reaction forces, and stress for the truss system shown below. Note that
Young's Modulus, E, is 200GPa while the crass sectional area, A, is 3250mm2 for all of the elements.
(Modified from Chandrupatla & Belegunda, Introduction to Finite Elements in Engineering, p.123)
K,5,
2*width,
K,6, 5*width/2,
K,7,
3*width,
!
! define lines
!
L,1,2
L,1,3
L,2,3
L,2,4
L,3,4
L,3,5
L,4,5
L,4,6
L,5,6
L,5,7
L,6,7
0
height
0
!
! element definition
!
ET,1,LINK1
R,1,3250
MP,EX,1,200e3
! element type
#1; spring element
! real constant
#1; Xsect area: 3200 mm^2
! material property #1; Young's modulus: 200 GPa
LESIZE,ALL, , ,1,1,1
! specify divisions on unmeshed lines
LMESH,all
! mesh all lines
!
FINISH
! finish pre-processor
!
/SOLU
! enter solution phase
!
! apply some constraints
DK,1,ALL,0
! define a DOF constraint at a keypoint
DK,7,UY,0
!
! apply loads
!
FK,1,FY,-280e3
! define a force load to a keypoint
FK,3,FY,-210e3
FK,5,FY,-280e3
FK,7,FY,-360e3
!
SOLVE
! solve the resulting system of equations
FINISH
! finish solution
/POST1
PRRSOL,F
PLDISP,2
PLNSOL,U,SUM,0,1
ETABLE,SAXL,LS, 1
PRETAB,SAXL
PLETAB,SAXL,NOAV
! Axial Stress
! List Element Table
! Plot Axial Stress
Problem Description
Determine the nodal deflections, reaction forces, and stress for the truss system shown below. Note that Young's
Modulus, E, is 200GPa while the crass sectional area, A, is 3250mm2 for all of the elements.
(Modified from Chandrupatla & Belegunda, Introduction to Finite Elements in Engineering, p.123)
! element type
#1; spring element
! real constant
#1; Xsect area: 3200 mm^2
! material property #1; Young's modulus: 200 GPa
LESIZE,ALL, , ,1,1,1
! specify divisions on unmeshed lines
LMESH,all
! mesh all lines
!
FINISH
! finish pre-processor
!
/SOLU
! enter solution phase
!
! apply some constraints
DK,1,ALL,0
! define a DOF constraint at a keypoint
DK,7,UY,0
!
! apply loads
!
FK,1,FY,-280e3
! define a force load to a keypoint
FK,3,FY,-210e3
FK,5,FY,-280e3
FK,7,FY,-360e3
!
SOLVE
! solve the resulting system of equations
FINISH
! finish solution
/POST1
PRRSOL,F
PLDISP,2
PLNSOL,U,SUM,0,1
ETABLE,SAXL,LS, 1
PRETAB,SAXL
PLETAB,SAXL,NOAV
Problem Description
The problem to be modeled in this example is a simple bicycle frame shown in the following figure. The frame is to be
built of hollow aluminum tubing having an outside diameter of 25mm and a wall thickness of 2mm for the main part of
the frame. For the rear forks, the tubing will be 12mm outside diameter and 1mm wall thickness.
=
=
=
=
=
500
825
325
400
50
!
!
!
!
!
! Define Keypoints
K,1, 0,y1, 0
K,2, 0,y2, 0
K,3,x1,y2, 0
K,4,x1, 0, 0
K,5,x2, 0, z1
K,6,x2, 0,-z1
! k,key-point number,x-coord,y-coord,z-coord
! l,keypoint1,keypoint2
!
!
!
!
!
FINISH
! Finish pre-processing
/SOLU
ANTYPE,0
! Analysis type,static
! dk,keypoint,direction,displacement,,,direction,direction
(dk command)
(fk command)
!fk,keypoint,direction,force
FINISH
SAVE
/post1
/WIND,ALL,OFF
/WIND,1,LTOP
/WIND,2,RTOP
/WIND,3,LBOT
/WIND,4,RBOT
GPLOT
/GCMD,1, PLDISP,2
!Plot the deformed and undeformed edge
/GCMD,2, PLNSOL,U,SUM,0,1
!
!
!
!
!
! The arbitrary name is a name that you give the data in the table
! It serves as a reference name to retrieve the data later
! Use a name that describes the data and is easily remembered.
! The item name and data code number come off of the tables provided.
! Examples:
! For the VonMises (or equivalent) stresses at angle 0 at both ends of the
! element (node i and node j);
etable,vonmi0,nmisc,5
etable,vonmj0,nmisc,45
! For the Axial stresses at angle 0
etable,axii0,ls,1
etable,axij0,ls,33
! For the Direct axial stress component due to axial load (no bending)
! Note it is independent of angular location.
etable,diri,smisc,13
etable,dirj,smisc,15
! ADD OTHERS THAT YOU NEED IN HERE...
! To plot the data, simply type
!
plls, name for node i, name for node j
! for example,
/GCMD,3, PLLS,vonmi0,vonmj0
/GCMD,4, PLLS,axii0,axij0
/CONT,2,9,0,,0.27
/CONT,3,9,0,,18
/CONT,4,9,-18,,18
/FOC,ALL,-0.340000,,,1
/replot
PRNSOL,DOF,
=
=
=
=
=
500
825
325
400
50
!
!
!
!
!
! Define Keypoints
K,1, 0,y1, 0
K,2, 0,y2, 0
K,3,x1,y2, 0
K,4,x1, 0, 0
K,5,x2, 0, z1
K,6,x2, 0,-z1
! k,key-point number,x-coord,y-coord,z-coord
! l,keypoint1,keypoint2
!
!
!
!
!
FINISH
! Finish pre-processing
/SOLU
ANTYPE,0
! Analysis type,static
! dk,keypoint,direction,displacement,,,direction,direction
(dk command)
(fk command)
!fk,keypoint,direction,force
SOLVE
FINISH
SAVE
/post1
/WIND,ALL,OFF
/WIND,1,LTOP
/WIND,2,RTOP
/WIND,3,LBOT
/WIND,4,RBOT
GPLOT
/GCMD,1, PLDISP,2
!Plot the deformed and undeformed edge
/GCMD,2, PLNSOL,U,SUM,0,1
!
!
!
!
!
! The arbitrary name is a name that you give the data in the table
! It serves as a reference name to retrieve the data later
! Use a name that describes the data and is easily remembered.
! The item name and data code number come off of the tables provided.
! Examples:
! For the VonMises (or equivalent) stresses at angle 0 at both ends of the
! element (node i and node j);
etable,vonmi0,nmisc,5
etable,vonmj0,nmisc,45
! For the Axial stresses at angle 0
etable,axii0,ls,1
etable,axij0,ls,33
! For the Direct axial stress component due to axial load (no bending)
! Note it is independent of angular location.
etable,diri,smisc,13
etable,dirj,smisc,15
! ADD OTHERS THAT YOU NEED IN HERE...
! To plot the data, simply type
!
plls, name for node i, name for node j
! for example,
/GCMD,3, PLLS,vonmi0,vonmj0
/GCMD,4, PLLS,axii0,axij0
/CONT,2,9,0,,0.27
/CONT,3,9,0,,18
/CONT,4,9,-18,,18
/FOC,ALL,-0.340000,,,1
/replot
PRNSOL,DOF,
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:
!
!
!
!
Preprocessor
rectangle, bottom left corner coords, width, height
circle,center coords, radius
substract area 2 from area 1
ET,1,PLANE42
KEYOPT,1,3,3
thickness
R,1,20
MP,EX,1,200000
200000 MPa
MP,PRXY,1,0.3
1, 0.3
AESIZE,ALL,5
AMESH,ALL
FINISH
! Exit preprocessor
/SOLU
! Solution
ANTYPE,0
DL,4, ,ALL,0
SFL,2,PRES,-1
SOLVE
FINISH
/POST1
PLNSOL,S,EQV
!
!
!
!
ET,1,PLANE42
KEYOPT,1,3,3
R,1,20
MP,EX,1,200000
MP,PRXY,1,0.3
AESIZE,ALL,5
AMESH,ALL
Preprocessor
rectangle, bottom left corner coords, width, height
circle,center coords, radius
substract area 2 from area 1
FINISH
/SOLU
! Exit preprocessor
! Solution
ANTYPE,0
DL,4, ,ALL,0
SFL,2,PRES,-1
SOLVE
FINISH
/POST1
PLNSOL,S,EQV
Introduction
This tutorial is the second of three basic tutorials created to illustrate commom features in ANSYS. The plane stress bracket
tutorial builds upon techniques covered in the first tutorial (3D Bicycle Space Frame), it is therefore essential that you have
completed that tutorial prior to beginning this one.
The 2D Plane Stress Bracket will introduce boolean operations, plane stress, and uniform pressure loading.
Problem Description
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.
AADD,ALL
CYL4,80,50,30
CYL4,0,20,10
CYL4,0,80,10
ASBA,6,ALL
from base area 6
FINISH
! Finish pre-processing
/SOLU
ANTYPE,0
! Analysis type,static
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
(dl command)
(fk command)
!fk,keypoint,direction,force
! Solve the problem
FINISH
SAVE
/post1
/WIND,ALL,OFF
/WIND,1,LTOP
/WIND,2,RTOP
/WIND,3,LBOT
/WIND,4,RBOT
GPLOT
/GCMD,1, PLDISP,2
/GCMD,2, PLNSOL,U,SUM,0,1
/GCMD,3, PLNSOL,S,EQV,0,1
/GCMD,4, PLNSOL,EPTO,EQV,0,1
/CONT,2,10,0,,0.0036
/CONT,3,10,0,,8
/CONT,4,10,0,,0.05e-3
/FOC,ALL,-0.340000,,,1
! Focus point
/replot
PRNSOL,DOF,
Problem Description
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.
! Create Geometry
BLC4,0,0,80,100
CYL4,80,50,50
CYL4,0,20,20
CYL4,0,80,20
BLC4,-20,20,20,60
AADD,ALL
CYL4,80,50,30
CYL4,0,20,10
CYL4,0,80,10
ASBA,6,ALL
FINISH
! Finish pre-processing
/SOLU
ANTYPE,0
! Analysis type,static
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
,ALL,0
(dl command)
(fk command)
!fk,keypoint,direction,force
SOLVE
FINISH
SAVE
/post1
/WIND,ALL,OFF
/WIND,1,LTOP
/WIND,2,RTOP
/WIND,3,LBOT
/WIND,4,RBOT
GPLOT
/GCMD,1, PLDISP,2
/GCMD,2, PLNSOL,U,SUM,0,1
/GCMD,3, PLNSOL,S,EQV,0,1
/GCMD,4, PLNSOL,EPTO,EQV,0,1
/CONT,2,10,0,,0.0036
/CONT,3,10,0,,8
/CONT,4,10,0,,0.05e-3
/FOC,ALL,-0.340000,,,1
! Focus point
/replot
PRNSOL,DOF,
Introduction
This tutorial is the last of three basic tutorials devised to illustrate commom features in ANSYS. Each tutorial builds upon
techniques covered in previous tutorials, it is therefore essential that you complete the tutorials in order.
The Solid Modelling Tutorial will introduce various techniques which can be used in ANSYS to create solid models. Filleting,
extrusion/sweeping, copying, and working plane orientation will be covered in detail.
Two Solid Models will be created within this tutorial.
We will create a solid model of the pulley shown in the following figure.
We will also create a solid model of the Spindle Base shown in the following figure.
/PREP7
BLC4,2,0,1,5.5
BLC4,3,2,5,1
BLC4,8,0,0.5,5
! Create rectangles
AADD,ALL
CYL4,3,5.5,0.5
CYL4,8.5,0.2,0.2
! Create circles
ASBA,4,1
! Subtract an area
AGEN,2,2,,,,4.6
AGEN,2,1,,,-0.5
! Mirrors an area
AADD,ALL
LFILLT,22,7,0.1,,
lines 30 and 7
LFILLT,26,7,0.1,,
AL,3,6,9
lines 9,10,11)
AL,10,11,14
AADD,ALL
! Sweep
K,1001,0,0,0
K,1002,0,5,0
! Keypoints
VROTAT,3, , , , , ,1001,1002,360, ,
1001 and 1002
K,2001,0,3,0
K,2002,1,3,0
K,2003,0,3,1
KWPLAN,1,2001,2002,2003
CSYS,5
CYL4,5.5,0,0.5, , , ,1
! Create circle
VGEN,8,5, , , ,45, , ,0
!Subtract areas
vsbv,all,5
vsbv,13,6
vsbv,all,7
vsbv,4,8
vsbv,all,9
vsbv,2,10
vsbv,all,11
vsbv,2,12
Spindle Base Model
/PREP7
BLC4,0,0,109,102
! Create rectangle
K,5,-20,82
K,6,-20,20
K,7,0,82
K,8,0,20
! Keypoints
LARC,4,5,7,20
LARC,1,6,8,20
L,5,6
! Line arcs
AL,4,5,6,7
AADD,1,2
CYL4,0,20,10
AGEN,2,1, , ,69
AGEN,2,1,2, , ,62
ASBA,3,ALL
!
!
!
!
!
VOFFST,6,26
K,100,109,102,0
K,101,109,2,0
K,102,159,102,sqrt(3)/0.02
! Keypoints
KWPLAN,-1,100,101,102
BLC4,0,0,102,180
CYL4,51,180,51
AADD,25,26
! Create rectangle
! Create circle
! Add them together
VOFFST,27,26
VADD,1,2
! Add volumes
AADD,33,34,38
AADD,32,36,37
! Add areas
CYL4,51,180,32, , , ,60
VADD,1,3
CYL4,51,180,18.5, , , ,60
VSBV,2,1
!
!
!
!
WPCSYS,-1,0
system
K,200,-20,61,26
K,201,0,61,26
K,202,-20,61,30
! Keypoints
KWPLAN,-1,200,201,202
CSYS,4
Create cylinder
Add volumes
Another cylinder
Subtract it
K,203,129-(0.57735*26),0,0
K,204, 129-(0.57735*26) + 38, sqrt(3)/2*76,0
! Keypoints
A,200,203,204
VOFFST,7,20,
VADD, ALL
We will also create a solid model of the Spindle Base shown in the following figure.
! Create rectangles
AADD,ALL
CYL4,3,5.5,0.5
CYL4,8.5,0.2,0.2
! Create circles
ASBA,4,1
! Subtract an area
AGEN,2,2,,,,4.6
AGEN,2,1,,,-0.5
! Mirrors an area
AADD,ALL
LFILLT,22,7,0.1,,
LFILLT,26,7,0.1,,
AL,3,6,9
AL,10,11,14
AADD,ALL
! Sweep
K,1001,0,0,0
K,1002,0,5,0
! Keypoints
VROTAT,3, , , , , ,1001,1002,360, ,
K,2001,0,3,0
K,2002,1,3,0
K,2003,0,3,1
KWPLAN,1,2001,2002,2003
CSYS,5
CYL4,5.5,0,0.5, , , ,1
! Create circle
VGEN,8,5, , , ,45, , ,0
!Subtract areas
vsbv,all,5
vsbv,13,6
vsbv,all,7
vsbv,4,8
vsbv,all,9
vsbv,2,10
vsbv,all,11
vsbv,2,12
! Create rectangle
K,5,-20,82
K,6,-20,20
K,7,0,82
K,8,0,20
! Keypoints
LARC,4,5,7,20
LARC,1,6,8,20
L,5,6
! Line arcs
AL,4,5,6,7
AADD,1,2
CYL4,0,20,10
AGEN,2,1, , ,69
AGEN,2,1,2, , ,62
ASBA,3,ALL
!
!
!
!
!
VOFFST,6,26
K,100,109,102,0
K,101,109,2,0
K,102,159,102,sqrt(3)/0.02
! Keypoints
KWPLAN,-1,100,101,102
BLC4,0,0,102,180
CYL4,51,180,51
AADD,25,26
! Create rectangle
! Create circle
! Add them together
VOFFST,27,26
VADD,1,2
! Add volumes
AADD,33,34,38
AADD,32,36,37
! Add areas
CYL4,51,180,32, , , ,60
VADD,1,3
CYL4,51,180,18.5, , , ,60
VSBV,2,1
!
!
!
!
Create cylinder
Add volumes
Another cylinder
Subtract it
WPCSYS,-1,0
K,200,-20,61,26
K,201,0,61,26
K,202,-20,61,30
! Keypoints
KWPLAN,-1,200,201,202
CSYS,4
K,203,129-(0.57735*26),0,0
K,204, 129-(0.57735*26) + 38, sqrt(3)/2*76,0
! Keypoints
A,200,203,204
VOFFST,7,20,
VADD, ALL
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to show the required
steps to account for the weight of an object in ANSYS.
Loads will not be applied to the beam shown below in order to observe the deflection caused by the
weight of the beam itself. The beam is to be made of steel with a modulus of elasticity of 200 GPa.
! Create Keypoints
L,1,2
ET,1,BEAM3
! Set element type
R,1,Width*Height,Width*(Height**3)/12,Height
MP,EX,1,200000
! Young's Modulus
!** = exponent
MP,PRXY,1,0.3
MP,DENS,1,7.86e-6
! Poisson's ratio
! Density
LESIZE,ALL,Length/10,
LMESH,1
FINISH
/SOLU
ANTYPE,0
DK,1,ALL,0,
ACEL,,9.8
! Static analysis
! Constrain keypoint 1
! Set gravity constant
SOLVE
FINISH
/POST1
PLDISP,2
! Create Keypoints
L,1,2
ET,1,BEAM3
! Set element type
R,1,Width*Height,Width*(Height**3)/12,Height
MP,EX,1,200000
! Young's Modulus
MP,PRXY,1,0.3
! Poisson's ratio
MP,DENS,1,7.86e-6
! Density
LESIZE,ALL,Length/10,
LMESH,1
FINISH
/SOLU
ANTYPE,0
! Static analysis
!** = exponent
DK,1,ALL,0,
ACEL,,9.8
! Constrain keypoint 1
! Set gravity constant
SOLVE
FINISH
/POST1
PLDISP,2
Introduction
This tutorial was completed using ANSYS 7.0. The purpose of this tutorial is to explain how to apply distributed
loads and use element tables to extract data. Please note that this material was also covered in the 'Bicycle Space
Frame' tutorial under 'Basic Tutorials'.
A distributed load of 1000 N/m (1 N/mm) will be applied to a solid steel beam with a rectangular cross section as
shown in the figure below. The cross-section of the beam is 10mm x 10mm while the modulus of elasticity of the
steel is 200GPa.
L,1,2
ET,1,BEAM3
R,1,100,833.333,10
MP,EX,1,200000
MP,PRXY,1,0.33
! Young's Modulus
! Poisson's ratio
ESIZE,100
LMESH,ALL
! Mesh size
! Mesh line
FINISH
/SOLU
ANTYPE,0
! Static analysis
DK,1,UX,0,,,UY
DK,2,UY,0
! Pin keypoint 1
! Roller on keypoint 2
SFBEAM,ALL,1,PRES,1
SOLVE
FINISH
/POST1
PLDISP,2
ETABLE,SMAXI,NMISC, 1
ETABLE,SMAXJ,NMISC, 3
PLLS,SMAXI,SMAXJ,1,0
L,1,2
ET,1,BEAM3
R,1,100,833.333,10
MP,EX,1,200000
MP,PRXY,1,0.33
! Young's Modulus
! Poisson's ratio
ESIZE,100
LMESH,ALL
! Mesh size
! Mesh line
FINISH
/SOLU
ANTYPE,0
! Static analysis
DK,1,UX,0,,,UY
DK,2,UY,0
! Pin keypoint 1
! Roller on keypoint 2
SFBEAM,ALL,1,PRES,1
SOLVE
FINISH
/POST1
PLDISP,2
ETABLE,SMAXI,NMISC, 1
ETABLE,SMAXJ,NMISC, 3
PLLS,SMAXI,SMAXJ,1,0
ANSYS
UTILITIES
BASIC
TUTORIALS
INTERMEDIATE
TUTORIALS
ADVANCED
TUTORIALS
POSTPROC.
TUTORIALS
COMMAND
LINE FILES
PRINTABLE
VERSION
Features
Basic Tutorials
Intermediate Tutorials
Advanced Tutorials
PostProc Tutorials
The ANSYS contact element CONTACT48 allows friction to be modelled as a normal force only or as a normal force and a shear force.
In this model there are two blocks, one above top of the other, with a small separation. The top block is cantilevered while the bottom
block is tied to ground. The top block experiences a load and comes into contact with the lower block.
This command file is also useful to demonstate the use of sets or selections to group nodes/keypoints or to select a single node/keypoint to
which boundary conditions will be applied.
Radiation
Index
Contributions
Comments
MecE 563
Mechanical Engineering
University of Alberta
ANSYS Inc.
Copyright 2001
University of Alberta
! Young's modulus
! Poisson's ratio
MP,EX, 2, 20e3
MP,NUXY,2, 0.3
! meshing
esize,0.5
mat,1
real,1
amesh,1
!
!
!
!
esize,0.35
mat,2
amesh,2
/pnum,mat,1
eplot
ET,2,contac48,,1
! defines second element type - 2D contact elements
keyo,2,7,1
r,2,20e3,,0.005,,10
TYPE,2
! activates or sets this element type
real,2
! define contact nodes and elements
! first the contact nodes
asel,s,area,,2
!
nsla,s,1
!
nsel,r,loc,y,1.99,2.01
!
cm,source,node
!
! then the target nodes
allsel
! relect everything
asel,s,area,,1
nsla,s,1
nsel,r,loc,y,1.99,2.01
cm,target,node
!
!
!
!
gcgen,source,target,3
finish
/solution
antype,stat,new
!Ground upper left hand corner of top block
ksel,s,loc,x,2.5
ksel,r,loc,y,4
dk,all,all,0
! Ground bottom nodes on bottom block
allsel
nsel,s,loc,y,0
! when vmin = vmax (0 here), a small tolerance is used
d,all,all,0
! Give top right corner a vertical load
allsel
ksel,s,loc,x,7.5
ksel,r,loc,y,4
fk,all,fy,-100
allsel
time,1
nsubst,20,100
autots,on
pred,on
nropt,full,,on
solve
finish
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to do a simple
nonlinear analysis of the beam shown below.
There are several causes for nonlinear behaviour such as Changing Status, Material Nonlinearities and Geometric
Nonlinearities (change in response due to large deformations). This tutorial will deal specifically with Geometric
Nonlinearities .
To solve this problem, the load will added incrementally. After each increment, the stiffness matrix will be adjusted
before increasing the load.
The solution will be compared to the equivalent solution using a linear response.
! define keypoints
! 5" beam (length)
l,1,2
! define line
et,1,beam3
r,1,0.03125,4.069e-5,0.125
mp,ex,1,30.0e6
mp,prxy,1,0.3
!
!
!
!
Beam
area, izz, height of beam
Young's Modulus
Poisson's ratio
esize,0.1
lmesh,all
finish
! stop preprocessor
/solu
antype,static
nlgeom,on
! static analysis
! turn on non-linear geometry analysis
autots,on
! auto time stepping
nsubst,5,1000,1
! Size of first substep=1/5 of the total load, max #
substeps=1000, min # substeps=1
outres,all,all
! save results of all iterations
dk,1,all
fk,2,mz,-100
! applied moment
solve
/post1
pldisp,1
PRNSOL,U,X
There are several causes for nonlinear behaviour such as Changing Status, Material Nonlinearities and
Geometric Nonlinearities (change in response due to large deformations). This tutorial will deal specifically
with Geometric Nonlinearities .
To solve this problem, the load will added incrementally. After each increment, the stiffness matrix will be
adjusted before increasing the load.
The solution will be compared to the equivalent solution using a linear response.
! define keypoints
! 5" beam (length)
l,1,2
! define line
et,1,beam3
r,1,0.03125,4.069e-5,0.125
mp,ex,1,30.0e6
mp,prxy,1,0.3
!
!
!
!
Beam
area, izz, height of beam
Young's Modulus
Poisson's ratio
esize,0.1
lmesh,all
finish
! stop preprocessor
/solu
antype,static
nlgeom,on
! static analysis
! turn on non-linear geometry analysis
autots,on
nsubst,5,1000,1
outres,all,all
dk,1,all
fk,2,mz,-100
! applied moment
solve
/post1
pldisp,1
PRNSOL,U,X
Buckling
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple buckling problem.
It is recommended that you complete the NonLinear Tutorial prior to beginning this tutorial
Buckling loads are critical loads where certain types of structures become unstable. Each load has an associated buckled
mode shape; this is the shape that the structure assumes in a buckled condition. There are two primary means to perform a
buckling analysis:
1. Eigenvalue
Eigenvalue buckling analysis predicts the theoretical buckling strength of an ideal elastic structure. It computes the
structural eigenvalues for the given system loading and constraints. This is known as classical Euler buckling
analysis. Buckling loads for several configurations are readily available from tabulated solutions. However, in reallife, structural imperfections and nonlinearities prevent most real-world structures from reaching their eigenvalue
predicted buckling strength; ie. it over-predicts the expected buckling loads. This method is not recommended for
accurate, real-world buckling prediction analysis.
2. Nonlinear
Nonlinear buckling analysis is more accurate than eigenvalue analysis because it employs non-linear, largedeflection, static analysis to predict buckling loads. Its mode of operation is very simple: it gradually increases the
applied load until a load level is found whereby the structure becomes unstable (ie. suddenly a very small increase in
the load will cause very large deflections). The true non-linear nature of this analysis thus permits the modeling of
geometric imperfections, load perterbations, material nonlinearities and gaps. For this type of analysis, note that
small off-axis loads are necessary to initiate the desired buckling mode.
This tutorial will use a steel beam with a 10 mm X 10 mm cross section, rigidly constrained at the bottom. The required
load to cause buckling, applied at the top-center of the beam, will be calculated.
ET,1,BEAM3
R,1,100,833.333,10
MP,EX,1,200000
MP,PRXY,1,0.3
!
!
!
!
K,1,0,0
K,2,0,100
L,1,2
ESIZE,10
LMESH,ALL,ALL
FINISH
/SOLU
ANTYPE,STATIC
PSTRES,ON
DK,1,ALL
FK,2,FY,-1
!
!
!
!
!
!
!
!
SOLVE
FINISH
/SOLU
ANTYPE,BUCKLE
BUCOPT,LANB,1
SOLVE
FINISH
/SOLU
EXPASS,ON
MXPAND,1
SOLVE
FINISH
/POST1
SET,LIST
!
!
!
!
!
SET,LAST
PLDISP
Enter post-processor
List eigenvalue solution - Time/Freq listing is the
force required for buckling (in N for this case).
Read in data for the desired mode
Plots the deflected shape
NonLinear Buckling
FINISH
/CLEAR
R,1,100,833.333,10
! area, I, height
K,1,0,0,0
K,2,0,100,0
! Lower node
! Upper node (100 mm high)
L,1,2
! Draws line
ESIZE,1
LMESH,ALL
FINISH
/SOLU
ANTYPE,STATIC
NLGEOM,ON
OUTRES,ALL,ALL
NSUBST,20
NEQIT,1000
AUTOTS,ON
LNSRCH,ON
!
!
!
!
!
/ESHAPE,1
DK,1,ALL,0
! Constrain bottom
FK,2,FY,-50000
!
!
!
!
/POST26
RFORCE,2,1,F,Y
NSOL,3,2,U,Y
XVAR,2
PLVAR,3
!
!
!
!
!
/AXLAB,Y,DEFLECTION
/AXLAB,X,LOAD
/REPLOT
! Changes y label
! Changes X label
FK,2,FX,-250
SOLVE
FINISH
Buckling
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple buckling problem.
It is recommended that you complete the NonLinear Tutorial prior to beginning this tutorial
Buckling loads are critical loads where certain types of structures become unstable. Each load has an associated
buckled mode shape; this is the shape that the structure assumes in a buckled condition. There are two primary
means to perform a buckling analysis:
1. Eigenvalue
Eigenvalue buckling analysis predicts the theoretical buckling strength of an ideal elastic structure. It
computes the structural eigenvalues for the given system loading and constraints. This is known as
classical Euler buckling analysis. Buckling loads for several configurations are readily available from
tabulated solutions. However, in real-life, structural imperfections and nonlinearities prevent most realworld structures from reaching their eigenvalue predicted buckling strength; ie. it over-predicts the
expected buckling loads. This method is not recommended for accurate, real-world buckling prediction
analysis.
2. Nonlinear
Nonlinear buckling analysis is more accurate than eigenvalue analysis because it employs non-linear,
large-deflection, static analysis to predict buckling loads. Its mode of operation is very simple: it
gradually increases the applied load until a load level is found whereby the structure becomes unstable
(ie. suddenly a very small increase in the load will cause very large deflections). The true non-linear
nature of this analysis thus permits the modeling of geometric imperfections, load perterbations, material
nonlinearities and gaps. For this type of analysis, note that small off-axis loads are necessary to initiate
the desired buckling mode.
This tutorial will use a steel beam with a 10 mm X 10 mm cross section, rigidly constrained at the bottom. The
required load to cause buckling, applied at the top-center of the beam, will be calculated.
ET,1,BEAM3
R,1,100,833.333,10
MP,EX,1,200000
MP,PRXY,1,0.3
!
!
!
!
K,1,0,0
K,2,0,100
L,1,2
ESIZE,10
LMESH,ALL,ALL
FINISH
/SOLU
ANTYPE,STATIC
PSTRES,ON
DK,1,ALL
FK,2,FY,-1
!
!
!
!
!
!
!
!
!
SOLVE
FINISH
/SOLU
ANTYPE,BUCKLE
BUCOPT,LANB,1
SOLVE
FINISH
/SOLU
EXPASS,ON
MXPAND,1
SOLVE
FINISH
/POST1
SET,LIST
!
!
!
!
!
SET,LAST
PLDISP
Enter post-processor
List eigenvalue solution - Time/Freq listing is the
force required for buckling (in N for this case).
Read in data for the desired mode
Plots the deflected shape
NonLinear Buckling
FINISH
/CLEAR
R,1,100,833.333,10
! area, I, height
K,1,0,0,0
K,2,0,100,0
! Lower node
! Upper node (100 mm high)
L,1,2
! Draws line
ESIZE,1
LMESH,ALL
FINISH
/SOLU
ANTYPE,STATIC
NLGEOM,ON
OUTRES,ALL,ALL
NSUBST,20
NEQIT,1000
AUTOTS,ON
LNSRCH,ON
/ESHAPE,1
DK,1,ALL,0
! Constrain bottom
FK,2,FY,-50000
!
!
!
!
/POST26
RFORCE,2,1,F,Y
NSOL,3,2,U,Y
XVAR,2
PLVAR,3
!
!
!
!
!
/AXLAB,Y,DEFLECTION
/AXLAB,X,LOAD
/REPLOT
! Changes y label
! Changes X label
FK,2,FX,-250
SOLVE
FINISH
NonLinear Materials
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to include material nonlinearities in an
ANSYS model. For instance, the case when a large force is applied resulting in a stresses greater than yield strength. In such a case, a
multilinear stress-strain relationship can be included which follows the stress-strain curve of the material being used. This will allow
ANSYS to more accurately model the plastic deformation of the material.
For this analysis, a simple tension speciment 100 mm X 5 mm X 5 mm is constrained at the bottom and has a load pulling on the top.
This specimen is made out of a experimental substance called "WhoKilledKenium". The stress-strain curve for the substance is
shown above. Note the linear section up to approximately 225 MPa where the Young's Modulus is constant (75 GPa). The material
then begins to yield and the relationship becomes plastic and nonlinear.
! Enter Preprocessor
! Keypoints
ET,1,LINK1
R,1,25
! Element type
! Area of 25
MP,EX,1,75000
MP,PRXY,1,0.3
! Young's modulus
! Poisson's ratio
TB,MELA,1,1,12,
TBPT,,.001,75
! Data points
TBPT,,.002,150
TBPT,,.003,225
TBPT,,.004,240
TBPT,,.005,250
TBPT,,.025,300
TBPT,,.06,355
TBPT,,.1,390
TBPT,,.15,420
TBPT,,.2,435
TBPT,,.25,449
TBPT,,.275,450
ESIZE,5
LMESH,all
! Element size 5
! Line mesh all lines
FINISH
/SOLU
NLGEOM,ON
NSUBST,20,1000,1
OUTRES,ALL,ALL
AUTOTS,ON
LNSRCH,ON
NEQIT,1000
!
!
!
!
!
!
ANTYPE,0
DK,1,all
FK,2,FY,10000
! Static analysis
! Constrain keypoint 1
! Load on keypoint 2
Nonlinear geometry on
20 load steps
Output data for all load steps
Auto time-search on
Line search on
1000 iteration maximum
SOLVE
FINISH
/POST1
/ESHAPE,1
PLNSOL,U,Y,0,1
FINISH
/POST26
RFORCE,2,1,F,Y
NSOL,3,2,U,Y
XVAR,2
PLVAR,3
/AXLAB,Y,DEFLECTION
/AXLAB,X,LOAD
/REPLOT
!
!
!
!
! Changes y label
! Changes X label
NonLinear Materials
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to include material
nonlinearities in an ANSYS model. For instance, the case when a large force is applied resulting in a stresses
greater than yield strength. In such a case, a multilinear stress-strain relationship can be included which follows
the stress-strain curve of the material being used. This will allow ANSYS to more accurately model the plastic
deformation of the material.
For this analysis, a simple tension speciment 100 mm X 5 mm X 5 mm is constrained at the bottom and has a
load pulling on the top. This specimen is made out of a experimental substance called "WhoKilledKenium".
The stress-strain curve for the substance is shown above. Note the linear section up to approximately 225 MPa
where the Young's Modulus is constant (75 GPa). The material then begins to yield and the relationship
becomes plastic and nonlinear.
! Enter Preprocessor
! Keypoints
ET,1,LINK1
R,1,25
! Element type
! Area of 25
MP,EX,1,75000
MP,PRXY,1,0.3
! Young's modulus
! Poisson's ratio
TB,MELA,1,1,12,
TBPT,,.001,75
TBPT,,.002,150
TBPT,,.003,225
TBPT,,.004,240
TBPT,,.005,250
TBPT,,.025,300
TBPT,,.06,355
TBPT,,.1,390
TBPT,,.15,420
TBPT,,.2,435
TBPT,,.25,449
TBPT,,.275,450
! Data points
ESIZE,5
LMESH,all
! Element size 5
! Line mesh all lines
FINISH
/SOLU
NLGEOM,ON
NSUBST,20,1000,1
OUTRES,ALL,ALL
AUTOTS,ON
LNSRCH,ON
NEQIT,1000
!
!
!
!
!
!
ANTYPE,0
DK,1,all
FK,2,FY,10000
! Static analysis
! Constrain keypoint 1
! Load on keypoint 2
Nonlinear geometry on
20 load steps
Output data for all load steps
Auto time-search on
Line search on
1000 iteration maximum
SOLVE
FINISH
/POST1
/ESHAPE,1
PLNSOL,U,Y,0,1
FINISH
/POST26
RFORCE,2,1,F,Y
NSOL,3,2,U,Y
XVAR,2
PLVAR,3
/AXLAB,Y,DEFLECTION
/AXLAB,X,LOAD
/REPLOT
!
!
!
!
! Changes y label
! Changes X label
(0,0)
(1,0)
5. Define Lines
Preprocessor > Modeling > Create > Lines > Lines > Straight Line
Create a line between Keypoint 1 and Keypoint 2.
6. Define Element Types
Preprocessor > Element Type > Add/Edit/Delete...
For this problem we will use the BEAM3 (Beam 2D elastic) element. This element has 3 degrees
of freedom (translation along the X and Y axis's, and rotation about the Z axis). With only 3
degrees of freedom, the BEAM3 element can only be used in 2D analysis.
7. Define Real Constants
Preprocessor > Real Constants... > Add...
In the 'Real Constants for BEAM3' window, enter the following geometric properties:
i. Cross-sectional area AREA: 0.0001
ii. Area Moment of Inertia IZZ: 8.33e-10
iii. Total beam height HEIGHT: 0.01
This defines an element with a solid rectangular cross section 0.01 m x 0.01 m.
8. Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic
In the window that appears, enter the following geometric properties for steel:
i. Young's modulus EX: 2.068e11
ii. Poisson's Ratio PRXY: 0.3
To enter the density of the material, double click on 'Linear' followed by 'Density' in the 'Define
Material Model Behavior' Window
Enter a density of 7830
Note: For dynamic analysis, both the stiffness and the material density have to be specified.
9. Define Mesh Size
Preprocessor > Meshing > Size Cntrls > ManualSize > Lines > All Lines...
For this example we will specify 10 element divisions along the line.
10. Mesh the frame
Preprocessor > Meshing > Mesh > Lines > click 'Pick All'
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to do a simple
modal analysis of the cantilever beam shown below.
! Enter keypoints
L,1,2
! Create line
ET,1,BEAM3
! Element type
R,1,0.0001,8.33e-10,0.01
MP,EX,1,2.068e11
MP,PRXY,1,0.33
MP,DENS,1,7830
! Young's modulus
! Poisson's ratio
! Density
LESIZE,ALL,,,10
LMESH,1
! Element size
! Mesh line
FINISH
/SOLU
ANTYPE,2
MODOPT,SUBSP,5
EQSLV,FRONT
MXPAND,5
!
!
!
!
Modal analysis
Subspace, 5 modes
Frontal solver
Expand 5 modes
DK,1,ALL
SOLVE
FINISH
/POST1
SET,LIST
! List solutions
SET,FIRST
PLDISP
ANMODE,10,0.5, ,0
! Enter keypoints
L,1,2
! Create line
ET,1,BEAM3
! Element type
R,1,0.0001,8.33e-10,0.01
MP,EX,1,2.068e11
MP,PRXY,1,0.33
MP,DENS,1,7830
! Young's modulus
! Poisson's ratio
! Density
LESIZE,ALL,,,10
LMESH,1
! Element size
! Mesh line
FINISH
/SOLU
ANTYPE,2
MODOPT,SUBSP,5
EQSLV,FRONT
MXPAND,5
!
!
!
!
Modal analysis
Subspace, 5 modes
Frontal solver
Expand 5 modes
DK,1,ALL
SOLVE
FINISH
/POST1
SET,LIST
! List solutions
SET,FIRST
PLDISP
ANMODE,10,0.5, ,0
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to explain the steps required to perform
Harmonic analysis the cantilever beam shown below.
We will now conduct a harmonic forced response test by applying a cyclic load (harmonic) at the end of the beam.
The frequency of the load will be varied from 1 - 100 Hz. The figure below depicts the beam with the application of
the load.
ANSYS provides 3 methods for conducting a harmonic analysis. These 3 methods are the Full , Reduced and
Modal Superposition methods.
This example demonstrates the Full method because it is simple and easy to use as compared to the other two
methods. However, this method makes use of the full stiffness and mass matrices and thus is the slower and costlier
option.
! Enter keypoints
L,1,2
! Create line
ET,1,BEAM3
! Element type
R,1,0.0001,8.33e-10,0.01
MP,EX,1,2.068e11
MP,PRXY,1,0.33
MP,DENS,1,7830
! Young's modulus
! Poisson's ratio
! Density
LESIZE,ALL,,,10
LMESH,1
! Element size
! Mesh line
FINISH
/SOLU
ANTYPE,3
! Harmonic analysis
DK,1,ALL
FK,2,FY,100
! Constrain keypoint 1
! Apply force
HARFRQ,0,100,
NSUBST,100,
KBC,1
! Frequency range
! Number of frequency steps
! Stepped loads
SOLVE
FINISH
/POST26
NSOL,2,2,U,Y, UY_2
STORE,MERGE
PRVAR,2
PLVAR,2
! Print data
! Plot data
We will now conduct a harmonic forced response test by applying a cyclic load (harmonic) at the end of the
beam. The frequency of the load will be varied from 1 - 100 Hz. The figure below depicts the beam with the
application of the load.
ANSYS provides 3 methods for conducting a harmonic analysis. These 3 methods are the Full , Reduced and
Modal Superposition methods.
This example demonstrates the Full method because it is simple and easy to use as compared to the other two
methods. However, this method makes use of the full stiffness and mass matrices and thus is the slower and
costlier option.
! Enter keypoints
L,1,2
! Create line
ET,1,BEAM3
! Element type
R,1,0.0001,8.33e-10,0.01
MP,EX,1,2.068e11
MP,PRXY,1,0.33
MP,DENS,1,7830
! Young's modulus
! Poisson's ratio
! Density
LESIZE,ALL,,,10
LMESH,1
! Element size
! Mesh line
FINISH
/SOLU
ANTYPE,3
! Harmonic analysis
DK,1,ALL
FK,2,FY,100
! Constrain keypoint 1
! Apply force
HARFRQ,0,100,
NSUBST,100,
KBC,1
! Frequency range
! Number of frequency steps
! Stepped loads
SOLVE
FINISH
/POST26
NSOL,2,2,U,Y, UY_2
STORE,MERGE
PRVAR,2
PLVAR,2
! Print data
! Plot data
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to show the steps involved to perform a
simple transient analysis.
Transient dynamic analysis is a technique used to determine the dynamic response of a structure under a timevarying load.
The time frame for this type of analysis is such that inertia or damping effects of the structure are considered to be
important. Cases where such effects play a major role are under step or impulse loading conditions, for example,
where there is a sharp load change in a fraction of time.
If inertia effects are negligible for the loading conditions being considered, a static analysis may be used instead.
For our case, we will impact the end of the beam with an impulse force and view the response at the location of
impact.
Since an ideal impulse force excites all modes of a structure, the response of the beam should contain all mode
frequencies. However, we cannot produce an ideal impulse force numerically. We have to apply a load over a
discrete amount of time dt.
After the application of the load, we track the response of the beam at discrete time points for as long as we like
(depending on what it is that we are looking for in the response).
The size of the time step is governed by the maximum mode frequency of the structure we wish to capture. The
smaller the time step, the higher the mode frequency we will capture. The rule of thumb in ANSYS is
time_step = 1 / 20f
where f is the highest mode frequency we wish to capture. In other words, we must resolve our step size such that
we will have 20 discrete points per period of the highest mode frequency.
It should be noted that a transient analysis is more involved than a static or harmonic analysis. It requires a
good understanding of the dynamic behavior of a structure. Therefore, a modal analysis of the structure
should be initially performed to provide information about the structure's dynamic behavior.
In ANSYS, transient dynamic analysis can be carried out using 3 methods.
The Full Method: This is the easiest method to use. All types of non-linearities are allowed. It is however
very CPU intensive to go this route as full system matrices are used.
The Reduced Method: This method reduces the system matrices to only consider the Master Degrees of
Freedom (MDOFs). Because of the reduced size of the matrices, the calculations are much quicker. However,
this method handles only linear problems (such as our cantilever case).
The Mode Superposition Method: This method requires a preliminary modal analysis, as factored mode
shapes are summed to calculate the structure's response. It is the quickest of the three methods, but it requires
a good deal of understanding of the problem at hand.
We will use the Reduced Method for conducting our transient analysis. Usually one need not go further than
Reviewing the Reduced Results. However, if stresses and forces are of interest than, we would have to Expand the
Reduced Solution.
ET,1,BEAM3
R,1,0.0001,8.33e-10,0.01
! Element type
! Real constants
MP,EX,1,2.068e11
MP,PRXY,1,0.33
MP,DENS,1,7830
! Young's modulus
! Poisson's ratio
! Density
LESIZE,ALL,,,10
LMESH,1
! Element size
! Mesh the line
FINISH
/SOLU
ANTYPE, TRANS
! Transient analysis
TRNOPT,REDUC,
DELTIM,0.001
! select nodes 2 - 11
! Define Master DOFs
! Reselect all nodes
D,1,ALL
F,2,FY,-100
!*
LSSOLVE,1,3,1
FINISH
/POST26
FILE,'Dynamic','rdsp','.'
NSOL,2,2,U,Y, UY_2
STORE,MERGE
PLVAR,2,
http://www.mece.ualberta.ca/tutorials/ansys/CL/CIT/Transient/Print.html
Transient dynamic analysis is a technique used to determine the dynamic response of a structure under a
time-varying load.
The time frame for this type of analysis is such that inertia or damping effects of the structure are
considered to be important. Cases where such effects play a major role are under step or impulse
loading conditions, for example, where there is a sharp load change in a fraction of time.
If inertia effects are negligible for the loading conditions being considered, a static analysis may be used
instead.
For our case, we will impact the end of the beam with an impulse force and view the response at the
location of impact.
http://www.mece.ualberta.ca/tutorials/ansys/CL/CIT/Transient/Print.html
Since an ideal impulse force excites all modes of a structure, the response of the beam should contain all
mode frequencies. However, we cannot produce an ideal impulse force numerically. We have to apply a
load over a discrete amount of time dt.
After the application of the load, we track the response of the beam at discrete time points for as long as
we like (depending on what it is that we are looking for in the response).
The size of the time step is governed by the maximum mode frequency of the structure we wish to
capture. The smaller the time step, the higher the mode frequency we will capture. The rule of thumb in
ANSYS is
time_step = 1 / 20f
where f is the highest mode frequency we wish to capture. In other words, we must resolve our step size
such that we will have 20 discrete points per period of the highest mode frequency.
It should be noted that a transient analysis is more involved than a static or harmonic analysis. It
requires a good understanding of the dynamic behavior of a structure. Therefore, a modal
analysis of the structure should be initially performed to provide information about the
structure's dynamic behavior.
In ANSYS, transient dynamic analysis can be carried out using 3 methods.
http://www.mece.ualberta.ca/tutorials/ansys/CL/CIT/Transient/Print.html
The Full Method: This is the easiest method to use. All types of non-linearities are allowed. It is
however very CPU intensive to go this route as full system matrices are used.
The Reduced Method: This method reduces the system matrices to only consider the Master
Degrees of Freedom (MDOFs). Because of the reduced size of the matrices, the calculations are
much quicker. However, this method handles only linear problems (such as our cantilever case).
The Mode Superposition Method: This method requires a preliminary modal analysis, as
factored mode shapes are summed to calculate the structure's response. It is the quickest of the
three methods, but it requires a good deal of understanding of the problem at hand.
We will use the Reduced Method for conducting our transient analysis. Usually one need not go further
than Reviewing the Reduced Results. However, if stresses and forces are of interest than, we would have
to Expand the Reduced Solution.
ET,1,BEAM3
R,1,0.0001,8.33e-10,0.01
! Element type
! Real constants
MP,EX,1,2.068e11
MP,PRXY,1,0.33
MP,DENS,1,7830
! Young's modulus
! Poisson's ratio
! Density
LESIZE,ALL,,,10
LMESH,1
! Element size
! Mesh the line
FINISH
/SOLU
ANTYPE, TRANS
! Transient analysis
TRNOPT,REDUC,
DELTIM,0.001
! select nodes 2 - 11
! Define Master DOFs
! Reselect all nodes
D,1,ALL
F,2,FY,-100
!*
http://www.mece.ualberta.ca/tutorials/ansys/CL/CIT/Transient/Print.html
LSSOLVE,1,3,1
FINISH
/POST26
FILE,'Dynamic','rdsp','.'
NSOL,2,2,U,Y, UY_2
STORE,MERGE
PLVAR,2,
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple conduction problem.
The Simple Conduction Example is constrained as shown in the following figure. Thermal conductivity (k) of the
material is 10 W/m*C and the block is assumed to be infinitely long.
! mesh 2D areas
ET,1, PLANE55
MP,KXX,1,10
ESIZE,length/20
AMESH,ALL
! 10 W/mC
! number of element sub-divisions/side
FINISH
/SOLU
ANTYPE,0
! fixed temp BC's
NSEL,S,LOC,Y,height
D,ALL,TEMP,500
NSEL,ALL
NSEL,S,LOC,X,0
NSEL,A,LOC,X,length
NSEL,A,LOC,Y,0
D,ALL,TEMP,100
NSEL,ALL
SOLVE
FINISH
/POST1
PLNSOL,TEMP,,0,
! mesh 2D areas
ET,1, PLANE55
MP,KXX,1,10
ESIZE,length/20
AMESH,ALL
FINISH
/SOLU
ANTYPE,0
! fixed temp BC's
NSEL,S,LOC,Y,height
D,ALL,TEMP,500
NSEL,ALL
NSEL,S,LOC,X,0
NSEL,A,LOC,X,length
NSEL,A,LOC,Y,0
D,ALL,TEMP,100
NSEL,ALL
SOLVE
FINISH
/POST1
PLNSOL,TEMP,,0,
Introduction
This tutorial was created using ANSYS 7.0 to solve simple thermal examples. Analysis of a simple conduction as
well a mixed conduction/convection/insulation problem will be demonstrated.
The Mixed Convection/Conduction/Insulated Boundary Conditions Example is constrained as shown in the
following figure (Note that the section is assumed to be infinitely long):
! mesh 2D areas
ET,1, PLANE55
MP,KXX,1,10
MAT,1
TYPE,1
ESIZE,length/20
AMESH,ALL
FINISH
/SOLU
ANTYPE,0
! convection BC's
NSEL,S,LOC,X,length
SF,ALL,CONV,10,100
NSEL,ALL
! right edge
! apply fixed temp of 100C
! Insulated BC's
NSEL,S,LOC,Y,0
SF,ALL,CONV,0
NSEL,ALL
! bottom edge
! insulate edge
SOLVE
FINISH
/POST1
PLNSOL,TEMP,,0,
http://www.mece.ualberta.ca/tutorials/ansys/CL/cit/convection/print.html
! mesh 2D areas
ET,1, PLANE55
MP,KXX,1,10
MAT,1
TYPE,1
ESIZE,length/20
http://www.mece.ualberta.ca/tutorials/ansys/CL/cit/convection/print.html
AMESH,ALL
FINISH
/SOLU
ANTYPE,0
! convection BC's
NSEL,S,LOC,X,length
SF,ALL,CONV,10,100
NSEL,ALL
! right edge
! apply fixed temp of 100C
! Insulated BC's
NSEL,S,LOC,Y,0
SF,ALL,CONV,0
NSEL,ALL
! bottom edge
! insulate edge
SOLVE
FINISH
/POST1
PLNSOL,TEMP,,0,
Introduction
This tutorial was created using ANSYS 7.0 to solve a simple transient conduction problem. Special thanks to
Jesse Arnold for the analytical solution shown at the end of the tutorial.
The example is constrained as shown in the following figure. Thermal conductivity (k) of the material is 5 W/
m*K and the block is assumed to be infinitely long. Also, the density of the material is 920 kg/m^3 and the
specific heat capacity (c) is 2.040 kJ/kg*K.
It is beneficial if the Thermal-Conduction tutorial is completed first to compare with this solution.
length=1.0
height=1.0
blc4,0,0,length, height
! mesh 2D areas
ET,1, PLANE55
MP,Dens,1,920
mp,c,1,2.040
mp,kxx,1,5
ESIZE,0.05
AMESH,ALL
!
!
!
!
!
!
FINISH
/SOLU
ANTYPE,4
! Transient analysis
time,300
nropt,full
lumpm,0
nsubst,20
neqit,100
autots,off
lnsrch,on
outres,all,all
kbc,1
!
!
!
!
!
!
!
SOLVE
FINISH
/POST1
/CONT,1,8,100,,500
PLNSOL,TEMP
ANTIME,20,0.5,,0,2,0,500
!
!
!
!
Enter postprocessor
Define a contour range
Plot temperature contour
Animate temp over time
! mesh 2D areas
ET,1, PLANE55
MP,Dens,1,920
mp,c,1,2.040
mp,kxx,1,5
ESIZE,0.05
AMESH,ALL
!
!
!
!
!
!
FINISH
/SOLU
ANTYPE,4
! Transient analysis
time,300
nropt,full
lumpm,0
nsubst,20
neqit,100
autots,off
lnsrch,on
outres,all,all
kbc,1
!
!
!
!
!
!
!
SOLVE
FINISH
/POST1
/CONT,1,8,100,,500
PLNSOL,TEMP
ANTIME,20,0.5,,0,2,0,500
!
!
!
!
Enter postprocessor
Define a contour range
Plot temperature contour
Animate temp over time
Introduction
This tutorial was completed using ANSYS 7.0 This tutorial is intended to outline the steps required to
create an axisymmetric model.
The model will be that of a closed tube made from steel. Point loads will be applied at the center of
the top and bottom plate to make an analytical verification simple to calculate. A 3/4 cross section
view of the tube is shown below.
As a warning, point loads will create discontinuities in the your model near the point of application. If
you chose to use these types of loads in your own modelling, be very careful and be sure to
understand the theory of how the FEA package is appling the load and the assumption it is making. In
this case, we will only be concerned about the stress distribution far from the point of application, so
the discontinuities will have a negligable effect.
rectng,0,20,0,5
rectng,15,20,0,100
rectng,0,20,95,100
aadd,all
et,1,plane2
keyopt,1,3,1
mp,ex,1,200000
mp,prxy,1,0.3
!
!
!
!
esize,2
amesh,all
! Mesh size
! Mesh the area
finish
/solu
antype,0
! Static analysis
lsel,s,loc,x,0
dl,all,,symm
lsel,all
nsel,s,loc,y,50
d,all,uy,0
nsel,all
fk,1,fy,-100
fk,12,fy,100
solve
finish
/post1
nsel,s,loc,y,45,55
prnsol,s,comp
nsel,all
/expand,27,axis,,,10
/view,1,1,2,3
/replot
/prep7
/triad,off
rectng,0,20,0,5
rectng,15,20,0,100
rectng,0,20,95,100
aadd,all
et,1,plane2
keyopt,1,3,1
mp,ex,1,200000
mp,prxy,1,0.3
!
!
!
!
esize,2
amesh,all
! Mesh size
! Mesh the area
finish
/solu
antype,0
! Static analysis
lsel,s,loc,x,0
dl,all,,symm
lsel,all
nsel,s,loc,y,50
d,all,uy,0
nsel,all
fk,1,fy,-100
fk,12,fy,100
solve
finish
/post1
nsel,s,loc,y,45,55
prnsol,s,comp
nsel,all
/expand,27,axis,,,10
/view,1,1,2,3
/replot
Introduction
This tutorial was created using ANSYS 5.7.1. This tutorial will introduce:
A 1000N vertical load will be applied to a catapult as shown in the figure below. The catapult is built
from steel tubing with an outer diameter of 40 mm, a wall thickness of 10, and a modulus of elasticity
of 200GPa. The springs have a stiffness of 5 N/mm.
/title, Catapult
/PREP7
ET,1,PIPE16
ET,2,COMBIN7
ET,3,COMBIN14
! Element type 1
! Element type 2
! Element type 3
R,1,40,10
R,2,1e9,1e9,1e9
R,3,5, , ,
! Real constants 1
! Real constants 2
! Real constants 3
MP,EX,1,200000
MP,PRXY,1,0.33
N, 1,
0,
0,
0
N, 2,
0,
0,1000
N, 3,1000,
0,1000
N, 4,1000,
0,
0
N, 5,
0,1000,1000
N, 6,
0,1000,
0
N, 7, 700, 700, 500
N, 8, 400, 400, 500
N, 9,
0,
0,
0
N,10,
0,
0,1000
N,11,
0,
0, 500
N,12,
0,
0,1500
N,13,
0,
0,-500
! Node locations
TYPE,1
REAL,1
MAT,1
! Turn on Element 1
! Turn on Real constants 1
! Turn on Material 1
E, 1, 6
E, 2, 5
E, 1, 4
E, 2, 3
E, 3, 4
E,10, 8
E, 9, 8
E, 7, 8
E,12, 5
E,13, 6
E,12,13
E, 5, 3
E, 6, 4
! Element connectivity
TYPE,2
REAL,2
! Turn on Element 2
! Turn on Real constants 2
E, 1, 9, 11
E, 2, 10, 11
! Element connectivity
TYPE,3
REAL,3
! Turn on Element 3
! Turn on Real constants 3
E,5,8
E,8,6
! Element connectivity
/PNUM,KP,0
/PNUM,ELEM,1
/REPLOT
! Number nodes
! Number elements
FINISH
/SOLU
ANTYPE,0
NLGEOM,ON
NSUBST,5
! Static analysis
! Non-linear geometry on
! 5 Load steps of equal size
D,3,ALL,0,,,4,12,13
F,7,FY,-1000
SOLVE
FINISH
/POST1
PLDISP,2
*GET,VERT7,NODE,7,U,Y
A 1000N vertical load will be applied to a catapult as shown in the figure below. The catapult is built from steel
tubing with an outer diameter of 40 mm, a wall thickness of 10, and a modulus of elasticity of 200GPa. The
springs have a stiffness of 5 N/mm.
! Element type 1
! Element type 2
! Element type 3
R,1,40,10
! Real constants 1
R,2,1e9,1e9,1e9
R,3,5, , ,
! Real constants 2
! Real constants 3
MP,EX,1,200000
MP,PRXY,1,0.33
N, 1,
0,
0,
0
N, 2,
0,
0,1000
N, 3,1000,
0,1000
N, 4,1000,
0,
0
N, 5,
0,1000,1000
N, 6,
0,1000,
0
N, 7, 700, 700, 500
N, 8, 400, 400, 500
N, 9,
0,
0,
0
N,10,
0,
0,1000
N,11,
0,
0, 500
N,12,
0,
0,1500
N,13,
0,
0,-500
! Node locations
TYPE,1
REAL,1
MAT,1
! Turn on Element 1
! Turn on Real constants 1
! Turn on Material 1
E, 1, 6
E, 2, 5
E, 1, 4
E, 2, 3
E, 3, 4
E,10, 8
E, 9, 8
E, 7, 8
E,12, 5
E,13, 6
E,12,13
E, 5, 3
E, 6, 4
! Element connectivity
TYPE,2
REAL,2
! Turn on Element 2
! Turn on Real constants 2
E, 1, 9, 11
E, 2, 10, 11
! Element connectivity
TYPE,3
REAL,3
! Turn on Element 3
! Turn on Real constants 3
E,5,8
E,8,6
! Element connectivity
/PNUM,KP,0
/PNUM,ELEM,1
/REPLOT
! Number nodes
! Number elements
FINISH
/SOLU
ANTYPE,0
NLGEOM,ON
! Static analysis
! Non-linear geometry on
NSUBST,5
D,3,ALL,0,,,4,12,13
F,7,FY,-1000
SOLVE
FINISH
/POST1
PLDISP,2
*GET,VERT7,NODE,7,U,Y
Design Optimization
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to introduce a method of solving design optimization
problems using ANSYS. This will involve creating the geometry utilizing parameters for all the variables, deciding which
variables to use as design, state and objective variables and setting the correct tolerances for the problem to obtain an accurately
converged solution in a minimal amount of time. The use of hardpoints to apply forces/constraints in the middle of lines will also
be covered in this tutorial.
A beam has a force of 1000N applied as shown below. The purpose of this optimization problem is to minimize the weight of the
beam without exceeding the allowable stress. It is necessary to find the cross sectional dimensions of the beam in order to
minimize the weight of the beam. However, the width and height of the beam cannot be smaller than 10mm. The maximum stress
anywhere in the beam cannot exceed 200 MPa. The beam is to be made of steel with a modulus of elasticity of 200 GPa.
K,1,0,0
K,2,1000,0
L,1,2
HPTCREATE,LINE,1,0,RATI,.75,
! Keypoint locations
ET,1,BEAM3
R,1,W*H,(W*H**3)/12,H,,,,
height
MP,EX,1,200000
MP,PRXY,1,0.3
! Element type
! Real consts: area,I (note '**', not '^'),
ESIZE,100
LMESH,ALL
! Mesh size
! Mesh line
FINISH
/SOLU
! Create line
! Create hardpoint 75% from left side
! Young's modulus
! Poisson's ratio
ANTYPE,0
! Static analysis
DK,1,UX,0
DK,1,UY,0
DK,2,UY,0
! Pin keypoint 1
FK,3,FY,-2000
! Force at hardpoint
! Support keypoint 2
SOLVE
FINISH
/POST1
ETABLE,EVolume,VOLU,
SSUM
*GET,Volume,SSUM,,ITEM,EVOLUME
ETABLE,SMAX_I,NMISC,1
node
ESORT,ETAB,SMAX_I,0,1,,
*GET,SMAXI,SORT,,MAX
ETABLE,SMAX_J,NMISC,3
node
ESORT,ETAB,SMAX_J,0,1,,
*GET,SMAXJ,SORT,,MAX
*SET,SMAX,SMAXI>SMAXJ
LGWRITE,optimize,txt,C:\TEMP
/OPT
OPANL,'optimize','txt','C:\Temp\'
OPVAR,H,DV,10,50,0.001
mm, tolerance 0.001mm
OPVAR,W,DV,10,50,0.001
tolerance 0.001mm
OPVAR,SMAX,SV,195,200,0.001
MPa, tolerance 0.001 MPa
OPVAR,VOLUME,OBJ,,,200
OPTYPE,FIRS
OPFRST,30,100,0.2,
forward difference
OPEXE
! First-order analysis
! Max iteration, Percent step size, Percent
PLVAROPT,H,W
/AXLAB,X,Number of Iterations
/AXLAB,Y,Width and Height (mm)
/REPLOT
! Run optimization
Design Optimization
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to introduce a method of solving
design optimization problems using ANSYS. This will involve creating the geometry utilizing parameters for
all the variables, deciding which variables to use as design, state and objective variables and setting the correct
tolerances for the problem to obtain an accurately converged solution in a minimal amount of time. The use of
hardpoints to apply forces/constraints in the middle of lines will also be covered in this tutorial.
A beam has a force of 1000N applied as shown below. The purpose of this optimization problem is to minimize
the weight of the beam without exceeding the allowable stress. It is necessary to find the cross sectional
dimensions of the beam in order to minimize the weight of the beam. However, the width and height of the
beam cannot be smaller than 10mm. The maximum stress anywhere in the beam cannot exceed 200 MPa. The
beam is to be made of steel with a modulus of elasticity of 200 GPa.
K,1,0,0
K,2,1000,0
L,1,2
HPTCREATE,LINE,1,0,RATI,.75,
! Create line
! Create hardpoint 75% from left side
ET,1,BEAM3
R,1,W*H,(W*H**3)/12,H,,,,
MP,EX,1,200000
MP,PRXY,1,0.3
!
!
!
!
! Keypoint locations
Element type
Real consts: area,I (note '**', not '^'),height
Young's modulus
Poisson's ratio
ESIZE,100
LMESH,ALL
! Mesh size
! Mesh line
FINISH
/SOLU
ANTYPE,0
! Static analysis
DK,1,UX,0
DK,1,UY,0
DK,2,UY,0
! Pin keypoint 1
FK,3,FY,-2000
! Force at hardpoint
! Support keypoint 2
SOLVE
FINISH
/POST1
ETABLE,EVolume,VOLU,
SSUM
*GET,Volume,SSUM,,ITEM,EVOLUME
ETABLE,SMAX_I,NMISC,1
ESORT,ETAB,SMAX_I,0,1,,
*GET,SMAXI,SORT,,MAX
ETABLE,SMAX_J,NMISC,3
ESORT,ETAB,SMAX_J,0,1,,
*GET,SMAXJ,SORT,,MAX
*SET,SMAX,SMAXI>SMAXJ
LGWRITE,optimize,txt,C:\TEMP
/OPT
OPANL,'optimize','txt','C:\Temp\'
OPVAR,H,DV,10,50,0.001
OPVAR,W,DV,10,50,0.001
OPVAR,SMAX,SV,195,200,0.001
OPVAR,VOLUME,OBJ,,,200
!
!
!
!
OPTYPE,FIRS
OPFRST,30,100,0.2,
OPEXE
! First-order analysis
! Max iteration, Percent step size, Percent forwar
! Run optimization
PLVAROPT,H,W
/AXLAB,X,Number of Iterations
/AXLAB,Y,Width and Height (mm)
/REPLOT
Substructuring
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to show the how to use substructuring in
ANSYS. Substructuring is a procedure that condenses a group of finite elements into one super-element. This reduces the
required computation time and also allows the solution of very large problems.
A simple example will be demonstrated to explain the steps required, however, please note that this model is not one
which requires the use of substructuring. The example involves a block of wood (E =10 GPa v =0.29) connected to a
block of silicone (E = 2.5 MPa, v = 0.41) which is rigidly attached to the ground. A force will be applied to the structure
as shown in the following figure. For this example, substructuring will be used for the wood block.
! Bottom-Up Substructuring
! GENERATION PASS - Build the superelement portion of the model
FINISH
/CLEAR, START
/FILNAME,GEN
! Change jobname
/PREP7
! Create Geometry
blc4,0,40,100,100
! Creates rectangle
! Element size
! Mesh area
FINISH
/SOLU
ANTYPE,SUBST
SEOPT,GEN,,2
NSEL,S,EXT
M,ALL,ALL
NSEL,ALL
NSEL,S,LOC,Y,140
NSEL,R,LOC,X,0
F,ALL,FX,5
NSEL,ALL
SAVE
SOLVE
FINISH
! USE PASS
FINISH
/CLEAR
/FILNAME,USE
/PREP7
! Load it
! Element type
! Turns on element type 2
! Second material property set for silicon
! Meshing
AESIZE,1,10,
mat,2
real,2
amesh,1
! Superelement
ET,1,MATRIX50
TYPE,1
*GET,MaxNode,NODE,,NUM,MAX
SETRAN,GEN,,MaxNode,GEN2
SE,GEN2
NSEL,S,LOC,Y,40
CPINTF,ALL
NSEL,ALL
!
!
!
!
Element size
Turns on Material 2
Turns on real constants 2
Mesh the area
!
!
!
!
!
!
!
FINISH
/SOLU
ANTYPE,STATIC
! Static analysis
NSEL,S,LOC,Y,0
D,ALL,ALL,0
NSEL,ALL
ESEL,S,TYPE,,1
SFE,ALL,1,SELV,,1
ESEL,ALL
! Element select
! Apply super-element load vector
! Reselect all elements
SAVE
SOLVE
FINISH
/POST1
PLNSOL,U,SUM,0,1
FINISH
! EXPANSION PASS
/CLEAR
/FILNAME,GEN
RESUME
! Clear database
! Change jobname back to generation pass jobname
! Restore generation pass database
/SOLU
! Enter SOLUTION
EXPASS,ON,YES
! Activate expansion pass
SEEXP,GEN2,USE
! Superelement name to be expanded
EXPSOL,1,1,
! Expansion pass info
SOLVE
! Initiate expansion pass solution.
superelement solution written to GEN.RST
FINISH
/POST1
PLNSOL,U,SUM,0,1
Full
Substructuring
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to show the how to use
substructuring in ANSYS. Substructuring is a procedure that condenses a group of finite elements into one
super-element. This reduces the required computation time and also allows the solution of very large problems.
A simple example will be demonstrated to explain the steps required, however, please note that this model is
not one which requires the use of substructuring. The example involves a block of wood (E =10 GPa v =0.29)
connected to a block of silicone (E = 2.5 MPa, v = 0.41) which is rigidly attached to the ground. A force will be
applied to the structure as shown in the following figure. For this example, substructuring will be used for the
wood block.
super-element are created by selecting the appropriate elements). This method is suitable for smaller models and
has the advantage that the results for multiple super-elements can be assembled in postprocessing.
! Creates rectangle
! Element size
! Mesh area
FINISH
/SOLU
ANTYPE,SUBST
SEOPT,GEN,,2
NSEL,S,EXT
M,ALL,ALL
NSEL,ALL
NSEL,S,LOC,Y,140
NSEL,R,LOC,X,0
F,ALL,FX,5
NSEL,ALL
SAVE
SOLVE
FINISH
! USE PASS
FINISH
/CLEAR
/FILNAME,USE
/PREP7
! Load it
! Element type
! Turns on element type 2
MP,EX,2, 2.5
MP,PRXY,2,0.41
! Meshing
AESIZE,1,10,
mat,2
real,2
amesh,1
! Superelement
ET,1,MATRIX50
TYPE,1
*GET,MaxNode,NODE,,NUM,MAX
SETRAN,GEN,,MaxNode,GEN2
SE,GEN2
NSEL,S,LOC,Y,40
CPINTF,ALL
NSEL,ALL
!
!
!
!
Element size
Turns on Material 2
Turns on real constants 2
Mesh the area
!
!
!
!
!
!
!
FINISH
/SOLU
ANTYPE,STATIC
! Static analysis
NSEL,S,LOC,Y,0
D,ALL,ALL,0
NSEL,ALL
ESEL,S,TYPE,,1
SFE,ALL,1,SELV,,1
ESEL,ALL
! Element select
! Apply super-element load vector
! Reselect all elements
SAVE
SOLVE
FINISH
/POST1
PLNSOL,U,SUM,0,1
FINISH
! EXPANSION PASS
/CLEAR
/FILNAME,GEN
RESUME
/SOLU
EXPASS,ON,YES
SEEXP,GEN2,USE
EXPSOL,1,1,
SOLVE
FINISH
/POST1
PLNSOL,U,SUM,0,1
! Clear database
! Change jobname back to generation pass jobname
! Restore generation pass database
!
!
!
!
!
Enter SOLUTION
Activate expansion pass
Superelement name to be expanded
Expansion pass info
Initiate expansion pass solution.
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to outline a simple coupled thermal/structural
analysis. A steel link, with no internal stresses, is pinned between two solid structures at a reference temperature of 0 C (273
K). One of the solid structures is heated to a temperature of 75 C (348 K). As heat is transferred from the solid structure into
the link, the link will attemp to expand. However, since it is pinned this cannot occur and as such, stress is created in the
link. A steady-state solution of the resulting stress will be found to simplify the analysis.
Loads will not be applied to the link, only a temperature change of 75 degrees Celsius. The link is steel with a modulus of
elasticity of 200 GPa, a thermal conductivity of 60.5 W/m*K and a thermal expansion coefficient of 12e-6 /K.
analysis.
! Enter preprocessor
k,1,0,0
k,2,1,0
! Keypoints
l,1,2
et,1,link33
r,1,4e-4,
mp,kxx,1,60.5
! Element type
! Area
! Thermal conductivity
esize,0.1
lmesh,all
physics,write,thermal
physics,clear
!
!
!
!
Element size
Mesh line
Write physics environment as thermal
Clear the environment
etchg,tts
mp,ex,1,200e9
mp,prxy,1,0.3
mp,alpx,1,12e-6
physics,write,struct
physics,clear
finish
!
!
!
!
!
Element type
Young's modulus
Poisson's ratio
Expansion coefficient
Write physics environment as struct
/solu
antype,0
physics,read,thermal
dk,1,temp,348
!
!
!
!
solve
finish
/solu
physics,read,struct
ldread,temp,,,,,,rth
environment
tref,273
dk,1,all,0
dk,2,UX,0
solve
finish
/post1
etable,CompStress,LS,1
! Enter postprocessor
! Create an element table for link stress
PRETAB,CompStress
Although the geometry must remain constant, the element types can change. For instance, thermal elements are
required for a thermal analysis while structural elements are required to deterime the stress in the link. It is
important to note, however that only certain combinations of elements can be used for a coupled physics
analysis. For a listing, see Chapter 2 of the ANSYS Coupled-Field Guide located in the help file.
The process requires the user to create all the necessary environments, which are basically the preprocessing
portions for each environment, and write them to memory. Then in the solution phase they can be combined to
solve the coupled analysis.
! Enter preprocessor
k,1,0,0
k,2,1,0
! Keypoints
l,1,2
et,1,link33
r,1,4e-4,
mp,kxx,1,60.5
! Element type
! Area
! Thermal conductivity
esize,0.1
lmesh,all
physics,write,thermal
physics,clear
!
!
!
!
Element size
Mesh line
Write physics environment as thermal
Clear the environment
etchg,tts
mp,ex,1,200e9
mp,prxy,1,0.3
mp,alpx,1,12e-6
physics,write,struct
physics,clear
finish
!
!
!
!
!
Element type
Young's modulus
Poisson's ratio
Expansion coefficient
Write physics environment as struct
/solu
antype,0
physics,read,thermal
dk,1,temp,348
!
!
!
!
solve
finish
/solu
physics,read,struct
ldread,temp,,,,,,rth
tref,273
dk,1,all,0
dk,2,UX,0
solve
finish
/post1
etable,CompStress,LS,1
PRETAB,CompStress
! Enter postprocessor
! Create an element table for link stress
! Print the element table
Using P-Elements
Introduction
This tutorial was completed using ANSYS 7.0. This tutorial outlines the steps necessary for solving a
model meshed with p-elements. The p-method manipulates the polynomial level (p-level) of the finite
element shape functions which are used to approximate the real solution. Thus, rather than increasing
mesh density, the p-level can be increased to give a similar result. By keeping mesh density rather
coarse, computational time can be kept to a minimum. This is the greatest advantage of using p-elements
over h-elements.
A uniform load will be applied to the right hand side of the geometry shown below. The specimen was
modeled as steel with a modulus of elasticity of 200 GPa.
/prep7
! Enter preprocessor
k,1,0,0
k,2,0,100
k,3,20,100
k,4,45,52
k,5,55,52
k,6,80,100
k,7,100,100
k,8,100,0
k,9,80,0
k,10,55,48
k,11,45,48
k,12,20,0
a,1,2,3,4,5,6,7,8,9,10,11,12
et,1,plane145
keyopt,1,3,3
r,1,10
mp,ex,1,200000
mp,prxy,1,0.3
!
!
!
!
!
esize,5
amesh,all
! Element size
! Mesh area
finish
/solu
antype,0
nsubst,20,100,20
outres,all,all
time,1
!
!
!
!
lsel,s,loc,x,0
dl,all,,all
lsel,all
lsel,s,loc,x,100
Element type
Plane stress with thickness option
Real constant - thickness
Young's modulus
Poisson's ratio
Static analysis
Number of substeps
Output data for all substeps
Time at end = 1
sfl,all,pres,-100
lsel,all
! Apply a pressure
! Re-select all lines
solve
finish
/post1
set,last
plesol,s,eqv
! Enter postprocessor
! Select last set of data
! Plot the equivalent stress
Using P-Elements
Introduction
This tutorial was completed using ANSYS 7.0. This tutorial outlines the steps necessary for solving a model
meshed with p-elements. The p-method manipulates the polynomial level (p-level) of the finite element shape
functions which are used to approximate the real solution. Thus, rather than increasing mesh density, the p-level
can be increased to give a similar result. By keeping mesh density rather coarse, computational time can be kept
to a minimum. This is the greatest advantage of using p-elements over h-elements.
A uniform load will be applied to the right hand side of the geometry shown below. The specimen was modeled
as steel with a modulus of elasticity of 200 GPa.
/prep7
! Enter preprocessor
k,1,0,0
k,2,0,100
k,3,20,100
k,4,45,52
k,5,55,52
k,6,80,100
k,7,100,100
k,8,100,0
k,9,80,0
k,10,55,48
k,11,45,48
k,12,20,0
a,1,2,3,4,5,6,7,8,9,10,11,12
et,1,plane145
keyopt,1,3,3
r,1,10
mp,ex,1,200000
mp,prxy,1,0.3
!
!
!
!
!
esize,5
amesh,all
! Element size
! Mesh area
finish
/solu
antype,0
nsubst,20,100,20
outres,all,all
time,1
!
!
!
!
lsel,s,loc,x,0
dl,all,,all
lsel,all
lsel,s,loc,x,100
sfl,all,pres,-100
lsel,all
Element type
Plane stress with thickness option
Real constant - thickness
Young's modulus
Poisson's ratio
Static analysis
Number of substeps
Output data for all substeps
Time at end = 1
solve
finish
/post1
set,last
plesol,s,eqv
! Enter postprocessor
! Select last set of data
! Plot the equivalent stress
Using P-Elements
Introduction
This tutorial was completed using ANSYS 7.0. This tutorial outlines the steps necessary for solving a model meshed
with p-elements. The p-method manipulates the polynomial level (p-level) of the finite element shape functions
which are used to approximate the real solution. Thus, rather than increasing mesh density, the p-level can be
increased to give a similar result. By keeping mesh density rather coarse, computational time can be kept to a
minimum. This is the greatest advantage of using p-elements over h-elements.
A uniform load will be applied to the right hand side of the geometry shown below. The specimen was modeled as
steel with a modulus of elasticity of 200 GPa.
! define geometry
k,1,0,0
k,2,0.03,0
k,3,0.03,0.03
! Define keypoints
k,4,0,0.03
a,1,2,3,4
! mesh 2D areas
ET,1,Plane55
! Element type
MP,Dens,1,920
mp,c,1,2040
mp,kxx,1,1.8
! Define density
! Define specific heat
! Define heat transfer coefficient
esize,0.0005
amesh,all
! Mesh size
! Mesh area
finish
/solu
antype,4
! Transient analysis
time,60
nropt,full
lumpm,0
nsubst,20
neqit,100
autots,off
lnsrch,on
outres,all,all
kbc,1
!
!
!
!
!
!
!
!
IC,all,temp,268
nsel,s,ext
sf,all,conv,10,368
nsel,all
/gst,off
!
!
!
!
/post1
set,last
etable,melty,temp,
esel,s,etab,melty,273
finish
!
!
!
!
Enter postprocessor
Read in last subset of data
Create an element table
Select all elements from table above 273
/solu
antype,,rest
ekill,all
esel,all
!
!
!
!
solve
finish
finish
/post1
set,last
esel,s,live
plnsol,temp
!
!
!
!
Re-enter postprocessor
Read in last subset of data
Select all live elements
Plot the temp contour of the live elements
Using P-Elements
Introduction
This tutorial was completed using ANSYS 7.0. This tutorial outlines the steps necessary for solving a model
meshed with p-elements. The p-method manipulates the polynomial level (p-level) of the finite element shape
functions which are used to approximate the real solution. Thus, rather than increasing mesh density, the p-level
can be increased to give a similar result. By keeping mesh density rather coarse, computational time can be kept
to a minimum. This is the greatest advantage of using p-elements over h-elements.
A uniform load will be applied to the right hand side of the geometry shown below. The specimen was modeled
as steel with a modulus of elasticity of 200 GPa.
! define geometry
k,1,0,0
k,2,0.03,0
k,3,0.03,0.03
k,4,0,0.03
a,1,2,3,4
! Define keypoints
! mesh 2D areas
ET,1,Plane55
! Element type
MP,Dens,1,920
mp,c,1,2040
mp,kxx,1,1.8
! Define density
! Define specific heat
! Define heat transfer coefficient
esize,0.0005
amesh,all
! Mesh size
! Mesh area
finish
/solu
antype,4
! Transient analysis
time,60
nropt,full
lumpm,0
nsubst,20
neqit,100
autots,off
lnsrch,on
outres,all,all
kbc,1
!
!
!
!
!
!
!
!
IC,all,temp,268
nsel,s,ext
sf,all,conv,10,368
nsel,all
/gst,off
!
!
!
!
/post1
set,last
etable,melty,temp,
esel,s,etab,melty,273
finish
!
!
!
!
Enter postprocessor
Read in last subset of data
Create an element table
Select all elements from table above 273
/solu
antype,,rest
ekill,all
esel,all
!
!
!
!
!
!
!
!
Re-enter postprocessor
Read in last subset of data
Select all live elements
Plot the temp contour of the live elements
solve
finish
finish
/post1
set,last
esel,s,live
plnsol,temp
Contact Elements
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to utilize contact
elements to simulate how two beams react when they come into contact with each other.
The beams, as shown below, are 100mm long, 10mm x 10mm in cross-section, have a Young's modulus of 200
GPa, and are rigidly constrained at the outer ends. A 10KN load is applied to the center of the upper, causing it to
bend and contact the lower.
H2=10
! Create Geometry
blc4,X1,Y1,L1,H1
blc4,X2,Y2,L2,H2
! define element type
ET,1,plane42
keyopt,1,3,3
type,1
R, 1, 10
!
!
!
!
element type 1
plane stress w/thick
activate element type 1
thickness 0.01
! Young's modulus
! Poisson's ratio
! meshing
esize,2
amesh,all
ET,2,contac48
keyo,2,7,1
r,2,200000,,,,10
TYPE,2
real,2
relect everything
select bottom area
select nodes in this area
select bottom layer of nodes in this area
select the nodes above the other beam
call this selection 'target'
gcgen,source,target,3
finish
/solut
antype,0
time,1
autots,on
nsubst,100,1000,20
outres,all,all
neqit,100
!
!
!
!
!
nsel,s,loc,x,X1
! Constrain top beam
nsel,r,loc,y,Y1,(Y1+H1)
d,all,all
nsel,all
nsel,s,loc,x,(X2+L2)
! Constrain bottom beam
nsel,r,loc,y,Y2,(Y2+H2)
d,all,all
nsel,all
nsel,s,loc,x,(L1/2+X1)
nsel,r,loc,y,(Y1+H1)
f,all,fy,-10000
nsel,all
! Apply load
solve
finish
/post1
/dscale,1,1
/CVAL,1,20,40,80,160,320,640,1280,2560
PLNSOL,S,EQV,0,1
http://www.mece.ualberta.ca/tutorials/ansys/CL/CAT/contact/print.html
Contact Elements
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to utilize
contact elements to simulate how two beams react when they come into contact with each other.
The beams, as shown below, are 100mm long, 10mm x 10mm in cross-section, have a Young's modulus
of 200 GPa, and are rigidly constrained at the outer ends. A 10KN load is applied to the center of the
upper, causing it to bend and contact the lower.
http://www.mece.ualberta.ca/tutorials/ansys/CL/CAT/contact/print.html
!
!
!
!
element type 1
plane stress w/thick
activate element type 1
thickness 0.01
! Young's modulus
! Poisson's ratio
! meshing
esize,2
amesh,all
ET,2,contac48
keyo,2,7,1
r,2,200000,,,,10
TYPE,2
real,2
relect everything
select bottom area
select nodes in this area
select bottom layer of nodes in this area
select the nodes above the other beam
call this selection 'target'
gcgen,source,target,3
finish
/solut
antype,0
time,1
autots,on
nsubst,100,1000,20
outres,all,all
neqit,100
!
!
!
!
!
nsel,s,loc,x,X1
! Constrain top beam
nsel,r,loc,y,Y1,(Y1+H1)
d,all,all
nsel,all
nsel,s,loc,x,(X2+L2)
http://www.mece.ualberta.ca/tutorials/ansys/CL/CAT/contact/print.html
nsel,r,loc,y,Y2,(Y2+H2)
d,all,all
nsel,all
nsel,s,loc,x,(L1/2+X1)
nsel,r,loc,y,(Y1+H1)
f,all,fy,-10000
nsel,all
! Apply load
solve
finish
/post1
/dscale,1,1
/CVAL,1,20,40,80,160,320,640,1280,2560
PLNSOL,S,EQV,0,1
Introduction
This tutorial was completed using ANSYS 7.0 The purpose of this tutorial is to familiarize the user
with the ANSYS Parametric Design Language (APDL). This will be a very basic introduction to
APDL, covering things like variable definition and simple looping. Users familiar with basic
programming languages will probably find the APDL very easy to use. To learn more about APDL
and see more complex examples, please see the APDL Programmer's Guide located in the help file.
This tutorial will cover the preprocessing stage of constructing a truss geometry. Variables including
length, height and number of divisions of the truss will be requested and the APDL code will
construct the geometry.
= (LENGTH/(DIVISION/2))/2
DIVISION + 1
-1
= 0
*do,i,1,NUM_K,1
COUNT = COUNT + 1
OSCILATE = (-1)**COUNT
X_COORD = X_COORD + DELTA_L
*if,OSCILATE,GT,0,THEN
k,i,X_COORD,0
*else
k,i,X_COORD,HEIGHT
*endif
*enddo
KEYP = 0
*do,j,1,DIVISION,1
KEYP = KEYP + 1
L,KEYP,(KEYP+1)
*if,KEYP,LE,(DIVISION-1),THEN
L,KEYP,(KEYP+2)
*endif
*enddo
et,1,link1
r,1,100
mp,ex,1,200000
mp,prxy,1,0.3
esize,,1
lmesh,all
finish
http://www.mece.ualberta.ca/tutorials/ansys/cl/cat/apdl/apdl.html
= (LENGTH/(DIVISION/2))/2
DIVISION + 1
-1
= 0
*do,i,1,NUM_K,1
COUNT = COUNT + 1
http://www.mece.ualberta.ca/tutorials/ansys/cl/cat/apdl/apdl.html
OSCILATE = (-1)**COUNT
X_COORD = X_COORD + DELTA_L
*if,OSCILATE,GT,0,THEN
k,i,X_COORD,0
*else
k,i,X_COORD,HEIGHT
*endif
*enddo
KEYP = 0
*do,j,1,DIVISION,1
KEYP = KEYP + 1
L,KEYP,(KEYP+1)
*if,KEYP,LE,(DIVISION-1),THEN
L,KEYP,(KEYP+2)
*endif
*enddo
et,1,link1
r,1,100
mp,ex,1,200000
mp,prxy,1,0.3
esize,,1
lmesh,all
finish
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to view cross
sectional results (Deformation, Stress, etc.) of the following example.
! Creates a rectangle
/ANGLE, 1 ,60.000000,YS,1
/REPLOT,FAST
ET,1,SOLID45
! Element type
MP,EX,1,200000
MP,PRXY,1,0.3
! Young's Modulus
! Poisson's ratio
esize,20
vmesh,all
! Element size
! Mesh the volume
FINISH
/SOLU
ANTYPE,0
ASEL,S,LOC,Z,0
DA,All,ALL,0
ASEL,ALL
!
!
!
!
KSEL,S,LOC,Z,Length
KSEL,R,LOC,Y,Height
KSEL,R,LOC,X,Width
FK,All,FY,-2500
KSEL,ALL
SOLVE
FINISH
! Solve
/POST1
PLNSOL,U,SUM,0,1
WPOFFS,Width/2,0,0
WPROTA,0,0,90
/CPLANE,1
/TYPE,1,8
!
!
!
!
!
WPCSYS,-1,0
WPOFFS,0,0,1/16*Length
/CPLANE,1
/TYPE,1,5
PLNSOL,S,EQV,0,1
!
!
!
!
Static analysis
Area select at z=0
Constrain the area
Reselect all areas
! Force on keypoint
! Reselect all keypoints
Plot deflection
Offset the working plane for cross-section view
Rotate working plane
Cutting plane defined to use the WP
QSLICE display
!Animation
ANCUT,43,0.1,5,0.05,0,0.1,7,14,2 ! Animate the slices
! Creates a rectangle
/ANGLE, 1 ,60.000000,YS,1
/REPLOT,FAST
ET,1,SOLID45
! Element type
MP,EX,1,200000
MP,PRXY,1,0.3
! Young's Modulus
! Poisson's ratio
esize,20
vmesh,all
! Element size
! Mesh the volume
FINISH
/SOLU
ANTYPE,0
ASEL,S,LOC,Z,0
DA,All,ALL,0
ASEL,ALL
!
!
!
!
KSEL,S,LOC,Z,Length
KSEL,R,LOC,Y,Height
KSEL,R,LOC,X,Width
FK,All,FY,-2500
KSEL,ALL
SOLVE
FINISH
! Solve
/POST1
PLNSOL,U,SUM,0,1
WPOFFS,Width/2,0,0
WPROTA,0,0,90
/CPLANE,1
/TYPE,1,8
!
!
!
!
!
WPCSYS,-1,0
WPOFFS,0,0,1/16*Length
/CPLANE,1
/TYPE,1,5
PLNSOL,S,EQV,0,1
!
!
!
!
Static analysis
Area select at z=0
Constrain the area
Reselect all areas
! Force on keypoint
! Reselect all keypoints
Plot deflection
Offset the working plane for cross-section view
Rotate working plane
Cutting plane defined to use the WP
QSLICE display
!Animation
ANCUT,43,0.1,5,0.05,0,0.1,7,14,2 ! Animate the slices
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to create and use 'paths' to provide extra detail during
post processing. For example, one may want to determine the effects of stress concentrators along a certain path. Rather than
plotting the entire contour plot, a plot of the stress along that path can be made.
In this tutorial, a steel plate measuring 100 mm X 200 mm X 10 mm will be used. Three holes are drilled through the vertical
centerline of the plate. The plate is constrained in the y-direction at the bottom and a uniform, distributed load is pulling on the
top of the plate.
et,1,plane2,,,3
R,1,10
mp,ex,1,200000
mp,prxy,1,0.3
!
!
!
!
Plane element
thickness of plane
Young's Modulus
Poisson's ratio
esize,5
amesh,all
! mesh size
! area mesh
finish
/solu
! apply constraints
lsel,s,loc,y,0
dl,all,,UY
allsel
! apply loads
allsel
lsel,s,loc,y,100
SFL,all,PRES,-2000/10
allsel
solve
finish
! plot results
/window,1,top
/POST1
PLNSOL,S,eqv,2,1
/window,1,off
/noerase
/window,2,bot
nsel,all
nsel,s,loc,y,50
path,cutline,2,,1000
ppath,1,,0,50
ppath,2,,200,50
PDEF,,S,eqv,AVG
nsel,all
PLPAGM,SEQV,200,NODE
!
!
!
!
!
define
define
choose
define
define
In this tutorial, a steel plate measuring 100 mm X 200 mm X 10 mm will be used. Three holes are drilled
through the vertical centerline of the plate. The plate is constrained in the y-direction at the bottom and a
uniform, distributed load is pulling on the top of the plate.
cyl4,50,50,10
cyl4,100,50,10
cyl4,150,50,10
asba,1,all
et,1,plane2,,,3
R,1,10
mp,ex,1,200000
mp,prxy,1,0.3
!
!
!
!
Plane element
thickness of plane
Young's Modulus
Poisson's ratio
esize,5
amesh,all
! mesh size
! area mesh
finish
/solu
! apply constraints
lsel,s,loc,y,0
dl,all,,UY
allsel
! apply loads
allsel
lsel,s,loc,y,100
SFL,all,PRES,-2000/10
allsel
solve
finish
! plot results
/window,1,top
/POST1
PLNSOL,S,eqv,2,1
/window,1,off
/noerase
/window,2,bot
nsel,all
nsel,s,loc,y,50
path,cutline,2,,1000
ppath,1,,0,50
ppath,2,,200,50
PDEF,,S,eqv,AVG
nsel,all
PLPAGM,SEQV,200,NODE
!
!
!
!
!
define
define
choose
define
define
Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to plot Vertical Deflection
vs. Length of the following beam using tables, a special type of array. By plotting this data on a curve, rather than using a contour
plot, finer resolution can be achieved.
This tutorial will use a steel beam 400 mm long, with a 40 mm X 60 mm cross section as shown above. It will be rigidly
constrained at one end and a -2500 N load will be applied to the other.
!
!
!
!
Beam3 element
Area,I,Height
Youngs Modulus
Poisson's Ratio
k,1,0,0
k,2,length,0
! Geometry
l,1,2
esize,elementsize
lmesh,all
finish
/solu
! Mesh size
! Mesh
antype,static
! Static analysis
dk,1,all
fk,2,fy,-2500
solve
finish
/post1
! Note, there are 21 nodes in the mesh.
! the table must have (#nodes + 1) rows
rows = ((length/elementsize + 1) + 1)
*DIM,graph,TABLE,rows,2,1
*vget,graph(1,1),node,all,loc,x
*vget,graph(1,2),node,all,u,y
*set,graph(2,1),0
*set,graph(2,2),0
400
*vget,graph(rows,1),node,2,loc,x
*vget,graph(rows,2),node,2,u,y
*vplot,graph(1,1),graph(1,2)
/axlab,x,Length
/axlab,y,Vertical Deflection
/replot
This tutorial will use a steel beam 400 mm long, with a 40 mm X 60 mm cross section as shown above. It will
be rigidly constrained at one end and a -2500 N load will be applied to the other.
!
!
!
!
Beam3 element
Area,I,Height
Youngs Modulus
Poisson's Ratio
k,1,0,0
k,2,length,0
! Geometry
l,1,2
esize,elementsize
! Mesh size
lmesh,all
! Mesh
finish
/solu
antype,static
! Static analysis
dk,1,all
fk,2,fy,-2500
solve
finish
/post1
! Note, there are 21 nodes in the mesh.
! the table must have (#nodes + 1) rows
rows = ((length/elementsize + 1) + 1)
*DIM,graph,TABLE,rows,2,1
*vget,graph(1,1),node,all,loc,x
*vget,graph(1,2),node,all,u,y
*set,graph(2,1),0
*set,graph(2,2),0
*vget,graph(rows,1),node,2,loc,x
*vget,graph(rows,2),node,2,u,y
*vplot,graph(1,1),graph(1,2)
/axlab,x,Length
/axlab,y,Vertical Deflection
/replot