You are on page 1of 19

Exercise 2: Ansys Probabilistic design

- a numerical experiment in MF2024, 2010

Ulf Sellgren KTH Machine Design School of Industrial Engineering and Management

MF2024 Robust and probabilistic design School of Industrial Engineering and Management November 2010

EXERCISE 2 ANSYS PROBABILISTIC DESIGN

The exercise
The exercise requires (Ansys) Mechanical APDL 12.0 It is a group exercise (2 persons per group) Set up and run a probabilistic simulation of a simple snap fastener feature with Ansys Modify the probabilistic input parameters to make the output parameters satisfy the probabilistic requirements and constraints

The basic Ansys probabilistic design simulations (PDS) procedure


Build a database that solves for a single case and verify results. Make sure to have the properties or boundary conditions with variations applied using variables Specify statistical distributions of the input variable using PDS Specify desired output variables using PDS Instruct PDS to solve the model multiple times Review the report generated by PDS

ELEVEN STEPS TO PERFORM


1. Create an empty folder and download the Ansys macro input file Snaper.inp (from the mf2024 home page).
/PREP7 /title,Snap fastener feature !************************************************************* ! Input parameters ! HEIGHT=0.0035 ! Beam height WIDTH=0.0095 ! Beam width LENGTH=0.019 ! Beam length STEP=0.0015 ! Step height ANGLE=20 ! Angle in degrees for Sliding face MU=0.6 EMOD=2.2e9 ! Youngs modulus DELTA=0.0015 ! Mating snap distance !************************************************************** k,1, 0.000, 0.000, 0.000 k,2, LENGTH-0.001, 0.000, 0.000 k,4, 0.000, HEIGHT, 0.000 k,5, LENGTH-0.001, HEIGHT, 0.000 k,7, LENGTH-0.001, HEIGHT+STEP, 0.000 k,8, LENGTH, HEIGHT+STEP, 0.000 cy=HEIGHT/2+STEP pi=4*atan(1) cx=cy/tan(ANGLE*pi/180) k,3, LENGTH+cx, 0.000, 0.000 k,6, LENGTH+cx, HEIGHT/2, 0.000 nx=8 ! number of elements in length direction ny=4 ! number of elements in heigth direction nz=4 ! number of elements in width direction l,1,2,nx ! l1 l,2,3,4 ! l2 l,4,5,nx ! l3 l,5,6,4 ! l4 l,7,8,2 ! l5 l,1,4,ny ! l6 l,2,5,ny ! l7 l,3,6,ny ! l8 l,5,7,2 ! l9 l,6,8,2 ! l10 al,1,7,3,6 al,2,8,4,7 al,4,10,5,9 UIMP,1,EX, , ,EMOD ! Material properties UIMP,1,NUXY, , ,.3, et,1,42,,,3 ! 4-node plane42 element with thickness r,1,WIDTH shpp,off amesh,all finish /solu Iz=WIDTH*HEIGHT**3/12 Py=3*EMOD*Iz*DELTA/(LENGTH-0.001)/(LENGTH-0.001)/(LENGTH-0.001) Px=Py*tan(ANGLE*pi/180)+mu/(1-MU*tan(ANGLE*pi/180)) dk,1,all,0 dl,6,,ux,0 fk,8,fy,-Py fk,8,fx,-Px solve finish /post1 plnsol,epel,x lsel,s,line,,6 nsll,s,1 nsort,epel,x *get,STRX,sort,0,max STRAIN=STRX lsel,all nsel,all ksel,s,kp,,7

nslk,s ! select node at point *get,nodnum,node,0,num,min DISP=abs(uy(nodnum)) W=Px ksel,all nsel,all finish

Figure1. The file Snaper.inp.

The FE model is a simple 2-D representation of a snap fastener mating feature (see figure 2). There are five design parameters (Length, Height, Width, Step, and Emod), which all are supposed to be randomly Gaussian distributed, and also the coefficient of friction (or Mu) and the mating height DELTA between the two mating features. is supposed to be uniformly distributed, while DELTA has a Gaussian distribution. The axial snap force W is searched for.

Figure2. The two snap fastener mating features (top), with the left one modeled and analyzed (bottom left).

2. Open Ansys 12 (Mechanical APDL) and execute Snaper.inp in the command window.
Start Mechanical APDL (Ansys Academic ) from the Mechanical APDL Product Launcher be sure to use the directory that contains the macro file as working directory (see figure 3).

Figure3. Open Ansys from the Mechanical APDL Product Launcher. The macro file Snaper.inp is executed by typing the command: /input,Snaper,inp

Figure4. Execute Snaper.inp in the Ansys command window.

The macro file creates the FE model, defines the boundary conditions, performs a static simulation, plots the elastic strain in length direction (see figure 5) and stores the axial snap force and the maximum axial strain in the parameters W and STRAIN, respectively.

