Translate

Wednesday, March 21, 2018

ANSYS Tutorial for 1D Structural Spar Elements (Step Bar)

Ansys 1D Structure Tutorials: Stepper bar in Tension

Disclaimer:

This tutorial is an educational tool designed to assist those who wish to leam how to use the ANSYS finite element software package. It is not intended as a guide for determining suitable modeling methods or strategies for any application. The authors of this tutorial have used their best efforts in preparing the tutorial. Those efforts include the development, research, and testing of the theories and computational models shown in the tutorial. The authors make no warranty of any kind, expressed or implied, with regard to any text or models contained in this tutorial. The authors shall not be liable in any event for incidental or consequential damages in connection with or arising out of, the furnishing, performance, or use of the text and models provided in this tutorial. There is no guarantee that there are no mistakes or errors in the information provided and the authors assume no responsibility for the use of any of the information contained in this tutorial.


Updates to Page:

Last edited on 10th October 2016 to account for changes in ANSYS release 17 [new method of applying cross-sectional area to Link180]

Overview :

In this tutorial, you will examine the 1-D displacement of a stepped bar in tension using ANSYS he problem is adapted from Cad/Cam and Automation by Farzak Haideri.You will determine the displacement distribution, nodal reaction force and stress distribution in the bar due to the applied loading and boundary conditions. A one-dimensional structural truss element (often also called a "spar", "spring" or link" element) will be used for this analysis. We will use SI system units for this tutorial length = m, mass = kg, lime = sec, force = N. stress/pressure = Pa. In this case, the bar is made from steel and the applied force is 50,000 N.

Example: An axial stepped bar is as shown in Fig.1.It is subjected to an axial pull of 50 kN. If the material of the bar is uniform and has a modulus of elasticity as 200 GPa, determine the displacements and stresses of each of the section, using a 1 D spar element. Also, confirm the results using conventional principles.
                             Fig.1

Discretization Model:
                           Fig.2

We can easily calculate the cross-sectional area of each element from the information given in the example in the book "Practical Stress Analysis with Finite Elements":

Element 1 = 0.0003 m2
Element 2 = 0.0002 m2
Element 3 = 0.00009 m2
The figure below shows the finalized model where the bars modeled as a sense of three elastic springs (or trusses) with equivalent stiffness to the three uniform cross-section elements shown in the figure above.


Figure 3: The ideal sed finite element model of the tapered bar.

It can be clea1y seen from figure 3 that the bar has been divided into three truss elements (E1, E2, and E3). Each of these will have a length of 0.2m,0.4m, and 0.3m The points at each end of each element are called "nodes'. These are numbered 1 to 4 in figure 3 and the x coordinate of each node is: N1 x = 0, N2 x = 0.2m, N3 x = 0.6m and N4, x = 0.9m.

Step 1: Launch ANSYS

You may need to adapt these instructions depending on your operating system and the options available to you. We will show how to launch ANSYS on a machine running Windows 8.1 Pro 64 bit.
1.  Click on the windows icon in the left lower comer of your screen.
2.  Click on All Programs to expand the programs list.
3.  Find Ansys XX.X in the list of programs and click on it. Where XX.X is the version number of ANSYS available to you. I' you are running ANSYS ver 17.0 then the XX.X will be 17.0, i.e. you should click on Ansys 17.0
4.  Click on the Mechanical APDL Product Launcher to launch the classic ANSYS interface. Your screen should look like the figure below.
5. 

6. When the product launcher displays your screen should look like this:


10. Once the main GUI opens it is useful to set the preferences: in the Main Menu select Preferences and make sure that Structural and h-method are selected.



Step 2: Define Element Type

1. The Main Menu select Preprocessor > Element Type > Add/Edit/Delete
2. Click on Add in the dialog box that appears,


4. Select Link in the left-hand menu and 3Dfinit stn 180 in the right-hand menu and then click Ok
5. This will defines element type 1 as a LINK 180 element. LINK 180 is actually a 3D truss element but we are going to use it as a 1D truss by later suppressing some of its degrees of freedom.
6. Click Close to close the Element Type dialog box.

Step 3: Define Element Cross Sectional Area (Section Properties)

1. In the Main Menu select Preprocessor > Sections > Link > Add
2. Enter the number "1" (for element number 1) in the dialog box that appears and then click on OK to move on to the next step.


3. In the next dialog box that appears, enter the value of and then click OK the cross-sectional area for element 1: 0.0003 m2


4.Now, we have to repeat this process for elements 2 and 3.
5.Click on Preprocessor > Sections > Link > Add again and enter "2" in the "Add Link Section" box that appears,
6.This time enter The value of the cross-sectional area for element 2: 0.0002 m2 and then click Ok
7. Repeat this process for element 3 using the value given above (0.00009 m2)
8. When you are finished you should have three section property sets defined: you can check this by clicking on Utility Menu > List > Properties > Section Properties



Step 4: Define the Material Behaviour

1. In the Main Menu click on Preprocessor > Material Props > Material Models, the Define Material Model Behaviour dialog box will now appear.
2. Expand the options in the night hand pane of the dialog box: Structural > Linear > Isotropic
3. In the dialog box that pops up. enter suitable material parameters for steel ( E = 200 x 109 Pa, Poissons ratio = 0.3):


4.Click on Ok '.o close the dialog box in which you entered the material parameters.
5.Close the Define Material Model Behaviour 6 along box by clicking on the X in the upper right comer.

Note: During working on Ansys if you minimize Ansys window then some sub window will disappear and it will on by click on Rise Hidden from Utility Windows









1.In the Main Menu click on Preprocessor > Modeling > Create > Nodes > |n Active CS
2.In the dialog box that appears: enter the x-coordinate for node 1 (i.e. 0) and dick on Apply (note that Apoly issues the command to create the node but keeps the dialog box open, clicking Ok would also issue the command to create the node but would close the dialog box).
3.Now enter the x-coordinate for node 2 (i.e. 0.2) and click Apply
4.Enter the x-coordinate for node 3 (i.e. 0.6) and click Apply
5.Enter the x-coordinate for the final node, node 4 (i.e. 0.9) and click Ok to dismiss the dialog box.





6. You may have notice nodes appearing on the main window when you clicked apply. You should now be able to see 4 nodes in the main window (note that node 1 is at the origin so you may not
be able to see it due to the display of the stand at the origin, this is OK):


7.We must now create the elements that join the nodes together click on Preprocessor > Modeling > Create > Elements > Auto Numbered > Thru Nodes
8.In the main window click on node 1 and then node 2. Then click Apply in the dialog box. You should see a line element appear joining nodes 1 and 2.


9. Now We have to change the area of second elements that join the nodes 2 and 3 together click on Preprocessor > Modeling > Create > Elements >Elem Attributes


10. In above window change section number 2 and click on OK
11. We must now create the elements 2  that join the nodes 2 and 3 together click on Preprocessor > Modeling > Create > Elements > Auto Numbered > Thru Nodes
12.Now click on node 2 and then node 3 and click Apply, A line element should appear joining nodes 2 and 3.


13.Finally, Repete above point step 9, 10, 11 and 12 for Element 3.
14. Your display should now look, Ike, this:



16. We can check that a| is as it should be by going to the Utility Menu (top of the window) and selecting: List > Elements > Nodes & Attributes, you should get this:


17.If your list looks different then it is likely you have made a mistake at some point.
18. The key points are that each element has a different section number (SEC) and that element 1 joins nodes 1 & 2, element 2 joins nodes 2&3 and element 3 joins nodes 3&4.

Step 6: Define Boundary Conditions

1.In this case, we are using a 3D truss to model a 1D truss problem so we must prevent the nodes from moving in either the Y or the Z directions. in order to do this, we constrain all nodes in the finite element model in both the Y and Z directions.
2. Preprocessor > Loads > Define Loads > Apply > Structural > Displacement > On Nodes
3. Select Pick All in the dialog box that appears.


4. Select both UY and UZ in the next dialog box that appears and enter a value of 0 for displacement value


5. Click Ok to close the dialog box. Your screen should now look like this:


6. Now we can apply the problem boundary conditions.
7. The original bar is held rigidly at its left-hand edge, in order to model this we will constrain the leftmost node (i.e. node 1) from moving in the X direction,
8. Again, select: Preprocessor > Loads > Define Loads > Apply > Structural > Displacement > On Nodes
9. Click on Node 1 and then click Ok


10. This time select UX only and enter a value of 0 for displacement value


11. Click Ok to close the dialog box. You should have noticed an extra constraint appear at node 1 (blue triangle point ng in the horizontal direction)


Step 7: Define Loads

1. Select Preprocessor > Loads > Define Loads > Apply > Structural > Force/ Moment > On Nodes


2. Pick node 4 and click on Ok


3. In the dialog box that appears to make sure that the direction of the force is set to FX and that the Force/ Moment value is 500000
4. Click on Ok to close the dialog box.
5.You should see a red arrow appear on node 4 pointing to the right.


Step 8: Solve the Problem

1. In the Main Menu select Solution > Analysis Type > New Analysis
2. Make sure that Static is selected in the dialog box that pops up and then clicks on Ok to dismiss the dialog.
3. Select Solution > Solve > Current LS to solve the problem
4. A new window and a dialog box will pop up. Take a quick look at the information in the window (/STATUS Command) before closing it.
5. Click on Ok m the dialog box to solve the problem.


6. Once the problem has been solved you will get a message to say that the solution is done, close this window when you are ready.


Step 9: Examine the Results

1. |n the Main Menu select General Postproc > List Results > Nodal Solution > DOF solution > Displacement Vector Sum and dick Ok


 2. You should get a screen similar to this:


3.As expected. displacement in the y-direction (UY) and displacement in the z-direction (UZ) arc zero for each node,
4.Node 1 has a zero displacement in all directions - this is as expected.
5.Node 2 has moved 0.166 x 10-3 m in the x-direction, Node 3 has moved 0.66 x 10-3 m and Node 4 has moved 0.15 x 10-2 m
6.The truss element that we have used is quite basic and it is difficult to get stress results directly from it. In order to access stress results, we have to define an element table.
7.Select General Postproc > Element Table > Define Table > Add
8.Edit the options in the d along box so that they look like this:



9.It is very important to add the "1" after "LS," 1 
10.Click on Ok to define the element table.


11.Click on Close to dose the other dialog box.

12.Now select General Postproc > Element Table and pick "List Elem Table" in the list that appears. Once you click on OK you should get a listing like this: 



13. This listing gives the stress in each element, for example, element 1 has an axial stress of 0.166 x 109 Pa
14. Now to get Nodal Reaction solution Select General Postproc > List Results > Reaction Solu> All Struc Force F Click OK




Log File/ Input File :

You can get this logfile/input file from Main Manu>Session Editor

/NOPR   ! Suppress printing of UNDO process 
/PMACRO ! Echo following commands to log    
FINISH  ! Make sure we are at BEGIN level   
/CLEAR,NOSTART  ! Clear model since no SAVE found   
! WE SUGGEST YOU REMOVE THIS LINE AND THE FOLLOWING STARTUP LINES   
/input,start,ans,'C:\Program Files\ANSYS Inc\v170\ANSYS\apdl\'  
/REPLOT,RESIZE  
!*  
/NOPR   
KEYW,PR_SET,1   
KEYW,PR_STRUC,1 
KEYW,PR_THERM,0 
KEYW,PR_FLUID,0 
KEYW,PR_ELMAG,0 
KEYW,MAGNOD,0   
KEYW,MAGEDG,0   
KEYW,MAGHFE,0   
KEYW,MAGELC,0   
KEYW,PR_MULTI,0 
/GO 
!*  
!*  
/PREP7  
!*  
ET,1,LINK180
!*  
!*  
!*  
SECTYPE,1,LINK, ,   
SECDATA,0.0003, 
SECCONTROL,0,0  
!*  
!*  
!*  
SECTYPE,2,LINK, ,   
SECDATA,0.0002, 
SECCONTROL,0,0  
!*  
!*  
!*  
SECTYPE,3,LINK, ,   
SECDATA,0.00009,
SECCONTROL,0,0  
!*  
N, ,0,,,,,, 
N, ,0.2,,,,,,   
N, ,0.6,,,,,,   
N, ,0.9,,,,,,   
FLST,2,2,1  
FITEM,2,1   
FITEM,2,2   
E,P51X  
TYPE,   1   
MAT,
REAL,   
ESYS,       0   
SECNUM,   2 
TSHAP,LINE  
!*  
FLST,2,2,1  
FITEM,2,2   
FITEM,2,3   
E,P51X  
TYPE,   1   
MAT,
REAL,   
ESYS,       0   
SECNUM,   3 
TSHAP,LINE  
!*  
FLST,2,2,1  
FITEM,2,3   
FITEM,2,4   
E,P51X  
!*  
MPTEMP,,,,,,,,  
MPTEMP,1,0  
MPDATA,EX,1,,200e9  
MPDATA,PRXY,1,,0.3  
elist,all,,,0,0 
FLST,2,4,1,ORDE,2   
FITEM,2,1   
FITEM,2,-4  
!*  
/GO 
D,P51X, ,0, , , ,UY,UZ, , , ,   
FLST,2,1,1,ORDE,1   
FITEM,2,1   
!*  
/GO 
D,P51X, ,0, , , ,UX, , , , ,
FLST,2,1,1,ORDE,1   
FITEM,2,4   
!*  
/GO 
F,P51X,FX,50000 
/DIST,1,1.08222638492,1 
/REP,FAST   
EPLOT   
FINISH  
/SOL
/STATUS,SOLU
SOLVE   
FINISH  
/POST1  
!*  
PRNSOL,U,COMP   
AVPRIN,0, , 
ETABLE, ,LS, 1  
!*  
PRETAB,LS1  
!*  
PRETAB,LS1  
!*  
PRRSOL,F
)/GOP    ! Resume printing after UNDO process   
)! We suggest a save at this point  


