Introduction
This tutorial was created using ANSYS 7.0 The purpose of this tutorial is to outline the steps required to plot Vertical Deflection vs. Length of the following beam using tables, a special type of array. By plotting this data on a curve, rather than using a contour plot, finer resolution can be achieved.
This tutorial will use a steel beam 400 mm long, with a 40 mm X 60 mm cross section as shown above. It will be rigidly constrained at one end and a -2500 N load will be applied to the other.
Preprocessing: Defining the Problem
- Give the example a Title
Utility Menu > File > Change Title ...
/title, Use of Tables for Data Plots - Open preprocessor menu
ANSYS Main Menu > Preprocessor
/PREP7 - Define Keypoints
Preprocessor > Modeling > Create > Keypoints > In Active CS...
K,#,x,y,zWe are going to define 2 keypoints for this beam as given in the following table:Keypoint Coordinates (x,y,z) 1 (0,0) 2 (400,0) - Create Lines
Preprocessor > Modeling > Create > Lines > Lines > In Active Coord
L,1,2Create a line joining Keypoints 1 and 2 - Define the Type of Element
- Define Real Constants
- Cross-sectional area AREA: 2400
- Area moment of inertia IZZ: 320e3
- Total beam height: 40
- Define Element Material Properties
Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > IsotropicIn the window that appears, enter the following geometric properties for steel: - Young's modulus EX: 200000
- Poisson's Ratio PRXY: 0.3
- Define Mesh Size
Preprocessor > Meshing > Size Cntrls > ManualSize > Lines > All Lines...For this example we will use an element edge length of 20mm. - Mesh the frame
Preprocessor > Meshing > Mesh > Lines > click 'Pick All'
Solution Phase: Assigning Loads and Solving
- Define Analysis Type
- Apply Constraints
- Apply Loads
- Solve the System
ANTYPE,0
Apply a load of -2500N on keypoint 2.
SOLVE
Postprocessing: Viewing the Results
It is at this point the tables come into play. Tables, a special type of array, are basically matrices that can be used to store and process data from the analysis that was just run. This example is a simplified use of tables, but they can be used for much more. For more information type help in the command line and search for 'Array Parameters'.
- Number of Nodes Since we wish to plot the verticle deflection vs length of the beam, the location and verticle deflection of each node must be recorded in the table. Therefore, it is necessary to determine how many nodes exist in the model. Utility Menu > List > Nodes... > OK. For this example there are 21 nodes. Thus the table must have at least 21 rows.
- Create the Table
- Utility Menu > Parameters > Array Parameters > Define/Edit > Add
- The window seen above will pop up. Fill it out as shown [Graph > Table > 22,2,1]. Note there are 22 rows, one more than the number of nodes. The reason for this will be explained below. Click OK and then close the 'Define/Edit' window.
- Enter Data into Table First, the horizontal location of the nodes will be recorded
- Utility Menu > Parameters > Get Array Data ...
- In the window shown below, select Model Data > Nodes
- Fill the next window in as shown below and click OK [Graph(1,1) > All > Location > X]. Naming the array parameter 'Graph(1,1)' fills in the table starting in row 1, column 1, and continues down the column.
Next, the vertical displacement will be recorded. - Utility Menu > Parameters > Get Array Data ... > Results data > Nodal results
- Fill the next window in as shown below and click OK [Graph(1,2) > All > DOF solution > UY]. Naming the array parameter 'Graph(1,2)' fills in the table starting in row 1, column 2, and continues down the column.
- Arrange the Data for Ploting Users familiar with the way ANSYS numbers nodes will realize that node 1 will be on the far left, as it is keypoint 1, node 2 will be on the far right (keypoint 2), and the rest of the nodes are numbered sequentially from left to right. Thus, the second row in the table contains the data for the last node. This causes problems during plotting, thus the information for the last node must be moved to the final row of the table. This is why a table with 22 rows was created, to provide room to move this data.
- Utility Menu > Parameters > Array Parameters > Define/Edit > Edit
- The data for the end of the beam (X-location = 400, UY = -0.833) is in row two. Cut one of the cells to be moved (right click > Copy or Ctrl+X), press the down arrow to get to the bottom of the table, and paste it into the appropriate column (right click > Paste or Ctrl+V). When both values have been moved check to ensure the two entries in row 2 are zero. Select File > Apply/Quit
- Plot the Data
- Utility Menu > Plot > Array Parameters
- The following window will pop up. Fill it in as shown, with the X-location data on the X-axis and the vertical deflection on the Y-axis.
- To change the axis labels select Utility Menu > Plot Ctrls > Style > Graphs > Modify Axes ...
- To see the changes to the labels, select Utility Menu > Replot
- The plot should look like the one seen below.
ANSYS Command Listing
finish
/clear
/title, Use of Tables for Data Plots
/prep7
elementsize = 20
length = 400
et,1,beam3 ! Beam3 element
r,1,2400,320e3,40 ! Area,I,Height
mp,ex,1,200000 ! Youngs Modulus
mp,prxy,1,0.3 ! Poisson's Ratio
k,1,0,0 ! Geometry
k,2,length,0
l,1,2
esize,elementsize ! Mesh size
lmesh,all ! Mesh
finish
/solu
antype,static ! Static analysis
dk,1,all ! Constrain one end fully
fk,2,fy,-2500 ! Apply load to other end
solve
finish
/post1
! Note, there are 21 nodes in the mesh. For the procedure below
! the table must have (#nodes + 1) rows
rows = ((length/elementsize + 1) + 1)
*DIM,graph,TABLE,rows,2,1 ! Creat a table called "graph"
! 22 rows x 2 columns x 1 plane
*vget,graph(1,1),node,all,loc,x ! Put node locations in the x direction
! in the first column for all nodes
*vget,graph(1,2),node,all,u,y ! Put node deflections in the y direction
! in the second column
*set,graph(2,1),0 ! Delete data in (2,1) which is for x = 400
! otherwise graph is not plotted properly
*set,graph(2,2),0 ! Delete data in (2,2) which is for UY @ x = 400
! otherwise graph is not plotted properly
*vget,graph(rows,1),node,2,loc,x ! Re-enter the data for x = 400, but at the end
*vget,graph(rows,2),node,2,u,y ! of the table
*vplot,graph(1,1),graph(1,2) ! Plot the data in the table
/axlab,x,Length ! Change the axis labels
/axlab,y,Vertical Deflection
/replot
No comments:
Post a Comment