{
 "metadata": {
  "name": "",
  "signature": "sha256:c6e5e1c4294a719070d1412094c85ff6cd99718ea66c74abcd23864bb9db9fd5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9 :\n",
      "Alloys Systems Phase Diagrams\n",
      "and Phase Transformations"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1 Page No : 317"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Calculation\n",
      "#Fulcrum is at 0.5% carbon\n",
      "#from lever rule\n",
      "Pro_f = ((0.80-0.5)/(0.80-0.0))*100;\t\t\t# % Proeutectoid ferrite\n",
      "Pea_f = 100-Pro_f;\t\t\t# % Pearlite ferrite\n",
      "\n",
      "# Results\n",
      "print 'Proeutectoid ferrite = %.1f %%'%Pro_f\n",
      "print 'Pearlite ferrite = %.1f %%'%Pea_f\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Proeutectoid ferrite = 37.5 %\n",
        "Pearlite ferrite = 62.5 %\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2 Page No : 317"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "N = 2;\n",
      "C = 2;\n",
      "\t\t\t#F = C-P+N\n",
      "P_1 = 1;\n",
      "P_2 = 2;\n",
      "P_3 = 3;\n",
      "P_4 = 4;\n",
      "\n",
      "# Calculation\n",
      "F_1 = C-P_1+N;\n",
      "F_2 = C-P_2+N;\n",
      "F_3 = C-P_3+N;\n",
      "F_4 = C-P_4+N;\n",
      "\n",
      "# Results\n",
      "print 'Degrees of freedom for 1 phase = ',F_1\n",
      "print 'Degrees of freedom for 2 phases = ',F_2\n",
      "print 'Degrees of freedom for 3 phases = ',F_3\n",
      "print 'Degrees of freedom for 4 phases = ',F_4\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Degrees of freedom for 1 phase =  3\n",
        "Degrees of freedom for 2 phases =  2\n",
        "Degrees of freedom for 3 phases =  1\n",
        "Degrees of freedom for 4 phases =  0\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3 Page No : 318"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "P = 4;\t\t\t#Number of phases exhibit by a material\n",
      "F = 0;\t\t\t#Minimum degrees of freedom\n",
      "\n",
      "# Calculation\n",
      "#modified form of the phase rule F = C-P+1\n",
      "C = F+P-1;\t\t\t#minimum number of components in the system\n",
      "\n",
      "# Results\n",
      "print 'the minimum number of components in the system = ',C\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the minimum number of components in the system =  3\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}