Commit eeebbe1a authored by Sherri Hadian's avatar Sherri Hadian
Browse files

Change Dichromatic notebook

parent fd9b52d6
Loading
Loading
Loading
Loading
+33 −25
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 10,
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
@@ -13,6 +13,8 @@
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "from mpl_toolkits.mplot3d import Axes3D\n",
    "\n",
    "# import the python scripts:\n",
    "import csl_generator as csl\n",
    "\n",
    "%matplotlib notebook"
@@ -27,7 +29,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
@@ -64,7 +66,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
@@ -106,7 +108,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
@@ -119,7 +121,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
@@ -192,7 +194,7 @@
       "4    [2, -1, 0]    [2, 0, -1]  Mixed"
      ]
     },
     "execution_count": 5,
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -209,7 +211,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
@@ -261,7 +263,7 @@
       "2     [1, 1, 1]     [1, 1, 1]  Twist"
      ]
     },
     "execution_count": 6,
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -282,7 +284,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
@@ -299,7 +301,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
@@ -383,12 +385,15 @@
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot the twist boundary plane with the DSC vectors (the small CSL repeat vectors)"
    "### Plot the twist boundary plane with the DSC vectors (the small CSL repeat vectors)\n",
    "#### _DSC vectors are the smallest vectors that keep the symmetry of the CSL lattice intact. They are therefore possible_\n",
    "#### _Burgers vectors of grain boundary dislocations. To know more about this I refer you to:_\n",
    "#### _'Interfaces in crystalline materials', Sutton and Balluffi, clarendon press, 1996._ \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
@@ -1186,10 +1191,10 @@
    {
     "data": {
      "text/plain": [
       "[<mpl_toolkits.mplot3d.art3d.Line3D at 0x11b9e9f98>]"
       "[<mpl_toolkits.mplot3d.art3d.Line3D at 0x125393860>]"
      ]
     },
     "execution_count": 11,
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -1199,10 +1204,10 @@
    "\n",
    "# function to plot a line \n",
    "\n",
    "def PlotLine(Vec, origin=[0,0,0], end=1, color='k'):    \n",
    "    return (ax.plot([origin[0], end*Vec[0] + origin[0]], \n",
    "       [origin[1], end*Vec[1] + origin[1]],\n",
    "       [origin[2], end*Vec[2]+ origin[2]], str(color)))\n",
    "def PlotLine(Vec, origin=[0,0,0], length=1, color='k'):    \n",
    "    return (ax.plot([origin[0], length*Vec[0] + origin[0]], \n",
    "       [origin[1], length*Vec[1] + origin[1]],\n",
    "       [origin[2], length*Vec[2]+ origin[2]], str(color)))\n",
    "\n",
    "\n",
    "# def PlotLine(Vec, origin=0, end=1, color='k'):    \n",
@@ -1230,13 +1235,13 @@
   "source": [
    "### A more advanced example of the usage of the CSL lattice in creating large facets:\n",
    "####  _This is how I created a large two-faceted structure by decomposing the high index boundary plane onto two_ \n",
    "#### _lower energy facets. All the 3 planes are CSL planes and form a triangle. Follow the link to the paper:_\n",
    "#### _lower energy facets. All the 3 planes are CSL planes and form a triangle. To know more follow the link to the paper:_\n",
    "#### __(https://journals.aps.org/prmaterials/abstract/10.1103/PhysRevMaterials.2.043601)__\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
@@ -1309,7 +1314,7 @@
       "268   [7, 0, -7]   [3, 5, -8]  Tilt"
      ]
     },
     "execution_count": 12,
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -1320,7 +1325,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
@@ -1331,7 +1336,7 @@
  },
  {
   "cell_type": "code",
   "execution_count": 214,
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
@@ -2132,7 +2137,7 @@
       "(-20, 3)"
      ]
     },
     "execution_count": 214,
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
@@ -2140,6 +2145,9 @@
   "source": [
    "ax = PlotPlane(v1, lim=27)\n",
    "\n",
    "# I intended to decompose the mixed grain boundary [7, 16, -29] into two lower energy facets.\n",
    "# 1 unit vector of  = 7 units of {1 2 3} plane + 2 units of {0 1 4}. \n",
    "\n",
    "PlotLine(dot(R,[7, 16, -29]), color='r')\n",
    "PlotLine(dot(R,[1, 2, -3]), end=7, color='r')\n",
    "PlotLine(dot(R,[0, 1, -4]), origin=dot(R,7*np.array([1, 2, -3])), end=2, color='r') \n",