blob: 4c1ace979544b7a535fa2a75a82301a67a2fc4fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//chapter 2
//example 2.2
//calculate distance between two nearest Cu atoms
//page 41
clear;
clc;
//given
N=6.02E23; // in /gram-atom (Avogadro's number)
n=4; // number of atom per unit cell for fcc structure
M=63.5; //in gram/gram-atom (atomic weight of Cu)
p=8.96; // in g/cm^3 (density)
//calculate
a=nthroot((n*M/(N*p)),3);
printf('\nThe lattice constant is\ta=%1.2E cm',a);
a=a*1E8; // changing unit from cm to Angstrom
printf('\n\t\t\ta=%.2f Angstrom',a);
d=a/sqrt(2); // distance infcc lattice
printf('\nThe distance between two nearest Cu atoms is \td=%.2f Angstrom',d);
|