Académique Documents
Professionnel Documents
Culture Documents
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.
ANSYS Environment
The ANSYS Environment for 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
1. Main Window
a. Utility Menu
b. Input Window
c. Toolbar
2
The Toolbar contains push buttons that execute commonly used
ANSYS commands. More push buttons can be added if desired.
d. Main Menu
e. Graphics Window
2. Output Window
3
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 Files
Introduction
A large number of files are created when you run ANSYS. If you started
ANSYS without specifying a jobname, the name of all the files created will be
FILE.* where the * represents various extensions described below. If you
specified a jobname, say Frame, and then the created files will all have the file
prefix, Frame again with various extensions:
frame.db
Database file (binary). This file stores the geometry, boundary
conditions and any solutions.
frame.dbb
Backup of the database file (binary).
frame.err
Error file (text). Listing of all error and warning messages.
frame. out
Output of all ANSYS operations (text). This is what normally scrolls in
the output window during an ANSYS session.
frame.log
Logfile or listing of ANSYS commands (text). Listing of all equivalent
ANSYS command line commands used during the current session.
etc...
Depending on the operations carried out, other files may have been
written. These files may contain results, etc.
What to save?
When you want to clean up your directory, or move things from the /scratch
directory, what files do you need to save?
4
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).
To save your model, select Utility Menu Bar -> File -> Save As Jobname.db.
Your model will be saved in a file called jobname.db, where jobname is
the name that you specified in the Launcher when you first started ANSYS.
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
unforeseen problems.
5
1. Using the Launcher...
o In the ANSYS Launcher, select Interactive... and specify the
previously defined jobname.
o Then when you get ANSYS started, select Utility Menu -> File -
> Resume Jobname.db .
o This will restore as much of your database (geometry, loads,
solution, etc) that you previously saved.
2. Or, start ANSYS and select Utility Menu -> File -> Resume from...
and select your job from the list that appears.
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?
6
the results differ by a large amount however, it will be necessary to try a finer
mesh yet.
The Consequences
Finer meshes come with a cost however: more calculation 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
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 produces lists and tables of many types of results that are normally
displayed on the screen. However, it is often desired to save the results to a
file to be later analyzed or included in a report.
7
list from the menu. You can pick multiple items. When the list appears
on the screen in its own window, Select 'File'/'Save As...' and give a
file name to store the results.
2. Any other solutions can be done in the same way. For example select
'Nodal Solution' from the 'List Results' menu, to get displacements.
3. Preprocessing and Solution data can be listed and saved from the 'List'
menu in the 'Utility Menu bar'. Save the resulting list in the same way
described above.
Plotting of Figures
There are two major routes to get hardcopies from ANSYS. The first is a quick
a raster-based screen dump, while the second is a scalable vector plot.
This raster image file may now be printed on a PostScript printer or included
in a document.
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...'.
8
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:
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:
9
1. Colour PostScript: To save the images to a colour postscript file,
enter the following commands in display:
2. pscr,color,2
3. /show,pscr
4. plot,n
Where n is the plot number, as above. You can plot as many images
as you want to postscript files in this manner. For subsequent plots,
you only require the plot,n command as the other options have now
been set. Each image is plotted to a postscript file such as pscrxx.grph,
where xx is a number, starting at 00.
Note: when you import a postscript file into a word processor, the
postscript image will appear as blank box. The printer information is still
present, but it can only be viewed when it's printed out to a postscript
printer.
Printing it out: Now that you've got your color postscript file, what are
you going to do with it? Take a look here for instructions on colour
postscript printing at a couple of sites on campus where you can have
your beautiful stress plot plotted to paper, overheads or even posters!
10
Note: when you import a postscript file into a word processor, the
postscript image will appear as blank box. The printer information is still
present, but it can only be viewed when it's printed out to a postscript
printer.
9. HPGL: The third commonly used printer format is HPGL, which stands
for Hewlett Packard Graphics Language. This is a compact vector
format that has the advantage that when you import a file of this type
into a word processor, you can actually see the image in the word
processor! To use the HPGL format, issue the following commands:
10. /show,hpgl
11. plot,n
11
EX NO: 1 ANALYSIS OF SIMPLE TRUSS
AIM:
Determine the nodal deflections, reaction forces, and stress for the
truss system.
PROBLEM DESCRIPTION:
12
Take Youngs Modulus E = 200GPa,
Area A = 3250mm2
1. 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
13
o We are going to define 7 keypoints for the simplified structure as
given in the following table
coordinate
keypoint
x y
1 0 0
2 1800 3118
3 3600 0
4 5400 3118
5 7200 0
6 9000 3118
7 10800 0
(these keypoints are depicted by numbers in the above figure).
14
1.
o To define the first keypoint which has the coordinates x = 0 and
y = 0:
Enter keypoint number 1 in the appropriate box, and enter the
x,y coordinates: 0, 0 in their appropriate boxes (as shown
above).
Click 'Apply' to accept what you have typed.
o Enter the remaining keypoints using the same method.
Note: When entering the final data point, click on 'OK' to indicate
that you are finished entering keypoints. If you first press '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.
2. 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.
3. 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.
4. Form Lines
15
The keypoints must now be connected
We will use the mouse to select the keypoints to form the lines.
o In the main menu select: Preprocessor > Modeling > Create >
Lines > Lines > In Active Coord. The following window will
then appear:
o Use the mouse to pick keypoint #1 (i.e. click on it). It will now be
marked by a small yellow box.
o 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.
o Connect the remaining keypoints using the same method.
o 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.
16
1. 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:
17
Click on the 'Add...' button. The following window will appear.
1.
o 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.
o Click on 'Close' in the 'Element Types' dialog box.
2. Define Geometric Properties
18
Click Add... and select 'Type 1 LINK1' (actually it is already selected). Click on
'OK'. The following window will appear.
1.
o As shown in the window above, enter the cross-sectional area
(3250mm):
o Click on 'OK'.
o 'Set 1' now appears in the dialog box. Click on 'Close' in the
'Real Constants' window.
2. Element Material Properties
19
o In the 'Preprocessor' menu select Material Props > Material
Models
1.
o We are going to give the properties of Steel. Enter the following
field:
1. EX = 2 e 5
o 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
20
continue. Close the "Define Material Model Behavior" by clicking
on the 'X' box in the upper right hand corner.
2. 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.
1.
o 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.
2. Mesh
o In the 'Preprocessor' menu select Meshing > Mesh > Lines and
click 'Pick All' in the 'Mesh Lines' Window
21
Plot Numbering
To show the line numbers, keypoint numbers, node numbers...
From the Utility Menu (top of screen) select PlotCtrls > Numbering...
Fill in the Window as shown below and click 'OK'
22
Now you can turn numbering on or off at your discretion
Save the model at this time, so if you make some mistakes later on, you will at
least be able to come back to this point. To do this, on the Utility Menu select
File > Save as.... Select the name and location where you want to save your
file.
You have now defined your model. It is now time to apply the load(s) and
constraint(s) and solve the the resulting system of equations.
Open up the 'Solution' menu (from the same 'ANSYS Main Menu').
First you must tell ANSYS how you want it to solve this problem:
23
o Click 'OK'.
2. Apply Constraints
24
o 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'.
o 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
o Select Define Loads > Apply > Structural > Force/Moment >
on Keypoints.
o Select the first Keypoint (left end of the truss) and click 'OK' in
the 'Apply F/M on KPs' window.
25
o Select FY in the 'Direction of force/mom'. This indicate that we
will be applying the load in the 'y' direction
o 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.
o The force will appear in the graphics window as a red arrow.
o Apply the remaining loads in the same manner.
The applied loads and constraints should now appear as shown below.
26
We now tell ANSYS to find the solution:
o In the 'Solution' menu select Solve > Current LS. This indicates
that we desire the solution under the current Load Step (LS).
Reaction Forces
A list of the resulting reaction forces can be obtained for this element
From the Main Menu select General Postproc > List Results >
Reaction Solu.
27
Select 'All struc forc F' as shown above and click 'OK'
Deformation
o Select 'Def + undef edge' and click 'OK' to view both the deformed
and the undeformed object.
Deflection
o From the 'General Postproc' menu select Plot results > Contour
Plot > Nodal Solution. The following window will appear.
28
o Looking at the scale, you may want to use more useful intervals.
From the Utility Menu select Plot Controls > Style > Contours >
Uniform Contours...
o Fill in the following window as shown and click 'OK'.
Axial Stress
29
o 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
o Click on 'OK' and close the 'Element Table Data' window.
o Plot the Stresses by selecting Element Table > Plot Elem Table
o The following window will appear. Ensure that 'SAXL' is selected
and click 'OK'
o 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 ...
Quitting ANSYS
30
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'.
RESULT:
Maximum Deflection :
Minimum Stress :
Maximum Stress :
31
EX NO: 2 2D Plane Stress Bracket
AIM:
To analyse the given bracket for deflection and Stress by treating it as
plane stress condition.
PROBLEM DESCRIPTION:
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.
32
Defining the Basic Geometry
ANSYS Main Menu -> Preprocessor -> (-Modeling-) Create -> (-Areas-)
Rectangle -> By 2 Corners.
Enter the parameters in the dialog box as shown below:
33
This creates a 80 by 100 rectangle with its origin at (0,0). Now create circular
end on the right hand side.
34
Don't worry for now that the areas overlap. They will be combined to
form a single area at a later time.
Also create a second and third circle for the left hand side, using the
following dimensions:
WP X 0 0
WP Y 20 80
radius 20 20
One more thing to define... we need a rectangle on the left hand end to
fill between the two small circles.
Create a rectangle with
WP X -20
WP Y 20
width 20
height 60
35
Your screen should now look like the following...
Boolean Operations
We now want to add these five discrete areas together to form one
area.
Back up to the Preprocessor menu and select Operate.
Then select (-Booleans-) Add -> Areas. A dialogue box then appears.
Now click on all five areas. Before pressing OK in the dialogue box,
check to see that the count parameter in the dialogue box is 5
(indicating 5 selected areas). If this not the case, try again.
Once OK is pressed, some processing takes place and finally one
large area is plotted.
36
The Bolt Holes
We now want to remove the bolt holes from this plate.
WP X 80 0 0
WP Y 50 20 80
radius 30 10 10
37
Elements and Meshing
Now that the area has been defined, it is time to select the element type, its
associated properties and finally, mesh the area.
38
From this dialog box, you can select from a wide range of elements that are
listed in various groups. Use the scroll bars to take a look at the groupings.
For our problem, select solid (under the Structural heading) and the
quad 82 element, as shown in the above figure. This indicates that we
will be using an eight noded quadrilateral element. It has 4 corner
nodes and 4 midside nodes and possesses a quadratic shape function.
Then press OK.
Now select the Options... button.
Under the Element Behavior K3 label, select Plane strs w/thk. This
indicates that we desire a plane stress element with thickness.
Under the Extra Element Output K5 select nodal stress.
The dialog box should now look as follows.
39
We will now assign some properties to the element.
Close up the Element Types window and once again back up to the
Preprocessor menu.
Select Real Constants... and click the Add... button followed by the OK
button.
In the thickness field, enter 20 (i.e. 20 mm).
The dialog box should look like the following figure:
40
Click on OK when complete.
41
The Meshing Process
The element properties are now defined. It is time to mesh the region.
42
Loads and Constraints
Now that the geometry has been defined, it is time to apply the loads and
constraints to the body and finally solve the problem.
To start this next stage, we need to back up to the ANSYS Main Menu.
Select Solution -> (-Analysis Type-)New Analysis .... Make sure that
the type of analysis is set to Static.
Click on OK.
43
This window is rich with function. Try playing with some of the options. In
general, you select an operation in the window and then use your mouse to
activate it in the Graph Window.
44
selection or by multiple nodes using Box, Polygon or Circle. Try
whatever method you like. You can always Reset or Cancel the
operation.
In the end, you want to select the following nodes:
45
Doing this indicates that all degrees of freedom at these nodes are
fixed to zero.
Do the same with the second small hole...
To see the whole plate again, you will need to go over to the Pan Zoom
Rotate window and select Back Up.
Zoom in on the other bolt hole and constraint it in the same way.
Load Application
46
Solution
Before proceeding, well will plot the elements again (Plot -> Elements
from the ANSYS Utility Menu).
From the Solution menu, select (-Solve-) Current LS. This indicates
that we want the current load step (or load condition) solved.
Click on the OK button on the dialog box that appears.
Close the /STAT window when the solution is complete.
Close the Solution menu, and enter the General PostProc menu.
47
From this, select (-Read Results-) Last Set to indicate the last set of
the results are to be made current.
48
Then press the Apply button.
Your graphic window should now look like:
49
Any other desired stress field may also be plotted by selecting the
appropriate field in the right hand box and pressing Apply.
When you are done, press OK.
At this point, you might want to go ahead and change the geometry, loads
,constraints, material properties and resolve the problem.
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.
RESULT:
Maximum Deflection :
50
Minimum Stress :
Maximum Stress :
51
EX NO: 3 CONDUCTION ANALYSIS OF A RECTANGULAR PLATE
AIM:
To analyze the given rectangular plate for temperature distribution.
PROBLEM DESCRIPTION:
Preprocessing:
1. Change jobname. On the Utility Menu across the very top of the screen,
select:
File -> Change Jobname Enter platetmp, and click on OK.
52
Click on Add. The Library of Element Types menu appears, as shown.
Scroll down to highlight Thermal Solid, and Quad 4node 55 as shown.
Click on OK, then Close.
In the dialogue box that appears, on the right hand side, choose:
Thermal -> Conductivity -> Isotropic
53
Another box appears. Enter 401 for KXX (thermal conductivity), then click on
OK.
KXX is the only material property needed for this analysis.
Close the other box (the one headed Define Material Model Behavior) by
clicking on the red X in the upper right-hand corner.
54
5. Specify mesh density controls.
We will specify numbers of element divisions along lines.
Choose:
Preprocessor -> -Meshing- Size Cntrls -> Manual Size -> Lines->
Picked Lines
The picking menu (below left) appears. On the graphics window, click on the
bottom horizontal line (this is one of the 10 meter lines), to highlight it. Then,
click OK in the picking menu. Then, the Element Size menu (below right)
appears. Enter 6 for NDIV, as shown, then click OK
55
Now, repeat the above process to specify 12 divisions along either of the
vertical lines. It is not necessary to specify a value for all four lines, you just
need a value for one of the horizontal lines and one of the vertical lines.
However, if you do specify a value for all four lines, make sure you use the
same number of divisions for both horizontal lines, and the same number of
divisions for both vertical lines. Of course, as specified above, the vertical and
horizontal lines do not need to have the same value. It is a problem, however,
if you specify different values for parallel lines on opposite ends of the plate.
A picking menu appears. Select Pick All. The rectangle will be meshed. You
will see a number of small rectangles drawn on the larger rectangular area.
Each small rectangle is a finite element. There are four nodes associated
with each individual element. The nodes are at the corners of the elements.
Solution:
A picking menu appears. Highlight the two vertical lines (the 20 meter lines),
which have a temperature of 100 C, then click on OK in the picking menu.
The box on the next page appears. Highlight TEMP for DOFs to be
constrained, and enter 100 for VALUE, as shown.
56
Repeat the above process to apply the 100 C temperature to the bottom
horizontal line, but in this case, choose Yes for Apply TEMP to endpoints?.
Repeat the process once more, to apply the 200 C temperature to the top
horizontal line, but in this case, choose No for Apply TEMP to endpoints?
Now, to address the fact that two corners do not have a specified
temperature, as an
approximation, we will set the temperature at these to corners to 150 C.
Solution -> Define Loads-> Apply -> Thermal-> Temperature -> On Keypoints
A picking menu appears. Note that there are four keypoints in the model,
one at each corner of the large rectangular area. Click on the upper two
corners, at the intersections of the 100 C and 200 C lines. When these corner
keypoints are highlighted, choose OK in the picking menu, and the
following box appears:
57
Click on TEMP for DOFs to be constrained and enter 150 for VALUE,
then click
OK.
Note: In some cases, when you want to repeat the same process two or more
times, you can click Apply in the box, instead of OK. That issues the
command, but leaves the box open. Clicking OK issues the command, but
leaves the box open. Sometimes, though, using the Apply option can cause
problems, if you are not careful. You might click on Apply to issue the
command, then immediately click on OK to close the box, and this issues
the command twice. Sometimes, that is not a problem, and sometimes it is.
So, in this exercise, you are just asked to click on OK in each case, and then
repeat the entire procedure. For the relatively simple modeling effort
undertaken in this exercise, this approach does not add much work, and is
probably less likely to result in errors.
58
Postprocessing:
In the graphics window, a plot, as shown on the following page, should appear
59
10. Select nodes along the plate center (x=5 meters).
For comparison with the analytical solution, you will need a listing of specific
temperatures at specific locations in the plate. ANSYS has calculated a
temperature at each node. Because of our method of creating the model by
automatic meshing of the rectangle, at this time, we do not know specific
node numbers at specific locations. But, we can get a listing of node numbers,
including the locations of each node, and also a listing of temperatures by
node numbers. To keep the amount of information to a workable level, it is
probably best to include in these lists only a subset of nodes. To get such a
list, we can first select only the nodes at x=5 meters. This is a case where it is
probably easiest to just use the direct command line entry option, rather than
operate through the menus. On the command line, type nsel,s,loc,x,5, as
shown below, and hit enter:
60
12. List the temperatures at each of these nodes.
General Postproc -> List Results -> Nodal Solution
In the box that appears, click on DOF Solution and Temperature, as
shown, then click OK.
61
A listing, as shown on the following page, should appear. The locations of the
same nodes have already been listed, in Step 11 above, so the results for
these nodes can be checked with the analytical solution.
Re-select all nodes in the model for additional plotting, or listing, as desired.
To do this, simply type, at the command line: allsel, then hit enter:
Subsequent lists and plots will include all nodes. Steps 10, 11, and 12 could
be repeated to get listings of temperatures of nodes at other locations.
62
EX No: 4 TWO DIMENSIONAL TRUSS
AIM :
To analyze the given truss for deflection, stresses and reaction force.
Problem Description
Determine the nodal deflections, reaction forces, and stress for the truss
system shown below (E = 200GPa, A = 3250mm2).
PROCEDURE:
63
Preprocessor:
Key point X Y
1 0 0
2 1800 3118
3 3600 0
4 5400 3118
5 7200 0
6 9000 3118
7 10800 0
Processor:
Post Processor:
List the Following:
a. Deformation.
64
b. Reaction forces
c. Axial Stresses.
RESULT:
Thus the given truss is analyzed and found the following results:
Maximum Deflection :
Reaction Forces :
Minimum Stress :
Maximum Stress :
65
EX NO: 5 Modal Analysis of a Cantilever Beam:
AIM:
To find the various modes of frequencies for the given cantilever beam.
PROBLEM DESCRIPTION:
The simple cantilever beam is used in all of the Dynamic Analysis Tutorials.
66
The following window will appear
67
For this problem, we will use the default options so click on OK.
3. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement >
On Keypoints
68
The following window will appear
69
o Select General Postproc > Plot Results > Deformed shape .
Select 'Def + undef edge'
The first mode shape will now appear in the graphics window.
o 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'.
o The first four mode shapes should look like the following:
70
o Keep the default setting and click 'OK'
o The animated mode shapes are shown below.
Mode 1
71
EX NO: 6 CONDUCTION ANALYSIS OF 2D COMPONENT
AIM:
Create geometry
Preprocessor > Modeling > Create > Areas > Rectangle > By 2
Corners > X=0, Y=0, Width=1, Height=1
72
Define the Type of Element
Preprocessor > Element Type > Add/Edit/Delete... > click 'Add' >
Select Thermal Mass Solid, Quad 4Node 55
For this 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.
Preprocessor > Material Props > Material Models > Thermal >
Conductivity > Isotropic > KXX = 10 (Thermal conductivity)
Mesh Size
Preprocessor > Meshing > Size Cntrls > ManualSize > Areas >
All Areas > 0.05
Mesh
Preprocessor > Meshing > Mesh > Areas > Free > Pick All
ANALYSIS:
Apply Constraints
73
Thermal > Temperature > On Nodes
Click the Box option (shown below) and draw a box around the
nodes on the top line.
74
Using the same method, constrain the remaining 3 sides to a
constant value of 100
RESULTS:
Plot Temperature
General Postproc > Plot Results > Contour Plot > Nodal Solu ...
> DOF solution, Temperature TEMP
75
EX NO: 7 TWO DIMENSIONAL ANALYSIS OF FRAME
AIM:
To analyze the give frame model for Deflections, stress and Bending
Moment.
Problem Description:
The simplified version that will be used for this problem is that of a cantilever
beam shown in the following figure
76
Procedure:
Preprocessor.
1. Define the element types Pipe 16
2. Define Geometric Element
Outer Diameter :25
Wall Thickness :2
3. Material Properties
Isotropic
E = 700000 MPa.
PRXY = 0.33
4. Define Key Points
KEYPOINTS X Y Z
1 0 325 0
2 0 400 0
3 500 400 0
4 500 0 0
5 825 0 50
6 825 0 -50
5. Create Lines.
6. Apply Constraints
77
Key points UX UY UZ
1 OK OK OK
2 - - -
3 - - -
4 - - -
5 - OK OK
6 - OK OK
Apply Loads;
Key points UX UY UZ
1
2 - - -
3 - - -
4 - 600 N -
5 - 200 N -
6 - - -
Post Processor:
RESULT:
Maximum Deflection:
Minimum Stress :
Maximum Stress :
Bending Moment Diagram
78
EX NO: 8 HARMONIC ANALYSIS OF CANTILEVER BEAM
AIM:
PROBLEM DESCRIPTION:
79
1. Define Analysis Type (Harmonic)
80
The following window will appear. Use the default settings
(shown below).
3. Apply Constraints
o Select Solution > Define Loads > Apply > Structural > Displacement >
On Nodes
o Constrain all DOF
4. Apply Loads:
o Select Solution > Define Loads > Apply > Structural >
Force/Moment > On Nodes
o Select the node at x=1 (far right)
o 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
81
5. Set the frequency range
o Select Solution > Load Step Opts > Time/Frequency > Freq
and Substps...
o As shown in the window below, specify a frequency range of 0 -
100Hz, 100 substeps and stepped b.c..
82
6. Solve the System
We want to observe the response at x=1 (where the load was applyed) as a
function of frequency. We cannot do this with General PostProcessing
(POST1), rather we must use TimeHist PostProcessing (POST26). POST26
is used to observe certain variables as a function of either time or frequency.
2. Define Variables
83
o Select Add (the green '+' sign in the upper left corner) from this
window and the following window should appear
84
o Graphically select node 2 when prompted and click OK. The
'Time History Variables' window should now look as follows
85
4. Plot UY vs. frequency
o In the 'Time History Variables' window click the 'Plot' button, 2
buttons to the left of 'Add'
To get a better view of the response, view the log scale of UY.
o Select Utility Menu > PlotCtrls > Style > Graphs > Modify
Axis
86
o As marked by an 'A' in the above window, change the Y-axis
scale to 'Logarithmic'
o Select Utility Menu > Plot > Replot
o You should now see the following
87
This is the response at node 2 for the cyclic load applied at this
node from 0 - 100 Hz.
o 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.
88
EX NO: 9 Thermal Analysis of Stepped Bar.
89
EX NO: 10 ANALYSIS OF BEAM WITH DISTRIBUTED LOAD
AIM:
The purpose of this exercise is to explain how to apply distributed loads and
use element tables to extract data.
Problem Definition:
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.
90
3. Create Keypoints
1 (0,0)
2 (1000,0)
4. Define Lines
Preprocessor > Modeling > Create > Lines > Lines > Straight
Line
L,K#,K#
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.
91
ii. Area Moment of Inertia IZZ: 833.333
iii. Total beam height HEIGHT: 10
Preprocessor > Material Props > Material Models > Structural >
Linear > Elastic > Isotropic
Preprocessor > Meshing > Size Cntrls > ManualSize > Lines >
All Lines...
Preprocessor > Meshing > Mesh > Lines > click 'Pick All'
You may also wish to turn on element numbering and turn off keypoint
numbering
92
1. Define Analysis Type
2. Apply Constraints
Solution > Define Loads > Apply > Structural > Displacement >
On Keypoints
3. Apply Loads
o Select Solution > Define Loads > Apply > Structural >
Pressure > On Beams
o Click 'Pick All' in the 'Apply F/M' window.
o As shown in the following figure, enter a value of 1 in the field
'VALI Pressure value at node I' then click 'OK'.
93
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.
94
4. Solve the System
95
d. In the third window enter '1' anywhere after the comma
4. click 'Apply'
5. Repeat steps 2 to 4 but change 'SMAXI' to 'SMAXJ' in step 3a
and change '1' to '3' in step 3d.
6. Click 'OK'. The 'Element Table Data' window should now have
two variables in it.
7. Click 'Close' in the 'Element Table Data' window.
8. Select: General Postproc > Plot Results > Line Elem Res...
9. Select 'SMAXI' from the 'LabI' pull down menu and 'SMAXJ' from
the 'LabJ' pull down menu
RESULT:
96
EX NO: 11 Thermal Analysis of a long Bar.
Introduction:
AIM:
To determine the nodal temperature distribution and create contour
plot.
Problem Description:
97
Basic Outline of the Problem:
Preprocessing:
1. Start ANSYS.
2. Create areas.
3. Define the material properties.
4. Define element type. (Quad 8node 77 element, which is a 2-D element for
heat transfer analysis.)
5. Specify meshing controls / Mesh the areas to create nodes and elements.
Solution:
6. Specify boundary conditions.
7. Solve.
Postprocessing:
8. Plot the temperature distribution.
Exit:
9. Exit the ANSYS program, saving all data.
98
Preprocessor:
Preprocessor>Modeling>Create>Areas>Rectangle>2 Corners.
The model should look like this now: (note, you have a black
background)
99
Material Properties:
Element Properties:
100
Now we have selected Element Type 1 to be a Thermal Solid 8node
Element. This finishes the section defining how the part is to be
analyzed.
Meshing:
This section is responsible for telling ANSYS how to divide the block
such that it has enough nodes, or points, to analyze to make an
accurate enough analysis.
Go to Preprocessor>Meshing>Size Controls>Manual
Size>Lines>All Lines. In the menu that comes up type 0.1 in the field
for Element edge length.
Click on OK. Now when you mesh the figure ANSYS will automatically
create square meshes that have an edge length of 0. 1m along the
lines you selected.
101
This window appears such that the program knows you are sure
that you have selected the right material to mesh (selected by the
Element Type Number), and the right Material Number (1, as
defined in the Material Properties section). Once this has been
verified, Click OK and proceed to
Preprocessor>Meshing>Mesh>Areas>Free
A popup window will appear on the left hand side of the screen.
This window allows you to select the area to be meshed.
Click anywhere within the blue rectangle you created to select the
area and then click OK in the pop-up window.
Now that we have modeled the block and defined how ANSYS is to
analyze the block we will apply the appropriate Boundary
Conditions.
Go to Preprocessor>Loads>Define Loads>Apply>Thermal (from
here one can apply any of the loads, or Boundary Conditions,
offered by ANSYS.)
First well apply the Convection Boundary layer at the base of the plate.
For this click Convection>On Lines within the Thermal Load category.
A popup window will appear on the left hand side of the screen. This
window allows you to select the line you wish the load to be applied.
Select the base of the plate and click OK. The following window will
appear:
102
Fill in the h value in the Film Coefficient blank and the Air
temperature in the Bulk Temperature blank. Click OK when
finished.
103
Now to apply the Heat Flux into the left side of the plate...
Within the Thermal Load category again, select Heat Flux>On Lines
and click OK. Then enter 50 into the blank and Click OK.
Since the top of the block is insulated we dont need to define a specific
boundary condition for the top, so we add uniform heat generation to the block
as a whole and
were done.
104
Now we have applied all the necessary boundary conditions so we
move on to the Solution.
Solution:
Post-Processing:
This section is designed so that one can list the results of their analysis
as a nodal solution
Go to the ANSYS Main Menu. Click
General Postprocessing>List Results>Nodal Solution.
105
Modification / Plotting the Results:
RESULT:
106
EX NO: 12 ANALYSIS OF CORNER BRACKET
AIM:
A simple static analysis of the corner bracket to control, if the bracket will yield
under loading.
PROBLEM DECRIPTION:
The dimensions of the corner bracket are given below. The bracket is made of
steel with a Young's modulus of E=205 GPa (GPa = 109 N/m2) and the
Poisson's ratio of 0.27 and a yield stress, including a safety factor, of 400
MPa.
107
We will assume plane state of stress, (plane stress is a state of stress in
which the normal and shear stress perpendicular to the plane is assumed to
be zero).
Preferences:
Select Structural
Preprocessing
108
Close the Element type dialog
Define rectangles
Enter 0, 0.15, -0.025, 0.025 for X1,X2,Y1 and Y2 (Tab key between
entries)
109
Enter 0.1, 0.15, -0.025, -0.075 for X1,X2,Y1 and Y2 for the second
rectangle
To clearly distinguish between the areas just created we will turn on the area
numbers and color control is turned on. This is done from the utility menu:
110
Change working plane to polar and create first circle
111
Let the Pan, Zoom, Rotate dialog be open you'll need it later
The WP origin will now be visible on top of the global origin. Next, change the
WP to polar, snap on, snap increment and display grid spacing to 0.005, the
polar radius to 0.025 and the tolerance to 0.001.
112
The next step is to create the first circle using the picking function in ANSYS.
You can at this point use the Pan,Zoom,Rotate dialog to zoom in the polar
WP coordinate system. Use the big dot to zoom in and the to pan.
Pick center point (left mouse button) at WP polar system (0,0). (Note
the message in the Input window)
Move the mouse to 0.025 radius and click left mouse button
OK to close picking menu
First we will move the WP origin to the center of the other circle. Then we will
create the other circle in the same manner as the first one. The simplest way
113
to move the WP without entering the number offset is to pick the average of
two keypoints at the lower end of the other rectangle.
Move the mouse to 0.025 radius and click left mouse button
114
Toolbar: SAVE_DB
Add areas
We need to add the different areas together to get one continuous area. This
is done with the boolean operation: Add areas
Toolbar: SAVE_DB
We need to fill in the radius between the intersection of the two rectangles.
But first we turn off the line numbers and turn off the display of the working
plane.
115
Utility menu: PlotCtrls - Numbering
116
Create fillet area
The next step is to create a fillet area that can be added to the rest of the
bracket. Before you continue to create a fillet area of the lines you just creates
use the Pan, Zoom, Rotate dialog under Utility menu: PlotCtrls to zoom in
the fillet radius as shown above.
Use the Pan, Zoom, Rotate dialog again and click on Fit and plot the areas
under
117
Add areas together
Now add the fillet area to the bracket area. Use the same procedure as in
step 10.
118
Create first bolt hole
The holes have a radius of 12.5 mm so we need to change the WP snap and
display increment to 2.5mm if we want to pick the circle origin and radius
when we create the holes.
Change the snap incr and display spacing to 0.0025 and click OK
when finished
119
Pick center point (left mouse button) at WP polar system (0,0).
Move the mouse to 0.0125 radius and click left mouse button
OK to close picking menu
To view the result so far we plot all lines (plotting areas can result in that
some areas hidden by others):
120
Toolbar: SAVE_DB
To finalize the model we only have to subtract the bolt areas from the bracket
to create holes.
Toolbar: SAVE_DB
Main Menu: Preprocessor - Meshing- Shape & Size - Global Elem Size
121
Finish the preprocessing by meshing the bracket
Solution
The upper bolt hole is constrained, e.g. we have to lock the displacements
(set them to zero) of the nodes on the circumference. Since we have not
explicitely defined where the nodes on the circumference are located,
(ANSYS automatically did that), we'll lock the 4 keypoints on the
circumference and tell ANSYS the all nodes located along the lines between
the keypoints will also be locked.
122
Main Menu: Solution - Loads - Apply - Structural - Displacement - On
Keypoints
Toolbar: SAVE_DB
We'll now apply the tapered (linearly varying) pressure to the bottom right bolt
hole. In ANSYS a hole is made of four lines defining the perimeter (omkrets).
We will apply the pressure to the two lines making up the lower part of the
circle. Since the total load Fy is 10 kN we need to calculate the maximum
pressure pm in the middle of the lower half.
Pick the line defining the bottom left part of the circle (line L6)
Apply in the picking menu
Enter 0 for VALI and 62.83e6 for VALJ
123
Apply in the PRES on Lines menu
Pick the line defining the bottom right part of the circle (line L7)
Apply in the picking menu
Enter 62.83e6 for VALI and 0 for VALJ
OK in the PRES on Lines menu
Solve
Review the information in the status window and close the window (File
- Close)
OK to begin the solution in the Solve current load step dialog
Close the information dialog when the solution is done
Postprocessing
Postprocessing is where you review the result of the analysis. The general
postprocessor is used to review the result at one loadstep (time step). Over
the entire model. The time-history postprocessor is used to review results at
specific points in the model over all time steps.
124
Plot the von Mises equivalent stress
Main menu: General Postproc - Plot results - Contour plot - Nodal Solu
Choose stress item and scroll down to select von Mises (SEQV)
OK
There are many other options available for reviewing results in the general
postprocessor. You have now finished the analysis and we exit the program.
125
EXNO: 13 ANALYSIS OF CANTILEVER BEAM
AIM:
The problem that is modeled is a classic cantilever beam: fixed at one end
and a vertical load applied to the other end.
Length = 2m
Depth = 10cm
Width = 5cm
Load = 10,000N
E = 200 GPa (steel)
1. The quickest way is to enter them in the ANSYS Input window. Move
your mouse to the lower half of the window and then left click. Then
type in each of the following lines. Each one is completed by hitting
Enter or Return. All lengths are given in mm.
2. length=2000
3. depth=100
4. width=50
5. xsect=depth*width
126
6. inertiaz=(width*depth**3)/12
You can now list the entered keypoints to make sure you have done this step
correctly, by selecting 'Utility menu bar'/'List'/'Keypoints'. There are two
options here; selecting either one will give you the coordinates of the
keypoints you have entered (these are 0,0 and 2000,0 since length=2000).
127
1. In the 'Utility menu bar', select 'PlotCtrls' menu, then 'Numbering...'
Click on the button beside 'Keypoint numbers' so that it changes
colour, and says 'On' beside it. Click on 'OK' and the box will close and
the keypoints will be plotted with their numbers. (for this example, the
first one may be hidden in the triad symbol at 0,0,0.) To replot at any
time, select 'Utility menu bar'/'Plot'/'replot'.
You must now connect the two keypoints together to form a line:
First close the last menu that were used to create the keypoints by double
clicking in the upper left-hand corner of the menu. This will return you
to the 'Create menu'.
Use the mouse to pick the two keypoints in the graphics window. They will
be marked by a small yellow box when picked. Click on 'OK' in the
'Create Straight Line' window when you have picked the two keypoints.
128
Click on 'Close' in the 'Element Types' window.
Close the 'Element Type' menu.
The last step before meshing is to tell ANSYS how big the elements should
be. Let's make the element length 20cm to begin with:
129
Give a 'SIZE' of 200 and click on OK.
Close the 'Shape & Size' menu.
Use the mouse to pick the line in the graphics window. It will be
surrounded by a yellow box when picked.
Turn off Keypoint numbering so that the plot does not become confusing.
Click on the 'Elem & Attrib numbering' box, and select 'Element numbers'.
Click on 'OK'.
From the 'Plot' menu, select 'Elements' and you will then see the elements
plotted in multiple colours, with their element numbers.
Since many of the results will be given by node, it would be a good idea to
look at how the nodes are numbered:
130
are numbered. Notice that they are not necessarily numbered from left
to right.
Save the model at this time, so if you make some mistakes later on, you will
be able to come back to this point:
You have now defined your model. It is now time to apply the load(s) and
constraint(s) and solve the resulting system of equations.
Close the 'Preprocessor' menu and open up the 'Solution' menu (from the
same 'ANSYS Main Menu').
First you must tell ANSYS how you want it to solve this problem: Select 'New
Analysis' and ensure that 'Static' is selected, and click 'OK'; i.e. you are going
to do a static analysis on the beam as apposed to a dynamic analysis, for
example.
131
Choose what degrees of freedom are to be constrained. In this case,
you have a cantilevered beam, so all DOF's are constrained at this
end.
Select 'All DOF' and click on 'OK'. (You will see some triangles in the
graphics window indicating the constraints. The rotation constraint is
marked in orange, and the displacement constraints are in blue. You
may not be able to see the rotation constraint because of the angle of
view.)
To get an isometric view, click on 'Iso' (at the top right). You can either
leave the 'Pan, Zoom, Rotate' window open and move it to an empty
area on the screen, or close it if your screen in already cluttered.
You may find that the triad symbol at the origin (in the graphics
window) is confusing the picture. You can turn it off, or move it to
another location. Select:
o 'Utility menu bar'/'PlotCtrls'/'Window Controls'/'Window
Options...'
o Click on the button by '/TRIAD' to adjust the location of triad
symbol. Its default location is at the origin, but it can be moved
to another location on the screen (note that it will then not mark
the location of the axes, but only their direction) or turned off.
132
You can also try adjusting the other parameters in the 'Window
Options' box. Click on 'Apply' to have your changes take effect without
closing the window. Click on 'OK' when you are done.
If you still have the 'Apply' menu open, select 'Force/Moment >'. (If you
don't have 'Apply' open, its under '-Loads-' in the 'Solution' menu.)
Choose 'On Nodes'
Pick the node at the end of the beam with the mouse.
Click on the button at the top and select FY. This indicate that we
will be applying the load in the 'y' direction
Click on 'OK'.
Solution:
In the 'Solution' menu under the '-Solve-' title, select 'Current LS' this
indicates that we desire the solution under the current Load Step (LS).
Click on 'OK' in the window that comes up after a few seconds. You
may close the solution '/STAT window' that has appeared from the
solution phase.
133
Postprocessing: Viewing the Results
You will now want to view the results. To do this you must enter the post-
processor:
Read the results by selecting 'By Load Step...' under '-Read Results-'. Select
Load Step 1 in the window that appears, and click on OK.
You will notice in the legend in the graphics window that there is the text
'DSCA=12.5'. This refers to the displacement scaling. In other words, the
displacements in the figure look 12.5 times larger than they really are. You
can adjust the displacement scaling by selecting 'Utility Menu
Bar'/'PlotCtrls'/'Style'/'Displacement Scaling...'.
134
Click on 'OK'.
The nodal results will be displayed. Node 2 will be displayed after 1 & 3-11.
This is due to the way that ANSYS numbers the nodes. Node 2 is at the end
of the beam (at x=2000). If you had not sorted the nodes before displaying the
nodal solution, the results would have been displayed in order of node from 1-
11, which does not correspond to the actual physical location of the nodes.
135
A list of stresses will appear. The axial stresses (AXIALI) are zero throughout,
as we would expect. The other two (BENDINGI & BENDINGJ) refer to the
bending stresses at each end of each element.
MATLAB INTRODUCTION:
Overview of the MATLAB Environment
136
Including graphical user interface building MATLAB is an interactive system
whose basic data element is an array that does not require dimensioning. It
allows you to solve many technical computing problems, especially those with
matrix and vector formulations, in a fraction of the time it would take to write a
program in a scalar noninteractive language such as C or FORTRAN.
The name MATLAB stands for matrix laboratory. MATLAB was originally
written to provide easy access to matrix software developed by the LINPACK
and EISPACK projects. Today, MATLAB engines incorporate the LAPACK
and BLAS libraries, embedding the state of the art in software for matrix
computation.
SIMULINK INTRODUCTION:
Simulink is a graphical extension to MATLAB for modeling and
137
simulation of systems. In Simulink, systems are drawn on screen as block
diagrams. Many elements of block diagrams are available, such as transfer
functions, summing junctions, etc., as well as virtual input and output devices
such as function generators and oscilloscopes. Simulink is integrated with
MATLAB and data can be easily transferred between the programs. In these
tutorials, we will apply Simulink to the examples from the MATLAB tutorials to
model the systems, build controllers, and simulate the systems. Simulink is
supported on Unix, Macintosh, and Windows environments; and is included in
the student version of MATLAB for personal computers.
The idea behind these tutorials is that you can view them in one window while
running Simulink in another window. System model files can be downloaded
from the tutorials and opened in Simulink. You will modify and extend these
system while learning to use Simulink for system modeling, control, and
simulation. Do not confuse the windows, icons, and menus in the tutorials for
your actual Simulink windows. Most images in these tutorials are not live -
they simply display what you should see in your own Simulink windows. All
Simulink operations should be done in your Simulink windows.
1. Starting Simulink
2. Model Files
3. Basic Elements
4. Running Simulations
5. Building Systems
Starting Simulink
>> Simulink
Alternatively, you can hit the Simulink button at the top of the MATLAB
window as shown below:
138
When it starts, Simulink brings up the Simulink Library browser.
139
Open the modeling window with New then Model from the File menu on the
Simulink Library Browser as shown above.
140
Model Files
You can open saved files in Simulink by entering the following command in
the MATLAB command window. (Alternatively, you can load a file using the
Open option in the File menu in Simulink, or by hitting Ctrl+O in Simulink.)
>> filename
141
A new model can be created by selecting New from the File menu in any
Simulink window (or by hitting Ctrl+N).
Basic Elements
There are two major classes of items in Simulink: blocks and lines. Blocks are
used to generate, modify, combine, output, and display signals. Lines are
used to transfer signals from one block to another.
Blocks
Continuous
Dis continuous
Dis cre te
Look-Up Tables
Ma th Ope ra tions
Mode l Ve rifica tion
Mode -l Wide Utilities
P orts & S ubs ys te m s
S igna l Attribute s
S igna l Routing
S inks : Us e d to output or dis pla y s igna ls
S ource s : Used to generate various signals
Us e r-Defined Functions
Dis cre te : Line a r, dis cre te-time system elements (transfer functions, state-
space models, etc.)
Line a r: Line a r, continuous-time system elements and connections
(summing junctions, gains, etc.)
Nonline a r: Nonline a r ope ra tors (a rbitra ry functions , s a tura tion, de la y, e tc.)
Conne ctions : Multiple x, De m ultiple x, S ys te m Ma cros , e tc.
Blocks have zero to several input terminals and zero to several output
terminals. Unused input terminals are indicated by a small open triangle.
142
Unused output terminals are indicated by a small triangular point. The block
shown below has an unused input terminal on the left and an unused output
terminal on the right.
Lines
Lines transmit signals in the direction indicated by the arrow. Lines must
always transmit signals from the output terminal of one block to the input
terminal of another block. One exception to this is a line can tap off of another
line, splitting the signal to each of two destination blocks, as shown below.
Lines can never inject a signal into another line; lines must be combined
through the use of a block such as a summing junction.
Simple Example
143
The simple model (from the model files section) consists of three blocks: Step,
Transfer Fcn, and Scope. The Step is a source block from which a step input
signal originates. This signal is transferred through the line in the direction
indicated by the arrow to the Transfer Function linear block. The Transfer
Function modifies its input signal and outputs a new signal on a line to the
Scope. The Scope is a sink block used to display a signal much like an
oscilloscope.
There are many more types of blocks available in Simulink, some of which will
be discussed later. Right now, we will examine just the three we have used in
the simple model.
Modifying Blocks
144
This dialog box contains fields for the numerator and the denominator of the
block's transfer function. By entering a vector containing the coefficients of the
desired numerator or denominator polynomial, the desired transfer function
can be entered. For example, to change the denominator to s^2+2s+1, enter
the following into the denominator field:
[1 2 1]
and hit the close button, the model window will change to the following:
145
The "step" block can also be double-clicked, bringing up the following dialog
box.
The default parameters in this dialog box generate a step function occurring at
time=1 sec, from an initial level of zero to a level of 1. (in other words, a unit
step at t=1). Each of these parameters can be changed. Close this dialog
before continuing.
The most complicated of these three blocks is the "Scope" block. Double
clicking on this brings up a blank oscilloscope screen.
146
When a simulation is performed, the signal which feeds into the scope will be
displayed in this window. Detailed operation of the scope will not be covered
in this tutorial. The only function we will use is the autoscale button, which
appears as a pair of binoculars in the upper portion of the window.
Running Simulations
simple2.mdl
Download and open this file in Simulink following the previous instructions for
this file. You should see the following model window.
147
Before running a simulation of this system, first open the scope window by
double-clicking on the scope block. Then, to start the simulation, either select
Start from the Simulation menu (as shown below) or hit Ctrl-T in the model
window.
The simulation should run very quickly and the scope window will appear as
shown below. If it doesn't, just double click on the block labeled "scope."
Note that the simulation output (shown in yellow) is at a very low level relative
to the axes of the scope. To fix this, hit the autoscale button (binoculars),
which will rescale the axes as shown below.
148
Note that the step response does not begin until t=1. This can be changed by
double-clicking on the "step" block. Now, we will change the parameters of the
system and simulate the system again. Double-click on the "Transfer Fcn"
block in the model window and change the denominator to
[1 20 400]
Re-run the simulation (hit Ctrl-T) and you should see what appears as a flat
line in the scope window. Hit the autoscale button, and you should see the
following in the scope window.
149
Notice that the autoscale button only changes the vertical axis. Since the new
transfer function has a very fast response, it compressed into a very narrow
part of the scope window. This is not really a problem with the scope, but with
the simulation itself. Simulink simulated the system for a full ten seconds even
though the system had reached steady state shortly after one second.
To correct this, you need to change the parameters of the simulation itself. In
the model window, select Parameters from the Simulation menu. You will see
the following dialog box.
There are many simulation parameter options; we will only be concerned with
the start and stop times, which tell Simulink over what time period to perform
the simulation. Change Start time from 0.0 to 0.8 (since the step doesn't occur
until t=1.0. Change Stop time from 10.0 to 2.0, which should be only shortly
after the system settles. Close the dialog box and rerun the simulation. After
hitting the autoscale button, the scope window should provide a much better
display of the step response as shown below.
150
Building Systems
In this section, you will learn how to build systems in Simulink using the
building blocks in Simulink's Block Libraries. You will build the following
system.
First you will gather all the necessary blocks from the block libraries. Then you
will modify the blocks so they correspond to the blocks in the desired model.
Finally, you will connect the blocks with lines to form the complete system.
After this, you will simulate the complete system to verify that it works.
151
Gathering Blocks
Cre a te a ne w m ode l (Ne w from the File m e nu or Ctrl-N). You will get a
blank model window.
152
Dra g the S te p block from the s ource s window into the le ft s ide of your
model window.
153
From the S im ulink Libra ry Brows e r, dra g the S um a nd G a in from "Ma th
Operations" option found under the Simulink title.
S witch to the "Continuous " option a nd dra g two ins ta nce s of the Tra ns fe r
Fcn (drag it two times) into your model window arranged approximately as
shown below. The exact alignment is not important since it can be changed
later. Just try to get the correct relative positions. Notice that the second
154
Transfer Function block has a 1 after its name. Since no two blocks may have
the same name, Simulink automatically appends numbers following the
names of blocks to differentiate between them.
Click on the "S inks " option the n dra g ove r the "S cope " icon
Modify Blocks
155
Follow these steps to properly modify the blocks in your model.
Double-click your Sum block. Since you will want the second input to be
subtracted, enter +- into the list of signs field. Close the dialog box.
Double-click your Gain block. Change the gain to 2.5 and close the dialog
box.
Double-click the leftmost Transfer Function block. Change the numerator to
[1 2] and the denominator to [1 0]. Close the dialog box.
Double-click the rightmost Transfer Function block. Leave the numerator
[1], but change the denominator to [1 2 4]. Close the dialog box. Your model
should appear as:
Cha nge the na m e of the firs t Tra ns fe r Function block by clicking on the
words "Transfer Fcn". A box and an editing cursor will appear on the block's
name as shown below. Use the keyboard (the mouse is also useful) to delete
the existing name and type in the new name, "PI Controller". Click anywhere
outside the name box to finish editing.
156
S im ila rly, cha nge the na m e of the s e cond Tra ns fe r Function block from
"Transfer Fcn1" to "Plant". Now, all the blocks are entered properly. Your
model should appear as:
157
Now that the blocks are properly laid out, you will now connect them together.
Follow these steps.
Dra g the m ous e from the output te rm ina l of the S te p block to the uppe r
(positive) input of the Sum block. Let go of the mouse button only when the
mouse is right on the input terminal. Do not worry about the path you follow
while dragging, the line will route itself. You should see the following.
The resulting line should have a filled arrowhead. If the arrowhead is open, as
shown below, it means it is not connected to anything.
158
You can continue the partial line you just drew by treating the open arrowhead
as an output terminal and drawing just as before. Alternatively, if you want to
redraw the line, or if the line connected to the wrong terminal, you should
delete the line and redraw it. To delete a line (or any other object), simply click
on it to select it, and hit the delete key.
Dra w a line conne cting the S um block output to the G a in input. Als o dra w a
line from the Gain to the PI Controller, a line from the PI Controller to the
Plant, and a line from the Plant to the Scope. You should now have the
following.
159
The line re m a ining to be dra wn is the fe e dba ck s igna l conne cting the
output of the Plant to the negative input of the Sum block. This line is different
in two ways. First, since this line loops around and does not simply follow the
shortest (right-angled) route so it needs to be drawn in several stages.
Second, there is no output terminal to start from, so the line has to tap off of
an existing line.
To tap off the output line, hold the Ctrl key while dragging the mouse from the
point on the existing line where you want to tap off. In this case, start just to
the right of the Plant. Drag until you get to the lower left corner of the desired
feedback signal line as shown below.
160
Now, the open arrowhead of this partial line can be treated as an output
terminal. Draw a line from it to the negative terminal of the Sum block in the
usual manner.
Now, you will a lign the blocks with e a ch othe r for a ne a te r a ppe a ra nce .
Once connected, the actual positions of the blocks does not matter, but it is
161
easier to read if they are aligned. To move each block, drag it with the mouse.
The lines will stay connected and re-route themselves. The middles and
corners of lines can also be dragged to different locations. Starting at the left,
drag each block so that the lines connecting them are purely horizontal. Also,
adjust the spacing between blocks to leave room for signal labels. You should
have something like:
Fina lly, you will pla ce la be ls in your m ode l to ide ntify the s igna ls . To pla ce
a label anywhere in your model, double click at the point you want the label to
be. Start by double clicking above the line leading from the Step block. You
will get a blank text box with an editing cursor as shown below
162
Type an r in this box, labeling the reference signal and click outside it to end
editing.
La be l the e rror (e ) signal, the control (u) signal, and the output (y) signal in
the same manner. Your final model should appear as:
163
To s a ve your m ode l, s e le ct S a ve As in the File menu and type in any
desired model name.
Simulation
Now that the model is complete, you can simulate the model. Select Start
from the Simulation menu to run the simulation. Double-click on the Scope
block to view its output. Hit the autoscale button (binoculars) and you should
see the following.
K=2.5
This variable can now be used in the Simulink Gain block. In your Simulink
model, double-click on the Gain block and enter the following in the Gain field.
164
K
Close this dialog box. Notice now that the Gain block in the Simulink model
shows the variable K rather than a number.
Now, you can re-run the simulation and view the output on the Scope. The
result should be the same as before.
165
Now, if any calculations are done in MATLAB to change any of the variables
used in the Simulink model, the simulation will use the new values the next
time it is run. To try this, in MATLAB, change the gain, K, by entering the
following at the command prompt.
K=5
Start the Simulink simulation again, bring up the Scope window, and hit the
autoscale button. You will see the following output which reflects the new,
higher gain.
166
Besides variables, signals and even entire systems can be exchanged
between MATLAB and Simulink
The model will be formed around this equation. In this equation, 'm' is the
equivalent mass of the system; 'c' is the damping constant; and 'k' is the
167
constant for the stiffness of the spring. First we want to rearrange the above
equation so that it is in terms of acceleration; then we will integrate to get the
expressions for velocity and position. Rearranging the equation to accomplish
this, we get:
To build the model, we start with a 'step' block and a 'gain' block. The gain
block represents the mass, which we will be equal to 5. We also know that we
will need to integrate twice, that we will need to add these equations together,
and that there are two more constants to consider. The damping constant 'c'
will act on the velocity, that is, after the first integration, and the constant 'k'
will act on the position, or after the second integration. Let c = 0.35 and let k =
0.5. Laying all these block out to get an idea of how to put them together, we
get:
168
By looking at the equation in terms of acceleration, it is clear that the damping
term and spring term are summed negatively, while the mass term is still
positive. To add places and change signs of terms being summed, double-
click on the sum function block and edit the list of signs:
Once we have added places and corrected the signs for the sum block, we
need only connect the lines to their appropriate places. To be able to see
what is happening with this spring system, we add a 'scope' block and add it
as follows:
169
The values of 'm', 'c' and 'k' can be altered to test cases of under-damping,
critical-damping and over-damping. To accurately use the scope, right-click
the graph and select "Autoscale".
The mdl-file can now be saved. The following is a sample output when the
model is run for 30 iterations.
170
171
ExNO:16 Simulation of Air-conditioning of a house
172
Provides the heater characteristics (temperature of the hot air, flow-
rate)
Defines the cost of electricity (Rs.4.00/kWhr)
Specifies the initial room temperature (10 deg. Celsius = 50 deg.
Fahrenheit)
Note: Time is given in units of hours. Certain quantities, like air flow-
rate, are expressed per hour (not per second).
Model Components
Set Point
"Set Point" is a constant block. It specifies the temperature that must be
maintained indoors. It is set at 86 degrees Fahrenheit which is equal to 30
degrees Centigrade.
By default. Temperatures are given in Fahrenheit, but then are
converted to Celsius to perform the calculations.
Thermostat
"Thermostat" is a subsystem that contains a Relay block. The
thermostat allows fluctuations of 5 degrees Fahrenheit above or below the
desired room temperature. If air temperature drops below 81 degrees
Fahrenheit, the thermostat turns on the heater.
We can see the Thermostat subsystem by the following command in
MATLAB Command window.
open_system([mdl,'/Thermostat']);
Heater
"Heater" is a subsystem that has a constant air flow rate, "Mdot", which
is specified in the air_condition.m M-file. The thermostat signal turns the
heater on or off. When the heater is on, it blows hot air at temperature
THeater
(50 degrees Celsius = 122 degrees Fahrenheit by default) at a
constant flow rate of Mdot (1kg/sec = 3600kg/hr by default).
The heat flow into the room is expressed by the Equation 1.
Equation 1: (dQ/dt) = (T heater Troom)*Mdot*c
where c is the heat capacity of air at constant pressure.
173
We can see the Heater subsystem by the following command in
MATLAB Command window.
open_system([mdl,'/Heater']);
Cost Calculator
"Cost Calculator" is a Gain block. "Cost Calculator" integrates the heat
flow over time and multiplies it by the energy cost.
The cost of heating is plotted in the "PlotResults" scope.
House
"House" is a subsystem that calculates room temperature variations. It
takes into consideration the heat flow from the heater and heat losses to the
environment. Heat losses and the temperature time derivative are expressed
by Equation 2.
Equation 2
(dQ/dt)losses =(Troom Tout) / Req where Req is the equivalent thermal
resistance of the house.
We can see the House subsystem by the following command in MATLAB
Command window.
open_system([mdl,'/House']);
Modeling the Environment
We model the environment as a heat sink with infinite heat capacity and
time varying temperature Tout. The constant block "Avg Outdoor Temp"
specifies the average air temperature outdoors. The "Daily Temp Variation"
Sine Wave block generates daily temperature fluctuations of outdoor
temperature. We can vary these parameters and see how they affect the
heating costs.
Running the Simulation and Visualizing the Results
We can run the simulation and visualize the results.
Open the "PlotResults" scope to visualize the results. The heat cost and
indoor versus outdoor temperatures are plotted on the scope. The
temperature outdoor varies sinusoidally, whereas the indoors temperature is
maintained within 5 degrees Fahrenheit of "Set Point". Time axis is labeled in
hours.
evalc('sim(mdl)');
open_system([mdl '/PlotResults']),
174
Remarks
This particular model is designed to calculate the heating costs only. If
the temperature of the outside air is higher than the room temperature, the
room temperature will exceed the desired "Set Point.
175
Examining the diagram shown above we can see that as some external
turning force is applied to the shaft (for example: by motor or by hand) the
cam rotates with it. The follower is free to move in the Y plane but is unable to
move in the other two so as the lobe of the cam passes the edge of the
follower it causes the follower to move up. Then some external downward
force (usually a spring and gravity) pushes the follower down making it keep
contact with the cam. This external force is needed to keep the follower in
contact with the cam profile.
Displacement Diagrams:
176
In the diagram shown opposite we can
see the two different displacements
represented by the two different arrows.
The green arrow representing the
displacement of the follower i.e. the
distance travelled up or down by the
follower. The mustard arrow (curved
arrow) shows the angular displacement
travelled by the cam.
Note: Angular displacement is the angle through which the cam has rotated.
If we examine the diagram shown below we can see the relationship between
a displacement diagram and the actual profile of the cam. Note only half of
the displacement diagram is drawn because the second half of the diagram is
the same as the first. The diagram is correct from a theoretical point of view
but would have to changed slightly if the cam was to be actually made and
used. We will consider this a little more in the the following section - Uniform
Velocity.
Uniform Velocity:
177
Uniform Velocity means travelling at a constant speed in a fixed direction and
as long as the speed or direction don't change then its uniform velocity. In
relation to cam and follower systems, uniform velocity refers to the motion of
the follower.
We shall take the cycle in steps. Firstly if the cam has to impart a
displacement of 30mm on follower over half its cycle then it must impart a
displacement of 30mm180 for every 1 turned by the cam i.e. it must move
the follower 0.167mm per degree turn. This distance is to much to small to
draw on a displacement diagram so we will consider the displacement of the
follower at the start, at the end of the half cycle, the end of the full cycle and at
certain other intervals (these intervals or the
length of these intervals will be decided on later).
First we will plot the graph. Before doing this we must first consider the
increments that we will use. We will use millimeters for the follower
178
displacement increments and because 1 is too small we will use increments
of 30 for the angular displacement.
Once this is done then we can draw the displacement diagram as shown
below. Note a straight line from the displacement of the follower at the start of
the motion to the displacement of the follower at the end of the motion
represents uniform velocity.
For this type of motion the follower displacement does not change at a
constant rate. In other words the follower doesn't travel at constant speed.
The best way to understand this non-uniform motion is to imagine a simple
pendulum swinging.
This motion is used where the follower is required to rise or fall with uniform
acceleration, that is its velocity is changing at a constant rate.
To conclude this:
179
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.
ANSYS Environment
The ANSYS Environment for 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.
3. Main Window
180
Within the Main Window are 5 divisions:
a. Utility Menu
b. Input Window
c. Toolbar
181
d. Main Menu
e. Graphics Window
4. 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.
182
ANSYS Files
Introduction
A large number of files are created when you run ANSYS. If you started
ANSYS without specifying a jobname, the name of all the files created will be
FILE.* where the * represents various extensions described below. If you
specified a jobname, say Frame, and then the created files will all have the file
prefix, Frame again with various extensions:
frame.db
Database file (binary). This file stores the geometry, boundary
conditions and any solutions.
frame.dbb
Backup of the database file (binary).
frame.err
Error file (text). Listing of all error and warning messages.
frame. out
Output of all ANSYS operations (text). This is what normally scrolls in
the output window during an ANSYS session.
frame.log
Logfile or listing of ANSYS commands (text). Listing of all equivalent
ANSYS command line commands used during the current session.
etc...
Depending on the operations carried out, other files may have been
written. These files may contain results, etc.
What to save?
When you want to clean up your directory, or move things from the /scratch
directory, what files do you need to save?
If you will always be using the GUI, then you only require the .db file.
This file stores the geometry, boundary conditions and any solutions.
Once the ANSYS has started, and the jobname has been specified,
183
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).
To save your model, select Utility Menu Bar -> File -> Save As Jobname.db.
Your model will be saved in a file called jobname.db, where jobname is
the name that you specified in the Launcher when you first started ANSYS.
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
unforeseen problems.
184
o In the ANSYS Launcher, select Interactive... and specify the
previously defined jobname.
o Then when you get ANSYS started, select Utility Menu -> File -
> Resume Jobname.db .
o This will restore as much of your database (geometry, loads,
solution, etc) that you previously saved.
4. Or, start ANSYS and select Utility Menu -> File -> Resume from...
and select your job from the list that appears.
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?
185
the results differ by a large amount however, it will be necessary to try a finer
mesh yet.
The Consequences
Finer meshes come with a cost however: more calculation 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
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 produces lists and tables of many types of results that are normally
displayed on the screen. However, it is often desired to save the results to a
file to be later analyzed or included in a report.
186
list from the menu. You can pick multiple items. When the list appears
on the screen in its own window, Select 'File'/'Save As...' and give a
file name to store the results.
5. Any other solutions can be done in the same way. For example select
'Nodal Solution' from the 'List Results' menu, to get displacements.
6. Preprocessing and Solution data can be listed and saved from the 'List'
menu in the 'Utility Menu bar'. Save the resulting list in the same way
described above.
Plotting of Figures
There are two major routes to get hardcopies from ANSYS. The first is a quick
a raster-based screen dump, while the second is a scalable vector plot.
This raster image file may now be printed on a PostScript printer or included
in a document.
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...'.
187
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:
3. select display from the ANSYS launcher menu (if you started ANSYS
that way)
4. 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:
188
12. Colour PostScript: To save the images to a colour postscript file,
enter the following commands in display:
13. pscr,color,2
14. /show,pscr
15. 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!
16. 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
17. pscr,color,3
18. /show,pscr
19. plot,n
189
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.
20. 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:
21. /show,hpgl
22. plot,n
190
EX NO: 1 ANALYSIS OF SIMPLE TRUSS
AIM:
Determine the nodal deflections, reaction forces, and stress for the
truss system.
PROBLEM DESCRIPTION:
191
3. 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
4. Enter Keypoints
coordinate
keypoint
x y
1 0 0
2 1800 3118
3 3600 0
4 5400 3118
5 7200 0
6 9000 3118
7 10800 0
(these keypoints are depicted by numbers in the above figure).
192
o The following window will then appear:
5.
o To define the first keypoint which has the coordinates x = 0 and
y = 0:
Enter keypoint number 1 in the appropriate box, and enter the
x,y coordinates: 0, 0 in their appropriate boxes (as shown
above).
Click 'Apply' to accept what you have typed.
o Enter the remaining keypoints using the same method.
Note: When entering the final data point, click on 'OK' to indicate
that you are finished entering keypoints. If you first press 'Apply'
and then 'OK' for the final keypoint, you will have defined it
193
twice!
If you did press 'Apply' for the final point, simply press 'Cancel' to
close this dialog box.
6. 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.
7. 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.
8. Form Lines
We will use the mouse to select the keypoints to form the lines.
o In the main menu select: Preprocessor > Modeling > Create >
Lines > Lines > In Active Coord. The following window will
then appear:
194
o Use the mouse to pick keypoint #1 (i.e. click on it). It will now be
marked by a small yellow box.
o 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.
o Connect the remaining keypoints using the same method.
o 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.
195
3. 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:
196
Click on the 'Add...' button. The following window will appear.
3.
o 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.
o Click on 'Close' in the 'Element Types' dialog box.
4. Define Geometric Properties
197
Click Add... and select 'Type 1 LINK1' (actually it is already selected). Click on
'OK'. The following window will appear.
3.
o As shown in the window above, enter the cross-sectional area
(3250mm):
o Click on 'OK'.
o 'Set 1' now appears in the dialog box. Click on 'Close' in the
'Real Constants' window.
4. Element Material Properties
198
o In the 'Preprocessor' menu select Material Props > Material
Models
3.
o We are going to give the properties of Steel. Enter the following
field:
1. EX = 2 e 5
o 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
199
continue. Close the "Define Material Model Behavior" by clicking
on the 'X' box in the upper right hand corner.
4. 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.
3.
o 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.
4. Mesh
o In the 'Preprocessor' menu select Meshing > Mesh > Lines and
click 'Pick All' in the 'Mesh Lines' Window
200
Plot Numbering
To show the line numbers, keypoint numbers, node numbers...
From the Utility Menu (top of screen) select PlotCtrls > Numbering...
Fill in the Window as shown below and click 'OK'
201
Now you can turn numbering on or off at your discretion
Save the model at this time, so if you make some mistakes later on, you will at
least be able to come back to this point. To do this, on the Utility Menu select
File > Save as.... Select the name and location where you want to save your
file.
You have now defined your model. It is now time to apply the load(s) and
constraint(s) and solve the the resulting system of equations.
Open up the 'Solution' menu (from the same 'ANSYS Main Menu').
First you must tell ANSYS how you want it to solve this problem:
202
o Click 'OK'.
6. Apply Constraints
203
o 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'.
o 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.
7. Apply Loads
o Select Define Loads > Apply > Structural > Force/Moment >
on Keypoints.
o Select the first Keypoint (left end of the truss) and click 'OK' in
the 'Apply F/M on KPs' window.
204
o Select FY in the 'Direction of force/mom'. This indicate that we
will be applying the load in the 'y' direction
o 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.
o The force will appear in the graphics window as a red arrow.
o Apply the remaining loads in the same manner.
The applied loads and constraints should now appear as shown below.
205
We now tell ANSYS to find the solution:
o In the 'Solution' menu select Solve > Current LS. This indicates
that we desire the solution under the current Load Step (LS).
2. Hand Calculations
We will first calculate the forces and stress in element 1 (as labeled in
the problem description).
206
3. Results Using ANSYS
Reaction Forces
A list of the resulting reaction forces can be obtained for this element
o from the Main Menu select General Postproc > List Results >
Reaction Solu.
o Select 'All struc forc F' as shown above and click 'OK'
207
These values agree with the reaction forces calculated by hand
above.
Deformation
o Select 'Def + undef edge' and click 'OK' to view both the deformed
and the undeformed object.
208
o 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
o From the 'General Postproc' menu select Plot results > Contour
Plot > Nodal Solution. The following window will appear.
209
o Select 'DOF solution' and 'USUM' as shown in the above window.
Leave the other selections as the default values. Click 'OK'.
210
o Looking at the scale, you may want to use more useful intervals.
From the Utility Menu select Plot Controls > Style > Contours >
Uniform Contours...
o Fill in the following window as shown and click 'OK'.
211
o 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.
o 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.
o 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'
212
o From the General Postprocessor menu select Element Table >
Define Table
o Click on 'Add...'
o 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
o Click on 'OK' and close the 'Element Table Data' window.
o Plot the Stresses by selecting Element Table > Plot Elem Table
o The following window will appear. Ensure that 'SAXL' is selected
and click 'OK'
Utility Menu > PlotCtrls > Style > Contours > Uniform
Contours ...
213
Again, you may wish to select more appropriate intervals for the
contour plot
214
Note that the axial stress in Element 1 is 82.9MPa as predicted
analytically.
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'.
RESULT:
Maximum Deflection:
Minimum Stress :
Maximum Stress :
215