summaryrefslogtreecommitdiff
path: root/3864/CH2/EX2.44/Ex2_44.sce
blob: 8cd10f122899ff8681782479fd3b8554cfa465c5 (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
clear
//
//

//Initilization of Variables

P=10*10**3 //N //Load
E=2*10**5 //N/mm**2 //Youngs Modulus
d2=12 //mm //Diameter of bar1
d1=16 //mm //diameter of bar2
L1=200 //mm //Length of bar1
L2=500 //mm //Length of bar2

//Calculations

//Let A1 and A2 be the cross Area of Bar1 & bar2 respectively
A1=%pi*4**-1*d1**2 //mm**2
A2=%pi*4**-1*d2**2 //mm**2

//Let p1 and p2 be the stress in Bar1 nad bar2 respectively
p1=P*A1**-1 //N/mm**2
p2=P*A2**-1 //N/mm**2

//Let V1 nad V2 be the Volume of of Bar1 and Bar2
V1=A1*(L1+L1)
V2=A2*L2

//Let E be the strain Energy stored in the bar
E=p1**2*(2*E)**-1*V1+p2**2*V2*(2*E)**-1

//result
printf("\n The Strain Energy stored in Bar is %0.2f  N-mm",E)