## Estimate young’s modulus of material
import math
n = 1.
m = 9.
A = 7.68e-29 ## Constant having unit J m
r_0 = 2.5e-10 ## bonding distance in m
print("\n Example 10.1")
B = A*(r_0**(8.))/(9.)
Y = (90.*B/(r_0)**11.-2.*A/(r_0)**3.)/r_0
print'%s %.2f %s '%("\n Young’s modulus of material is ",Y/1e9," GN m^-2")
## Calculation of stress in fibers
import math
Y_f = 440.
Y_m = 71.
sigma_total= 100. ## total load
print("\n Example 10.2")
r = Y_f/Y_m
sigma_f = r*(sigma_total/0.7)/(1.+r*3./7.)
print("\n Part A:")
print'%s %.2f %s '%("\n When load is applied parallel to fiber then, stress in fiber is ",sigma_f," MN m^-2")
print("\n\n Part B:")
print'%s %.2f %s '%("\n When load is applied perpendicular to fiber then, stress in fiber and matrix is same i.e.",sigma_total," MN m^-2")
## Estimate diffusion coefficient
import math
t_r = 100. ## relaxation time in s
d = 2.5 ## distance in angstrom
print("\n Example 10.3")
f = 1./t_r ## jump frequency
D = (d*1e-10)**2.*f
print'%s %.2e %s '%("\n Diffusion coefficient is ",D," m^2 s^-1")