import math
# Variables
n_bcc = 1./2;
n_fcc = 1./4;
r_fcc = 1.26; #in Angstorm
r_bcc = 1.24; #in Angstorm
# Calculations
a_bcc = 4.*r_bcc/math.sqrt(3); #in Angstorm
a_fcc = 2.*math.sqrt(2)*r_fcc; #in Angstorm
v_fcc = a_fcc**3;
v_bcc = a_bcc**3;
v = 100*((n_fcc*v_fcc)-(n_bcc*v_bcc))/(n_fcc*v_fcc);
# Results
print "Percentage change in volume = %.3f"%v
# Variables
e = 51.; #Young modulous in GPa
v = 0.22; #poisson ratio
# Calculations
g = e/(2*(1-v)); #shear modulous in GPa
b = 2*10.**-10;
ue = (1./2)*g*10**9*b**2*10**12; #in J/m**3
# Results
print "Change in free energy during recrysatllization (in J/m**3) = %.1f J/m**3"%ue
# Variables
g = 41.*10**9; #in N/m**2
b = 0.64*10**-9; #in m
l = 20.*10**-6; #in m
# Calculations
t = g*b/l; #in N/m**2
T = t*10.**-6; #in MPa
# Results
print "Contribution of these particles (in MPa) = %.3f MPa"%T