## Calculate the stress required to move the dislocation at given temperature
import math
b = 2. ## burger vector in angstrom
v = 20.*b**3. ## activation volume
tau_pn = 1000. ## P-N stress of crystal in MNm**-2
k = 1.38e-23 ## physical constant
t1 = 0. ## temperature in K
t2 = 100.## temperature in K
t3 = 300.## temperature in K
t4 = 500.## temperature in K
print("\n Example 11.2")
print("\n\n Part A:")
T = t1
tau_app = tau_pn - 40.*k*T/(v*1e-30)
print'%s %.2f %s %.2f %s '%("\n The stress required to move the dislocation at temperature",T,"K is",tau_app," MNm^-2")
print("\n\n Part B:")
T = t2
tau_app = tau_pn - 40*k*T/(v*1e-30*1e6)
print'%s %.2f %s %.2f %s '%("\n The stress required to move the dislocation at temperature",T,"K is",tau_app," MNm^-2")
print("\n\n Part C:")
T = t3
tau_app = tau_pn - 40*k*T/(v*1e-30*1e6)
if tau_app<0 :
print("\n Stress to be applied is zero")
print'%s %.2f %s'%("\n The stress required to move the dislocation at temperature ",T,"K entirely overcome by thermal fluctuations")
print("\n\n Part D:")
T = t4
tau_app = tau_pn - 40*k*T/(v*1e-30*1e6)
if tau_app<0:
print("\n Stress to be applied is zero")
print'%s %.2f %s'%("\n The stress required to move the dislocation at temperature ",T,"K entirely overcome by thermal fluctuations")
## Calculate the dislocation density in copper
import math
mu = 44. ## shear modulus of copper in GN m**-2
b = 2.55 ## burgers vector in angstrom
tau = 35. ## shear stress in MN m**-2
print("Example 11.3")
l = mu*1e9*b*1e-10/(tau*1e6)
rho = 1./l**2.
print'%s %.2f %s '%("\n Dislocation density in copper is ",rho," m^-2")
## Answer in book is 1e12 m**-2 and due to round off error
## Find the yield stress for a grain size of ASTM 9
import math
sigma1 = 120. ## initial yield strength of material in MNm**-2
sigma2 = 220. ## Final yield strength of material in MN m**-2
d1 = 0.04 ## initial diameter in mm
d2 = 0.01 ## final diameter in mm
n = 9. ## astm number
print("Example 11.4")
k = (sigma2-sigma1)*1e6/(1./math.sqrt(d2*1e-3)-1./math.sqrt(d1*1e-3))
sigma_i = sigma1*1e6 -k/math.sqrt((d1*1e-3))
d = 1/math.sqrt(2**(n-1.)*1e4/645.)
sigma_y = sigma_i+k*(d*1e-3)**(-0.5)
print'%s %.2f %s '%("\n Yield stress for a grain size of ASTM 9 is ",math.ceil(sigma_y/1e6)," MN m^-2")
## Estimate the change in yield strength
import math
n1 = 1e6 ## initial number of particles
n2 = 1e3 ## final number of particle
print("\n Example 11.5")
k = (n1/n2)**(1/3.)
print'%s %.2f %s '%("\n Yield strength would have decreased to ",100/k," of its initial value.")