{
 "metadata": {
  "name": "",
  "signature": "sha256:e51408600d11e929cd24c31057edae00d199336d2c2b7260dda7e3b7642c128f"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3 : Conservation Principle of Mass"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.3 Page No : 100"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\t\t\t\n",
      "#Initialization of variables\n",
      "d1 = 60. \t\t\t#diameter of a section of pipe - cm\n",
      "V1 = 45. \t\t\t#velocity of water - cm/s\n",
      "d2 = 90. \t\t\t#diameter of enlarged section - cm\n",
      "\t\t\t\n",
      "#calculations\n",
      "V2 = V1*d1**2 /d2**2\n",
      "Q = math.pi/4 *d1**2 *V1 *10**-6\n",
      "\t\t\t\n",
      "#results\n",
      "print \"Velocity at point 2  =  %d cm/s\"%(V2)\n",
      "print \" FLow rate  =  %.4f m**3/s\"%(Q)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity at point 2  =  20 cm/s\n",
        " FLow rate  =  0.1272 m**3/s\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.4 Page No : 100"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\t\t\t\n",
      "#Initialization of variables\n",
      "dn1 = 4 \t\t\t#spacing between streamlines - cm\n",
      "v1 = 300. \t\t\t#velocity - cm/s\n",
      "dn2 = 2.5 \t\t\t#spacing - cm\n",
      "\t\t\t\n",
      "#calculations\n",
      "v2 = v1*dn1/dn2\n",
      "\t\t\t\n",
      "#results\n",
      "print \"Velocity  =  %.1f m/s\"%(v2/100)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity  =  4.8 m/s\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}