Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Matlab Torsion Problem A solid shaft with a cylindrical cross section has a leng

ID: 2086101 • Letter: M

Question

Matlab Torsion Problem A solid shaft with a cylindrical cross section has a length L, diameter D, shear modulus G and yield stress Ty A torque T is applied about the z axis and increased until the angle of twist has reached a certain value (say ????), then the torque is removed, write matlab code that determines for a given ????- The maximum torque applied The maximum shear stress generated The permanent angle of twist The residual shear stress at the elastic-plastic interface Choose 16 values for ???? that range from zero to 3 times the angle of twist at the onset of yield. Apply the code to the special case: L 35 ft, D-2.4in, G-11.2x106 psi and -22 ksi. (Hint, for T=75 kip in, the residual shear stress at rp-5.02 ksi).

Explanation / Answer

clear all;close all;clc;commandwindow;
%getting values from the user...
G=input('enter the value of shear modulus G : ');
D=input('enter the diameter in inches : ');
J=(pi/32)*(D^4);
L=input('enter the length of the shaft in feet : ');
L=L*12; %feet to inches conversion...
phi=input('give the angle of twist at the onset of the yield : ');

%computing for 16 values of phi_max...
i=1;
for phi_max=0:(1/16):(3*phi)
%computing maximum torque T_Max...
T_Max(:,i)=(G*J*phi_max)/L;
%computing maximum shear stress Tou_max...
Tou_max(:,i)=(G*D*phi_max)/(2*L);
i=i+1;
end
%computing permanent angle of twist phi_y...
tou_y=input('enter the yield stress tou_y : ');
phi_y=(tou_y*2*L)/(G*D);
display('Maximum troque for 16 values of phi_max is : ');
display(T_Max);
display('maximum shear stress for 16 values of phi_max is : ');
display(Tou_max);
display('computing permanent angle of twist phi_y is :');
display(phi_y);

OUTPUT:
T_Max =

1.0e+05 *

Columns 1 through 8

0 0.0543 0.1086 0.1629 0.2171 0.2714 0.3257 0.3800

Columns 9 through 16

0.4343 0.4886 0.5429 0.5972 0.6514 0.7057 0.7600 0.8143

Columns 17 through 24

0.8686 0.9229 0.9772 1.0314 1.0857 1.1400 1.1943 1.2486

Columns 25 through 32

1.3029 1.3572 1.4115 1.4657 1.5200 1.5743 1.6286 1.6829

Columns 33 through 40

1.7372 1.7915 1.8457 1.9000 1.9543 2.0086 2.0629 2.1172

Columns 41 through 48

2.1715 2.2258 2.2800 2.3343 2.3886 2.4429 2.4972 2.5515

Column 49

2.6058

maximum shear stress for 16 values of phi_max is :

Tou_max =

Columns 1 through 6

0 2000 4000 6000 8000 10000

Columns 7 through 12

12000 14000 16000 18000 20000 22000

Columns 13 through 18

24000 26000 28000 30000 32000 34000

Columns 19 through 24

36000 38000 40000 42000 44000 46000

Columns 25 through 30

48000 50000 52000 54000 56000 58000

Columns 31 through 36

60000 62000 64000 66000 68000 70000

Columns 37 through 42

72000 74000 76000 78000 80000 82000

Columns 43 through 48

84000 86000 88000 90000 92000 94000

Column 49

96000

computing permanent angle of twist phi_y is :

phi_y =

0.0031