summaryrefslogtreecommitdiff
path: root/3864/CH7/EX7.21/Ex7_21.sce
blob: 2f8167ce720a8cadea664f572348fe477a961da8 (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
51
52
53
54
55
56
57
58
59
clear
//
//

//Initilization of Variables

d=150 //mm //Diameter
T=20*10**6 //N //Torque
M=12*10**6 //N-mm //B.M
F=200*10**3 //N //Axial Thrust

//Calculations

//M.I
I=(%pi*64**-1*d**4)

//Bending stress 
f_A=M*I**-1*(d*2**-1) //N/mm**2
f_B=-f_A //N/mm**2

//Axial thrust due to thrust
sigma=F*(%pi*4**-1*d**2)**-1

//At A
p_x=f_A-sigma //N/mm**2

//At B
p_x2=f_B-sigma //N/mm**2

p_y=0 //At A and B

//Polar Modulus
J=%pi*32**-1*d**4 //mm**4

//Shearing stress at A and B
q=T*J**-1*(d*2**-1) //N/mm**2


//Principal Stresses
//At A
P1=(p_x+p_y)*2**-1+(((p_x-p_y)*2**-1)**2+q**2)**0.5 //N/mm**2
P2=(p_x+p_y)*2**-1-(((p_x-p_y)*2**-1)**2+q**2)**0.5 //N/mm**2

//Max shear stress
q_max1=(((p_x-p_y)*2**-1)**2+q**2)**0.5 //N/mm**2

//At B
P1_2=(p_x2+p_y)*2**-1+(((p_x2-p_y)*2**-1)**2+q**2)**0.5 //N/mm**2
P2_2=(p_x2+p_y)*2**-1-(((p_x2-p_y)*2**-1)**2+q**2)**0.5 //N/mm**2

//Max shear stress
q_max2=(((p_x2-p_y)*2**-1)**2+q**2)**0.5 //N/mm**2


//Result
printf("\n MAx Principal Stresses:P1 %0.2f  N/mm**2",P1)
printf("\n                       :P2 %0.2f  N/mm**2",P2)
printf("\n Min Principal Stresses:P1_2 %0.2f  N/mm**2",P1_2)
printf("\n                       :P2_2 %0.2f  N/mm**2",P2_2)