import math
# Variables
Y = 180*10**9; #Young's modulus of a certain material(in N/m**2)
E = 1.8; #true surface energy (in J/m**2)
c = (5./2)*10**-6; #Crack (in meter)
# Calculation
F_strength = math.sqrt((2*Y*E/(math.pi*c)))
p = 1000*math.pi*c/(2*Y) - 1.8
# Results
print 'fracture strength = %.2f MN/m**2'%(F_strength*10**-6)
print "plastic work required to propogate the crack : %.1f "%p
# book answer is wrong
import math
# Variables
d_o = 12.7; #tensile test specimen diameter (in mm)
d = 12; #tensile test specimen diameter after load (in mm)
P = 76*10**3; #load(in N)
pi = 22./7;
A_o = (pi/4)*(d_o**2); #Initial area of cross section(in mm**2)
A = (pi/4)*(d**2); #area of cross section after load of 76 kN
# Calculation
E_stress = P/A_o; #engineering stress
T_stress = P/A; #true stress
T_strain = math.log(A_o/A); #true strain
E_strain = math.exp(T_strain)-1; #engineering strain
# Results
print 'engineering stress in = %.f N/mm**2'%E_stress
print 'true stress in = %.2f N/mm**2'%T_stress
print 'engineering strain = %.2f'%E_strain
print 'true strain = %.2f'%T_strain
# rounding off error
import math
# Variables
Y = 210.*10**9; #Young's modulus of a certain material(in N/m**2)
E = 10.; #true surface energy (in J/m**2)
c = (100./2)*10**-6; #Crack (in meter)
pi = 3.14;
# Calculation
F_strength = (2*Y*E/(pi*c))**(1/2.);
# Results
print 'fracture strength in %.1e Newton/m**2'%F_strength
import math
# Variables
l_o = 305.*10**-3; #length of copper piece(in meter)
E = 110.*10**9; #surface energy
stress = 276.*10**6; #in Pa
# Calculation
dl = stress*l_o/E; #resultant elongation(in meter)
# Results
print 'resultant elongation in = %.2f mm'%(dl*10**3)
import math
# Variables
T_stress = 415.; #True stress (in Megapascal)
T_strain = 0.10; #True strain
K = 1035.; #(in Megapascal)
# Calculation
n = (math.log(T_stress)-math.log(K))/math.log(T_strain); #
# Results
print 'Strain hardening exponent for an alloy = %.2f'%n