(Note: Logfile contain all the operation in terms of Ansys Program, you have performed during above process. also, you can run this program in Ansys by copy this log file contains after edit and pest in Command Prompt in utility menu.)


For example, If you want to change Area of Element 2 from 0.0002 m2 to 0.0004 m2 and Length of Element 3 from 0.3 m to 0.5 m then make following changes in program and pest in command prompt and press enter>Yes>OK

Note: Every time Click on New from Utility > New Analysis 

> Select Save no information click OK before running this program


/NOPR   ! Suppress printing of UNDO process 
/PMACRO ! Echo following commands to log    
FINISH  ! Make sure we are at BEGIN level   
/CLEAR,NOSTART  ! Clear model since no SAVE found   
! WE SUGGEST YOU REMOVE THIS LINE AND THE FOLLOWING STARTUP LINES   
/input,start,ans,'C:\Program Files\ANSYS Inc\v170\ANSYS\apdl\'  
/REPLOT,RESIZE  
!*  
/NOPR   
KEYW,PR_SET,1   
KEYW,PR_STRUC,1 
KEYW,PR_THERM,0 
KEYW,PR_FLUID,0 
KEYW,PR_ELMAG,0 
KEYW,MAGNOD,0   
KEYW,MAGEDG,0   
KEYW,MAGHFE,0   
KEYW,MAGELC,0   
KEYW,PR_MULTI,0 
/GO 
!*  
!*  
/PREP7  
!*  
ET,1,LINK180
!*  
!*  
!*  
SECTYPE,1,LINK, ,   
SECDATA,0.0003, 
SECCONTROL,0,0  
!*  
!*  
!*  
SECTYPE,2,LINK, ,   
SECDATA,0.0004, 
SECCONTROL,0,0  
!*  
!*  
!*  
SECTYPE,3,LINK, ,   
SECDATA,0.00009,
SECCONTROL,0,0  
!*  
N, ,0,,,,,, 
N, ,0.2,,,,,,   
N, ,0.6,,,,,,   
N, ,0.11,,,,,,   
FLST,2,2,1  
FITEM,2,1   
FITEM,2,2   
E,P51X  
TYPE,   1   
MAT,
REAL,   
ESYS,       0   
SECNUM,   2 
TSHAP,LINE  
!*  
FLST,2,2,1  
FITEM,2,2   
FITEM,2,3   
E,P51X  
TYPE,   1   
MAT,
REAL,   
ESYS,       0   
SECNUM,   3 
TSHAP,LINE  
!*  
FLST,2,2,1  
FITEM,2,3   
FITEM,2,4   
E,P51X  
!*  
MPTEMP,,,,,,,,  
MPTEMP,1,0  
MPDATA,EX,1,,200e9  
MPDATA,PRXY,1,,0.3  
elist,all,,,0,0 
FLST,2,4,1,ORDE,2   
FITEM,2,1   
FITEM,2,-4  
!*  
/GO 
D,P51X, ,0, , , ,UY,UZ, , , ,   
FLST,2,1,1,ORDE,1   
FITEM,2,1   
!*  
/GO 
D,P51X, ,0, , , ,UX, , , , ,
FLST,2,1,1,ORDE,1   
FITEM,2,4   
!*  
/GO 
F,P51X,FX,50000 
/DIST,1,1.08222638492,1 
/REP,FAST   
EPLOT   
FINISH  
/SOL
/STATUS,SOLU
SOLVE   
FINISH  
/POST1  
!*  
PRNSOL,U,COMP   
AVPRIN,0, , 
ETABLE, ,LS, 1  
!*  
PRETAB,LS1  
!*  
PRETAB,LS1  
!*  
PRRSOL,F
)/GOP    ! Resume printing after UNDO process   
)! We suggest a save at this point  

Quitting ANSYS

To quit ANSYS 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


NEXT TIME WE DISCUSS THIS PROBLEM FOR DIFFERENT MATERIAL AND HOW TO EDIT THIS PROBLEM IF SOMETHING GOES WRONG.



No comments:

Post a Comment