from __future__ import division
from math import log, exp, pi
#given
#reaction comlete in 500 mins at 10 degree celcius and in 1 min at 80 degrees celcius
#so
t1=1 #min
t2=500 #min
T1=273+80 #kelvin
T2=273+10 #Kelvin
#gas constant
R=8.314
#as we know that phie=1/t*
#so
#log(phie1/phie2)=log(t2/t1)
#so we get
#log(t2/t1)=Ea/2.303*(1/T1-1/T2)
#so Ea is given by
Ea=2.303*log(t2/t1)*(1/(1/T1-1/T2))*R
#to find the reaction completion time when temperature is 40 degrees celcius
#so
T3=273+40 #Kelvin
t3=t1*exp(Ea/2.303/R*(1/T1-1/T3)) #min
print " the reaction completion tym at 40 degree celcius is %0.2f min"%(t3)
#given
#temp
T=983+273 #K
Tm=1083+273 #K
deltaT=Tm-T #K
#given that
#latent heat of fusion of copper
deltaHm=1.88*10**9 #J/m**3
#interface energy/unit area
gammasL=0.144 #J/m**2
#change in free energy of vapour
deltaGv=deltaHm*deltaT/Tm #J/m**3
#critical radius of copper during solidification
#for notation only we are using r*=R
R=2*gammasL/deltaGv*10**10 #A
print " the critical radius of copper during solidification is %0.3f A"%(R)
#given
#latent heat of fusion of pure gold
deltaHf=-1.16*10**9 #J/m**2
#surface free energy
gama=0.132 #J/m**2
#melting point of gold
Tm=1064+273 #K
#supercooling value
deltaT=230 #K
#critical radius is given by R intead of r* just for notation
R=(-2*gama*Tm/deltaHf)*(1/deltaT)*10**9 #nm
print " critical radius of pure gold at 230 degree celcius is %0.3f nm"%(R)
#change in free energy of vapours is
deltaGv=deltaHf*deltaT/Tm #J/m**3
#activation free energy
#for notation deltaG* we use deltaG
deltaG=16*(pi)*(gama)**3/3/(deltaGv)**2 #J
print " the activation free energy is %0.3e J"%(deltaG)
#given
#diameter of hard inert particle
D=2 #m
#average centre to centre distance between the particles
l=20*10**-6 #m becaus 1 micro m=10**-6 m
#shear modulus of copper
G=41*10**9 #Pa
#burgers vector
b=0.64*10**-9 #m
#contribution of these particles on the yeild strength of material
tau=G*b/l/10**6 #MPa
print " the contribution of these particles on the yeild strength of material is %0.3f MPa"%(tau)
#given
#heat for recovery of yeild point in zinc
Q=83.14*10**3 #J/mole
#gas constant
R=8.314*10**3 #J/mol K
#temperature
T1=0+273 #K
T2=27+273 #K
#recovery time at 0 degree celcius
t2=5 #min
#the recovery time for the two different temp is given by
#1/t1=A*exp(-Q/R/T1) --------------(1)
#1/t2=A*exp(-Q/R/T2) -----------(2)
#taking ratio of (1) to (2)
#we get
t1=t2*exp(Q/R*(1/T1-1/T2)) #min (there is calculation mistake I myself have checked from calculator too)
print " the recovery time at 27 degree celcius is %0.2f min"%(t2)