In [3]:

```
E=110*10**3 #Young's modulus of Copper in MPa
sigma=276.0 #Applied stress in MPa
lo=305.0 #Original length in mm
dl=sigma*lo/E
print"Elongation obtained is ",round(dl,2),"mm"
```

In [7]:

```
del_d=-2.5*10**-3 #Deformation in dia in mm
d0=10.0 #Initial dia in mm
v=0.34 #Poisson ratio for brass
ex=del_d/d0
ez=-ex/v
E=97*10**3 #Modulus of elasticity in MPa
sigma=ez*E
F=sigma*math.pi*(d0**2)/4.0
print"Applied force is ",round(F,0),"N"
```

In [12]:

```
si2=150 # in MPa
si1=0
e2=0.0016
e1=0
d0=12.8*10**-3 #Initial Diameter in m
E=(si2-si1)/(e2-e1)
A0=math.pi*d0**2/4.0
sig=450*10**6 #tensile strength in MPa
F=sig*A0
l0=250 #Initial lengt in mm
e=0.06 #strain
dl=e*l0
print"Modulus of elasticity is ",round(E/10**3,1),"GPa"
print"From the graph the Yield strength is",l0,"MPa"
print"Maximum load sustained is ",round(F,0),"N/n"
print"Change in length is ",dl,"mm"
```

In [14]:

```
di=12.8 #Initial dia in mm
df=10.7 #Final dia in mm
import math
RA = ((di**2-df**2)/di**2)*100
Ao=math.pi*di**2*10**-6/4.0
sig=460*10**6 #Tensile strength
F=sig*Ao
Af=math.pi*df**2/4.0
sig_t=F/Af
print"percent reduction in area is ",round(RA,0),"%"
print"True stress is ",round(sig_t,1),"MPa"
```

In [5]:

```
sig_t=415 #True stress in MPa
et=0.1 #True strain
K=1035.0 # In MPa
n=(math.log(sig_t)-math.log(K))/math.log(et)
print"Strain - hardening coefficient is ",round(n,2)
```

In [22]:

```
n=4.0 #No of points
T1=520
T2=512
T3=515
T4=522
Tav=(T1+T2+T3+T4)/n
s=(((T1-Tav)**2+(T2-Tav)**2+(T3-Tav)**2+(T4-Tav)**2)/(n-1))**(0.5)
print"The average Tensile strength is",round(Tav,0),"MPa"
print"The standard deviation is",round(s,1),"MPa"
```

In [18]:

```
sig_y=310.0 #Minimum yield strength in MPa
N=5.0 # Conservative factor of safety
F=220000/2.0 #Two rods must support half of the total force
sig_w=sig_y/N
d=2*math.sqrt(F/(math.pi*sig_w))
print"Diameter of each of the two rods is ",round(d,1),"mm"
```

In [ ]:

```
```