summaryrefslogtreecommitdiff
path: root/3864/CH10/EX10.2/Ex10_2.sce
blob: 81c9db7dd31b016ba16f15d264e74e32abad7c9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
clear
//
//

//Initilization of Variables

M=40*10**6 //N-mm //Bending moment
T=10*10**6 //N-mm //TOrque
mu=0.25 //Poissons ratio
P_e=200 //N/mm**2 //Stress at Elastic Limit
FOS=2

//Calculations

//Let d be the diameter of the shaft

//Principal stresses are given by

//P1=16*(%pi*d**3)**-1*(M+(M**2+T**2)**0.5)
//After substituting values and further simplifying we get
//P1=4.13706*10**8*(d**3)**-1     ............................(1)

//P2=16*(%pi*d**3)**-1*(M-(M**2+T**2)**0.5)
//After substituting values and further simplifying we get
//P2=-6269718*(%pi*d**3)**-1       ..............................(2)

//q_max=(P1-P2)*2**-1
//After substituting values and further simplifying we get
//q_max=2.09988*10**8*(d**3)**-1

//Max Principal stress theory
//P1=P_e*(FOS)**-1
//After substituting values and further simplifying we get
d=(4.13706*10**8*2*200**-1)**0.33333 //mm 

//Max shear stress theory
//q_max=shear stress at elastic limit*(FOS)**-1
//After substituting values and further simplifying we get
d2=(2.09988*10**8*4*200**-1)**0.33333

//Max strain energy theory
//P_3=0
//P1**2+P2**2-2*mu*P1*P2=P_e**2*(FOS)**-1
//After substituting values and further simplifying we get
d3=(8.62444*10**12)**0.166666

//Result
printf("\n Diameter of shaft according to:MAx Principal stress theory %0.2f  mm",d)
printf("\n                               :Max shear stress theory %0.2f  mm",d2)
printf("\n                               :Max strain energy theory %0.2f  mm",d3)