summaryrefslogtreecommitdiff
path: root/3863/CH1/EX1.1/Ex1_1.sce
blob: 89f476e26dbc1b639f80b7cf5e8bfa50f4537a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
clear
//
//Given
//Variable declaration
L=150           //Length of the rod in cm
D=20            //Diameter of the rod in mm
P=20*10**3      //Axial pull in N
E=2.0e5         //Modulus of elasticity in N/sq.mm

//Calculation
A=(%pi/4)*(D**2)    //Area in sq.mm
 //case (i):stress
sigma=P/A               //Stress in N/sq.mm
 //case (ii):strain
e=sigma/E               //Strain
 //case (iii):elongation of the rod
dL=e*L                  //Elongation of the rod in cm

//Result
printf("\n Stress = %0.3f  N/mm^2",sigma)
printf("\n Strain = %0.6f  ",e)
printf("\n Elongation = %0.4f  cm",dL)