summaryrefslogtreecommitdiff
path: root/Problems_In_Hydraulics/ch4.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Problems_In_Hydraulics/ch4.ipynb')
-rwxr-xr-xProblems_In_Hydraulics/ch4.ipynb291
1 files changed, 291 insertions, 0 deletions
diff --git a/Problems_In_Hydraulics/ch4.ipynb b/Problems_In_Hydraulics/ch4.ipynb
new file mode 100755
index 00000000..aefd97a7
--- /dev/null
+++ b/Problems_In_Hydraulics/ch4.ipynb
@@ -0,0 +1,291 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f02a7c0105dc5d8192eae252809dedbf748fa59e0b9b78e4af3b1079610b7a69"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Orifices and Notches"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1 Page No : 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "Cd= 0.98 # velocity\n",
+ "g= 32.2 \t#ft/sec**2\n",
+ "H= 2. \t#ft\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v= math.sqrt(2*g*H)\n",
+ "t= H/v\n",
+ "h= 0.5*g*t**2\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'Vertical distance fallen in this ttime = %.3f ft'%(h) \n",
+ "\n",
+ "#Note : The answer given in textbook is wrong.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vertical distance fallen in this ttime = 0.500 ft\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2 Page No : 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "r= 53.4\n",
+ "T= 60. \t #F pressure of air\n",
+ "h= 29.7 \t#in of mercury\n",
+ "sm= 13.6\n",
+ "w= 62.4 \t#lb/ft**3\n",
+ "d= 1.5 \t#in diameter\n",
+ "Qin= 2. \t#cuses air\n",
+ "g=32.2 \t #ft/s**2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "W= h*sm*w/(r*(460+T)*12)\n",
+ "dP= 0.75*w/(12*W)\n",
+ "Q= math.sqrt(2*g*dP)*math.pi*d**2/(4*144)\n",
+ "W= Q*W*60\n",
+ "Cd= Qin/W\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'coefficient of discharge = %.2f '%(Cd) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "coefficient of discharge = 0.62 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3 Page No : 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "H1= 34. \t#ft height\n",
+ "H2= 8. \t #ft head\n",
+ "H3= 7. \t#ft pressure head\n",
+ "g= 32.2 \t#ft/sec**2\n",
+ "d= 1.5 \t #in\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "v2= math.sqrt(2*g*(H1+H2-H3))\n",
+ "Q= v2*math.pi*d**2/(4*144)\n",
+ "v3= (2*v2+math.sqrt(4*v2**2-4*6*(v2**2-H2*2*5*g)))/12\n",
+ "dr= math.sqrt(v2/v3)\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'ratio of diameteres = %.1f '%(dr) \n",
+ "print \" Maximum discharge = %.3f cusec\"%(Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ratio of diameteres = 1.6 \n",
+ " Maximum discharge = 0.583 cusec\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4 Page No : 54"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "Q1= 8./15 \t#cuses\n",
+ "Q2= 2./15 \t#cuses\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "A= math.degrees(math.atan(Q2/Q1))\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'Angle of inclination = %.2f degrees'%(A) \n",
+ "\n",
+ "# rounding off error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of inclination = 14.04 degrees\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5 Page No : 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "g= 32.2 \t#ft/sec**2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "r= g**2/((math.sqrt(2))**2*g**2)\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'coefficient of contraction = %.1f '%(r) \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "coefficient of contraction = 0.5 \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6 Page No : 56"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "\n",
+ "import math \n",
+ "\n",
+ "#initialisation of variables\n",
+ "B= 3. \t #ft long\n",
+ "H= 2. \t#ft depth of water\n",
+ "H1= 3.75 \t#ft \n",
+ "w= 4. \t#ft wide\n",
+ "g= 32.2 \t#ft/sec**2\n",
+ "\n",
+ "#CALCULATIONS\n",
+ "Q= 3.33*(B-(H1/5))*H**1.5\n",
+ "v= Q/(H*w)\n",
+ "kh= v**2/(2*g)\n",
+ "Q1= 3.33*(B-(H1/5)-kh)*(((H1/5)+kh)**1.5-kh**1.5)\n",
+ "\n",
+ "#RESULTS\n",
+ "print 'Discharge = %.2f cuses'%(Q1) \n",
+ "\n",
+ "\n",
+ "# NOte : ANSWER IN THE TEXTBOOK IS WRONG\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Discharge = 5.42 cuses\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file