{
 "metadata": {
  "name": "",
  "signature": "sha256:030c93395768b2f42836485175665cce8f1a2b5170495494504b4c018dda5636"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 12 :\n",
      "Oxidation and Corrosion"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.1 Page No : 395"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "D = 320*10**-3;\t\t\t#in meter\n",
      "L = 1;\t\t\t#in meter\n",
      "\n",
      "# Calculation\n",
      "A = math.pi*D*L;\t\t\t#Surface area in meter**2\n",
      "l = (200/A);\n",
      "\n",
      "# Results\n",
      "print 'the distance at which magnisium anode capable of giving 2MA = %.0f meters'%l\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the distance at which magnisium anode capable of giving 2MA = 199 meters\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 12.2 Page No : 396"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "import math \n",
      "\n",
      "# Variables\n",
      "W = 0.0243;\t\t\t#1 mole of magnesium weight(in Kg)\n",
      "C = 2*96490;\t\t\t#used charge (in A-s)\n",
      "A = 15*10**(-3);\t\t\t#current density (in A/metre2)\n",
      "t = 10;\t\t\t#time (in years)\n",
      "T = 10*365*24*3600;\t\t\t#time (in sec)\n",
      "\n",
      "# Calculation\n",
      "#amount of magnesium required  = charge required per m2 of hull surface for a design life of 10 years/(used charge for anode)\n",
      "Mg_required = W*A*T/C;\t\t\t#magnesium required per square meter of the hull surface for a design life of 10 years\n",
      "\n",
      "# Results\n",
      "print 'magnesium required per square meter of the hull surface for a design life of 10 years = %.1f Kg/m2'%Mg_required\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "magnesium required per square meter of the hull surface for a design life of 10 years = 0.6 Kg/m2\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}