summaryrefslogtreecommitdiff
path: root/1367/CH12/EX12.1/12_1.sce
blob: 8238950bf2eb7f4a73b3e2c1fc1e5f2a6721a9c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//calculate percentage change in volume
//Ex:12.1
clc;
clear;
close;
n_bcc=1/2;
n_fcc=1/4;
r_fcc=1.26;//in Angstorm
r_bcc=1.24;//in Angstorm
a_bcc=4*r_bcc/sqrt(3);//in Angstorm
a_fcc=2*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);
disp(v,"Percentage change in volume = ");