summaryrefslogtreecommitdiff
path: root/Fluid_mechanics_by_Pao/Chapter_6.ipynb
blob: 424aea7ac175981540ad417a21069e2950a3f5b7 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:27148bed2cbad8357ddcdc8e0ee434be3797107d2f692797bdf3a1e36c7e8d1a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 - Dimensional analysis and model similitude"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3 - Pg 230"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the flow rate of water and pressure drop\n",
      "#Initialization of variables\n",
      "dg=0.5 #in\n",
      "dw=12. #in\n",
      "rhog=0.022 #slug/ft^3\n",
      "rhow=1.94 #slug/ft^3\n",
      "muw=2.34e-5 #lb-sec/ft^2\n",
      "mug=3.50e-7 #lb-sec/ft^2\n",
      "Qg=0.15 #ft^3/s\n",
      "dpg=100. #lb/ft^2\n",
      "#calculations\n",
      "Vr=dg/dw *rhog/rhow *muw/mug\n",
      "Qr=Vr*dw*dw /dg/dg\n",
      "Qw=Qr*Qg\n",
      "dpr=rhow/rhog *(Vr)*Vr\n",
      "dpw=dpr*dpg\n",
      "#results\n",
      "print '%s %.2f %s' %(\"Flow rate of water =\",Qw,\"ft^3/s\")\n",
      "print '%s %.1f %s' %(\"\\n Pressure drop =\",dpw,\"lb/ft^2\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Flow rate of water = 2.73 ft^3/s\n",
        "\n",
        " Pressure drop = 8.8 lb/ft^2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4 - Pg 231"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#calculate the velocity ratio, time ratio, acceleration ratio and force ratio.\n",
      "#Initialization of variables\n",
      "import math\n",
      "Lr=1./10.\n",
      "rhom=2.\n",
      "rhop=1.94\n",
      "#calculations\n",
      "Vr=math.sqrt(Lr)\n",
      "Tr=Lr/Vr\n",
      "ar=Vr/Tr\n",
      "Fr=rhom/rhop *ar*Lr*Lr*Lr\n",
      "#results\n",
      "print '%s %.4f' %(\"Velocity ratio = \",Vr)\n",
      "print '%s %.4f' %(\"\\n Time ratio = \",Tr)\n",
      "print '%s %d' %(\"\\n Acceleration ratio = \",ar)\n",
      "print '%s %.6f' %(\"\\n Force ratio = \",Fr)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Velocity ratio =  0.3162\n",
        "\n",
        " Time ratio =  0.3162\n",
        "\n",
        " Acceleration ratio =  1\n",
        "\n",
        " Force ratio =  0.001031\n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}