{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3:Lubricants"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:1,Page no:27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=4.55#weight f oil saponified(gms)#\n",
	"volume=2.1#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.02#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.517 mg/g\n",
        ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:2,Page no:28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=10.#weight f oil saponified(gms)#\n",
	"volume=2.4#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.02#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3)-.001,\"mg/g\"\n",
      "print\"\\nAs the acid value is more than 0.1, oil cannot be used for lubrication\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.268 mg/g\n",
	"\n",
	"As the acid value is more than 0.1, oil cannot be used for lubrication\n",
        ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:3,Page no:28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=20.#volume of oil saponified(ml)#\n",
	"den_oil=0.86#density f oil saponified(gm/ml)#\n",
	"volume=2.5#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.1#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.814 mg/g\n",
        ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:4,Page no:29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=10.#volume of oil saponified(ml)#\n",
	"den_oil=0.92#density f oil saponified(gm/ml)#\n",
	"volume=4#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.01#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.243 mg/g\n",
        ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:5,Page no:27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=9.#volume of oil saponified(ml)#\n",
	"den_oil=0.81#density f oil saponified(gm/ml)#\n",
	"volume=1.5#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.04#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.461 mg/g\n",
        ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:6,Page no:30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=20.#volume of oil saponified(ml)#\n",
	"den_oil=0.86#density f oil saponified(gm/ml)#\n",
	"volume=2.8#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=1./10.#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3)-.001,\"mg/g\"\n",
      "print\"\\nAs the acid value is more than 0.1, oil cannot be used for lubrication\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.911 mg/g\n",
	"\n",
	"As the acid value is more than 0.1, oil cannot be used for lubrication\n",
        ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:7,Page no:30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=7.#volume of oil saponified(ml)#\n",
	"den_oil=0.88#density f oil saponified(gm/ml)#\n",
	"volume=3.8#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.02#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,2),\"mg/g\"\n",
      "print\"\\nAs the acid value is more than 0.1, oil cannot be used for lubrication\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.69 mg/g\n",
	"\n",
	"As the acid value is more than 0.1, oil cannot be used for lubrication\n",
        ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:8,Page no:31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=6.#volume of oil saponified(ml)#\n",
	"den_oil=0.91#density f oil saponified(gm/ml)#\n",
	"volume=2.6#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.02#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3),\"mg/g\"\n",
      "print\"\\nAs the acid value is more than 0.1, oil cannot be used for lubrication\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.533 mg/g\n",
	"\n",
	"As the acid value is more than 0.1, oil cannot be used for lubrication\n",
        ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:9,Page no:31"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=1.3#weight f oil saponified(gms)#\n",
	"volume=0.8#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=0.001#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,5),\"mg/g\"\n",
      "print\"\\nAs the acid value is less than 0.1, oil can be used for lubrication\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.0.03446 mg/g\n",
	"\n",
	"As the acid value is less than 0.1, oil can be used for lubrication\n",
        ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:10,Page no:32"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"vol_oil=10.#volume of oil saponified(ml)#\n",
	"den_oil=0.91#density f oil saponified(gm/ml)#\n",
	"volume=5.#volume of alcoholic KOH consumed to neutralize fatty acids(ml)#\n",
	"normality_KOH=1./50#normality of KOH #\n",
      "\n",
      "#Calculation\n",
	"wt_oil=vol_oil*den_oil\n",
	"A=volume*normality_KOH*56./wt_oil#formula for acid value#\n",
       "\n",
      "#Result\n",
      "print\"\\nAcid value of oil is \",round(A,3),\"mg/g\"\n",
      "print\"\\nAs the acid value is more than 0.1, oil cannot be used for lubrication\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 0.615 mg/g\n",
	"\n",
	"As the acid value is more than 0.1, oil cannot be used for lubrication\n",
        ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:1,Page no:33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=2.5#weight f oil saponified(gms)#\n",
	"blank=49.0#volume blank titration reading(ml)#\n",
	"back=26.4#volume back titration reading(ml)#\n",
       "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"normality_KOH=0.4#normality of KOH#\n",
	"S=volume*normality_KOH*56/wt_oil#formula for saponification value#\n",
       "\n",
      "#Result\n",
      "print\"\\nSaponification value of oil is \",round(S,3),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Saponification value of oil is 202.496 mg/g\n",
        ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:2,Page no:33"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=5.#weight f oil saponified(gms)#\n",
	"blank=44.0#volume blank titration reading(ml)#\n",
	"back=17.#volume back titration reading(ml)#\n",
       "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"normality_KOH=0.5#normality of KOH#\n",
	"S=volume*normality_KOH*56/wt_oil#formula for saponification value#\n",
       "\n",
      "#Result\n",
      "print\"\\nSaponification value of oil is \",round(S,1),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Saponification value of oil is 151.2 mg/g\n",
        ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:3,Page no:34"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n","S=180.#Saponification value of oil#\n",
	"wt_oil=1.#weight f oil saponified(gms)#\n",
	"blank=50.#volume blank titration reading(ml)#\n",
	"normality_KOH=0.4#normality of KOH #\n",
       "\n",
      "#Calculation\n",
	"volume=S*wt_oil/(normality_KOH*56)#formula for saponification value#\n",
	"back=blank-volume#volume of alcoholic KOH consumed(ml)#\n",       "\n",
      "#Result\n",
      "print\"\\nQuantity of alcoholic KOH required per gram is \",round(back),\"ml\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Quantity of alcoholic KOH required per gram is 42.0 ml\n",
        ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:4,Page no:35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=2.5#weight f oil saponified(gms)#\n",
	"blank=40.#volume blank titration reading(ml)#\n",
	"back=20.#volume back titration reading(ml)#\n",
	"normality_KOH=0.25#normality of KOH #\n",
	"normality_HCl=.5#normality of HCl#\n",
       "\n",
      "#Calculation\n",
	"e=normality_HCl/normality_KOH#for equivalence in titration #\n",
	"volume=(blank-back)*e#volume of alcoholic KOH consumed(ml)#\n",
	"S=volume*normality_KOH*56/wt_oil#formula for saponification value#\n",
        "\n",
      "#Result\n",
      "print\"\\nSaponification value of oil is \",round(S),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Saponification value of oil is 224.0 mg/g\n",
        ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:5,Page no:35"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"S_C=192.#Saponification value of castor oil#\n",
	"wt_oil=16.#weight f oil saponified(gms)#\n",
	"blank=45.#volume blank titration reading(ml)#\n",
	"back=31.5#volume back titration reading(ml)#\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"N_H=0.5#normality of HCl in titration#\n",
      "\n",
      "#Calculation\n",
	"V_H=blank#volume of HCl in titration(ml)#\n",
	"V_K=50.#volume of KOH in titration(ml)#\n",
	"N_K=N_H*V_H/V_K#normality of KOH for equivalence#\n",
	"S_blended=volume*N_K*56./wt_oil#formula for saponification value#\n",
	"pc_C=(S_blended/S_C)*100#blend percentage#\n",
       "\n",
      "#Result\n",
      "print\"\\nPercentage of castor oil in blend is \",round(pc_C,3),\"%\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Percentage of castor oil in blend is 11.074 %\n",
        ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:6,Page no:36"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=3.#weight f oil saponified(gms)#\n",
	"blank=36.0#volume blank titration reading(ml)#\n",
	"back=12.#volume back titration reading(ml)#\n",
       "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"normality_KOH=0.5#normality of KOH#\n",
	"S=volume*normality_KOH*56/wt_oil#formula for saponification value#\n",
       "\n",
      "#Result\n",
      "print\"\\nSaponification value of oil is \",round(S),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Saponification value of oil is 224.0 mg/g\n",
        ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:7,Page no:37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=1.55#weight f oil saponified(gms)#\n",
	"blank=20.0#volume blank titration reading(ml)#\n",
	"back=15.#volume back titration reading(ml)#\n",
       "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"normality_KOH=0.5#normality of KOH#\n",
	"S=volume*normality_KOH*56/wt_oil#formula for saponification value#\n",
       "\n",
      "#Result\n",
      "print\"\\nSaponification value of oil is \",round(S,2),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Saponification value of oil is 90.32 mg/g\n",
        ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:8,Page no:37"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"wt_oil=1.25#weight f oil saponified(gms)#\n",
	"blank=50.0#volume blank titration reading(ml)#\n",
	"back=7.5#volume back titration reading(ml)#\n",
       "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"normality_KOH=0.1#normality of KOH#\n",
	"S=volume*normality_KOH*56/wt_oil#formula for saponification value#\n",
       "\n",
      "#Result\n",
      "print\"\\nSaponification value of oil is \",round(S,1),\"mg/g\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Saponification value of oil is 190.4 mg/g\n",
        ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:9,Page no:38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"S_C=188.#Saponification value of castor oil#\n",
	"wt_oil=12.3#weight f oil saponified(gms)#\n",
	"blank=45.#volume blank titration reading(ml)#\n",
	"back=30.2#volume back titration reading(ml)#\n",
      "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"N=0.5#normality of KOH for equivalence#\n",
	"S_blended=volume*N*56./wt_oil#formula for saponification value#\n",
	"pc_C=(S_blended/S_C)*100\n",
       "\n",
      "#Result\n",
      "print\"\\nPercentage of castor oil in blend is \",round(pc_C,2),\"%\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Acid value of oil is 17.92 %\n",
        ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example no:10,Page no:38"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
	"S_C=191.#Saponification value of castor oil#\n",
	"wt_oil=2.5#weight f oil saponified(gms)#\n",
	"blank=40.#volume blank titration reading(ml)#\n",
	"back=24.#volume back titration reading(ml)#\n",
      "\n",
      "#Calculation\n",
	"volume=blank-back#volume of alcoholic KOH consumed(ml)#\n",
	"N=0.5#normality of KOH for equivalence#\n",
	"S_blended=volume*N*56./wt_oil#formula for saponification value#\n",
	"pc_C=(S_blended/S_C)*100\n",
       "\n",
      "#Result\n",
      "print\"\\nPercentage of castor oil in blend is \",round(pc_C,2),\"%\"\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "Percentage of castor oil in blend is 93.82 %\n",
        ]
      }
     ],
     "prompt_number": 20
    },
   ],
   "metadata": {}
  }
 ]
}