summaryrefslogtreecommitdiff
path: root/Material_Science_by_S._L._Kakani_and_A._Kakani/ch12.ipynb
blob: 025ece08d03db4e1303c50b7497066da9cf7e1ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
 "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": {}
  }
 ]
}