summaryrefslogtreecommitdiff
path: root/635/CH1/EX1.2
diff options
context:
space:
mode:
Diffstat (limited to '635/CH1/EX1.2')
-rwxr-xr-x635/CH1/EX1.2/Ch01Ex2.sci14
1 files changed, 14 insertions, 0 deletions
diff --git a/635/CH1/EX1.2/Ch01Ex2.sci b/635/CH1/EX1.2/Ch01Ex2.sci
new file mode 100755
index 000000000..50be14759
--- /dev/null
+++ b/635/CH1/EX1.2/Ch01Ex2.sci
@@ -0,0 +1,14 @@
+// Scilab Code Ex1.2 Primitive unit cell: Page-4 (2010)
+a = 3, b = 3; // Lattice translation vectors along X and Y direction, angstrom
+c_bar = 3; // Assumed translation vector along Z direction, angstrom
+c = 1.5*(a+b+c_bar); // Real translation vector along Z direction, angstrom
+printf("\n%3.1f is the body centered position of a cubic unit cell defined by the primitive translation vectors a, b and c_bar.", c);
+V_con = a^3; // Volume of conventional unit cell, metre cube
+V_primitive = 1/2*V_con; // Volume of primitive unit cell, metre cube
+printf("\nThe volume of conventional unit cell: %2d angstrom cube", V_con);
+printf("\nThe volume of primitive unit cell: %4.1f angstrom cube", V_primitive);
+
+// Result
+// 13.5 is the body centered position of a cubic unit cell defined by the primitive translation vectors a, b and c_bar.
+// The volume of conventional unit cell: 27 angstrom cube
+// The volume of primitive unit cell: 13.5 angstrom cube \ No newline at end of file