1: Bonding in Solids

Example number 1, Page number 1.21

In [6]:
#importing modules
import math
from __future__ import division
from sympy import diff,Symbol
import numpy as np

#Variable declaration
n=1;
m=9;
a=Symbol('a')
b=Symbol('b')
r=Symbol('r')

#Calculation
y=(-a/(r**n))+(b/(r**m));
y=diff(y,r);
y=diff(y,r);

#Result
print y
-2*a/r**3 + 90*b/r**11
In [6]:
#since the values of a,b,r are declared as symbols in the above cell, it cannot be solved there. hence it is being solved here with the given variable declaration
#importing modules
import math
from __future__ import division

#Variable declaration
a=7.68*10**-29;     
r0=2.5*10**-10;    #radius(m)

#Calculation
b=a*(r0**8)/9;
y=((-2*a*r0**8)+(90*b))/r0**11;    
E=y/r0;           #young's modulus(Pa)

#Result
print "young's modulus is",int(E/10**9),"GPa"
young's modulus is 157 GPa

Example number 2, Page number 1.22

In [7]:
#importing modules
import math
from __future__ import division

#Variable declaration
dm=1.98*10**-29/3;      #dipole moment
l=0.92*10**-10;         #bond length(m)

#Calculation
ec=dm/l;        #effective charge(coulomb)

#Result
print "effective charge is",round(ec*10**19,2),"*10**-19 coulomb"
print "answer given in the book is wrong"
effective charge is 0.72 *10**-19 coulomb
answer given in the book is wrong