summaryrefslogtreecommitdiff
path: root/Engineering_Physics_by_Uma_Mukherji/Chapter4.ipynb
blob: ee675097747332a5669c1b218151c83aebabd199 (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
{
 "metadata": {
  "name": "",
  "signature": "sha256:e2b842be083bc61cf1d1d9ada89de2502dedfb3d340e5f3b6d0b51d6c790688a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "4: Ultrasonic"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.1, Page number 84"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "V1=343;     #velocity of air(m/s)\n",
      "V2=1372;    #velocity f water(m/s)\n",
      "dt=3;       #time difference(s)\n",
      "\n",
      "\n",
      "#Calculation\n",
      "S=((V1*V2)*(dt))/(V2-V1);     #distance between two ships(m)\n",
      "\n",
      "#Result\n",
      "print \"distance between two ships is\",S,\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "distance between two ships is 1372.0 m\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.2, Page number 84"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "V=1700;     #velocity of sound(m/s)\n",
      "t=0.65;     #time(s)\n",
      "n=0.07*10**6;     #frequency of source(Hz)\n",
      "\n",
      "\n",
      "#Calculation\n",
      "d=(V*t)/2;      #depth of sea(m)\n",
      "lamda=V/n;      #wavelength of pulse(m)\n",
      "\n",
      "#Result\n",
      "print \"depth of sea is\",d,\"m\"\n",
      "print \"wavelength of pulse is\",round(lamda,4),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "depth of sea is 552.5 m\n",
        "wavelength of pulse is 0.0243 m\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 4.3, Page number 84"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "P=1;     \n",
      "l=40*10**-3;    #length of pure rod(m)\n",
      "E=115*10**9;    #Young's modulus(N/m**2)\n",
      "D=7.25*10**3;   #density of pure iron(kg/m**3)\n",
      "\n",
      "#Calculation\n",
      "n=(P/(2*l))*math.sqrt(E/D);    #natural frequency of pure rod(Hz) \n",
      "\n",
      "#Result\n",
      "print \"natural frequency of pure rod is\",round(n/10**3,1),\"kHz\"\n",
      "print \"answer given in the book is wrong\"\n",
      "print \"frequency of rod is more than audible range, rod can be used in magnetostriction oscillator\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "natural frequency of pure rod is 49.8 kHz\n",
        "answer given in the book is wrong\n",
        "frequency of rod is more than audible range, rod can be used in magnetostriction oscillator\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}