summaryrefslogtreecommitdiff
path: root/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb')
-rwxr-xr-xOscillations_and_Waves_by_S._Prakash/chapter12.ipynb524
1 files changed, 524 insertions, 0 deletions
diff --git a/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb b/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb
new file mode 100755
index 00000000..ba23123e
--- /dev/null
+++ b/Oscillations_and_Waves_by_S._Prakash/chapter12.ipynb
@@ -0,0 +1,524 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 12, Doppler's Effect"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1, page 457"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Speed\n",
+ "#given data :\n",
+ "vl=166 #m/s\n",
+ "v=(2*vl) #m/s\n",
+ "print \"Speed = %0.f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed = 332 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2, page 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "#given data :\n",
+ "f1=90 #vibrations/second\n",
+ "f2=(1+(1/10))*f1 #vibrations/s\n",
+ "print \"Frequency = %0.f vibrations/s \"%f2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency = 99 vibrations/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3, page 458"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "#given data :\n",
+ "N=400 #hZ\n",
+ "V=340 #M/S\n",
+ "VS=60 #M/S\n",
+ "N2=((V/(V-VS))*N) #Hz\n",
+ "print \"Frequency when engine is approaching to the listner = %0.f Hz \" %round(N2)\n",
+ "N3=((V/(V+VS))*N) #Hz\n",
+ "print \"Frequency when engine is moving away from the listner = %0.f Hz \" %N3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency when engine is approaching to the listner = 486 Hz \n",
+ "Frequency when engine is moving away from the listner = 340 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4, page 459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#WAVELENGTH\n",
+ "x=1/5 #\n",
+ "h=60 #cm\n",
+ "h1=((1-x)*h) #cm\n",
+ "h2=((1+x)*h) #cm\n",
+ "print \"Wavelength of waves in north-direction = %0.f cm \" %h1\n",
+ "print \"Wavelength of waves in south-direction = %0.f cm\" %h2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Wavelength of waves in north-direction = 48 cm \n",
+ "Wavelength of waves in south-direction = 72 cm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5, page 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=340 #m/s\n",
+ "n=600 #Hz\n",
+ "vs=36 #km h**-1\n",
+ "vs1=vs*(1000/3600) #m/s\n",
+ "apf=((v)/(v-vs1))*n #Hz\n",
+ "vs2=54 #km h**-1\n",
+ "vs3=vs2*(1000/3600) #m/s\n",
+ "apf1=((v)/(v+vs3))*n #Hz\n",
+ "print \"Two apparent frequencies are\",round(apf,1),\"Hz and\",round(apf1,2),\"Hz.\"\n",
+ "df=apf-apf1 #Hz\n",
+ "print \"Difference in frequencies = %0.2f Hz\" %df\n",
+ "#second apparent frequency and difference is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Two apparent frequencies are 618.2 Hz and 574.65 Hz.\n",
+ "Difference in frequencies = 43.53 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6, page 460"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=330 #m/s\n",
+ "n=500 #Hz\n",
+ "vs=30 #km h**-1\n",
+ "vs1=vs*(1000/3600) #m/s\n",
+ "n3=((v+vs1)/(v-vs1))*n #Hz\n",
+ "print \"Frequency when cars are approaching = %0.f Hz \" %round(n3)\n",
+ "n1=((v-vs1)/(v+vs1))*n #Hz\n",
+ "print \"Frequency when cars have crossed = %0.f Hz\" %round(n1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency when cars are approaching = 526 Hz \n",
+ "Frequency when cars have crossed = 475 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7, page 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=330 #m/s\n",
+ "n=600 #Hz\n",
+ "vs=20 #m/s\n",
+ "apf=((v)/(v+vs))*n #Hz\n",
+ "print \"Frequency when source is moving away from the observer = %0.f Hz \" %round(apf)\n",
+ "apf1=((v)/(v-vs))*n #Hz\n",
+ "print \"Frequency when siren reaching at the cliff = %0.f Hz \" %round(apf1)\n",
+ "bf=apf1-apf #Hz\n",
+ "print \"Beat frequency = %0.f Hz \" %round(bf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency when source is moving away from the observer = 566 Hz \n",
+ "Frequency when siren reaching at the cliff = 639 Hz \n",
+ "Beat frequency = 73 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 8, page 461"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "#frequency\n",
+ "r=3 #m\n",
+ "w=10 #s**-1\n",
+ "vs=r*w #m/s\n",
+ "A=6 #m\n",
+ "fd=5/pi #s**-1\n",
+ "vmax=A*2*pi*fd #m/s\n",
+ "v=330 #m/s\n",
+ "n=340 #Hz\n",
+ "nmax=((v+vmax)/(v-vs))*n #Hz\n",
+ "nmin=((v-vmax)/(v+vs))*n #Hz\n",
+ "print \"Maximum frequency = %0.f Hz \" %nmax\n",
+ "print \"Minimum frequency = %0.f Hz \" %nmin"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum frequency = 442 Hz \n",
+ "Minimum frequency = 255 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 9, page 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#speed\n",
+ "n12=3 #\n",
+ "n=340 #Hz\n",
+ "v=340 #m/s\n",
+ "vs=((n12*v)/(2*n)) #m/s\n",
+ "print \"Speed = %0.2f m/s \" %vs"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Speed = 1.50 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10, page 463"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt\n",
+ "#frequency\n",
+ "sa=1.5 #km\n",
+ "oa=1 #km\n",
+ "so=sqrt(oa**2+sa**2) #km\n",
+ "csd=sa/so #\n",
+ "v=0.33 #km/s\n",
+ "n=400 #Hz\n",
+ "vlov=120*(1000/3600) #m/s\n",
+ "vs1=(1/30)*csd #km/s\n",
+ "nd=((v)/(v-vs1))*n #vibrations/sec\n",
+ "print \"Apparent frequency = %0.f vibrations/second \" %round(nd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Apparent frequency = 437 vibrations/second \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11, page 464"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#frequency\n",
+ "v=1200 #km/h\n",
+ "w=40 #km/h\n",
+ "vs=40 #km/h\n",
+ "n=580 #Hz\n",
+ "nd=((v+vs)/((v+vs)-vs))*n #Hz\n",
+ "print \"Frequency of the whistle as heared by an observer on the hill = %0.2f Hz \" %nd\n",
+ "x=29/30 #km\n",
+ "print \"Distance = %0.2f m \" %(x*1000)\n",
+ "ndd=((v-w)+vs)/((v-w))*nd #Hz\n",
+ "print \"Frequency heared by driver = %0.2f Hz \" %ndd\n",
+ "#distance is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of the whistle as heared by an observer on the hill = 599.33 Hz \n",
+ "Distance = 966.67 m \n",
+ "Frequency heared by driver = 620.00 Hz \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 12, page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#doppler shift and velocity\n",
+ "h1=6010 #\u00c5\n",
+ "h2=6000 #\u00c5\n",
+ "ds=h1-h2 #\u00c5\n",
+ "print \"Doppler shift = %0.f \u00c5 \" %ds\n",
+ "c=3*10**8 #m/s\n",
+ "v=((ds/h2)*c) #m/s\n",
+ "print \"Speed = %0.e m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Doppler shift = 10 \u00c5 \n",
+ "Speed = 5e+05 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 13, page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#doppler shift and velocity\n",
+ "h1=3737 #\u00c5\n",
+ "h2=3700 #\u00c5\n",
+ "ds=h1-h2 #\u00c5\n",
+ "print \"Doppler shift = %0.f \u00c5 \" %ds\n",
+ "c=3*10**8 #m/s\n",
+ "v=((ds/h2)*c) #m/s\n",
+ "print \"Speed = %0.e m/s \" %v\n",
+ "#speed is calculated wrong in the textbook"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Doppler shift = 37 \u00c5 \n",
+ "Speed = 3e+06 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 14, page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#speed\n",
+ "dv=10**3 #Hz\n",
+ "v=5*10**9 #Hz\n",
+ "c=3*10**8 #m/s\n",
+ "v=((dv)/(2*v))*c #m/s\n",
+ "print \"Velocity = %0.f m/s \" %v"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Velocity = 30 m/s \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}