blob: cc43c5926530fa0a67973e47747281e9c9953fdd (
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
|
clear
//
//Given
//Variable declaration
P=60*10**3 //Load in N
d=4*10 //diameter in mm
L=5*10**3 //Length of rod in mm
E=2e5 //Youngs Modulus in N/sq.mm
//Calculation
A=(%pi/4)*d**2 //Area in sq.mm
V=int(A*L) //Volume of rod in cubic.mm
//case (ii):stress in the rod
sigma=(P/A) //stress in N/sq.mm
//case (i):stretch in the rod
x=((sigma/E)*L) //stretch or extension in mm
//case (iii):strain energy absorbed by the rod
U=((sigma**2/(2*E)*V))*1e-3 //strain energy absorbed by the rod in Nm
//Result
printf("\n stress in the rod = %0.3f N/mm^2",sigma)
printf("\n stretch in the rod = %0.3f mm",x)
printf("\n strain energy absorbed by the rod = %0.3f N-m",U)
|