Chapter 3:Fundamentals of Structures of Crystalline Solids¶

Example 3.1 Page 43¶

In [2]:
#initiation of variables
a= 0.48#let side of a unit cell
b = 0.46#  let side of a unit cell
c = 0.40 # let side of a unit cell
p_x = 1.0/4
p_y = 1
p_z = 1.0/2

#calculation
qa = a*p_x # distance of point along x axis from origin in nm
rb = b*p_y # distance of point along y axis from origin in nm
sc = c*p_z # distance of point along z axis from origin

#result
print" Point P (%.2f" %p_x,"%.2f" %p_y,"%.2f" %p_z,") corresponds to",
print " %.2fnm" %qa,"%.2fnm" %rb,"%.2fnm " %sc

 Point P (0.25 1.00 0.50 ) corresponds to  0.12nm 0.46nm 0.20nm


Example 3.2 Page 44¶

In [5]:
#initiation of variable
print"\n\nPoint \t Fractional Length\t       Point \n"
print"Number \t x axix\t y axix\ z axix \t Coordinate"
n = 1 # serial number

for x in range (0,2) :
for y in range (0,2) :
for z in range (0,2) :
print "%d\t" %n,"  %.1f" %x,"     %0.1f" %y,"    %.1f" %y,"   %.1f" %x," %.1f"%y," %.1f "%z
n = n+1

x = 0.5# x coordinate for center point
y = 0.5# y coordinate for center point
z = 0.5# y coordinate for center point
print "%d\t" %n,"  %.1f" %x,"     %0.1f" %y,"    %.1f" %y,"   %.1f" %x," %.1f"%y," %.1f "%z
print "sequence of point number is changed to make problem programable "


Point 	 Fractional Length	       Point

Number 	 x axix	 y axix\ z axix 	 Coordinate
1	  0.0      0.0     0.0    0.0  0.0  0.0
2	  0.0      0.0     0.0    0.0  0.0  1.0
3	  0.0      1.0     1.0    0.0  1.0  0.0
4	  0.0      1.0     1.0    0.0  1.0  1.0
5	  1.0      0.0     0.0    1.0  0.0  0.0
6	  1.0      0.0     0.0    1.0  0.0  1.0
7	  1.0      1.0     1.0    1.0  1.0  0.0
8	  1.0      1.0     1.0    1.0  1.0  1.0
9	  0.5      0.5     0.5    0.5  0.5  0.5
sequence of point number is changed to make problem programable


Example 3.3 Page 46¶

In [7]:
#initiation of variable
a = 1.0 # let side of a unit cell
b = 1.0 # let side of a unit cell
c = 1.0 # let side of a unit cell
x_proj = 0.5*a # x coordinate of point
y_proj = 1.0*b # y coordinate of point
z_proj = 0.0*c # z coordinate of point

#calculation
k = 1.0/x_proj
x_reduction = x_proj*k # reduction in x direction
y_reduction = y_proj*k # reduction in x direction
z_reduction = z_proj*k # reduction in x direction

print " Indices of direction are as [%d" %x_reduction," %d" %y_reduction," %d" %z_reduction,"]"

 Indices of direction are as [1  2  0 ]


Example 3.4 Page 47¶

In [17]:
#initiation of variable
import numpy as np
#solving for a point on the vector
a=5.0;
O=[0,0,0] #origin
a=[1,-1,0] # co-ordinate of the assumed point
A= [x * 5 for x in a]

#calcualtion
OA=np.subtract(A,O); #vector
OA=[x * 1.0/5 for x in OA]

#result
print "the resultant vector in [x,y,z] respectively",OA
print  "while in notation negative value is indicated by a bar over it"

the resultant vector in [x,y,z] respectively [1.0, -1.0, 0.0]
while in notation negative value is indicated by a bar over it


Example 3.5 Page 49¶

In [18]:
#initiation of variable
u1 = 1.0 # Unit cell parameter
v1 = 1.0 # Unit cell parameter
w1 = 1.0 # Unit cell parameter

#calcualtion
u_1 = 1.0/3*(2*u1-v1)
v_1 = 1.0/3*(2*v1-u1)
t_1 = -(u_1+v_1)
w_1 = w1
k = 1.0/u_1
u = u_1*k
v = v_1*k
w = w_1*k
t = t_1*k

#result
print" Indices of direction are as [%d" %u," %d" %v," %d" %t," %d" %w,"]"
print  "while in notation negative value is indicated by a bar over it"

 Indices of direction are as [1  1  -2  3 ]
while in notation negative value is indicated by a bar over it


Example 3.6 Page 50¶

In [19]:
#initiation of variable
a = 1.0# let side of a unit cell
b = 1.0 #  let side of a unit cell
c = 1.0 # let side of a unit cell

#calcualtion
x_proj = 0.0 # x coordinate of point
y_proj = -1.0*b # y coordinate of point
z_proj = 0.5*c # z coordinate of point
x_reduction = x_proj*a # reduction in x direction
y_reduction = 1.0/y_proj# reduction in x direction
z_reduction = 1.0/z_proj # reduction in x direction

#result
print " Indices of direction are as [%d" %x_reduction," %d" %y_reduction," %d" %z_reduction,"]"
print  "while in notation negative value is indicated by a bar over it"

 Indices of direction are as [0  -1  2 ]
while in notation negative value is indicated by a bar over it


Example 3.7 Page 52¶

In [1]:
#initiation of variable
print "its a theoritical problem so only steps are shown how to solve the question"
print "In order to construct the figure we assume some lines that are normal to planes and from the intersection of lines we construct new planes"
A=[0,-1,1] # normal to one place
B=[1,0,1] #assumed normal of top plane
C=[-1,0,-1] #normal of the bottom plane

#result
print "from the question line ef is the intersection of plane",A, "and top plane and line gh intersection of plane",A,"bottom plane similar intersection has to be taken with front and back cell to find out the line eg and fh"

its a theoritical problem so only steps are shown how to solve the question
In order to construct the figure we assume some lines that are normal to planes and from the intersection of lines we construct new planes
from the question line ef is the intersection of plane [0, -1, 1] and top plane and line gh intersection of plane [0, -1, 1] bottom plane similar intersection has to be taken with front and back cell to find out the line eg and fh


Example 3.8 Page 52¶

In [21]:
#initiation of variable
u1 = 1.0 # Unit cell parameter
v1 = -1.0 # Unit cell parameter
w1 = 1.0 # Unit cell parameter

#calcualtion
u_1 = 1.0/3*(2*u1-v1)
v_1 = 1.0/3*(2*v1-u1)
t_1 = -(u_1+v_1)
w_1 = w1
k = 1.0/u_1
u = u_1*k
v = v_1*k
w = w_1*k
t = t_1*k

#result
print" Indices of direction are as [%d" %u," %d" %v," %d" %t," %d" %w,"]"
print  "while in notation negative value is indicated by a bar over it"
print " in book the notation used [h k i l] but in the solution [u v t w]  is used to maintain uniformity]"

 Indices of direction are as [1  -1  0  1 ]
while in notation negative value is indicated by a bar over it
in book the notation used [h k i l] but in the solution [u v t w]  is used to maintain uniformity]