summaryrefslogtreecommitdiff
path: root/2309/CH5/EX5.1
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /2309/CH5/EX5.1
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '2309/CH5/EX5.1')
-rwxr-xr-x2309/CH5/EX5.1/Ex5_1.sce21
1 files changed, 21 insertions, 0 deletions
diff --git a/2309/CH5/EX5.1/Ex5_1.sce b/2309/CH5/EX5.1/Ex5_1.sce
new file mode 100755
index 000000000..bf59b4231
--- /dev/null
+++ b/2309/CH5/EX5.1/Ex5_1.sce
@@ -0,0 +1,21 @@
+// Chapter 5 Example 1
+//==============================================================================
+clc;
+clear;
+
+//input data
+//Copper has FCC structure
+
+r = 1.273; // Atomic radius in angstrom
+N = 6.023*10^26; // Avagadros number in atoms/kilomole
+A = 63.5; // Atomic weight of copper in grams
+n = 4; // No. of atoms per unit cell for FCC
+
+//Calculations
+r1 = r*10^-10; // Radius conversion from angstrom to m
+a = (4*r1)/sqrt(2); // lattice parameter for FCC
+p = (n*A)/(N*a^3); // Density of copper
+
+//Output
+
+mprintf('Lattice Constant a = %3.1e m\n Density of copper = %3.1f kg/m^3',a,p);