diff options
author | hardythe1 | 2015-05-05 14:21:39 +0530 |
---|---|---|
committer | hardythe1 | 2015-05-05 14:21:39 +0530 |
commit | 435840cef00c596d9e608f9eb2d96f522ea8505a (patch) | |
tree | 4c783890c984c67022977ca98432e5e4bab30678 /Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb | |
parent | aa1863f344766ca7f7c20a395e58d0fb23c52130 (diff) | |
download | Python-Textbook-Companions-435840cef00c596d9e608f9eb2d96f522ea8505a.tar.gz Python-Textbook-Companions-435840cef00c596d9e608f9eb2d96f522ea8505a.tar.bz2 Python-Textbook-Companions-435840cef00c596d9e608f9eb2d96f522ea8505a.zip |
add books
Diffstat (limited to 'Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb')
-rwxr-xr-x | Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb | 144 |
1 files changed, 144 insertions, 0 deletions
diff --git a/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb b/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb new file mode 100755 index 00000000..763a53c2 --- /dev/null +++ b/Applied_Physics/Chapter_03_Planes_in_Crystals.ipynb @@ -0,0 +1,144 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:1ec2372be7a9974010a31557c9658c85707025e7a87f82e6ef26be63dbcfb0e7"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3:Planes in Crystals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11 , Page no:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given\n",
+ "h=3;\n",
+ "k=2;\n",
+ "l=1; #miller indices\n",
+ "a=4.2E-8; #in cm (lattice constant)\n",
+ "\n",
+ "#calculate\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
+ "d=d*1E8; #changing unit from cm to Angstrom\n",
+ "\n",
+ "#result\n",
+ "print\"The interplanar spacing is d=\",round(d,2),\"cm\";\n",
+ "print\"\\t\\t\\t d=\",round(d,2),\"Angstrom\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The interplanar spacing is d= 1.12 cm\n",
+ "\t\t\t d= 1.12 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12 , Page no:61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given\n",
+ "h=1;k=1;l=1; #miller indices\n",
+ "a=2.5;b=2.5;c=1.8; #in Angstrom (lattice constants for tetragonal lattice )\n",
+ "\n",
+ "#calculate\n",
+ "d=1/math.sqrt((h/a)**2+(k/b)**2+(l/c)**2); #calculation for interplanar spacing\n",
+ "\n",
+ "#result\n",
+ "print\"The lattice spacing is d=\",round(d,2),\"Angstrom\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The lattice spacing is d= 1.26 Angstrom\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15 , Page no:63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from __future__ import division\n",
+ "\n",
+ "#given\n",
+ "h=1;k=0;l=0; #miller indices\n",
+ "a=2.5; #in Angstrom (lattice constant)\n",
+ "\n",
+ "#calculate\n",
+ "a=a*1E-10; #hence a is in Angstrom\n",
+ "d=a/math.sqrt(h**2+k**2+l**2); #calculation for interplanar spacing\n",
+ "p=d/a**3;\n",
+ "\n",
+ "#result\n",
+ "print\"The density is p=\",round(p),\"lattice points/m^2\";"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The density is p= 1.6e+19 lattice points/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |