summaryrefslogtreecommitdiff
path: root/1898/CH6/EX6.20/Ex6_20.sce
blob: 56f0f586e9bf74dc75756a4898f5c936b125711a (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
clear all; clc;

disp("Scilab Code Ex 6.20 : ")

//Given:
M =20; //kN
Iy = 0.96*10^-3; //m^4
Iz = 7.54*10^-3; //m^4
theta = 57.1*(%pi/180);


//Internal moment Components:
My = M*sin(theta); 
Mz = M*cos(theta); 

//Bending Stress:
y_p = -0.2; //y Coordinate of P
z_p = 0.35; //z Coordinate of P

theta1 = (%pi/2)-(theta);
yp = -z_p*sin(theta1)+ y_p*cos(theta1);
zp = z_p*cos(theta1) + y_p*sin(theta1);

//Eq 6-17

sigma_p = ((Mz*-yp)/Iz) + ((My*zp)/Iy) ;
sigma_p = sigma_p/10^3;

//Orientation of the Nuetral Axis:
alpha = atan((Iz/Iy)*tan(theta));
alpha = alpha*(180/%pi);

//Display:

    
 printf("\n\nThe maximum normal stress at point P = %1.2f MPa',sigma_p);
 printf("\nThe orientation of the nuetral axis = %1.1f degrees',alpha);
 
 //------------------------------------------------------------------------END---------------------------------------------------------------------------------------