summaryrefslogtreecommitdiff
path: root/backup/mechanics_of_fluid_version_backup/Chapter4-.ipynb
blob: be52c7b9fe944fa71150394e4062084b910a02f4 (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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{
 "metadata": {
  "name": "",
  "signature": "sha256:745d131b65427d77eef09608cde1afafe8a3c0b2b5d38233f35ec5b6ceb45ab5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter4- The Momentum Equation"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg140"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The Hydrodynamic force on the vane and resultant force of  angle \n",
      "rho=1000.; ## kg/m^3\n",
      "u1=36.; ## m/s\n",
      "u2=30.; ## m/s\n",
      "d=0.05; ## m\n",
      "theta=60.; ## degrees\n",
      "\n",
      "A=math.pi/4.*d**2.;\n",
      "\n",
      "Q=A*u1;\n",
      "\n",
      "F_x=rho*Q*(u2*(math.cos(theta/57.3)) - u1);\n",
      "F_y=rho*Q*u2*math.sin(theta/57.3);\n",
      "\n",
      "F=math.sqrt(F_x**2+F_y**2);\n",
      "phi=math.atan((F_y/F_x));\n",
      "\n",
      "print'%s %.1f %s'%(\"The Hydrodynamic force on the vane =\",F,\"N\")\n",
      "\n",
      "\n",
      "print'%s %.1f %s'%(\"This resultant force acts at angle of\",phi*180/math.pi,\"to the x-direction\")\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Hydrodynamic force on the vane = 2361.2 N\n",
        "This resultant force acts at angle of -51.1 to the x-direction\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-143"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The net horizontal force exerted by the water onthe bend and resultant force of  angle\n",
      "Q1=0.45; ## m**3/s\n",
      "Q2=0.425; ## m**3/s\n",
      "d1=0.6; ## m\n",
      "d2=0.3; ## m\n",
      "p1=1.4*10.**5.; ## Pa\n",
      "rho=1000.; ## kg/m**3\n",
      "theta=45/57.3; ## degrees\n",
      "\n",
      "A1=math.pi/4*d1**2;\n",
      "A2=math.pi/4*d2**2;\n",
      "\n",
      "u1=Q1/A1;\n",
      "u2=Q2/A2;\n",
      "\n",
      "p2=p1+rho/2.*(u1**2-u2**2.);\n",
      "\n",
      "F_x=rho*Q2*(u2*math.cos(theta)-u1)-p1*A1+p2*A2*math.cos(theta)\n",
      "F_y=rho*Q2*(u2*math.sin(theta)-0)+p2*A2*math.sin(theta);\n",
      "\n",
      "F=math.sqrt(F_x**2+F_y**2);\n",
      "phi=math.atan(F_y/F_x);\n",
      "\n",
      "print'%s %.1f %s'%(\"The net horizontal force exerted by the water onthe bend =\",F,\"N\")\n",
      "\n",
      "\n",
      "print'%s %.1f %s'%(\"This resultant force acts at angle of\",phi*57.3,\"to the x-direction\")"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The net horizontal force exerted by the water onthe bend = 33263.1 N\n",
        "This resultant force acts at angle of -13.9 to the x-direction\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg154"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#calculate The thrust on the turbine and Power generated by the turbine\n",
      "rho=1.2; ## kg/m**3\n",
      "d=12.; ## m\n",
      "u1=20.; ## m/s\n",
      "u4=8.; ## m/s\n",
      "\n",
      "A=math.pi/4.*d**2\n",
      "F=rho*A*(u1+u4)/2.*(u1-u4);\n",
      "\n",
      "print'%s %.3f %s'%(\"The thrust on the turbine = \",F,\"N\")\n",
      "\n",
      "P=rho*A*(u1+u4)/2.*(u1**2/2.-u4**2/2.);\n",
      "print'%s %.2f %s'%(\"Power generated by the turbine =\",P,\"W\")\n",
      "#in book it is converted into kw\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thrust on the turbine =  22800.423 N\n",
        "Power generated by the turbine = 319205.92 W\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}