Figure 5. The strain results plotted as specified at the end of the macro Snaper.inp Scrutinize the input file and the results. Try to understand the simulated case.

3. Enter the Probabilistic Design module in Ansys and define the random input.
Select Random Input.in the Prob Definitns menu (see figure 6).

Figure 6. The Probabilistic Design module In the screen shots below, the geometric parameter LENGTH is defined as a random Gaussian variable with mean values 0.019 m and standard deviation 0.001 m. HEIGHT, WIDTH and STEP are also defined as random Gaussian variables, but with mean values 0.0035 m, 0.0095 m, and 0.0015 m, respectively and the standard deviations 0.0001 m. Furthermore, the ANGLE and EMOD (Youngs modulus) parameters are also defined as random Gaussian parameter with mean values 20 degrees and 2.2 GPa, respectively and the standard deviations 0.1 degrees and 0.1 GPa. The interaction parameter DELTA is defined as a random Gaussian variable with mean value 0.0015 m and standard deviation 0.0005 m. MU (coefficient of friction ) is defined as a random parameter with a uniform distribution between 0.54 and 0.66.

Figure 7. Add LENGTH as a random input variable Also add the other random input variables.

Figure 8. All input random variables defined

4. Select the random output parameters.


Select Random Output option and add W and STRAIN as output variables. This axial snap force result W, and the maximum axial strain STRAIN are defined as a parameter in the postprocessing portion of the Snaper.inp file.

Figure 9. Two output random variables defined

5. Instruct Ansys PDS to solve the model multiple times.


Use the Method Wizard. Skip the first screen with clock by hitting NEXT, accept default No in the second screen, select the first three boxes in the third screen, and pick FINISH in the fourth screen

Figure 10. Chose the probabilistic design general options and output.

10

Select Monte Carlo simulations as the probabilistic method, as shown in figure 11.

Figure 11. Define the options for the Monte Carlo simulations.

11

6. Assign an input file to PDS.


First we must comment out the value assignment to LENGTH, HEIGHT, WIDTH, etc. in the macro file Snaper.inp and store it as SnapPD.inp. Everything after a ! on an input line is treated by Ansys as a comment). e.g.: ! LENGTH=0.019 ! HEIGHT=0.0035 ! WIDTH=0.0095 all random input parameters ..

Figure 12. Assign the Ansys input macro file, with the design parameter definitions removed.

12

7. Run the PDS.


PDS is designed to distribute these runs over multiple computers. It will compile all these results back on your own PC. This distributed computing is not too difficult to set up, but for this exercise we will run them all on our own machine. Select and execute a Serial Run, as shown in figure 13.

Figure 13. Execute a serial Monte Carlo simulation.

13

8. Scrutinize the results


First look how sensitive the response parameter W to variations of the three design variables. Look at Sensitivites, Scatter Plot and Correlation Matrix in the menu Trends under Prob Results.

Figure 14. Sensitivity trends plotted for the random output snap force W.

14

Figure 15. Sensitivity trends plotted for the random output axial strain STRAIN.

15

9. Let Ansys generate an HTML report.


First define Report Options and then select a new report folder in Generate Report.

Figure 16. Write the HTML report. In this case, the report SnapReport is create as a web-page in the subfolder SnapReport.

16

10. Modify the random input to meet reliability requirements


Analyze the interactive trend data and scrutinize the generated report. Modify the standard deviations of the five random input parameters and try to meet the following two probabilistic requirements: 1: 95.6% of the snap fastener features should have a maximum snap force W between 40 and 120 N, with a confidence limit of 95%. 2: 95.6% of the snap fastener features should have a maximum axial STRAIN between 0.012 and 0.020, with a confidence limit of 95%. Furthermore, due to cost constraints the deviations (tolerances) should be as large as possible.

Figure 17. A normal(Gaussian) distribution.

17

11. Fill in the Exercise Word-template, pack the generated final HTML report folder and append them to an e-mail to mf2024@md.kth.se.
Add your results to the Exercise 2 Word-template, and zip the folder with the final Ansys HTML report for the Monte Carlo simulation where the reliability requirements are met, and append them both to an e-mail to mf2024@md.kth.se Your results should include 1. A table with the mean values of your input random variables and their standard deviation values. 2. The computed mean and standard deviation for the random output parameters. 3. Sensitivity plots for the two output parameters 4. A description of how the requirements for W and STRAIN and the cost constraint are satisfied. 5. A reflection on the model errors and how they could be addressed. 6. Dont forget to add your names on the front page. Your e-mail must include: 1. The subject: Exercise 2 2. Your exercise 2 results (in the Word-template) 3. A zip-file with your Ansys HTML report. 4. Your names.

18

You might also like