#initiation of variable
from math import pi
sigma=40.0*10**6 # in Pa Tensile stress
E=69.0*10**9 #Modulus of elasticity in pa
Ys=0.3 #Specific surface energy in N/m^2
#calculation
a=2*E*Ys/(pi*sigma**2) #Maximum length of surface flaw
print" Maximum length of surface flaw without fracture is %.1f micro meter " %(a*1e6);
#initiation of variable
T=800+273.0; # Ambient temperature in K
#stress is 140 MPa
L_M=24.0*10**3 # Larson - miller parameter
#From Graph of Fig. 8.32 Larson-Miller Parameter is deduced
#calculation
t=10**((L_M/T)-20)
print" Time to rupture for a component is %d hours" %t,"(%.1f days)" %(t/(24.0))
print "Answer in book is 233 hours. it is because of approximation at intermediate stage"